@wirecat/tg-cli 0.119.0 → 0.120.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/contracts/wirecat.json +2 -0
- package/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-NEQQOANM.js → adapter-OJKHXGBC.js} +49 -49
- package/dist/bundle/{all-profiles-QFT46FTF.js → all-profiles-URIWNL23.js} +10 -10
- package/dist/bundle/{anthropic-UJ4RYCWU.js → anthropic-YUKNB63B.js} +5 -5
- package/dist/bundle/{app-server-NE3EL5IK.js → app-server-H5QNHGH4.js} +43 -43
- package/dist/bundle/{bot-api-D4H5SCP5.js → bot-api-27GN4Y3D.js} +49 -49
- package/dist/bundle/{bot-history-KF2PUMWA.js → bot-history-VVSWLVZM.js} +18 -18
- package/dist/bundle/{bun-F7MH5YKA.js → bun-PAAJX3GU.js} +2 -2
- package/dist/bundle/{bun-sqlite-FYDJXUHF.js → bun-sqlite-TPEBWFZH.js} +5 -5
- package/dist/bundle/{chunk-XM3P7LLT.js → chunk-34DSPJNN.js} +2 -2
- package/dist/bundle/{chunk-QD27C3BG.js → chunk-3FPFRDG2.js} +10 -8
- package/dist/bundle/{chunk-OG2CG2GS.js → chunk-3GLLWDM6.js} +12 -12
- package/dist/bundle/{chunk-FQ3C6DFV.js → chunk-3SANNNWS.js} +3 -3
- package/dist/bundle/{chunk-G3MQOH6Z.js → chunk-4JATS2J5.js} +3 -3
- package/dist/bundle/{chunk-6OE5I3PR.js → chunk-4OWY7QBE.js} +6 -6
- package/dist/bundle/{chunk-QG5U6HCI.js → chunk-4W4EVVL4.js} +4 -4
- package/dist/bundle/{chunk-JKKEMVW3.js → chunk-6XHZV7AQ.js} +4 -4
- package/dist/bundle/{chunk-IAGX5VFL.js → chunk-7DPWVKYS.js} +4 -4
- package/dist/bundle/{chunk-5EHJWIW4.js → chunk-7I6YVQHW.js} +2 -2
- package/dist/bundle/{chunk-TKHEVAEG.js → chunk-7N4IUEX3.js} +8 -8
- package/dist/bundle/{chunk-HV5YYAJX.js → chunk-7VNV426X.js} +51 -18
- package/dist/bundle/{chunk-YMWPRHXG.js → chunk-7WS3ULOO.js} +1185 -426
- package/dist/bundle/{chunk-FJKP6MMP.js → chunk-B7B65ZLU.js} +2 -2
- package/dist/bundle/{chunk-3EQ7USKJ.js → chunk-CGUDXNJE.js} +2 -2
- package/dist/bundle/{chunk-4AACB23H.js → chunk-CLTMVPGT.js} +13 -13
- package/dist/bundle/{chunk-FQZSS3AB.js → chunk-CLURRDNU.js} +6 -6
- package/dist/bundle/{chunk-RGU2G3KL.js → chunk-CYWV2RLN.js} +4 -4
- package/dist/bundle/{chunk-F223KYWG.js → chunk-D2WNQJUQ.js} +1 -1
- package/dist/bundle/{chunk-6ERQJRL2.js → chunk-DDKFAUQD.js} +2 -2
- package/dist/bundle/{chunk-Z4CGZAFQ.js → chunk-DE7QIEUP.js} +34 -34
- package/dist/bundle/{chunk-7VUNJDYU.js → chunk-DH7VKHTZ.js} +4 -4
- package/dist/bundle/{chunk-L33G5ARH.js → chunk-DQTQO6PB.js} +1005 -768
- package/dist/bundle/{chunk-TEZKCH5B.js → chunk-FATTEYZH.js} +2 -2
- package/dist/bundle/{chunk-23JGV5FQ.js → chunk-FPWXG53C.js} +11 -11
- package/dist/bundle/{chunk-MDLSI3EN.js → chunk-H5XC2WYO.js} +35 -589
- package/dist/bundle/{chunk-UBCLVM7C.js → chunk-HDSKBXAF.js} +3 -3
- package/dist/bundle/{chunk-X5PDWCG7.js → chunk-HIBYYKGO.js} +1 -1
- package/dist/bundle/{chunk-HPQQ76WF.js → chunk-JJY3TQTM.js} +3 -3
- package/dist/bundle/{chunk-D6YTBJY6.js → chunk-JQLGS3SG.js} +1 -1
- package/dist/bundle/{chunk-2BAJ6ORN.js → chunk-JSEIT2WO.js} +1 -1
- package/dist/bundle/{chunk-BXIPT2BO.js → chunk-KLHOQ6XQ.js} +1 -1
- package/dist/bundle/{chunk-CX2WCEQU.js → chunk-KP26Y5OA.js} +1440 -248
- package/dist/bundle/{chunk-3K65KTXD.js → chunk-KRCMKFUV.js} +2 -2
- package/dist/bundle/{chunk-HGMMRT4G.js → chunk-KTV5Y5EX.js} +2 -2
- package/dist/bundle/{chunk-7C6POLLO.js → chunk-KW6JZGG3.js} +1 -1
- package/dist/bundle/{chunk-D4Y2KL5V.js → chunk-LLCGOZ44.js} +4 -4
- package/dist/bundle/{chunk-FRW3CWC7.js → chunk-LS72R7DN.js} +34 -34
- package/dist/bundle/{chunk-NDSRND3E.js → chunk-LVGX7VTD.js} +4 -4
- package/dist/bundle/{chunk-5FEEFXJA.js → chunk-MCPOZNWG.js} +1 -1
- package/dist/bundle/{chunk-6K5R3YPN.js → chunk-MMPISXSU.js} +2 -2
- package/dist/bundle/{chunk-65BWMPCI.js → chunk-MTD6WZKV.js} +2 -2
- package/dist/bundle/{chunk-TT4CIXVH.js → chunk-PDYTNTQI.js} +6 -6
- package/dist/bundle/{chunk-KBHK5UGL.js → chunk-RX5CJ55S.js} +1 -1
- package/dist/bundle/{chunk-QTFXYR5W.js → chunk-S6OC367D.js} +4 -4
- package/dist/bundle/{chunk-DQELQ7BL.js → chunk-THJHYMFR.js} +1293 -1525
- package/dist/bundle/{chunk-RUNFFBJU.js → chunk-U2TPRUWK.js} +84 -72
- package/dist/bundle/{chunk-V5Z2JO6X.js → chunk-U6HEZPCR.js} +19 -19
- package/dist/bundle/{chunk-SMHLQEE2.js → chunk-VUBZFMGP.js} +2 -2
- package/dist/bundle/{chunk-W2BIBPRU.js → chunk-VUUR2SRS.js} +67 -44
- package/dist/bundle/{chunk-KC4MQRAB.js → chunk-WGGSFGNZ.js} +8 -8
- package/dist/bundle/{chunk-ZEQ7ONPZ.js → chunk-WLBPNLDF.js} +3 -3
- package/dist/bundle/{chunk-QQ3QZFFD.js → chunk-WQ55F4Y3.js} +8 -8
- package/dist/bundle/{chunk-72QLHHSO.js → chunk-YBOVL25O.js} +17 -15
- package/dist/bundle/{chunk-S3HAFJVC.js → chunk-YDROJG2Y.js} +86 -29
- package/dist/bundle/{chunk-CIDFV3IT.js → chunk-YQKEPT22.js} +1 -1
- package/dist/bundle/{chunk-XDMJVWWR.js → chunk-ZON7K5QE.js} +3 -3
- package/dist/bundle/{chunk-ROOUBFUW.js → chunk-ZRRZTPSB.js} +18152 -17010
- package/dist/bundle/command-contract-KW6FNOJO.js +33 -0
- package/dist/bundle/{decode-5N4ERCHC.js → decode-RVWSCZW4.js} +5 -5
- package/dist/bundle/{dispatch-TBGXBDHE.js → dispatch-U2DW6UI7.js} +8 -8
- package/dist/bundle/{echarts-YDEBAMXT.js → echarts-6VNUD3JF.js} +2 -2
- package/dist/bundle/{embed-T7H62XFR.js → embed-LWLCQKIK.js} +6 -6
- package/dist/bundle/{embedder-AW3O2TR3.js → embedder-CXKHLRJT.js} +9 -9
- package/dist/bundle/{entry-L2LJ2VPY.js → entry-HV4NSX3Z.js} +7 -7
- package/dist/bundle/{failure-AWHPW2HE.js → failure-HJD7S5UA.js} +2 -2
- package/dist/bundle/{first-run-6PBZSRZU.js → first-run-OPI6NIWQ.js} +11 -11
- package/dist/bundle/first-screen-BVQLF4LN.js +31 -0
- package/dist/bundle/{instructions-C3NJERO7.js → instructions-TK4HXL3A.js} +1 -1
- package/dist/bundle/{mcp-CWLASTLV.js → mcp-7KQUJNFN.js} +2 -2
- package/dist/bundle/{node-P3CIIYWU.js → node-WFPNBUCU.js} +2 -2
- package/dist/bundle/{node-sqlite-YVHMNRVA.js → node-sqlite-L5BRGJLK.js} +6 -6
- package/dist/bundle/{oauth-5OQYA2SV.js → oauth-CGVWL35B.js} +7 -7
- package/dist/bundle/{open-YGWUVSU7.js → open-HLL55C5S.js} +5 -5
- package/dist/bundle/{openai-U45JBQ6F.js → openai-YFCNXIJ4.js} +14 -14
- package/dist/bundle/{process-DCYX5EDG.js → process-4A5JP5LO.js} +1 -1
- package/dist/bundle/{program-UZBFH2EZ.js → program-IFGQGSUF.js} +52 -52
- package/dist/bundle/{prompt-HPVTPTFI.js → prompt-B5FYE2DQ.js} +5 -5
- package/dist/bundle/{proxy-transport-D7MCHGSV.js → proxy-transport-ENU2SJYT.js} +5 -5
- package/dist/bundle/{recognize-IJCPFJ76.js → recognize-ZHMHGIV3.js} +4 -4
- package/dist/bundle/{remote-MWDYQWFW.js → remote-A3W5HE52.js} +7 -7
- package/dist/bundle/{rerank-SXG64475.js → rerank-HWJAQOZM.js} +7 -7
- package/dist/bundle/{serve-KJQENHEH.js → serve-PP326Q2F.js} +9 -9
- package/dist/bundle/{server-MXVXZWN6.js → server-MV6CL63L.js} +35 -35
- package/dist/bundle/server-TZGGOJ26.js +60 -0
- package/dist/bundle/{state-CKKJWH27.js → state-Y3RJ7ZXB.js} +6 -6
- package/dist/bundle/{store-R3BE4V56.js → store-EVNI2MHZ.js} +13 -13
- package/dist/bundle/store-maintenance-command-XPQE47RE.js +49 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-7TGMZRBE.js +0 -33
- package/dist/bundle/first-screen-UKCD7D2R.js +0 -31
- package/dist/bundle/server-RTMCRKQF.js +0 -60
- package/dist/bundle/store-maintenance-command-KDGBSBNU.js +0 -49
- /package/dist/bundle/{chunk-DWX4DE2I.js → chunk-YVNHQFLC.js} +0 -0
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
note
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4JATS2J5.js";
|
|
6
6
|
import {
|
|
7
7
|
currentCaller,
|
|
8
8
|
endpointTemplate,
|
|
@@ -12,27 +12,35 @@ import {
|
|
|
12
12
|
providerErrorKey,
|
|
13
13
|
renderEvent,
|
|
14
14
|
runContextOf
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3FPFRDG2.js";
|
|
16
16
|
import {
|
|
17
17
|
permissionCeiling
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-HDSKBXAF.js";
|
|
19
19
|
import {
|
|
20
20
|
envName,
|
|
21
21
|
readOnlyLockOf,
|
|
22
22
|
readOnlyRefusal
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-DDKFAUQD.js";
|
|
24
24
|
import {
|
|
25
25
|
carries
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-JQLGS3SG.js";
|
|
27
27
|
import {
|
|
28
28
|
BUSINESS_KINDS,
|
|
29
|
+
CATEGORIES,
|
|
30
|
+
DEAL_KINDS,
|
|
29
31
|
DEAL_ROLES,
|
|
32
|
+
DEAL_STATUSES,
|
|
30
33
|
FACT_STATUSES,
|
|
31
34
|
FACT_TYPES,
|
|
32
35
|
FIELD_TYPES,
|
|
36
|
+
FINANCE_REVIEWS,
|
|
33
37
|
INVOICE_DIRECTIONS,
|
|
38
|
+
INVOICE_STATUSES,
|
|
39
|
+
KEEP_STORE_RUNS_FOR_DAYS,
|
|
40
|
+
KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
34
41
|
LINK_KINDS,
|
|
35
42
|
LINK_SOURCES,
|
|
43
|
+
LOG_ATTRIBUTES,
|
|
36
44
|
MEETING_RESULT_ENTITIES,
|
|
37
45
|
MEMORY_KINDS,
|
|
38
46
|
MEMORY_SCOPES,
|
|
@@ -43,6 +51,7 @@ import {
|
|
|
43
51
|
PRIORITY_LABELS,
|
|
44
52
|
QUERY_BACKENDS,
|
|
45
53
|
RELATION_KINDS,
|
|
54
|
+
RUNS_SIZE_LIMIT_MB,
|
|
46
55
|
STANDINGS,
|
|
47
56
|
TAG_TYPES,
|
|
48
57
|
TASK_KINDS,
|
|
@@ -52,11 +61,16 @@ import {
|
|
|
52
61
|
TASK_VERDICTS,
|
|
53
62
|
WORK_TASK_TYPES,
|
|
54
63
|
author,
|
|
64
|
+
childTrace,
|
|
55
65
|
count,
|
|
66
|
+
currentRun,
|
|
56
67
|
describeQuery,
|
|
68
|
+
enclosingTraceId,
|
|
57
69
|
event,
|
|
58
70
|
evidenceSource,
|
|
59
71
|
id,
|
|
72
|
+
inRun,
|
|
73
|
+
logAttributes,
|
|
60
74
|
markStoreDamaged,
|
|
61
75
|
meeting,
|
|
62
76
|
meetingCounts,
|
|
@@ -71,31 +85,38 @@ import {
|
|
|
71
85
|
meetingStats,
|
|
72
86
|
meetingSummary,
|
|
73
87
|
meetingTranscript,
|
|
88
|
+
newRunId,
|
|
74
89
|
organization,
|
|
75
90
|
project,
|
|
76
91
|
providerMetadata,
|
|
77
92
|
reminder,
|
|
93
|
+
runsDirFor,
|
|
94
|
+
snakeLogger,
|
|
78
95
|
sourceReview,
|
|
96
|
+
startRun,
|
|
79
97
|
text,
|
|
80
98
|
time,
|
|
81
|
-
|
|
82
|
-
|
|
99
|
+
traceOf,
|
|
100
|
+
typedCommand,
|
|
101
|
+
untrusted,
|
|
102
|
+
useAsProcessRun
|
|
103
|
+
} from "./chunk-KP26Y5OA.js";
|
|
83
104
|
import {
|
|
84
105
|
isCliFailure,
|
|
85
106
|
storeDamaged
|
|
86
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-WLBPNLDF.js";
|
|
87
108
|
import {
|
|
88
109
|
readSharedSection,
|
|
89
110
|
sharedConfigPath,
|
|
90
111
|
writeSharedSection
|
|
91
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-CLURRDNU.js";
|
|
92
113
|
import {
|
|
93
114
|
filesPresent,
|
|
94
115
|
sharedModelsDirectory
|
|
95
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-DH7VKHTZ.js";
|
|
96
117
|
import {
|
|
97
118
|
storePath
|
|
98
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-MMPISXSU.js";
|
|
99
120
|
import {
|
|
100
121
|
configFilePath,
|
|
101
122
|
createRecordLog,
|
|
@@ -106,9 +127,8 @@ import {
|
|
|
106
127
|
projectFields,
|
|
107
128
|
resolvePaths,
|
|
108
129
|
saveConfigFile,
|
|
109
|
-
traceIdOf,
|
|
110
130
|
writeSecurely
|
|
111
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-U6HEZPCR.js";
|
|
112
132
|
import {
|
|
113
133
|
COMPACT_FLAG,
|
|
114
134
|
MAX_NEXT_STEPS,
|
|
@@ -162,18 +182,18 @@ import {
|
|
|
162
182
|
url,
|
|
163
183
|
variant,
|
|
164
184
|
writes
|
|
165
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-WGGSFGNZ.js";
|
|
166
186
|
import {
|
|
167
187
|
CliError,
|
|
168
188
|
isCliError,
|
|
169
189
|
singleLine,
|
|
170
190
|
visibleControls
|
|
171
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-VUBZFMGP.js";
|
|
172
192
|
import {
|
|
173
193
|
__name
|
|
174
194
|
} from "./chunk-ZVVMGPBJ.js";
|
|
175
195
|
|
|
176
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
196
|
+
// 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
|
|
177
197
|
var labels = /* @__PURE__ */ new WeakMap();
|
|
178
198
|
var annotate = /* @__PURE__ */ __name((command, meta) => {
|
|
179
199
|
labels.set(command, { ...labels.get(command), ...meta });
|
|
@@ -3674,7 +3694,7 @@ __name(useColor, "useColor");
|
|
|
3674
3694
|
// node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
|
|
3675
3695
|
var program = new Command();
|
|
3676
3696
|
|
|
3677
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3697
|
+
// 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
|
|
3678
3698
|
import { isDeepStrictEqual } from "node:util";
|
|
3679
3699
|
var protectedCommands = /* @__PURE__ */ new WeakMap();
|
|
3680
3700
|
var hasSharedContract = /* @__PURE__ */ __name((command) => protectedCommands.has(command), "hasSharedContract");
|
|
@@ -3682,7 +3702,7 @@ var hidden = /* @__PURE__ */ __name((command) => Boolean(command._hidden), "hidd
|
|
|
3682
3702
|
var snapshot = /* @__PURE__ */ __name((command, known = /* @__PURE__ */ new Map(), children) => {
|
|
3683
3703
|
if (hidden(command))
|
|
3684
3704
|
throw new Error("a hidden command cannot own a shared contract");
|
|
3685
|
-
const { commands:
|
|
3705
|
+
const { commands: _2, usage: __, path: ___, ...contract } = describeAlone(command, known);
|
|
3686
3706
|
return {
|
|
3687
3707
|
...contract,
|
|
3688
3708
|
aliases: [...command.aliases()],
|
|
@@ -3876,7 +3896,7 @@ var customizeSharedCommand = /* @__PURE__ */ __name((reference2, reason, build,
|
|
|
3876
3896
|
return command;
|
|
3877
3897
|
}, "customizeSharedCommand");
|
|
3878
3898
|
|
|
3879
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3899
|
+
// 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
|
|
3880
3900
|
var argumentInfoSchema = object({
|
|
3881
3901
|
name: string(),
|
|
3882
3902
|
required: boolean(),
|
|
@@ -3950,7 +3970,7 @@ var commandsDocumentSchema = strictObject({
|
|
|
3950
3970
|
exit_codes: record(string(), pipe(number(), integer()))
|
|
3951
3971
|
});
|
|
3952
3972
|
|
|
3953
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3973
|
+
// 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
|
|
3954
3974
|
var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
3955
3975
|
let command = root;
|
|
3956
3976
|
const path2 = [];
|
|
@@ -3968,7 +3988,7 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
|
3968
3988
|
}
|
|
3969
3989
|
}, "refuseJoinedPath");
|
|
3970
3990
|
|
|
3971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/sends/guarded.js
|
|
3972
3992
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3973
3993
|
var sentIds = /* @__PURE__ */ __name((typed2, message2) => ({
|
|
3974
3994
|
messageId: message2.id,
|
|
@@ -3995,18 +4015,18 @@ var stopWrites = /* @__PURE__ */ __name((scope, reason) => {
|
|
|
3995
4015
|
for (const write of scope)
|
|
3996
4016
|
write.cut();
|
|
3997
4017
|
}, "stopWrites");
|
|
3998
|
-
var refuseStopped = /* @__PURE__ */ __name((
|
|
3999
|
-
for (const scope of
|
|
4018
|
+
var refuseStopped = /* @__PURE__ */ __name((scopes2) => {
|
|
4019
|
+
for (const scope of scopes2)
|
|
4000
4020
|
if (stopped.has(scope))
|
|
4001
4021
|
throw stopped.get(scope);
|
|
4002
4022
|
}, "refuseStopped");
|
|
4003
4023
|
var currentOperation = /* @__PURE__ */ __name(() => current.getStore(), "currentOperation");
|
|
4004
4024
|
var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 = () => ({}), prepare) => {
|
|
4005
|
-
const
|
|
4006
|
-
refuseStopped(
|
|
4025
|
+
const scopes2 = scopesFor();
|
|
4026
|
+
refuseStopped(scopes2);
|
|
4007
4027
|
try {
|
|
4008
4028
|
await guard.ask?.(attempt);
|
|
4009
|
-
refuseStopped(
|
|
4029
|
+
refuseStopped(scopes2);
|
|
4010
4030
|
if (guard.reserve) {
|
|
4011
4031
|
guard.check(attempt, { reserve: false });
|
|
4012
4032
|
await guard.reserve(attempt);
|
|
@@ -4017,7 +4037,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
4017
4037
|
throw error;
|
|
4018
4038
|
}
|
|
4019
4039
|
try {
|
|
4020
|
-
refuseStopped(
|
|
4040
|
+
refuseStopped(scopes2);
|
|
4021
4041
|
} catch (error) {
|
|
4022
4042
|
guard.record({ ...attempt, outcome: "failed", errorCode: codeOf(error) });
|
|
4023
4043
|
throw error;
|
|
@@ -4042,7 +4062,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
4042
4062
|
});
|
|
4043
4063
|
}, "cut")
|
|
4044
4064
|
};
|
|
4045
|
-
for (const scope of
|
|
4065
|
+
for (const scope of scopes2)
|
|
4046
4066
|
scope.add(flight);
|
|
4047
4067
|
try {
|
|
4048
4068
|
if (prepare !== void 0)
|
|
@@ -4068,13 +4088,13 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
4068
4088
|
throw new CliError(error.code, error.message, { ...error.details, sent: false });
|
|
4069
4089
|
throw error;
|
|
4070
4090
|
} finally {
|
|
4071
|
-
for (const scope of
|
|
4091
|
+
for (const scope of scopes2)
|
|
4072
4092
|
scope.delete(flight);
|
|
4073
4093
|
}
|
|
4074
4094
|
}, "guardedWrite");
|
|
4075
4095
|
var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
|
|
4076
4096
|
|
|
4077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/result-fields.js
|
|
4078
4098
|
var named = /* @__PURE__ */ __name((work) => {
|
|
4079
4099
|
try {
|
|
4080
4100
|
return work();
|
|
@@ -4101,7 +4121,7 @@ var projectFields2 = /* @__PURE__ */ __name((value, fields) => named(() => {
|
|
|
4101
4121
|
return projectFields(value, fields);
|
|
4102
4122
|
}), "projectFields");
|
|
4103
4123
|
|
|
4104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/execution.js
|
|
4105
4125
|
var DEFAULT_COMMAND_MS = 3e4;
|
|
4106
4126
|
var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
|
|
4107
4127
|
var DEFAULT_SYNC_MS = 15 * 6e4;
|
|
@@ -4126,7 +4146,7 @@ var execution = /* @__PURE__ */ __name((streams, { timeoutMs, fields, maxOutputB
|
|
|
4126
4146
|
let interrupted;
|
|
4127
4147
|
let reject = /* @__PURE__ */ __name(() => {
|
|
4128
4148
|
}, "reject");
|
|
4129
|
-
const interruption = new Promise((
|
|
4149
|
+
const interruption = new Promise((_2, fail) => {
|
|
4130
4150
|
reject = fail;
|
|
4131
4151
|
});
|
|
4132
4152
|
void interruption.catch(() => {
|
|
@@ -4273,7 +4293,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
|
|
|
4273
4293
|
throw signal.reason;
|
|
4274
4294
|
let abort = /* @__PURE__ */ __name(() => {
|
|
4275
4295
|
}, "abort");
|
|
4276
|
-
const interrupted = new Promise((
|
|
4296
|
+
const interrupted = new Promise((_2, reject) => {
|
|
4277
4297
|
abort = /* @__PURE__ */ __name(() => reject(signal.reason), "abort");
|
|
4278
4298
|
signal.addEventListener("abort", abort, { once: true });
|
|
4279
4299
|
});
|
|
@@ -4284,7 +4304,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
|
|
|
4284
4304
|
}
|
|
4285
4305
|
}, "withAbort");
|
|
4286
4306
|
|
|
4287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/sends/permissions.js
|
|
4288
4308
|
var LEVELS = ["deny", "readonly", "ask", "allow"];
|
|
4289
4309
|
var DANGEROUS = /* @__PURE__ */ new Set(["messages.delete", "bot.messages.delete", "topics.delete", "chats.delete", "chats.clear"]);
|
|
4290
4310
|
var skipFlagFor = /* @__PURE__ */ __name((key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes", "skipFlagFor");
|
|
@@ -4684,7 +4704,7 @@ var assertRetentionEvidenceRead = /* @__PURE__ */ __name((permissions) => {
|
|
|
4684
4704
|
}
|
|
4685
4705
|
}, "assertRetentionEvidenceRead");
|
|
4686
4706
|
|
|
4687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/bot/registry.js
|
|
4688
4708
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
4689
4709
|
import { join } from "node:path";
|
|
4690
4710
|
var botsDirectory = /* @__PURE__ */ __name((app, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "bots"), "botsDirectory");
|
|
@@ -4773,7 +4793,7 @@ var registryProfiles = /* @__PURE__ */ __name((app, env = process.env) => {
|
|
|
4773
4793
|
return readdirSync(directory, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => entry.name).map((name) => name.slice(0, -".json".length));
|
|
4774
4794
|
}, "registryProfiles");
|
|
4775
4795
|
|
|
4776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
|
|
4777
4797
|
import { existsSync as existsSync2, readdirSync as readdirSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
4778
4798
|
import { join as join2 } from "node:path";
|
|
4779
4799
|
var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
|
|
@@ -4795,7 +4815,7 @@ var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
|
|
|
4795
4815
|
}, "profilesWithAccounts");
|
|
4796
4816
|
var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
|
|
4797
4817
|
|
|
4798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/output-detail.js
|
|
4799
4819
|
var RARELY_SET = ["editedAt", "replyTo", "forwardedFrom", "reactions"];
|
|
4800
4820
|
var BRIEF = ["locator", "chatTitle", "timestamp", "senderName", "excerpt", "score"];
|
|
4801
4821
|
var SNAKE_BRIEF = ["ref", "chat_title", "timestamp", "sender_name", "excerpt", "score"];
|
|
@@ -4831,7 +4851,7 @@ var atDetail = /* @__PURE__ */ __name((value, detail = "default") => {
|
|
|
4831
4851
|
return value;
|
|
4832
4852
|
}, "atDetail");
|
|
4833
4853
|
|
|
4834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/output.js
|
|
4835
4855
|
var refuseCompact = /* @__PURE__ */ __name(({ json, jsonl, fields, hitDetail }) => {
|
|
4836
4856
|
const other = jsonl ? "--jsonl" : fields !== void 0 ? "--json=\u2026" : json ? "--json" : hitDetail === "brief" ? "--brief" : "";
|
|
4837
4857
|
if (other)
|
|
@@ -4895,7 +4915,7 @@ var silence = /* @__PURE__ */ __name((renderer) => ({
|
|
|
4895
4915
|
}, "warn")
|
|
4896
4916
|
}), "silence");
|
|
4897
4917
|
|
|
4898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/runs/log-events.js
|
|
4899
4919
|
var CORE_LOG_EVENTS = defineLogEvents([
|
|
4900
4920
|
{ id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
|
|
4901
4921
|
{ id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
|
|
@@ -4905,6 +4925,7 @@ var CORE_LOG_EVENTS = defineLogEvents([
|
|
|
4905
4925
|
meaning: "a read was answered from what was kept, without asking the messenger",
|
|
4906
4926
|
keys: ["operation", "reason"]
|
|
4907
4927
|
},
|
|
4928
|
+
{ id: "store.write", meaning: "a committed write changed rows of one store table", keys: ["table", "op", "n"] },
|
|
4908
4929
|
{ id: "command.crashed", meaning: "a command failed on a bug; where, never what", keys: ["error_class", "frames"] },
|
|
4909
4930
|
{
|
|
4910
4931
|
id: "events.dropped",
|
|
@@ -4926,490 +4947,11 @@ var DIAGNOSTIC_LOG_EVENTS = {
|
|
|
4926
4947
|
request: "provider.request",
|
|
4927
4948
|
response: "provider.response",
|
|
4928
4949
|
warning: "client.warning",
|
|
4929
|
-
cache: "cache.answered"
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
|
|
4933
|
-
var snake2 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
4934
|
-
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
4935
|
-
var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
|
|
4936
|
-
var logAttributes = /* @__PURE__ */ __name((event2) => renamed(event2, snake2), "logAttributes");
|
|
4937
|
-
var fromLogAttributes = /* @__PURE__ */ __name((attributes) => renamed(attributes, camel), "fromLogAttributes");
|
|
4938
|
-
var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
4939
|
-
debug: /* @__PURE__ */ __name((event2, message2) => logger.debug(logAttributes(event2), message2), "debug"),
|
|
4940
|
-
info: /* @__PURE__ */ __name((event2, message2) => logger.info(logAttributes(event2), message2), "info"),
|
|
4941
|
-
warn: /* @__PURE__ */ __name((event2, message2) => logger.warn(logAttributes(event2), message2), "warn"),
|
|
4942
|
-
error: /* @__PURE__ */ __name((event2, message2) => logger.error(logAttributes(event2), message2), "error")
|
|
4943
|
-
}), "snakeLogger");
|
|
4944
|
-
|
|
4945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
4946
|
-
import { randomUUID } from "node:crypto";
|
|
4947
|
-
import { appendFileSync, mkdirSync, readdirSync as readdirSync3, readFileSync as readFileSync3, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4948
|
-
import { userInfo } from "node:os";
|
|
4949
|
-
import { join as join3, sep } from "node:path";
|
|
4950
|
-
|
|
4951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
4952
|
-
var diagnostic = {
|
|
4953
|
-
event: true,
|
|
4954
|
-
operation: true,
|
|
4955
|
-
opcode: true,
|
|
4956
|
-
seq: true,
|
|
4957
|
-
status: true,
|
|
4958
|
-
method: true,
|
|
4959
|
-
endpointTemplate: true,
|
|
4960
|
-
bytes: true,
|
|
4961
|
-
ids: true,
|
|
4962
|
-
counts: true,
|
|
4963
|
-
durationMs: true,
|
|
4964
|
-
outcome: true,
|
|
4965
|
-
errorCode: true,
|
|
4966
|
-
providerError: true,
|
|
4967
|
-
level: true,
|
|
4968
|
-
transport: true,
|
|
4969
|
-
attempt: true,
|
|
4970
|
-
waitMs: true,
|
|
4971
|
-
code: true,
|
|
4972
|
-
detail: true,
|
|
4973
|
-
reason: true,
|
|
4974
|
-
ageMs: true
|
|
4975
|
-
};
|
|
4976
|
-
var send = {
|
|
4977
|
-
profile: true,
|
|
4978
|
-
chatId: true,
|
|
4979
|
-
outcome: true,
|
|
4980
|
-
kind: true,
|
|
4981
|
-
action: true,
|
|
4982
|
-
people: true,
|
|
4983
|
-
messageId: true,
|
|
4984
|
-
key: true,
|
|
4985
|
-
count: true,
|
|
4986
|
-
forEveryone: true,
|
|
4987
|
-
sendId: true,
|
|
4988
|
-
operationId: true,
|
|
4989
|
-
parentOperationId: true,
|
|
4990
|
-
replyTo: true,
|
|
4991
|
-
threadId: true,
|
|
4992
|
-
sendAs: true,
|
|
4993
|
-
resultChatId: true,
|
|
4994
|
-
length: true,
|
|
4995
|
-
attachments: true,
|
|
4996
|
-
scheduledFor: true,
|
|
4997
|
-
notify: true,
|
|
4998
|
-
origin: true,
|
|
4999
|
-
reservation: true,
|
|
5000
|
-
errorCode: true
|
|
4950
|
+
cache: "cache.answered",
|
|
4951
|
+
store: "store.write"
|
|
5001
4952
|
};
|
|
5002
|
-
var background = [
|
|
5003
|
-
"job",
|
|
5004
|
-
"pid",
|
|
5005
|
-
"schedule",
|
|
5006
|
-
"exitCode",
|
|
5007
|
-
"tool",
|
|
5008
|
-
"tier",
|
|
5009
|
-
"actorType",
|
|
5010
|
-
"actorId",
|
|
5011
|
-
"agent",
|
|
5012
|
-
"targetType",
|
|
5013
|
-
"targetId"
|
|
5014
|
-
];
|
|
5015
|
-
var crash = ["errorClass", "frames"];
|
|
5016
|
-
var dropped = ["dropped"];
|
|
5017
|
-
var LOG_ATTRIBUTES = [
|
|
5018
|
-
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
5019
|
-
].sort();
|
|
5020
|
-
|
|
5021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
5022
|
-
var KEEP_RUNS_FOR_DAYS = 30;
|
|
5023
|
-
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
5024
|
-
var RUNS_SIZE_LIMIT_MB = 200;
|
|
5025
|
-
var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "runs"), "runsDirFor");
|
|
5026
|
-
var startRun = /* @__PURE__ */ __name((options) => {
|
|
5027
|
-
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
5028
|
-
const startedAt = options.startedAt ?? now();
|
|
5029
|
-
const id6 = options.runId ?? newRunId(startedAt, options.command);
|
|
5030
|
-
const dir = join3(options.runsDir, day(startedAt), id6);
|
|
5031
|
-
pruneRuns(options.runsDir, {
|
|
5032
|
-
keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
|
|
5033
|
-
keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
5034
|
-
maxBytes: options.maxBytes ?? RUNS_SIZE_LIMIT_MB * 1024 * 1024,
|
|
5035
|
-
now: startedAt
|
|
5036
|
-
});
|
|
5037
|
-
refuseRealStateInTests(dir);
|
|
5038
|
-
const metadata = {
|
|
5039
|
-
runId: id6,
|
|
5040
|
-
command: options.command,
|
|
5041
|
-
...options.profile === void 0 ? {} : { profile: options.profile },
|
|
5042
|
-
startedAt: startedAt.toISOString(),
|
|
5043
|
-
status: "running",
|
|
5044
|
-
cliVersion: options.cliVersion,
|
|
5045
|
-
runtime: runtime(),
|
|
5046
|
-
platform: process.platform,
|
|
5047
|
-
arch: process.arch,
|
|
5048
|
-
...options.traceId === void 0 ? {} : { traceId: options.traceId },
|
|
5049
|
-
...options.context
|
|
5050
|
-
};
|
|
5051
|
-
let file;
|
|
5052
|
-
const opened = /* @__PURE__ */ __name(() => {
|
|
5053
|
-
if (file)
|
|
5054
|
-
return file;
|
|
5055
|
-
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
5056
|
-
const events2 = join3(dir, "events.jsonl");
|
|
5057
|
-
writeFileSync(events2, "", { flag: "a", mode: 384 });
|
|
5058
|
-
file = snakeLogger(createRecordLog({
|
|
5059
|
-
to: events2,
|
|
5060
|
-
runId: id6,
|
|
5061
|
-
command: options.command,
|
|
5062
|
-
resource: { service: options.service, version: options.cliVersion },
|
|
5063
|
-
allow: LOG_ATTRIBUTES,
|
|
5064
|
-
...options.traceId === void 0 ? {} : { traceId: options.traceId },
|
|
5065
|
-
...options.onError === void 0 ? {} : { onError: options.onError }
|
|
5066
|
-
}));
|
|
5067
|
-
writeRunFile(dir, metadata);
|
|
5068
|
-
return file;
|
|
5069
|
-
}, "opened");
|
|
5070
|
-
if (!options.lazy)
|
|
5071
|
-
opened();
|
|
5072
|
-
let finished = false;
|
|
5073
|
-
const operations = /* @__PURE__ */ new Set();
|
|
5074
|
-
const codes = /* @__PURE__ */ new Set();
|
|
5075
|
-
const noted = /* @__PURE__ */ __name((level2) => (event2, message2) => {
|
|
5076
|
-
const { operation, errorCode, error_code, code } = event2;
|
|
5077
|
-
if (typeof operation === "string")
|
|
5078
|
-
operations.add(operation);
|
|
5079
|
-
for (const value of [errorCode, error_code, code])
|
|
5080
|
-
if (typeof value === "string")
|
|
5081
|
-
codes.add(value);
|
|
5082
|
-
if (finished)
|
|
5083
|
-
return;
|
|
5084
|
-
opened()[level2](event2, message2);
|
|
5085
|
-
}, "noted");
|
|
5086
|
-
const logger = { debug: noted("debug"), info: noted("info"), warn: noted("warn"), error: noted("error") };
|
|
5087
|
-
return {
|
|
5088
|
-
id: id6,
|
|
5089
|
-
dir,
|
|
5090
|
-
logger,
|
|
5091
|
-
finish: /* @__PURE__ */ __name(async (status2, extra = {}) => {
|
|
5092
|
-
if (finished)
|
|
5093
|
-
return;
|
|
5094
|
-
finished = true;
|
|
5095
|
-
const completedAt = now();
|
|
5096
|
-
const final = {
|
|
5097
|
-
...metadata,
|
|
5098
|
-
...extra,
|
|
5099
|
-
status: status2,
|
|
5100
|
-
completedAt: completedAt.toISOString(),
|
|
5101
|
-
durationMs: completedAt.getTime() - startedAt.getTime(),
|
|
5102
|
-
operations: [...operations].sort(),
|
|
5103
|
-
codes: [...codes].sort()
|
|
5104
|
-
};
|
|
5105
|
-
if (file || status2 !== "success") {
|
|
5106
|
-
opened();
|
|
5107
|
-
writeRunFile(dir, final);
|
|
5108
|
-
return;
|
|
5109
|
-
}
|
|
5110
|
-
try {
|
|
5111
|
-
mkdirSync(join3(dir, ".."), { recursive: true, mode: 448 });
|
|
5112
|
-
appendIndex(join3(dir, ".."), runFileOf(final));
|
|
5113
|
-
} catch (error) {
|
|
5114
|
-
options.onError?.(error);
|
|
5115
|
-
}
|
|
5116
|
-
}, "finish")
|
|
5117
|
-
};
|
|
5118
|
-
}, "startRun");
|
|
5119
|
-
var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) => {
|
|
5120
|
-
if (env.VITEST === void 0)
|
|
5121
|
-
return;
|
|
5122
|
-
let home;
|
|
5123
|
-
try {
|
|
5124
|
-
home = userInfo().homedir;
|
|
5125
|
-
} catch {
|
|
5126
|
-
return;
|
|
5127
|
-
}
|
|
5128
|
-
if (dir.startsWith(join3(home, ".local", "share") + sep))
|
|
5129
|
-
throw new Error(`a test opened a run in the real data folder: ${dir}`);
|
|
5130
|
-
}, "refuseRealStateInTests");
|
|
5131
|
-
var runtime = /* @__PURE__ */ __name(() => {
|
|
5132
|
-
const bun = process.versions.bun;
|
|
5133
|
-
return bun ? `bun ${bun}` : `node ${process.versions.node}`;
|
|
5134
|
-
}, "runtime");
|
|
5135
|
-
var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
|
|
5136
|
-
const stamp = startedAt.toISOString().replace(/[-:]/g, "").replace(/\.\d+Z$/, "Z");
|
|
5137
|
-
const slug2 = command.replace(/[^a-z0-9]+/gi, "-").toLowerCase();
|
|
5138
|
-
return `${stamp}-${slug2}-${randomUUID().slice(0, 6)}`;
|
|
5139
|
-
}, "newRunId");
|
|
5140
|
-
var INDEX = "index.jsonl";
|
|
5141
|
-
var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
|
|
5142
|
-
appendFileSync(join3(dayDir, INDEX), `${JSON.stringify(written)}
|
|
5143
|
-
`, { mode: 384 });
|
|
5144
|
-
}, "appendIndex");
|
|
5145
|
-
var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
|
|
5146
|
-
const written = runFileOf(metadata);
|
|
5147
|
-
writeSecurely(join3(dir, "run.json"), `${JSON.stringify(written, null, 2)}
|
|
5148
|
-
`, 384);
|
|
5149
|
-
try {
|
|
5150
|
-
appendIndex(join3(dir, ".."), written);
|
|
5151
|
-
} catch {
|
|
5152
|
-
}
|
|
5153
|
-
}, "writeRunFile");
|
|
5154
|
-
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");
|
|
5155
|
-
var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITIVE_INFINITY, filter = {} } = {}) => {
|
|
5156
|
-
const first2 = since === void 0 ? void 0 : day(new Date(since));
|
|
5157
|
-
const runs = [];
|
|
5158
|
-
for (const date of days(runsDir).sort().reverse()) {
|
|
5159
|
-
if (first2 !== void 0 && date < first2 || runs.length >= atLeast)
|
|
5160
|
-
break;
|
|
5161
|
-
for (const metadata of runsOfDay(join3(runsDir, date))) {
|
|
5162
|
-
if (matchesListFilter(metadata, filter))
|
|
5163
|
-
runs.push(metadata);
|
|
5164
|
-
}
|
|
5165
|
-
}
|
|
5166
|
-
return runs;
|
|
5167
|
-
}, "listRuns");
|
|
5168
|
-
var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
|
|
5169
|
-
const latest = /* @__PURE__ */ new Map();
|
|
5170
|
-
let raw = "";
|
|
5171
|
-
try {
|
|
5172
|
-
raw = readFileSync3(join3(dayDir, INDEX), "utf8");
|
|
5173
|
-
} catch {
|
|
5174
|
-
}
|
|
5175
|
-
for (const line of raw.split("\n")) {
|
|
5176
|
-
if (line.trim() === "")
|
|
5177
|
-
continue;
|
|
5178
|
-
try {
|
|
5179
|
-
const metadata = metadataOf(JSON.parse(line));
|
|
5180
|
-
if (typeof metadata.runId === "string")
|
|
5181
|
-
latest.set(metadata.runId, metadata);
|
|
5182
|
-
} catch {
|
|
5183
|
-
}
|
|
5184
|
-
}
|
|
5185
|
-
return latest;
|
|
5186
|
-
}, "indexedRuns");
|
|
5187
|
-
var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
|
|
5188
|
-
const latest = indexedRuns(dayDir);
|
|
5189
|
-
for (const entry of safeReaddir(dayDir)) {
|
|
5190
|
-
if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
|
|
5191
|
-
continue;
|
|
5192
|
-
const metadata = readRun(join3(dayDir, entry));
|
|
5193
|
-
if (metadata)
|
|
5194
|
-
latest.set(metadata.runId, metadata);
|
|
5195
|
-
}
|
|
5196
|
-
return [...latest.values()].sort((a, b) => a.runId < b.runId ? 1 : a.runId > b.runId ? -1 : 0);
|
|
5197
|
-
}, "runsOfDay");
|
|
5198
|
-
var findRun = /* @__PURE__ */ __name((runsDir, id6) => {
|
|
5199
|
-
const stamped = /^(\d{4})(\d{2})(\d{2})T/.exec(id6);
|
|
5200
|
-
const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
|
|
5201
|
-
const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
|
|
5202
|
-
for (const date of dates) {
|
|
5203
|
-
const dir = join3(runsDir, date, id6);
|
|
5204
|
-
const metadata = readRun(dir);
|
|
5205
|
-
if (metadata)
|
|
5206
|
-
return { dir, metadata };
|
|
5207
|
-
}
|
|
5208
|
-
for (const date of dates) {
|
|
5209
|
-
const metadata = indexedRuns(join3(runsDir, date)).get(id6);
|
|
5210
|
-
if (metadata)
|
|
5211
|
-
return { dir: join3(runsDir, date, id6), metadata };
|
|
5212
|
-
}
|
|
5213
|
-
return void 0;
|
|
5214
|
-
}, "findRun");
|
|
5215
|
-
var readEvents = /* @__PURE__ */ __name((dir) => {
|
|
5216
|
-
let raw;
|
|
5217
|
-
try {
|
|
5218
|
-
raw = readFileSync3(join3(dir, "events.jsonl"), "utf8");
|
|
5219
|
-
} catch {
|
|
5220
|
-
return [];
|
|
5221
|
-
}
|
|
5222
|
-
const events2 = [];
|
|
5223
|
-
for (const line of raw.split("\n")) {
|
|
5224
|
-
if (line.trim() === "")
|
|
5225
|
-
continue;
|
|
5226
|
-
try {
|
|
5227
|
-
const parsed = JSON.parse(line);
|
|
5228
|
-
if (parsed !== null && typeof parsed === "object")
|
|
5229
|
-
events2.push(eventOf(parsed));
|
|
5230
|
-
} catch {
|
|
5231
|
-
}
|
|
5232
|
-
}
|
|
5233
|
-
return events2;
|
|
5234
|
-
}, "readEvents");
|
|
5235
|
-
var eventOf = /* @__PURE__ */ __name((line) => {
|
|
5236
|
-
const { attributes, time: time2, severity } = line;
|
|
5237
|
-
if (attributes === null || typeof attributes !== "object")
|
|
5238
|
-
return logAttributes(line);
|
|
5239
|
-
return { time: time2, severity, ...logAttributes(attributes) };
|
|
5240
|
-
}, "eventOf");
|
|
5241
|
-
var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = keepDays, maxBytes, now }) => {
|
|
5242
|
-
const cutoff = day(new Date(now.getTime() - keepDays * DAY_MS));
|
|
5243
|
-
const successCutoff = day(new Date(now.getTime() - Math.min(keepSuccessDays, keepDays) * DAY_MS));
|
|
5244
|
-
let removed = 0;
|
|
5245
|
-
for (const date of days(runsDir)) {
|
|
5246
|
-
if (date >= cutoff) {
|
|
5247
|
-
if (date < successCutoff)
|
|
5248
|
-
dropSuccesses(join3(runsDir, date));
|
|
5249
|
-
continue;
|
|
5250
|
-
}
|
|
5251
|
-
try {
|
|
5252
|
-
rmSync(join3(runsDir, date), { recursive: true, force: true });
|
|
5253
|
-
removed += 1;
|
|
5254
|
-
} catch {
|
|
5255
|
-
}
|
|
5256
|
-
}
|
|
5257
|
-
if (maxBytes !== void 0)
|
|
5258
|
-
removed += fitSize(runsDir, maxBytes, now);
|
|
5259
|
-
return removed;
|
|
5260
|
-
}, "pruneRuns");
|
|
5261
|
-
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
5262
|
-
var SUCCESSES_DROPPED = ".successes-dropped";
|
|
5263
|
-
var SIZE_CHECKED = ".size-checked";
|
|
5264
|
-
var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
5265
|
-
const marker = join3(dayDir, SUCCESSES_DROPPED);
|
|
5266
|
-
try {
|
|
5267
|
-
statSync(marker);
|
|
5268
|
-
return;
|
|
5269
|
-
} catch {
|
|
5270
|
-
}
|
|
5271
|
-
try {
|
|
5272
|
-
const kept = [];
|
|
5273
|
-
for (const [id6, metadata] of indexedRuns(dayDir)) {
|
|
5274
|
-
if (metadata.status === "success")
|
|
5275
|
-
rmSync(join3(dayDir, id6), { recursive: true, force: true });
|
|
5276
|
-
else
|
|
5277
|
-
kept.push(JSON.stringify(runFileOf(metadata)));
|
|
5278
|
-
}
|
|
5279
|
-
for (const entry of safeReaddir(dayDir)) {
|
|
5280
|
-
if (entry === INDEX || entry.startsWith("."))
|
|
5281
|
-
continue;
|
|
5282
|
-
if (readRun(join3(dayDir, entry))?.status === "success")
|
|
5283
|
-
rmSync(join3(dayDir, entry), { recursive: true, force: true });
|
|
5284
|
-
}
|
|
5285
|
-
writeSecurely(join3(dayDir, INDEX), kept.map((line) => `${line}
|
|
5286
|
-
`).join(""), 384);
|
|
5287
|
-
writeFileSync(marker, "", { mode: 384 });
|
|
5288
|
-
} catch {
|
|
5289
|
-
}
|
|
5290
|
-
}, "dropSuccesses");
|
|
5291
|
-
var sizeOf = /* @__PURE__ */ __name((path2) => {
|
|
5292
|
-
let total = 0;
|
|
5293
|
-
for (const entry of safeReaddir(path2)) {
|
|
5294
|
-
const full = join3(path2, entry);
|
|
5295
|
-
try {
|
|
5296
|
-
const stat = statSync(full);
|
|
5297
|
-
total += stat.isDirectory() ? sizeOf(full) : stat.size;
|
|
5298
|
-
} catch {
|
|
5299
|
-
}
|
|
5300
|
-
}
|
|
5301
|
-
return total;
|
|
5302
|
-
}, "sizeOf");
|
|
5303
|
-
var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
5304
|
-
const stamp = join3(runsDir, SIZE_CHECKED);
|
|
5305
|
-
const today = day(now);
|
|
5306
|
-
try {
|
|
5307
|
-
if (readFileSync3(stamp, "utf8").trim() === today)
|
|
5308
|
-
return 0;
|
|
5309
|
-
} catch {
|
|
5310
|
-
}
|
|
5311
|
-
const dates = days(runsDir).sort();
|
|
5312
|
-
const sizes = new Map(dates.map((date) => [date, sizeOf(join3(runsDir, date))]));
|
|
5313
|
-
let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
|
|
5314
|
-
let removed = 0;
|
|
5315
|
-
for (const date of dates) {
|
|
5316
|
-
if (total <= maxBytes || date === today)
|
|
5317
|
-
break;
|
|
5318
|
-
dropSuccesses(join3(runsDir, date));
|
|
5319
|
-
const after = sizeOf(join3(runsDir, date));
|
|
5320
|
-
total -= (sizes.get(date) ?? 0) - after;
|
|
5321
|
-
sizes.set(date, after);
|
|
5322
|
-
}
|
|
5323
|
-
for (const date of dates) {
|
|
5324
|
-
if (total <= maxBytes || date === today)
|
|
5325
|
-
break;
|
|
5326
|
-
try {
|
|
5327
|
-
rmSync(join3(runsDir, date), { recursive: true, force: true });
|
|
5328
|
-
total -= sizes.get(date) ?? 0;
|
|
5329
|
-
removed += 1;
|
|
5330
|
-
} catch {
|
|
5331
|
-
}
|
|
5332
|
-
}
|
|
5333
|
-
try {
|
|
5334
|
-
mkdirSync(runsDir, { recursive: true, mode: 448 });
|
|
5335
|
-
writeFileSync(stamp, today, { mode: 384 });
|
|
5336
|
-
} catch {
|
|
5337
|
-
}
|
|
5338
|
-
return removed;
|
|
5339
|
-
}, "fitSize");
|
|
5340
|
-
var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day");
|
|
5341
|
-
var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
|
|
5342
|
-
var readRun = /* @__PURE__ */ __name((dir) => {
|
|
5343
|
-
try {
|
|
5344
|
-
return metadataOf(JSON.parse(readFileSync3(join3(dir, "run.json"), "utf8")));
|
|
5345
|
-
} catch {
|
|
5346
|
-
return void 0;
|
|
5347
|
-
}
|
|
5348
|
-
}, "readRun");
|
|
5349
|
-
var safeReaddir = /* @__PURE__ */ __name((dir) => {
|
|
5350
|
-
try {
|
|
5351
|
-
return readdirSync3(dir);
|
|
5352
|
-
} catch {
|
|
5353
|
-
return [];
|
|
5354
|
-
}
|
|
5355
|
-
}, "safeReaddir");
|
|
5356
|
-
var runFileOf = /* @__PURE__ */ __name(({ partial: partial2, ...metadata }) => ({
|
|
5357
|
-
...logAttributes(metadata),
|
|
5358
|
-
...partial2 ? { partial: { ...logAttributes(partial2), failures: partial2.failures.map((failure) => logAttributes(failure)) } } : {}
|
|
5359
|
-
}), "runFileOf");
|
|
5360
|
-
var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
5361
|
-
const { partial: partial2, ...metadata } = fromLogAttributes(parsed);
|
|
5362
|
-
if (partial2 === null || typeof partial2 !== "object")
|
|
5363
|
-
return metadata;
|
|
5364
|
-
const { failures, ...rest } = fromLogAttributes(partial2);
|
|
5365
|
-
return {
|
|
5366
|
-
...metadata,
|
|
5367
|
-
partial: {
|
|
5368
|
-
...rest,
|
|
5369
|
-
failures: Array.isArray(failures) ? failures.map((failure) => fromLogAttributes(failure)) : []
|
|
5370
|
-
}
|
|
5371
|
-
};
|
|
5372
|
-
}, "metadataOf");
|
|
5373
4953
|
|
|
5374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5375
|
-
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
5376
|
-
import { randomBytes } from "node:crypto";
|
|
5377
|
-
var scopes = new AsyncLocalStorage2();
|
|
5378
|
-
var processScope;
|
|
5379
|
-
var currentRun = /* @__PURE__ */ __name(() => {
|
|
5380
|
-
const scope = scopes.getStore();
|
|
5381
|
-
if (scope)
|
|
5382
|
-
return scope;
|
|
5383
|
-
processScope ??= {
|
|
5384
|
-
runId: newRunId(/* @__PURE__ */ new Date(), "process"),
|
|
5385
|
-
command: "",
|
|
5386
|
-
startedAt: Date.now(),
|
|
5387
|
-
...traceOf(process.env)
|
|
5388
|
-
};
|
|
5389
|
-
return processScope;
|
|
5390
|
-
}, "currentRun");
|
|
5391
|
-
var inRun = /* @__PURE__ */ __name((scope, body) => scopes.run(scope, body), "inRun");
|
|
5392
|
-
var runEvent = /* @__PURE__ */ __name((event2) => scopes.getStore()?.events?.(event2), "runEvent");
|
|
5393
|
-
var typedCommand = /* @__PURE__ */ __name((tool, words2, profile = currentRun().profile) => [tool, profile, words2].filter((part) => part !== void 0 && part !== "").join(" "), "typedCommand");
|
|
5394
|
-
var useAsProcessRun = /* @__PURE__ */ __name((scope) => {
|
|
5395
|
-
processScope = scope;
|
|
5396
|
-
}, "useAsProcessRun");
|
|
5397
|
-
var processRun = /* @__PURE__ */ __name(() => processScope, "processRun");
|
|
5398
|
-
var enclosingTraceId = /* @__PURE__ */ __name(() => scopes.getStore()?.traceId, "enclosingTraceId");
|
|
5399
|
-
var traceOf = /* @__PURE__ */ __name((env) => {
|
|
5400
|
-
const traceId = traceIdOf(env.TRACEPARENT);
|
|
5401
|
-
return traceId === void 0 ? {} : { traceId };
|
|
5402
|
-
}, "traceOf");
|
|
5403
|
-
var childTrace = /* @__PURE__ */ __name(() => {
|
|
5404
|
-
const hex = /* @__PURE__ */ __name((bytes) => randomBytes(bytes).toString("hex"), "hex");
|
|
5405
|
-
const traceId = hex(16);
|
|
5406
|
-
return { traceId, traceparent: `00-${traceId}-${hex(8)}-01` };
|
|
5407
|
-
}, "childTrace");
|
|
5408
|
-
var attempts = new AsyncLocalStorage2();
|
|
5409
|
-
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
5410
|
-
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
5411
|
-
|
|
5412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/runs/recording.js
|
|
4954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/runs/recording.js
|
|
5413
4955
|
var recorded = /* @__PURE__ */ __name(async (options, body) => {
|
|
5414
4956
|
const recording = startRecording(options);
|
|
5415
4957
|
try {
|
|
@@ -5455,6 +4997,7 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
5455
4997
|
}, "onError"),
|
|
5456
4998
|
...options.keepDays === void 0 ? {} : { keepDays: options.keepDays },
|
|
5457
4999
|
...options.keepSuccessDays === void 0 ? {} : { keepSuccessDays: options.keepSuccessDays },
|
|
5000
|
+
...options.keepStoreDays === void 0 ? {} : { keepStoreDays: options.keepStoreDays },
|
|
5458
5001
|
...options.maxBytes === void 0 ? {} : { maxBytes: options.maxBytes },
|
|
5459
5002
|
now,
|
|
5460
5003
|
...extra
|
|
@@ -5463,6 +5006,7 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
5463
5006
|
const held = !run && options.keepFailed ? [] : void 0;
|
|
5464
5007
|
const counted = { wire: 0, operation: 0 };
|
|
5465
5008
|
let refused;
|
|
5009
|
+
let wroteStore = false;
|
|
5466
5010
|
const cap = capped();
|
|
5467
5011
|
const requests = /* @__PURE__ */ __name(() => counted.wire > 0 ? counted.wire : counted.operation, "requests");
|
|
5468
5012
|
const events2 = /* @__PURE__ */ __name((event2) => {
|
|
@@ -5470,6 +5014,8 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
5470
5014
|
counted[event2.level === "wire" ? "wire" : "operation"] += 1;
|
|
5471
5015
|
if (event2.event === "response" && event2.outcome === "error")
|
|
5472
5016
|
refused = event2;
|
|
5017
|
+
if (event2.event === "store")
|
|
5018
|
+
wroteStore = true;
|
|
5473
5019
|
if (options.trace)
|
|
5474
5020
|
streams.diagnostic(options.format === "pretty" ? renderEvent(event2) : JSON.stringify(logAttributes(event2)));
|
|
5475
5021
|
if (run)
|
|
@@ -5491,13 +5037,14 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
5491
5037
|
events: events2,
|
|
5492
5038
|
succeed: /* @__PURE__ */ __name(async (answer) => {
|
|
5493
5039
|
const partial2 = partialOutcome(answer);
|
|
5494
|
-
const kept = run ?? (partial2 && held ? keep(open({ startedAt })) : void 0);
|
|
5040
|
+
const kept = run ?? ((partial2 || wroteStore) && held ? keep(open({ startedAt })) : void 0);
|
|
5495
5041
|
if (kept)
|
|
5496
5042
|
cap.close(kept);
|
|
5497
5043
|
await kept?.finish(partial2 ? "partial" : "success", {
|
|
5498
5044
|
requests: requests(),
|
|
5499
5045
|
...cap.dropped(),
|
|
5500
|
-
...partial2 ? { partial: partial2 } : {}
|
|
5046
|
+
...partial2 ? { partial: partial2 } : {},
|
|
5047
|
+
...!run && !partial2 && wroteStore ? { keptBecauseStore: true } : {}
|
|
5501
5048
|
});
|
|
5502
5049
|
}, "succeed"),
|
|
5503
5050
|
fail: /* @__PURE__ */ __name(async (thrown) => {
|
|
@@ -5532,29 +5079,47 @@ var wasSettled = /* @__PURE__ */ __name((error) => typeof error === "object" &&
|
|
|
5532
5079
|
var HELD_AT_MOST = 500;
|
|
5533
5080
|
var EVENTS_AT_MOST = 2e3;
|
|
5534
5081
|
var EVENT_BYTES_AT_MOST = 1024 * 1024;
|
|
5082
|
+
var STORE_EVENTS_AT_MOST = 100;
|
|
5535
5083
|
var capped = /* @__PURE__ */ __name(() => {
|
|
5536
5084
|
let lines = 0;
|
|
5537
5085
|
let bytes = 0;
|
|
5538
|
-
let
|
|
5086
|
+
let dropped = 0;
|
|
5087
|
+
let stores = 0;
|
|
5539
5088
|
const byOperation = {};
|
|
5089
|
+
const summed = /* @__PURE__ */ new Map();
|
|
5090
|
+
const write = /* @__PURE__ */ __name((run, event2) => {
|
|
5091
|
+
const size = JSON.stringify(logAttributes(event2)).length + 200;
|
|
5092
|
+
if (lines >= EVENTS_AT_MOST || bytes + size > EVENT_BYTES_AT_MOST) {
|
|
5093
|
+
dropped += 1;
|
|
5094
|
+
const operation = "operation" in event2 && event2.operation ? event2.operation : event2.event;
|
|
5095
|
+
byOperation[operation] = (byOperation[operation] ?? 0) + 1;
|
|
5096
|
+
return;
|
|
5097
|
+
}
|
|
5098
|
+
lines += 1;
|
|
5099
|
+
bytes += size;
|
|
5100
|
+
logEvent(run, event2);
|
|
5101
|
+
}, "write");
|
|
5540
5102
|
return {
|
|
5541
5103
|
log: /* @__PURE__ */ __name((run, event2) => {
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5104
|
+
if (event2.event === "store" && ++stores > STORE_EVENTS_AT_MOST) {
|
|
5105
|
+
const key = `${event2.table} ${event2.op}`;
|
|
5106
|
+
const sum = summed.get(key);
|
|
5107
|
+
if (sum)
|
|
5108
|
+
sum.n += event2.n;
|
|
5109
|
+
else
|
|
5110
|
+
summed.set(key, { ...event2 });
|
|
5547
5111
|
return;
|
|
5548
5112
|
}
|
|
5549
|
-
|
|
5550
|
-
bytes += size;
|
|
5551
|
-
logEvent(run, event2);
|
|
5113
|
+
write(run, event2);
|
|
5552
5114
|
}, "log"),
|
|
5553
5115
|
close: /* @__PURE__ */ __name((run) => {
|
|
5554
|
-
|
|
5555
|
-
run
|
|
5116
|
+
for (const sum of summed.values())
|
|
5117
|
+
write(run, sum);
|
|
5118
|
+
summed.clear();
|
|
5119
|
+
if (dropped > 0)
|
|
5120
|
+
run.logger.warn({ event: "events.dropped", dropped, counts: byOperation });
|
|
5556
5121
|
}, "close"),
|
|
5557
|
-
dropped: /* @__PURE__ */ __name(() =>
|
|
5122
|
+
dropped: /* @__PURE__ */ __name(() => dropped > 0 ? { eventsDropped: dropped } : {}, "dropped")
|
|
5558
5123
|
};
|
|
5559
5124
|
}, "capped");
|
|
5560
5125
|
var logEvent = /* @__PURE__ */ __name((run, event2) => {
|
|
@@ -5565,7 +5130,7 @@ var logEvent = /* @__PURE__ */ __name((run, event2) => {
|
|
|
5565
5130
|
};
|
|
5566
5131
|
if (event2.event === "warning")
|
|
5567
5132
|
run.logger.warn(record2);
|
|
5568
|
-
else if (event2.event
|
|
5133
|
+
else if ((event2.event === "request" || event2.event === "response") && event2.outcome === "error")
|
|
5569
5134
|
run.logger.error(record2);
|
|
5570
5135
|
else
|
|
5571
5136
|
run.logger.info(record2);
|
|
@@ -5601,14 +5166,14 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
|
|
|
5601
5166
|
return void 0;
|
|
5602
5167
|
}, "partialOutcome");
|
|
5603
5168
|
|
|
5604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/deadline.js
|
|
5605
5170
|
var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
|
|
5606
5171
|
if (ms2 === void 0)
|
|
5607
5172
|
return body();
|
|
5608
5173
|
let timer2;
|
|
5609
5174
|
let timedOut;
|
|
5610
5175
|
const writes2 = /* @__PURE__ */ new Set();
|
|
5611
|
-
const expired = new Promise((
|
|
5176
|
+
const expired = new Promise((_2, reject) => {
|
|
5612
5177
|
timer2 = setTimeout(() => {
|
|
5613
5178
|
const pending = [...writes2];
|
|
5614
5179
|
const cut2 = pending.filter((write) => !write.preparing);
|
|
@@ -5627,7 +5192,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
|
|
|
5627
5192
|
}
|
|
5628
5193
|
}, "withDeadline");
|
|
5629
5194
|
|
|
5630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/profile.js
|
|
5631
5196
|
var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
|
|
5632
5197
|
var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
5633
5198
|
var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
|
|
@@ -5696,10 +5261,10 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
|
|
|
5696
5261
|
return void 0;
|
|
5697
5262
|
}, "sampleCommand");
|
|
5698
5263
|
|
|
5699
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5700
|
-
import { existsSync as
|
|
5264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/settings.js
|
|
5265
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
5701
5266
|
|
|
5702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/models/endpoint.js
|
|
5703
5268
|
var endpoint = /* @__PURE__ */ __name((value) => {
|
|
5704
5269
|
try {
|
|
5705
5270
|
const url3 = new URL(value);
|
|
@@ -5709,7 +5274,7 @@ var endpoint = /* @__PURE__ */ __name((value) => {
|
|
|
5709
5274
|
}
|
|
5710
5275
|
}, "endpoint");
|
|
5711
5276
|
|
|
5712
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5277
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/models/settings.js
|
|
5713
5278
|
var MODEL_FIELDS = ["provider", "model", "base_url"];
|
|
5714
5279
|
var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
|
|
5715
5280
|
provider: optional(picklist(["off", "openai", "anthropic"])),
|
|
@@ -5778,7 +5343,7 @@ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
|
|
|
5778
5343
|
};
|
|
5779
5344
|
}, "modelTarget");
|
|
5780
5345
|
|
|
5781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/analysis/settings.js
|
|
5782
5347
|
var model = pipe(string(), trim(), minLength(1), maxLength(200));
|
|
5783
5348
|
var url2 = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
|
|
5784
5349
|
var AI_FIELDS = {
|
|
@@ -5822,7 +5387,7 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
|
|
|
5822
5387
|
};
|
|
5823
5388
|
}, "resolveAISettings");
|
|
5824
5389
|
|
|
5825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/domain/duration.js
|
|
5826
5391
|
var DURATION = /^(\d+)(ms|s|m|h|d)$/;
|
|
5827
5392
|
var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
|
|
5828
5393
|
var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
@@ -5836,7 +5401,9 @@ var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
|
5836
5401
|
return ms2;
|
|
5837
5402
|
}, "parseDuration");
|
|
5838
5403
|
|
|
5839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5404
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/embeddings/models.js
|
|
5405
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
5406
|
+
import { join as join3 } from "node:path";
|
|
5840
5407
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
5841
5408
|
var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
|
|
5842
5409
|
var e5Large = huggingFace("Xenova/multilingual-e5-large", "00fc3aeb3dbb95842de2ac1961d33c6319acf57b");
|
|
@@ -5883,9 +5450,13 @@ var TEXT_MODELS = [
|
|
|
5883
5450
|
languages: "over 100 languages \u2014 the best of the two on chat, about seven times slower",
|
|
5884
5451
|
licence: "Gemma Terms of Use",
|
|
5885
5452
|
terms: "https://ai.google.dev/gemma/terms",
|
|
5453
|
+
// Gemma Terms of Use §3.1: every copy carries this notice and the use restrictions of §3.2.
|
|
5454
|
+
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",
|
|
5886
5455
|
dims: 768,
|
|
5887
5456
|
maxTokens: 2048,
|
|
5888
|
-
|
|
5457
|
+
// 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
|
|
5458
|
+
// 5 on the scale e5-small's 31 sets. It was 2, which held a memo sync to 39 chunks.
|
|
5459
|
+
chunksPerSecond: 5,
|
|
5889
5460
|
pooling: "sentence_embedding",
|
|
5890
5461
|
prefix: { query: "task: search result | query: ", passage: "title: none | text: " },
|
|
5891
5462
|
onnx: "onnx/model_q4.onnx",
|
|
@@ -5952,7 +5523,8 @@ var TEXT_MODELS = [
|
|
|
5952
5523
|
]
|
|
5953
5524
|
}
|
|
5954
5525
|
];
|
|
5955
|
-
var DEFAULT_TEXT_MODEL = "
|
|
5526
|
+
var DEFAULT_TEXT_MODEL = "embeddinggemma";
|
|
5527
|
+
var PREVIOUS_DEFAULT_TEXT_MODEL = "e5-small";
|
|
5956
5528
|
var SECTION = "text_models";
|
|
5957
5529
|
var slug = pipe(string(), regex(/^[a-z0-9][a-z0-9._-]{0,62}$/, "is not a model id: a-z, 0-9, . _ -"));
|
|
5958
5530
|
var words = pipe(string(), trim(), minLength(1), maxLength(300));
|
|
@@ -5991,10 +5563,10 @@ var TextModelsSection = strictObject({
|
|
|
5991
5563
|
var textModelsFile = /* @__PURE__ */ __name((env = process.env) => sharedConfigPath(storePath(env), env), "textModelsFile");
|
|
5992
5564
|
var readTextModelsSection = /* @__PURE__ */ __name((env = process.env) => {
|
|
5993
5565
|
const path2 = textModelsFile(env);
|
|
5994
|
-
const
|
|
5995
|
-
if (
|
|
5566
|
+
const section2 = readSharedSection(path2, SECTION);
|
|
5567
|
+
if (section2 === void 0)
|
|
5996
5568
|
return {};
|
|
5997
|
-
const checked = safeParse(TextModelsSection,
|
|
5569
|
+
const checked = safeParse(TextModelsSection, section2);
|
|
5998
5570
|
if (!checked.success) {
|
|
5999
5571
|
const issue = checked.issues[0];
|
|
6000
5572
|
const at2 = issue ? getDotPath(issue) : null;
|
|
@@ -6006,7 +5578,7 @@ var readTextModelsSection = /* @__PURE__ */ __name((env = process.env) => {
|
|
|
6006
5578
|
throw new CliError("configuration_error", `${path2}: ${SECTION}.custom names ${twice} twice`);
|
|
6007
5579
|
return checked.output;
|
|
6008
5580
|
}, "readTextModelsSection");
|
|
6009
|
-
var writeTextModelsSection = /* @__PURE__ */ __name((
|
|
5581
|
+
var writeTextModelsSection = /* @__PURE__ */ __name((section2, env = process.env) => writeSharedSection(textModelsFile(env), SECTION, section2.use === void 0 && !section2.custom?.length ? void 0 : section2), "writeTextModelsSection");
|
|
6010
5582
|
var textModels = /* @__PURE__ */ __name((env = process.env) => [
|
|
6011
5583
|
...TEXT_MODELS,
|
|
6012
5584
|
...(readTextModelsSection(env).custom ?? []).map((model3) => ({ ...model3, custom: true }))
|
|
@@ -6019,9 +5591,17 @@ var textModel = /* @__PURE__ */ __name((id6, env = process.env) => {
|
|
|
6019
5591
|
}
|
|
6020
5592
|
return found;
|
|
6021
5593
|
}, "textModel");
|
|
5594
|
+
var downloaded = /* @__PURE__ */ __name((id6, env) => {
|
|
5595
|
+
const model3 = TEXT_MODELS.find((one) => one.id === id6);
|
|
5596
|
+
const directory = sharedModelsDirectory("text", env);
|
|
5597
|
+
return model3 !== void 0 && filesPresent(model3.files.map((file) => [file, join3(directory, model3.id, file.name)]));
|
|
5598
|
+
}, "downloaded");
|
|
6022
5599
|
var chosenTextModel = /* @__PURE__ */ __name((env = process.env) => {
|
|
6023
5600
|
const use = readTextModelsSection(env).use;
|
|
6024
|
-
|
|
5601
|
+
if (use !== void 0)
|
|
5602
|
+
return { id: use, from: "chosen" };
|
|
5603
|
+
const kept = !downloaded(DEFAULT_TEXT_MODEL, env) && existsSync3(join3(sharedModelsDirectory("text", env), PREVIOUS_DEFAULT_TEXT_MODEL));
|
|
5604
|
+
return { id: kept ? PREVIOUS_DEFAULT_TEXT_MODEL : DEFAULT_TEXT_MODEL, from: "default" };
|
|
6025
5605
|
}, "chosenTextModel");
|
|
6026
5606
|
var mmarco = huggingFace("cross-encoder/mmarco-mMiniLMv2-L12-H384-v1", "1427fd652930e4ba29e8149678df786c240d8825");
|
|
6027
5607
|
var bge = huggingFace("onnx-community/bge-reranker-v2-m3-ONNX", "6f5ff65298512715a1e669753bc754d2bc8f367b");
|
|
@@ -6098,16 +5678,16 @@ var vectorModelKey = /* @__PURE__ */ __name((model3) => {
|
|
|
6098
5678
|
}, "vectorModelKey");
|
|
6099
5679
|
var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
|
|
6100
5680
|
|
|
6101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5681
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/services/history-limits.js
|
|
6102
5682
|
var HISTORY_MAX_DAYS = 1095;
|
|
6103
5683
|
var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
|
|
6104
|
-
var
|
|
5684
|
+
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
6105
5685
|
var historyWindow = /* @__PURE__ */ __name((shape, limits, now) => {
|
|
6106
5686
|
const group2 = shape !== void 0 && shape.kind !== "dialog" && shape.kind !== "saved";
|
|
6107
5687
|
if (group2 && (shape.participantsCount ?? 0) > limits.groupMembersMax)
|
|
6108
5688
|
return { skip: "group_too_large", members: shape.participantsCount ?? 0 };
|
|
6109
|
-
const
|
|
6110
|
-
return { keepFrom: now - Math.min(
|
|
5689
|
+
const days = group2 ? limits.groupDays : limits.dialogDays;
|
|
5690
|
+
return { keepFrom: now - Math.min(days, HISTORY_MAX_DAYS) * DAY_MS };
|
|
6111
5691
|
}, "historyWindow");
|
|
6112
5692
|
var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now = Date.now()) => {
|
|
6113
5693
|
const skipped = /* @__PURE__ */ new Map();
|
|
@@ -6145,10 +5725,10 @@ var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now =
|
|
|
6145
5725
|
return { batch: { ...batch, messages }, skipped };
|
|
6146
5726
|
}, "limitBatch");
|
|
6147
5727
|
|
|
6148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6149
|
-
import { readFileSync as
|
|
5728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
|
|
5729
|
+
import { readFileSync as readFileSync3 } from "node:fs";
|
|
6150
5730
|
|
|
6151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5731
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/config-repair.js
|
|
6152
5732
|
var REPAIR_WORDS = {
|
|
6153
5733
|
byte_order_mark: "an invisible byte-order mark at the start",
|
|
6154
5734
|
comment: "a comment, which JSON does not allow",
|
|
@@ -6389,7 +5969,7 @@ ${parts.join(",\n")}
|
|
|
6389
5969
|
${indent}${close}`;
|
|
6390
5970
|
}, "serialise");
|
|
6391
5971
|
|
|
6392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
|
|
6393
5973
|
var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
6394
5974
|
var SECTIONS = ["personal", "bot"];
|
|
6395
5975
|
var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
|
|
@@ -6568,7 +6148,7 @@ var schemaIssues = /* @__PURE__ */ __name((raw, schema2, context2) => {
|
|
|
6568
6148
|
return [...found.values()];
|
|
6569
6149
|
}
|
|
6570
6150
|
}, "schemaIssues");
|
|
6571
|
-
var
|
|
6151
|
+
var scopes = /* @__PURE__ */ __name((raw) => {
|
|
6572
6152
|
if (!isNode(raw))
|
|
6573
6153
|
return [];
|
|
6574
6154
|
const out = [];
|
|
@@ -6576,12 +6156,12 @@ var scopes2 = /* @__PURE__ */ __name((raw) => {
|
|
|
6576
6156
|
if (isNode(node))
|
|
6577
6157
|
out.push([path2, node]);
|
|
6578
6158
|
}, "add");
|
|
6579
|
-
const addSection = /* @__PURE__ */ __name((path2,
|
|
6580
|
-
if (!isNode(
|
|
6159
|
+
const addSection = /* @__PURE__ */ __name((path2, section2) => {
|
|
6160
|
+
if (!isNode(section2))
|
|
6581
6161
|
return;
|
|
6582
|
-
add([...path2, "defaults"],
|
|
6583
|
-
if (isNode(
|
|
6584
|
-
for (const [name, scope] of Object.entries(
|
|
6162
|
+
add([...path2, "defaults"], section2.defaults);
|
|
6163
|
+
if (isNode(section2.profiles))
|
|
6164
|
+
for (const [name, scope] of Object.entries(section2.profiles))
|
|
6585
6165
|
add([...path2, "profiles", name], scope);
|
|
6586
6166
|
}, "addSection");
|
|
6587
6167
|
add([], raw);
|
|
@@ -6590,7 +6170,7 @@ var scopes2 = /* @__PURE__ */ __name((raw) => {
|
|
|
6590
6170
|
addSection([name], raw[name]);
|
|
6591
6171
|
return out;
|
|
6592
6172
|
}, "scopes");
|
|
6593
|
-
var savedPermissionKeys = /* @__PURE__ */ __name((raw) =>
|
|
6173
|
+
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");
|
|
6594
6174
|
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");
|
|
6595
6175
|
var pathId = /* @__PURE__ */ __name((path2) => path2.join("\0"), "pathId");
|
|
6596
6176
|
var prune = /* @__PURE__ */ __name((raw, paths) => {
|
|
@@ -6598,7 +6178,7 @@ var prune = /* @__PURE__ */ __name((raw, paths) => {
|
|
|
6598
6178
|
const kept = /* @__PURE__ */ new Map();
|
|
6599
6179
|
const walk = /* @__PURE__ */ __name((node, at2) => {
|
|
6600
6180
|
if (Array.isArray(node)) {
|
|
6601
|
-
const indices = node.flatMap((
|
|
6181
|
+
const indices = node.flatMap((_2, index) => drop.has(pathId([...at2, String(index)])) ? [] : [index]);
|
|
6602
6182
|
kept.set(pathId(at2), indices);
|
|
6603
6183
|
return indices.map((index) => walk(node[index], [...at2, String(index)]));
|
|
6604
6184
|
}
|
|
@@ -6634,7 +6214,7 @@ var withoutPath = /* @__PURE__ */ __name((raw, at2) => {
|
|
|
6634
6214
|
}
|
|
6635
6215
|
return { config: prune(raw, [gone]).pruned, removed: true };
|
|
6636
6216
|
}, "withoutPath");
|
|
6637
|
-
var publicIssue = /* @__PURE__ */ __name(({ at:
|
|
6217
|
+
var publicIssue = /* @__PURE__ */ __name(({ at: _2, ...issue }) => issue, "publicIssue");
|
|
6638
6218
|
var fixVerb = /* @__PURE__ */ __name((issue) => issue.kind === "invalid_json" ? "repair" : "remove", "fixVerb");
|
|
6639
6219
|
var issueMessage = /* @__PURE__ */ __name((issues, doctor = "doctor") => {
|
|
6640
6220
|
const [first2] = issues;
|
|
@@ -6663,7 +6243,7 @@ var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schem
|
|
|
6663
6243
|
var wholeFile = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what }), "wholeFile");
|
|
6664
6244
|
var readConfigText = /* @__PURE__ */ __name((path2) => {
|
|
6665
6245
|
try {
|
|
6666
|
-
return { text:
|
|
6246
|
+
return { text: readFileSync3(path2, "utf8") };
|
|
6667
6247
|
} catch (error) {
|
|
6668
6248
|
const code = error.code;
|
|
6669
6249
|
if (code === "ENOENT")
|
|
@@ -6683,22 +6263,22 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
|
|
|
6683
6263
|
return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
|
|
6684
6264
|
}, "readConfigFile");
|
|
6685
6265
|
|
|
6686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6687
|
-
import { existsSync as
|
|
6266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/default-config.js
|
|
6267
|
+
import { existsSync as existsSync4, linkSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
6688
6268
|
import { dirname, join as join4 } from "node:path";
|
|
6689
6269
|
var DEFAULT_CONFIG = {
|
|
6690
6270
|
defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
|
|
6691
6271
|
profiles: {}
|
|
6692
6272
|
};
|
|
6693
6273
|
function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
6694
|
-
if (
|
|
6274
|
+
if (existsSync4(path2))
|
|
6695
6275
|
return;
|
|
6696
6276
|
const directory = dirname(path2);
|
|
6697
|
-
|
|
6277
|
+
mkdirSync(directory, { recursive: true, mode: 448 });
|
|
6698
6278
|
const temporary = mkdtempSync(join4(directory, ".config-"));
|
|
6699
6279
|
const candidate = join4(temporary, "config.json");
|
|
6700
6280
|
try {
|
|
6701
|
-
|
|
6281
|
+
writeFileSync(candidate, `${JSON.stringify(config, null, 2)}
|
|
6702
6282
|
`, { flag: "wx", mode: 384 });
|
|
6703
6283
|
try {
|
|
6704
6284
|
linkSync(candidate, path2);
|
|
@@ -6707,12 +6287,12 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
|
6707
6287
|
throw error;
|
|
6708
6288
|
}
|
|
6709
6289
|
} finally {
|
|
6710
|
-
|
|
6290
|
+
rmSync(temporary, { recursive: true, force: true });
|
|
6711
6291
|
}
|
|
6712
6292
|
}
|
|
6713
6293
|
__name(ensureDefaultConfig, "ensureDefaultConfig");
|
|
6714
6294
|
|
|
6715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
|
|
6716
6296
|
var isNode2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
6717
6297
|
var parentOf = /* @__PURE__ */ __name((config, key) => {
|
|
6718
6298
|
const path2 = key.split(".");
|
|
@@ -6734,7 +6314,7 @@ var withSettingDefaults = /* @__PURE__ */ __name((raw, declared) => {
|
|
|
6734
6314
|
return { config, added };
|
|
6735
6315
|
}, "withSettingDefaults");
|
|
6736
6316
|
|
|
6737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/settings.js
|
|
6738
6318
|
var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
|
|
6739
6319
|
var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
|
|
6740
6320
|
var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
|
|
@@ -6773,6 +6353,7 @@ var SHARED_PROFILE_ENTRIES = {
|
|
|
6773
6353
|
record_input: optional(recordInputSetting),
|
|
6774
6354
|
keep_runs_for_days: optional(count2),
|
|
6775
6355
|
keep_successful_runs_for_days: optional(count2),
|
|
6356
|
+
keep_store_runs_for_days: optional(count2),
|
|
6776
6357
|
runs_size_limit_mb: optional(count2),
|
|
6777
6358
|
permissions: optional(permissionLevels),
|
|
6778
6359
|
sends_per_hour: optional(count2),
|
|
@@ -6783,6 +6364,7 @@ var SHARED_PROFILE_ENTRIES = {
|
|
|
6783
6364
|
history_dialog_days: optional(historyDays),
|
|
6784
6365
|
history_group_days: optional(historyDays),
|
|
6785
6366
|
history_group_members_max: optional(count2),
|
|
6367
|
+
history_muted: optional(flag),
|
|
6786
6368
|
picture_search: optional(flag),
|
|
6787
6369
|
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(", ")}`))),
|
|
6788
6370
|
...AI_ENTRIES
|
|
@@ -6798,6 +6380,7 @@ var MESSENGER_ONLY_SETTINGS = [
|
|
|
6798
6380
|
"history_dialog_days",
|
|
6799
6381
|
"history_group_days",
|
|
6800
6382
|
"history_group_members_max",
|
|
6383
|
+
"history_muted",
|
|
6801
6384
|
"read_other_bots",
|
|
6802
6385
|
"speech_model",
|
|
6803
6386
|
"picture_search"
|
|
@@ -6831,6 +6414,11 @@ var SHARED_SETTINGS = [
|
|
|
6831
6414
|
default: KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
6832
6415
|
description: "days a successful run is kept"
|
|
6833
6416
|
},
|
|
6417
|
+
{
|
|
6418
|
+
key: "keep_store_runs_for_days",
|
|
6419
|
+
default: KEEP_STORE_RUNS_FOR_DAYS,
|
|
6420
|
+
description: "days a successful run that wrote the store is kept, even unrecorded"
|
|
6421
|
+
},
|
|
6834
6422
|
{ key: "runs_size_limit_mb", default: RUNS_SIZE_LIMIT_MB, description: "the most megabytes all runs may take" },
|
|
6835
6423
|
{ key: "sender_colors", default: false, description: "color each sender's name in a conversation" },
|
|
6836
6424
|
{ key: "search_catch_up", default: false, description: "prepare local search after a gaps repair" },
|
|
@@ -6849,6 +6437,7 @@ var SHARED_SETTINGS = [
|
|
|
6849
6437
|
default: DEFAULT_HISTORY_LIMITS.groupMembersMax,
|
|
6850
6438
|
description: "a group with more people than this keeps no pushed history"
|
|
6851
6439
|
},
|
|
6440
|
+
{ key: "history_muted", default: false, description: "messages sync --all reads muted chats too" },
|
|
6852
6441
|
{
|
|
6853
6442
|
key: "picture_search",
|
|
6854
6443
|
default: false,
|
|
@@ -6973,7 +6562,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6973
6562
|
const env = options.env ?? process.env;
|
|
6974
6563
|
const configPath = configPathFor(options);
|
|
6975
6564
|
try {
|
|
6976
|
-
if (!options.readOnly)
|
|
6565
|
+
if (!options.readOnly && !readOnlyLockOf(app, env))
|
|
6977
6566
|
ensureDefaultConfig(configPath, withDefaults(DEFAULT_CONFIG).config);
|
|
6978
6567
|
} catch (error) {
|
|
6979
6568
|
throw new CliError("configuration_error", error instanceof Error ? error.message : String(error));
|
|
@@ -6994,11 +6583,11 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6994
6583
|
const name = usableProfileName(profile.value);
|
|
6995
6584
|
const configured = config.profiles[name] ?? {};
|
|
6996
6585
|
const shared = config.defaults ?? {};
|
|
6997
|
-
const
|
|
6586
|
+
const section2 = config[kind2];
|
|
6998
6587
|
const layers = [
|
|
6999
|
-
[`config file: ${kind2}.profiles.${name}`,
|
|
6588
|
+
[`config file: ${kind2}.profiles.${name}`, section2?.profiles?.[name]],
|
|
7000
6589
|
[extension.sourcePaths ? `config file: profiles.${name}` : "config file", configured],
|
|
7001
|
-
[`config file: ${kind2}.defaults`,
|
|
6590
|
+
[`config file: ${kind2}.defaults`, section2?.defaults],
|
|
7002
6591
|
[extension.sourcePaths ? "config file: defaults" : "config defaults", shared]
|
|
7003
6592
|
];
|
|
7004
6593
|
const fromLayers = /* @__PURE__ */ __name((key, fallback, only = layers) => first(only.map(([from, scope]) => [from, scope?.[key]]), fallback), "fromLayers");
|
|
@@ -7012,11 +6601,13 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
7012
6601
|
const historyDialogDays = fromLayers("history_dialog_days", DEFAULT_HISTORY_LIMITS.dialogDays);
|
|
7013
6602
|
const historyGroupDays = fromLayers("history_group_days", DEFAULT_HISTORY_LIMITS.groupDays);
|
|
7014
6603
|
const historyGroupMembersMax = fromLayers("history_group_members_max", DEFAULT_HISTORY_LIMITS.groupMembersMax);
|
|
6604
|
+
const historyMuted = fromLayers("history_muted", false);
|
|
7015
6605
|
const pictureSearch = fromLayers("picture_search", false);
|
|
7016
6606
|
const searchReranker = fromLayers("search_reranker", DEFAULT_RERANK_MODEL);
|
|
7017
6607
|
const recordInput = fromLayers("record_input", true);
|
|
7018
6608
|
const keepRunsForDays = fromLayers("keep_runs_for_days", DEFAULT_KEEP_RUNS_FOR_DAYS);
|
|
7019
6609
|
const keepSuccessfulRunsForDays = fromLayers("keep_successful_runs_for_days", KEEP_SUCCESSFUL_RUNS_FOR_DAYS);
|
|
6610
|
+
const keepStoreRunsForDays = fromLayers("keep_store_runs_for_days", KEEP_STORE_RUNS_FOR_DAYS);
|
|
7020
6611
|
const runsSizeLimitMb = fromLayers("runs_size_limit_mb", RUNS_SIZE_LIMIT_MB);
|
|
7021
6612
|
const readOnlyLock = readOnlyLockOf(app, env);
|
|
7022
6613
|
const sendsPerHour = kind2 === "bot" ? fromLayers("sends_per_hour", Number.POSITIVE_INFINITY, kindLayers) : fromLayers("sends_per_hour", DEFAULT_SENDS_PER_HOUR);
|
|
@@ -7059,6 +6650,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
7059
6650
|
groupDays: historyGroupDays.value,
|
|
7060
6651
|
groupMembersMax: historyGroupMembersMax.value
|
|
7061
6652
|
},
|
|
6653
|
+
historyMuted: historyMuted.value,
|
|
7062
6654
|
pictureSearch: pictureSearch.value,
|
|
7063
6655
|
searchReranker: searchReranker.value,
|
|
7064
6656
|
limit: limit.value,
|
|
@@ -7071,6 +6663,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
7071
6663
|
keepFailedRuns: record2.value || record2.from !== "flag",
|
|
7072
6664
|
keepRunsForDays: keepRunsForDays.value,
|
|
7073
6665
|
keepSuccessfulRunsForDays: keepSuccessfulRunsForDays.value,
|
|
6666
|
+
keepStoreRunsForDays: keepStoreRunsForDays.value,
|
|
7074
6667
|
runsSizeLimitMb: runsSizeLimitMb.value,
|
|
7075
6668
|
...readOnlyLock ? { readOnlyLock } : {},
|
|
7076
6669
|
permissions: permissions.levels,
|
|
@@ -7082,7 +6675,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
7082
6675
|
updateCheck: updateCheck.value,
|
|
7083
6676
|
skillHint: skillHint.value,
|
|
7084
6677
|
configPath,
|
|
7085
|
-
configFound:
|
|
6678
|
+
configFound: existsSync5(configPath),
|
|
7086
6679
|
configuredProfiles: namedProfiles(config),
|
|
7087
6680
|
profilesHere: profilesOf(config, env),
|
|
7088
6681
|
accountProfiles: accountsOf(config, env, bots),
|
|
@@ -7099,12 +6692,14 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
7099
6692
|
historyDialogDays: historyDialogDays.from,
|
|
7100
6693
|
historyGroupDays: historyGroupDays.from,
|
|
7101
6694
|
historyGroupMembersMax: historyGroupMembersMax.from,
|
|
6695
|
+
historyMuted: historyMuted.from,
|
|
7102
6696
|
pictureSearch: pictureSearch.from,
|
|
7103
6697
|
searchReranker: searchReranker.from,
|
|
7104
6698
|
record: record2.from,
|
|
7105
6699
|
recordInput: recordInput.from,
|
|
7106
6700
|
keepRunsForDays: keepRunsForDays.from,
|
|
7107
6701
|
keepSuccessfulRunsForDays: keepSuccessfulRunsForDays.from,
|
|
6702
|
+
keepStoreRunsForDays: keepStoreRunsForDays.from,
|
|
7108
6703
|
runsSizeLimitMb: runsSizeLimitMb.from,
|
|
7109
6704
|
sendsPerHour: sendsPerHour.from,
|
|
7110
6705
|
requestsPerMinute: requestsPerMinute.from,
|
|
@@ -7244,7 +6839,7 @@ var given = /* @__PURE__ */ __name((value) => {
|
|
|
7244
6839
|
return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
|
|
7245
6840
|
}, "given");
|
|
7246
6841
|
|
|
7247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/context.js
|
|
7248
6843
|
var setExitCode = /* @__PURE__ */ __name((command, code) => {
|
|
7249
6844
|
const slot = environmentOf(command).exit;
|
|
7250
6845
|
if (slot)
|
|
@@ -7339,6 +6934,7 @@ var baseContext = /* @__PURE__ */ __name((command, resolveSettings) => {
|
|
|
7339
6934
|
trace: settings.trace,
|
|
7340
6935
|
keepDays: settings.keepRunsForDays,
|
|
7341
6936
|
...settings.keepSuccessfulRunsForDays === void 0 ? {} : { keepSuccessDays: settings.keepSuccessfulRunsForDays },
|
|
6937
|
+
...settings.keepStoreRunsForDays === void 0 ? {} : { keepStoreDays: settings.keepStoreRunsForDays },
|
|
7342
6938
|
...settings.runsSizeLimitMb === void 0 ? {} : { maxBytes: settings.runsSizeLimitMb * 1024 * 1024 },
|
|
7343
6939
|
processRun: !environment.agent,
|
|
7344
6940
|
format,
|
|
@@ -7366,7 +6962,7 @@ var commandPath = /* @__PURE__ */ __name((command) => {
|
|
|
7366
6962
|
return words2.join(" ");
|
|
7367
6963
|
}, "commandPath");
|
|
7368
6964
|
|
|
7369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/effects.js
|
|
7370
6966
|
var REMOTE_READ = { remote: "read", local: "read" };
|
|
7371
6967
|
var FETCH = { remote: "read", local: "write" };
|
|
7372
6968
|
var REMOTE_WRITE = { remote: "write", local: "write" };
|
|
@@ -7498,7 +7094,7 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
|
|
|
7498
7094
|
throw readOnlyRefusal(lock, what);
|
|
7499
7095
|
}, "refuseUnderReadOnly");
|
|
7500
7096
|
|
|
7501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/account.js
|
|
7502
7098
|
var account = strictObject({
|
|
7503
7099
|
provider: text,
|
|
7504
7100
|
id,
|
|
@@ -7508,7 +7104,7 @@ var account = strictObject({
|
|
|
7508
7104
|
scope: optional(picklist(["personal", "work"]))
|
|
7509
7105
|
});
|
|
7510
7106
|
|
|
7511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/account-session.js
|
|
7512
7108
|
var accountSession = strictObject({
|
|
7513
7109
|
current: boolean(),
|
|
7514
7110
|
client: nullable(text),
|
|
@@ -7518,7 +7114,7 @@ var accountSession = strictObject({
|
|
|
7518
7114
|
created_at: optional(nullable(time))
|
|
7519
7115
|
});
|
|
7520
7116
|
|
|
7521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/account-change.js
|
|
7522
7118
|
var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
|
|
7523
7119
|
var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
|
|
7524
7120
|
var audience = picklist(["everyone", "contacts", "nobody"]);
|
|
@@ -7547,7 +7143,7 @@ var accountRemoval = strictObject({
|
|
|
7547
7143
|
kept: array(strictObject({ kind: removalKind, target: text, reason: text }))
|
|
7548
7144
|
});
|
|
7549
7145
|
|
|
7550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
|
|
7551
7147
|
var accountProfile = strictObject({
|
|
7552
7148
|
profile: id,
|
|
7553
7149
|
current: boolean(),
|
|
@@ -7559,7 +7155,7 @@ var accountProfile = strictObject({
|
|
|
7559
7155
|
bot: optional(literal(true))
|
|
7560
7156
|
});
|
|
7561
7157
|
|
|
7562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
|
|
7563
7159
|
var milliseconds = pipe(number(), minValue(0));
|
|
7564
7160
|
var counterReading = strictObject({
|
|
7565
7161
|
counter: picklist(["views", "reactions", "comments"]),
|
|
@@ -7571,7 +7167,7 @@ var counterReading = strictObject({
|
|
|
7571
7167
|
});
|
|
7572
7168
|
var selection = record(string(), unknown());
|
|
7573
7169
|
|
|
7574
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7170
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
|
|
7575
7171
|
var adminRow = strictObject({
|
|
7576
7172
|
ref: reference,
|
|
7577
7173
|
/** What `stats * evidence` takes: a person id, a stay or a message locator. */
|
|
@@ -7624,7 +7220,7 @@ var adminReport = strictObject({
|
|
|
7624
7220
|
rows: array(adminRow)
|
|
7625
7221
|
});
|
|
7626
7222
|
|
|
7627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7223
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/task.js
|
|
7628
7224
|
var closeSuggestion = strictObject({
|
|
7629
7225
|
as: picklist(["done", "dismissed"]),
|
|
7630
7226
|
/** The agent's name. */
|
|
@@ -7686,7 +7282,7 @@ var task = strictObject({
|
|
|
7686
7282
|
updated_at: optional(time)
|
|
7687
7283
|
});
|
|
7688
7284
|
|
|
7689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/agenda.js
|
|
7690
7286
|
var agendaChat = strictObject({
|
|
7691
7287
|
chat: reference,
|
|
7692
7288
|
title: nullable(text),
|
|
@@ -7756,11 +7352,11 @@ var agenda = strictObject({
|
|
|
7756
7352
|
unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
|
|
7757
7353
|
});
|
|
7758
7354
|
|
|
7759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
|
|
7760
7356
|
var analysisConsent = strictObject({ chat: id, provider: text, at: time });
|
|
7761
7357
|
var analysisConsentRevocation = strictObject({ revoked: boolean() });
|
|
7762
7358
|
|
|
7763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/attachment.js
|
|
7764
7360
|
var attachment = strictObject({
|
|
7765
7361
|
/** The message it came with, as a locator; absent inside that message. */
|
|
7766
7362
|
message: optional(reference),
|
|
@@ -7798,7 +7394,7 @@ var attachment = strictObject({
|
|
|
7798
7394
|
});
|
|
7799
7395
|
var hitFile = strictObject({ position: count, kind: text, name: optional(text), size: optional(count) });
|
|
7800
7396
|
|
|
7801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7397
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
|
|
7802
7398
|
var actionableError = objectWithRest({
|
|
7803
7399
|
code: text,
|
|
7804
7400
|
message: text,
|
|
@@ -7815,7 +7411,7 @@ var batchResult = strictObject({
|
|
|
7815
7411
|
max_error_percent: count
|
|
7816
7412
|
});
|
|
7817
7413
|
|
|
7818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7414
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
|
|
7819
7415
|
var extractionItem = strictObject({
|
|
7820
7416
|
ref: reference,
|
|
7821
7417
|
attachment: count,
|
|
@@ -7848,7 +7444,7 @@ var extractionReport = strictObject({
|
|
|
7848
7444
|
cursor: optional(text)
|
|
7849
7445
|
});
|
|
7850
7446
|
|
|
7851
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
|
|
7852
7448
|
var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
|
|
7853
7449
|
var attachmentBytes = strictObject({
|
|
7854
7450
|
ref: reference,
|
|
@@ -7876,22 +7472,80 @@ var attachmentTextChange = strictObject({
|
|
|
7876
7472
|
replaced: nullable(picklist(["extracted", "agent"]))
|
|
7877
7473
|
});
|
|
7878
7474
|
|
|
7879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7880
|
-
var
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
|
|
7476
|
+
var WEIGHTS = {
|
|
7477
|
+
bot: 3,
|
|
7478
|
+
scam: 3,
|
|
7479
|
+
fake: 3,
|
|
7480
|
+
deleted: 1,
|
|
7481
|
+
no_photo: 1,
|
|
7482
|
+
no_username: 1,
|
|
7483
|
+
odd_name: 1,
|
|
7484
|
+
never_wrote: 1,
|
|
7485
|
+
link_first: 2,
|
|
7486
|
+
burst_join: 1,
|
|
7487
|
+
mass_invited: 1,
|
|
7488
|
+
new_account: 2,
|
|
7489
|
+
no_bio: 1,
|
|
7490
|
+
same_text: 2,
|
|
7491
|
+
photo_recent: 1,
|
|
7492
|
+
cas_banned: 3,
|
|
7493
|
+
lols_banned: 3,
|
|
7494
|
+
lols_scammer: 3
|
|
7495
|
+
};
|
|
7496
|
+
var LINK = /https?:\/\/|t\.me\/|www\./i;
|
|
7497
|
+
var DIGITS = /\d{5,}/;
|
|
7498
|
+
var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
|
|
7499
|
+
|
|
7500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
|
|
7501
|
+
var linkedIdentity = strictObject({
|
|
7502
|
+
provider: text,
|
|
7503
|
+
id,
|
|
7504
|
+
name: nullable(text),
|
|
7505
|
+
username: nullable(text),
|
|
7506
|
+
is_bot: nullable(boolean()),
|
|
7507
|
+
accounts: array(id),
|
|
7508
|
+
seen_in: array(strictObject({ account: id, scope: picklist(["personal", "work"]) })),
|
|
7509
|
+
method: text,
|
|
7510
|
+
linked_by: text,
|
|
7511
|
+
linked_at: time
|
|
7512
|
+
});
|
|
7513
|
+
var linkedPerson = strictObject({
|
|
7514
|
+
uid: id,
|
|
7515
|
+
name: nullable(text),
|
|
7516
|
+
identities: array(linkedIdentity),
|
|
7517
|
+
/** An agent's link: the `identity_link` proposal the owner decides; the person is still as it was. */
|
|
7518
|
+
proposal: optional(text)
|
|
7519
|
+
});
|
|
7520
|
+
var contactActivity = strictObject({
|
|
7521
|
+
at: time,
|
|
7522
|
+
subject: text,
|
|
7523
|
+
subject_id: count,
|
|
7524
|
+
role: text,
|
|
7525
|
+
scope: text,
|
|
7526
|
+
provider: nullable(text),
|
|
7527
|
+
account: nullable(text),
|
|
7528
|
+
chat_id: nullable(text),
|
|
7529
|
+
locator: nullable(text),
|
|
7530
|
+
project_id: nullable(count)
|
|
7531
|
+
});
|
|
7532
|
+
var botReason = picklist(Object.keys(WEIGHTS));
|
|
7533
|
+
var contactCheck = strictObject({
|
|
7534
|
+
person: strictObject({ id, name: nullable(text), username: nullable(text), provider: text }),
|
|
7535
|
+
score: count,
|
|
7536
|
+
reasons: array(strictObject({ reason: botReason, weight: count, source: text, detail: optional(text) })),
|
|
7537
|
+
registries: array(strictObject({
|
|
7538
|
+
name: picklist(["cas", "lols"]),
|
|
7539
|
+
answer: picklist(["listed", "clean", "unknown"]),
|
|
7540
|
+
checked_at: time,
|
|
7541
|
+
detail: optional(text),
|
|
7542
|
+
reasons: optional(array(picklist(["cas_banned", "lols_banned", "lols_scammer"])))
|
|
7543
|
+
})),
|
|
7544
|
+
unknown: array(botReason),
|
|
7545
|
+
checked_at: time
|
|
7892
7546
|
});
|
|
7893
7547
|
|
|
7894
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/member.js
|
|
7895
7549
|
var member = strictObject({
|
|
7896
7550
|
id,
|
|
7897
7551
|
name: nullable(text),
|
|
@@ -7914,7 +7568,7 @@ var member = strictObject({
|
|
|
7914
7568
|
check: optional(record(string(), unknown()))
|
|
7915
7569
|
});
|
|
7916
7570
|
|
|
7917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/chat.js
|
|
7918
7572
|
var setting = optional(nullable(boolean()));
|
|
7919
7573
|
var chat = strictObject({
|
|
7920
7574
|
ref: reference,
|
|
@@ -7955,758 +7609,972 @@ var chat = strictObject({
|
|
|
7955
7609
|
members: optional(array(member))
|
|
7956
7610
|
});
|
|
7957
7611
|
|
|
7958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7959
|
-
var
|
|
7612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/message.js
|
|
7613
|
+
var quoted = strictObject({
|
|
7960
7614
|
id,
|
|
7961
|
-
|
|
7962
|
-
|
|
7615
|
+
sender_id: nullable(id),
|
|
7616
|
+
sender_name: nullable(text),
|
|
7617
|
+
timestamp: nullable(time),
|
|
7618
|
+
text,
|
|
7619
|
+
attachments: array(attachment),
|
|
7620
|
+
outgoing: nullable(boolean())
|
|
7963
7621
|
});
|
|
7964
|
-
var
|
|
7622
|
+
var mailPerson = strictObject({ name: nullable(text), address: text, ref: nullable(reference) });
|
|
7623
|
+
var message = strictObject({
|
|
7624
|
+
/** The message's locator. */
|
|
7625
|
+
ref: reference,
|
|
7965
7626
|
id,
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
chat_ids: array(id),
|
|
7969
|
-
emoji: optional(text),
|
|
7970
|
-
/** Kinds of chat it takes by itself. */
|
|
7971
|
-
include: optional(array(picklist(["contacts", "non-contacts", "groups", "channels", "bots"]))),
|
|
7972
|
-
skip: optional(array(picklist(["muted", "read", "archived"]))),
|
|
7973
|
-
excluded_chat_ids: optional(array(id)),
|
|
7974
|
-
pinned_chat_ids: optional(array(id)),
|
|
7975
|
-
/** `chats folders show`: the chats in it, pinned and left out, by name. */
|
|
7976
|
-
chats: optional(array(named2)),
|
|
7977
|
-
pinned_chats: optional(array(named2)),
|
|
7978
|
-
excluded_chats: optional(array(named2))
|
|
7979
|
-
});
|
|
7980
|
-
|
|
7981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
|
|
7982
|
-
var inviteLink = strictObject({
|
|
7983
|
-
link: text,
|
|
7984
|
-
/** Who joins by it asks first, and an admin lets them in. */
|
|
7985
|
-
approval: boolean(),
|
|
7986
|
-
/** `null` when it never expires. */
|
|
7987
|
-
expires_at: nullable(time),
|
|
7988
|
-
/** `null` for no limit. */
|
|
7989
|
-
max_uses: nullable(count),
|
|
7990
|
-
/** The group's own link; revoking it makes the messenger issue a new one. */
|
|
7991
|
-
primary: optional(boolean()),
|
|
7992
|
-
revoked: optional(boolean()),
|
|
7993
|
-
pending_count: optional(count),
|
|
7994
|
-
joined_count: optional(count)
|
|
7995
|
-
});
|
|
7996
|
-
|
|
7997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
|
|
7998
|
-
var operated = { operation_id: id, chat_id: id };
|
|
7999
|
-
var group = strictObject({
|
|
8000
|
-
...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
|
|
8001
|
-
parent_chat_id: optional(nullable(id)),
|
|
8002
|
-
muted_until: optional(nullable(time)),
|
|
8003
|
-
description: nullable(text),
|
|
8004
|
-
link: nullable(text),
|
|
8005
|
-
settings: strictObject({
|
|
8006
|
-
...unwrap(chat.entries.settings).entries,
|
|
8007
|
-
all_can_pin: nullable(boolean()),
|
|
8008
|
-
only_admins_add: nullable(boolean()),
|
|
8009
|
-
only_admins_call: nullable(boolean()),
|
|
8010
|
-
only_owner_edits_info: nullable(boolean()),
|
|
8011
|
-
members_see_link: nullable(boolean())
|
|
8012
|
-
})
|
|
8013
|
-
});
|
|
8014
|
-
var chatGroupChange = union([
|
|
8015
|
-
strictObject({ operation_id: id, chat: group }),
|
|
8016
|
-
strictObject({ operation_id: id, requested: literal(true) })
|
|
8017
|
-
]);
|
|
8018
|
-
var chatInspection = strictObject({
|
|
8019
|
-
kind: chat.entries.kind,
|
|
8020
|
-
title: nullable(text),
|
|
8021
|
-
id: nullable(id),
|
|
8022
|
-
username: nullable(text),
|
|
8023
|
-
participants_count: nullable(count),
|
|
8024
|
-
description: nullable(text),
|
|
8025
|
-
member: nullable(boolean()),
|
|
8026
|
-
approval_needed: optional(boolean())
|
|
8027
|
-
});
|
|
8028
|
-
var chatSender = strictObject({
|
|
8029
|
-
id,
|
|
8030
|
-
title: text,
|
|
8031
|
-
kind: picklist(["self", "channel", "group"]),
|
|
8032
|
-
premium_required: boolean(),
|
|
8033
|
-
default: boolean()
|
|
8034
|
-
});
|
|
8035
|
-
var chatRead = strictObject({ ...operated, until: nullable(id), thread_id: optional(id) });
|
|
8036
|
-
var chatMembersFetch = strictObject({
|
|
7627
|
+
provider: optional(text),
|
|
7628
|
+
account: optional(text),
|
|
8037
7629
|
chat_id: id,
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8053
|
-
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
8070
|
-
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
7630
|
+
chat_title: optional(nullable(text)),
|
|
7631
|
+
sender_id: nullable(id),
|
|
7632
|
+
sender_name: nullable(text),
|
|
7633
|
+
sender_username: optional(text),
|
|
7634
|
+
sender_is_chat: optional(boolean()),
|
|
7635
|
+
sender_is_me: boolean(),
|
|
7636
|
+
mentions: optional(array(id)),
|
|
7637
|
+
/** When it was sent. */
|
|
7638
|
+
timestamp: time,
|
|
7639
|
+
edited_at: nullable(time),
|
|
7640
|
+
text,
|
|
7641
|
+
/** What a voice message says, once heard. */
|
|
7642
|
+
transcript: optional(text),
|
|
7643
|
+
/** In a window of messages around one, the one asked for. */
|
|
7644
|
+
anchor: optional(boolean()),
|
|
7645
|
+
/** A stretch of the text, transcript, file name or file text around what a search matched. */
|
|
7646
|
+
excerpt: optional(text),
|
|
7647
|
+
/** `picture`: the picture search lane found it by what the picture shows; it follows the text hits. */
|
|
7648
|
+
matched_in: optional(picklist(["text", "transcript", "filename", "file", "context", "picture"])),
|
|
7649
|
+
score: optional(number()),
|
|
7650
|
+
/**
|
|
7651
|
+
* `corrected`: a query word matched only a spelling speech recognition garbled in a voice note's transcript,
|
|
7652
|
+
* listed in `corrections`. `words` and `beginnings`: what a discovery search matched.
|
|
7653
|
+
*/
|
|
7654
|
+
match: optional(picklist(["words", "beginnings", "corrected"])),
|
|
7655
|
+
corrections: optional(array(strictObject({ from: text, to: array(text) }))),
|
|
7656
|
+
/** Where a search found it: the local archive, the messenger's server, or both. */
|
|
7657
|
+
found_in: optional(picklist(["archive", "server", "both"])),
|
|
7658
|
+
/** A discovery search's partial match: how much of the question it covers, and which words it lacks. */
|
|
7659
|
+
discovery: optional(strictObject({
|
|
7660
|
+
coverage: number(),
|
|
7661
|
+
matched_terms: array(text),
|
|
7662
|
+
missing_terms: array(text),
|
|
7663
|
+
parent: optional(reference),
|
|
7664
|
+
/** Present when meaning was searched too: which of the two lists found it. */
|
|
7665
|
+
found_by: optional(array(picklist(["words", "meaning"]))),
|
|
7666
|
+
/** Present when the reranker read it: its own score, higher is better. It ordered the first hits with `score`. */
|
|
7667
|
+
reranker_score: optional(number())
|
|
7668
|
+
})),
|
|
7669
|
+
/** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
|
|
7670
|
+
context: optional(array(strictObject({ ref: reference, timestamp: time, sender_name: nullable(text), text }))),
|
|
7671
|
+
/**
|
|
7672
|
+
* A discovery hit's later messages, from any chat the search reads, that share a rare word with it, latest first:
|
|
7673
|
+
* one may change or cancel what the hit says. An excerpt, as the hit's own: `messages context <ref>` has the whole text.
|
|
7674
|
+
*/
|
|
7675
|
+
follow_ups: optional(array(strictObject({
|
|
7676
|
+
ref: reference,
|
|
7677
|
+
chat_title: nullable(text),
|
|
7678
|
+
timestamp: time,
|
|
7679
|
+
sender_name: nullable(text),
|
|
7680
|
+
excerpt: text
|
|
7681
|
+
}))),
|
|
7682
|
+
outgoing: nullable(boolean()),
|
|
7683
|
+
attachments: array(attachment),
|
|
7684
|
+
reply_to: nullable(quoted),
|
|
7685
|
+
/** The id a reply answers, also when the provider sent no copy of that message. */
|
|
7686
|
+
reply_to_id: optional(id),
|
|
7687
|
+
forwarded_from: nullable(quoted),
|
|
7688
|
+
thread_id: optional(id),
|
|
7689
|
+
thread_root_id: optional(id),
|
|
7690
|
+
reactions: optional(nullable(strictObject({
|
|
7691
|
+
counts: array(strictObject({ reaction: text, count })),
|
|
7692
|
+
mine: nullable(text),
|
|
7693
|
+
total: count
|
|
7694
|
+
}))),
|
|
7695
|
+
scheduled_for: optional(time),
|
|
7696
|
+
/** The owner starred it; only where the messenger has stars, and only when set. */
|
|
7697
|
+
starred: optional(literal(true)),
|
|
7698
|
+
/** The owner's own message in a one-to-one chat: `delivered`, or `read` once opened; absent when no receipt came. */
|
|
7699
|
+
delivery: optional(picklist(["delivered", "read"])),
|
|
7700
|
+
email: optional(strictObject({
|
|
7701
|
+
subject: nullable(text),
|
|
7702
|
+
from: nullable(mailPerson),
|
|
7703
|
+
to: array(mailPerson),
|
|
7704
|
+
cc: array(mailPerson),
|
|
7705
|
+
bcc: array(mailPerson),
|
|
7706
|
+
/** The mail header Reply-To; `reply_to` is the quoted message a chat reply answers. */
|
|
7707
|
+
reply_addresses: array(mailPerson),
|
|
7708
|
+
labels: array(text),
|
|
7709
|
+
/** The thread as a `chat:` reference. */
|
|
7710
|
+
thread: reference,
|
|
7711
|
+
read: nullable(boolean()),
|
|
7712
|
+
flagged: nullable(boolean()),
|
|
7713
|
+
/** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
|
|
7714
|
+
sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) })),
|
|
7715
|
+
/** Mail `review`: filed in the mailbox of mail sent to many. */
|
|
7716
|
+
bulk: optional(boolean()),
|
|
7717
|
+
/** Mail `review`: its List-Id, `null` when it has none. */
|
|
7718
|
+
list_id: optional(nullable(text)),
|
|
7719
|
+
/** Mail `review`: the mail rule that decided how it is stored, by its id in `rules list`; `null` when none. */
|
|
7720
|
+
rule_id: optional(nullable(number())),
|
|
7721
|
+
/** Mail `review`: the evidence fingerprint a finding cites this email by. */
|
|
7722
|
+
fingerprint: optional(pipe(text, regex(/^[a-f0-9]{64}$/))),
|
|
7723
|
+
/** Mail `review`: no earlier stored email, in any account, came from this address. */
|
|
7724
|
+
new_sender: optional(boolean()),
|
|
7725
|
+
/** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
|
|
7726
|
+
sender_identities: optional(number())
|
|
7727
|
+
})),
|
|
7728
|
+
provider_metadata: providerMetadata
|
|
8083
7729
|
});
|
|
8084
|
-
var chatArchive = strictObject({ ...operated2, archived: boolean() });
|
|
8085
|
-
var chatPin = strictObject({ ...operated2, pinned: boolean() });
|
|
8086
|
-
var chatUnread = strictObject({ ...operated2, unread: literal(true) });
|
|
8087
7730
|
|
|
8088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8089
|
-
var
|
|
8090
|
-
var
|
|
7731
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
|
|
7732
|
+
var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
|
|
7733
|
+
var contextMessage = strictObject({
|
|
7734
|
+
locator: reference,
|
|
7735
|
+
provider: text,
|
|
7736
|
+
account: id,
|
|
8091
7737
|
chat_id: id,
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
/** `create` and `title` carry the chat's title. */
|
|
8100
|
-
title: optional(text),
|
|
8101
|
-
/** `profile`: the name and username seen before. */
|
|
8102
|
-
before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
|
|
7738
|
+
chat_title: nullable(text),
|
|
7739
|
+
id,
|
|
7740
|
+
timestamp: time,
|
|
7741
|
+
sender_id: nullable(id),
|
|
7742
|
+
sender_name: nullable(text),
|
|
7743
|
+
outgoing: nullable(boolean()),
|
|
7744
|
+
text
|
|
8103
7745
|
});
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
7746
|
+
var sharedChat = strictObject({
|
|
7747
|
+
provider: text,
|
|
7748
|
+
account: id,
|
|
8107
7749
|
chat_id: id,
|
|
8108
7750
|
title: nullable(text),
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
fetched_at: time
|
|
8112
|
-
});
|
|
8113
|
-
var cachedChatMetadata = strictObject({ chat_id: id, metadata: nullable(chatMetadata) });
|
|
8114
|
-
var failedChatMetadata = strictObject({ chat_id: id, error: strictObject({ code: text, message: text }) });
|
|
8115
|
-
var chatMetadataRefresh = strictObject({
|
|
8116
|
-
chats: array(union([chatMetadata, failedChatMetadata])),
|
|
8117
|
-
has_more: boolean()
|
|
7751
|
+
kind: chat.entries.kind,
|
|
7752
|
+
last_message_at: nullable(time)
|
|
8118
7753
|
});
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
var action = picklist(["report", "delete", "remove"]);
|
|
8122
|
-
var level = picklist(["deny", "readonly", "ask", "allow"]);
|
|
8123
|
-
var chatRules = strictObject({
|
|
8124
|
-
chat_id: id,
|
|
7754
|
+
var contextEvent = strictObject({
|
|
7755
|
+
ref: reference,
|
|
8125
7756
|
title: nullable(text),
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
blocked: array(id),
|
|
8132
|
-
blocked_names: array(text),
|
|
8133
|
-
links: action,
|
|
8134
|
-
invites: action,
|
|
8135
|
-
forwards: action,
|
|
8136
|
-
blocked_people: action,
|
|
8137
|
-
flood: strictObject({ messages: count, minutes: count, action }),
|
|
8138
|
-
new_account: strictObject({ days: count, action: picklist(["report", "remove"]) }),
|
|
8139
|
-
consent: strictObject({ delete: level, remove: level })
|
|
8140
|
-
})
|
|
8141
|
-
});
|
|
8142
|
-
var chatModeration = strictObject({
|
|
8143
|
-
chat_id: id,
|
|
8144
|
-
rows: array(strictObject({
|
|
8145
|
-
kind: picklist(["message", "member"]),
|
|
8146
|
-
rule: picklist(["blocked", "invites", "links", "forwards", "flood", "newAccount"]),
|
|
8147
|
-
person_id: id,
|
|
8148
|
-
person_name: nullable(text),
|
|
8149
|
-
message_id: optional(id),
|
|
8150
|
-
action,
|
|
8151
|
-
outcome: picklist(["reported", "done", "planned", "forbidden", "declined", "refused", "failed", "skipped"]),
|
|
8152
|
-
reason: optional(text),
|
|
8153
|
-
command: optional(text)
|
|
8154
|
-
}))
|
|
7757
|
+
starts_at: nullable(time),
|
|
7758
|
+
ends_at: nullable(time),
|
|
7759
|
+
all_day: boolean(),
|
|
7760
|
+
location: nullable(text),
|
|
7761
|
+
status: nullable(text)
|
|
8155
7762
|
});
|
|
8156
|
-
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8161
|
-
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
complete: boolean(),
|
|
8166
|
-
completeness: strictObject({
|
|
8167
|
-
state: picklist(["complete", "partial", "unknown"]),
|
|
8168
|
-
up_to_date: nullable(boolean()),
|
|
8169
|
-
gaps: boolean(),
|
|
8170
|
-
reaches_start: boolean(),
|
|
8171
|
-
fetched_at: nullable(time)
|
|
8172
|
-
}),
|
|
8173
|
-
messages: count,
|
|
8174
|
-
senders: count,
|
|
8175
|
-
replies: count,
|
|
8176
|
-
threads: count,
|
|
8177
|
-
reactions: count,
|
|
8178
|
-
views: optionalCount,
|
|
8179
|
-
forwards: optionalCount,
|
|
8180
|
-
comments: optionalCount,
|
|
8181
|
-
top_posts: array(strictObject({
|
|
8182
|
-
ref: reference,
|
|
8183
|
-
timestamp: time,
|
|
8184
|
-
reactions: count,
|
|
8185
|
-
views: optionalCount,
|
|
8186
|
-
forwards: optionalCount,
|
|
8187
|
-
comments: optionalCount
|
|
8188
|
-
})),
|
|
8189
|
-
questions: strictObject({
|
|
8190
|
-
asked: count,
|
|
8191
|
-
answered: count,
|
|
8192
|
-
median_minutes_to_answer: minutes,
|
|
8193
|
-
answered_by: picklist(["owner", "owner-and-admins"])
|
|
7763
|
+
var context = strictObject({
|
|
7764
|
+
person: contextPerson,
|
|
7765
|
+
/** The accounts read: only those of the scopes the caller may read. */
|
|
7766
|
+
accounts: array(strictObject({ provider: text, account: id, scope: picklist(["personal", "work"]) })),
|
|
7767
|
+
shared: array(sharedChat),
|
|
7768
|
+
last: strictObject({
|
|
7769
|
+
from_them: nullable(contextMessage),
|
|
7770
|
+
from_me: nullable(contextMessage),
|
|
7771
|
+
from_them_anywhere: nullable(contextMessage)
|
|
8194
7772
|
}),
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
7773
|
+
recent: strictObject({ direct: array(contextMessage), groups: array(contextMessage) }),
|
|
7774
|
+
mentions: array(contextMessage),
|
|
7775
|
+
/** Calendar events they are invited to, one occurrence per series. */
|
|
7776
|
+
events: optional(strictObject({ upcoming: array(contextEvent), recent: array(contextEvent) })),
|
|
7777
|
+
limits: strictObject({ messages: count, bytes: count }),
|
|
7778
|
+
complete: boolean(),
|
|
7779
|
+
not_read: array(strictObject({
|
|
7780
|
+
provider: text,
|
|
7781
|
+
account: id,
|
|
7782
|
+
chat_id: id,
|
|
7783
|
+
title: nullable(text),
|
|
7784
|
+
reason: picklist(["not_fetched", "partial"])
|
|
7785
|
+
}))
|
|
7786
|
+
});
|
|
7787
|
+
var shortMessage = strictObject({ at: time, text, transcript: optional(text) });
|
|
7788
|
+
var identifiedMessage = strictObject({
|
|
7789
|
+
...shortMessage.entries,
|
|
7790
|
+
id,
|
|
7791
|
+
locator: reference,
|
|
7792
|
+
sender_id: nullable(id),
|
|
7793
|
+
reply_to: nullable(id)
|
|
7794
|
+
});
|
|
7795
|
+
var counterObservation = strictObject({
|
|
7796
|
+
value: number(),
|
|
7797
|
+
observed_at: time,
|
|
7798
|
+
source: picklist(["remote_fetch", "remote_update"]),
|
|
7799
|
+
reactions: optional(message.entries.reactions.wrapped.wrapped)
|
|
7800
|
+
});
|
|
7801
|
+
var { reply_addresses: mailReplyTo, ...mailFields } = message.entries.email.wrapped.entries;
|
|
7802
|
+
var fullMessage = strictObject({
|
|
7803
|
+
...pick(message, [
|
|
7804
|
+
"id",
|
|
7805
|
+
"chat_id",
|
|
7806
|
+
"chat_title",
|
|
7807
|
+
"excerpt",
|
|
7808
|
+
"sender_id",
|
|
7809
|
+
"sender_name",
|
|
7810
|
+
"sender_username",
|
|
7811
|
+
"mentions",
|
|
7812
|
+
"sender_is_chat",
|
|
7813
|
+
"timestamp",
|
|
7814
|
+
"edited_at",
|
|
7815
|
+
"text",
|
|
7816
|
+
"outgoing",
|
|
7817
|
+
"attachments",
|
|
7818
|
+
"reply_to",
|
|
7819
|
+
"reply_to_id",
|
|
7820
|
+
"forwarded_from",
|
|
7821
|
+
"thread_id",
|
|
7822
|
+
"thread_root_id",
|
|
7823
|
+
"scheduled_for",
|
|
7824
|
+
"provider_metadata",
|
|
7825
|
+
"delivery"
|
|
7826
|
+
]).entries,
|
|
7827
|
+
reactions: nullable(message.entries.reactions.wrapped.wrapped),
|
|
7828
|
+
starred: optional(boolean()),
|
|
7829
|
+
email: optional(strictObject({ ...mailFields, reply_to: mailReplyTo })),
|
|
7830
|
+
counter_observations: optional(partial(strictObject({
|
|
7831
|
+
views: counterObservation,
|
|
7832
|
+
reactions: counterObservation,
|
|
7833
|
+
comments: counterObservation
|
|
7834
|
+
}))),
|
|
7835
|
+
...shortMessage.entries,
|
|
7836
|
+
locator: reference
|
|
7837
|
+
});
|
|
7838
|
+
var contactMessages = strictObject({
|
|
7839
|
+
person: strictObject({ uid: id, provider: text, id, name: nullable(text) }),
|
|
7840
|
+
chats: array(strictObject({
|
|
7841
|
+
chat: pick(chat, ["id", "title", "kind"]),
|
|
7842
|
+
messages: array(union([shortMessage, identifiedMessage, fullMessage])),
|
|
7843
|
+
complete: boolean(),
|
|
8204
7844
|
more: boolean()
|
|
8205
7845
|
})),
|
|
8206
|
-
|
|
7846
|
+
limits: strictObject({ messages: count })
|
|
8207
7847
|
});
|
|
8208
|
-
var
|
|
8209
|
-
var
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
7848
|
+
var contactContext = union([context, contactMessages]);
|
|
7849
|
+
var coverage = strictObject({
|
|
7850
|
+
included: count,
|
|
7851
|
+
has_more: boolean(),
|
|
7852
|
+
cut_by: nullable(picklist(["limit", "bytes"]))
|
|
7853
|
+
});
|
|
7854
|
+
var meetingCue = strictObject({
|
|
7855
|
+
reference,
|
|
7856
|
+
fingerprint: text,
|
|
7857
|
+
transcript_id: count,
|
|
7858
|
+
content_hash: nullable(text),
|
|
7859
|
+
position: count,
|
|
7860
|
+
start_ms: count,
|
|
7861
|
+
end_ms: count,
|
|
7862
|
+
speaker_participant_id: nullable(count),
|
|
7863
|
+
speaker_name: nullable(text),
|
|
7864
|
+
text,
|
|
7865
|
+
revision: picklist(["current", "superseded"])
|
|
7866
|
+
});
|
|
7867
|
+
var contactPreparation = strictObject({
|
|
7868
|
+
...context.entries,
|
|
7869
|
+
prepare: strictObject({
|
|
7870
|
+
waiting: array(strictObject({
|
|
7871
|
+
provider: text,
|
|
7872
|
+
account: id,
|
|
7873
|
+
chat_id: id,
|
|
7874
|
+
title: nullable(text),
|
|
7875
|
+
message: contextMessage,
|
|
7876
|
+
partial: boolean()
|
|
7877
|
+
})),
|
|
7878
|
+
tasks: array(strictObject({
|
|
7879
|
+
ref: reference,
|
|
7880
|
+
title: text,
|
|
7881
|
+
role: text,
|
|
7882
|
+
due_at: nullable(time),
|
|
7883
|
+
project: reference,
|
|
7884
|
+
source: nullable(reference),
|
|
7885
|
+
created_at: time
|
|
7886
|
+
})),
|
|
7887
|
+
facts: array(strictObject({
|
|
7888
|
+
ref: reference,
|
|
7889
|
+
type: text,
|
|
7890
|
+
statement: text,
|
|
7891
|
+
subject: nullable(reference),
|
|
7892
|
+
project: nullable(reference),
|
|
7893
|
+
updated_at: time
|
|
7894
|
+
})),
|
|
7895
|
+
notes: array(strictObject({ ref: reference, title: nullable(text), text, revision: count, updated_at: time })),
|
|
7896
|
+
meetings: array(strictObject({
|
|
7897
|
+
reference,
|
|
7898
|
+
cues: array(meetingCue),
|
|
7899
|
+
cue_coverage: strictObject({ included: count, omitted: nullable(count), has_more: boolean() })
|
|
7900
|
+
})),
|
|
7901
|
+
limits: strictObject({ items: count, bytes: count }),
|
|
7902
|
+
coverage: strictObject({
|
|
7903
|
+
waiting: strictObject({
|
|
7904
|
+
...coverage.entries,
|
|
7905
|
+
rule: literal("their message is the newest the store holds in a one-to-one chat")
|
|
7906
|
+
}),
|
|
7907
|
+
tasks: strictObject({
|
|
7908
|
+
...coverage.entries,
|
|
7909
|
+
selection: literal("open, assigned to them in any role"),
|
|
7910
|
+
accounts: array(text)
|
|
7911
|
+
}),
|
|
7912
|
+
facts: strictObject({
|
|
7913
|
+
...coverage.entries,
|
|
7914
|
+
selection: literal("accepted, about them or a project they are a member of")
|
|
7915
|
+
}),
|
|
7916
|
+
notes: strictObject({
|
|
7917
|
+
...coverage.entries,
|
|
7918
|
+
selection: literal("written by you, about them"),
|
|
7919
|
+
withheld: optional(literal("contacts.notes.list"))
|
|
7920
|
+
}),
|
|
7921
|
+
meetings: strictObject({
|
|
7922
|
+
...coverage.entries,
|
|
7923
|
+
read: literal("every account of the store that saw them"),
|
|
7924
|
+
accounts: array(text),
|
|
7925
|
+
pending: count
|
|
7926
|
+
})
|
|
7927
|
+
})
|
|
7928
|
+
})
|
|
8229
7929
|
});
|
|
8230
7930
|
|
|
8231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8232
|
-
var
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
7931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/deal.js
|
|
7932
|
+
var nullableText = nullable(text);
|
|
7933
|
+
var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
|
|
7934
|
+
var outcome = picklist(["open", "won", "lost"]);
|
|
7935
|
+
var crmAccount = nullable(strictObject({ provider: text, account: text }));
|
|
7936
|
+
var day = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
|
|
7937
|
+
var deal = strictObject({
|
|
7938
|
+
id,
|
|
7939
|
+
ref: reference,
|
|
7940
|
+
kind: picklist(["deal", "lead"]),
|
|
7941
|
+
title: text,
|
|
7942
|
+
/** One line with the stage, amount and status. */
|
|
7943
|
+
summary: text,
|
|
7944
|
+
pipeline: reference,
|
|
7945
|
+
pipeline_name: text,
|
|
7946
|
+
stage: text,
|
|
7947
|
+
/** The base stage `stage` maps to, once the owner confirmed it; `null` while unsorted. */
|
|
7948
|
+
base_stage: nullable(strictObject({ ref: reference, name: text })),
|
|
7949
|
+
status: outcome,
|
|
7950
|
+
organization: nullable(party),
|
|
7951
|
+
currency: nullableText,
|
|
7952
|
+
amount: nullableText,
|
|
7953
|
+
close_date: day,
|
|
7954
|
+
closed_date: day,
|
|
7955
|
+
closed_reason: nullableText,
|
|
7956
|
+
rank: nullable(number()),
|
|
7957
|
+
/** A lead's deal, once it became one. */
|
|
7958
|
+
deal: nullable(reference),
|
|
7959
|
+
/** The CRM account it is a copy from; `null` for the owner's own. */
|
|
7960
|
+
account: crmAccount,
|
|
7961
|
+
external_id: nullableText,
|
|
7962
|
+
/** A CRM copy's assignee, the identity `<account>/user/<id>`. */
|
|
7963
|
+
assignee: nullableText,
|
|
7964
|
+
/** A CRM copy's own fields by code; a list field's value is its option's label, `option_id` its id. */
|
|
7965
|
+
provider_metadata: record(string(), strictObject({
|
|
7966
|
+
label: nullable(string()),
|
|
7967
|
+
value: unknown(),
|
|
7968
|
+
option_id: optional(union([string(), array(string())]))
|
|
7969
|
+
})),
|
|
7970
|
+
people: array(strictObject({ ...party.entries, role: picklist(DEAL_ROLES) })),
|
|
7971
|
+
author: strictObject({
|
|
7972
|
+
type: picklist(["person", "bot"]),
|
|
7973
|
+
id,
|
|
7974
|
+
name: nullableText,
|
|
7975
|
+
kind: nullable(picklist(["agent", "rule"]))
|
|
7976
|
+
}),
|
|
7977
|
+
model: nullableText,
|
|
7978
|
+
source: text,
|
|
7979
|
+
reason: nullableText,
|
|
7980
|
+
evidence: array(reference),
|
|
7981
|
+
project: nullable(reference),
|
|
7982
|
+
project_name: nullableText,
|
|
7983
|
+
created_at: time,
|
|
7984
|
+
updated_at: time,
|
|
7985
|
+
untrusted
|
|
8237
7986
|
});
|
|
8238
|
-
var
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
7987
|
+
var lead = deal;
|
|
7988
|
+
var pipelineStage = strictObject({
|
|
7989
|
+
name: text,
|
|
7990
|
+
position: count,
|
|
7991
|
+
outcome,
|
|
7992
|
+
external_id: nullableText,
|
|
7993
|
+
/** Open deals or leads in it now. */
|
|
7994
|
+
open: count,
|
|
7995
|
+
/** With a funnel: rows that got this far, and the share of them that reached the next stage. */
|
|
7996
|
+
reached: optional(count),
|
|
7997
|
+
conversion: optional(nullable(number())),
|
|
7998
|
+
/** With a funnel: rows standing in it now, and their sum per currency, never converted. */
|
|
7999
|
+
items: optional(count),
|
|
8000
|
+
amounts: optional(array(strictObject({ amount: text, currency: text, items: count })))
|
|
8243
8001
|
});
|
|
8244
|
-
var
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8002
|
+
var pipeline = strictObject({
|
|
8003
|
+
id,
|
|
8004
|
+
ref: reference,
|
|
8005
|
+
name: text,
|
|
8006
|
+
kind: picklist(["deal", "lead"]),
|
|
8007
|
+
account: crmAccount,
|
|
8008
|
+
external_id: nullableText,
|
|
8009
|
+
stages: array(pipelineStage),
|
|
8010
|
+
created_at: time,
|
|
8011
|
+
totals: optional(strictObject({ items: count, open: count, won: count, lost: count, win_rate: nullable(number()) })),
|
|
8012
|
+
since: optional(day),
|
|
8013
|
+
untrusted
|
|
8248
8014
|
});
|
|
8249
|
-
var
|
|
8250
|
-
|
|
8251
|
-
|
|
8015
|
+
var stage = strictObject({
|
|
8016
|
+
...pipelineStage.entries,
|
|
8017
|
+
pipeline: reference,
|
|
8018
|
+
pipeline_name: text,
|
|
8019
|
+
kind: picklist(["deal", "lead"]),
|
|
8020
|
+
untrusted
|
|
8252
8021
|
});
|
|
8253
8022
|
|
|
8254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8255
|
-
var
|
|
8256
|
-
var
|
|
8257
|
-
var
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/business-context.js
|
|
8024
|
+
var nullableText2 = nullable(text);
|
|
8025
|
+
var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
|
|
8026
|
+
var standing = picklist(STANDINGS);
|
|
8027
|
+
var categories = array(picklist(CATEGORIES));
|
|
8028
|
+
var section = /* @__PURE__ */ __name((item) => strictObject({ items: array(item), total: count, has_more: boolean(), next: nullableText2 }), "section");
|
|
8029
|
+
var relationRole = strictObject({
|
|
8030
|
+
/** `link:<id>`; absent for a proposal. */
|
|
8031
|
+
link: optional(reference),
|
|
8032
|
+
/** A `relationship` proposal waiting for the owner: its id, with `standing: proposed`. */
|
|
8033
|
+
proposal: optional(text),
|
|
8034
|
+
kind: picklist(RELATION_KINDS),
|
|
8035
|
+
role: nullableText2,
|
|
8036
|
+
/** `reported`: a CRM account says so and nobody confirmed it; `ended`: it no longer holds. */
|
|
8037
|
+
standing,
|
|
8038
|
+
/** The source account that reported it, `<provider>:<account>`. */
|
|
8039
|
+
account: optional(text),
|
|
8040
|
+
/** A job title the source gave; never a role. */
|
|
8041
|
+
position: optional(text),
|
|
8042
|
+
/** How a source made it when it stated none, such as `department-head`. */
|
|
8043
|
+
derived: optional(text),
|
|
8044
|
+
starts_at: optional(time),
|
|
8045
|
+
ends_at: optional(time)
|
|
8046
|
+
});
|
|
8047
|
+
var related = strictObject({ ref: reference, name: nullableText2, roles: array(relationRole) });
|
|
8048
|
+
var coverage2 = strictObject({
|
|
8049
|
+
/** `<provider>:<account>` of every account read. */
|
|
8050
|
+
accounts: array(text),
|
|
8051
|
+
not_read: array(strictObject({ source: text, reason: text }))
|
|
8052
|
+
});
|
|
8053
|
+
var linkedBy = array(picklist(["project", "counterparty"]));
|
|
8054
|
+
var financeTotal = strictObject({
|
|
8055
|
+
status: text,
|
|
8056
|
+
currency: text,
|
|
8057
|
+
rows: count,
|
|
8058
|
+
total: text,
|
|
8059
|
+
open: optional(text)
|
|
8060
|
+
});
|
|
8061
|
+
var money = strictObject({
|
|
8062
|
+
invoices: section(strictObject({
|
|
8063
|
+
ref: reference,
|
|
8064
|
+
title: text,
|
|
8065
|
+
direction: picklist(INVOICE_DIRECTIONS),
|
|
8066
|
+
status: picklist(INVOICE_STATUSES),
|
|
8067
|
+
review: picklist(FINANCE_REVIEWS),
|
|
8068
|
+
currency: text,
|
|
8069
|
+
total: text,
|
|
8070
|
+
open: text,
|
|
8071
|
+
due_date: day2,
|
|
8072
|
+
linked_by: linkedBy
|
|
8270
8073
|
})),
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8074
|
+
payments: section(strictObject({
|
|
8075
|
+
ref: reference,
|
|
8076
|
+
title: text,
|
|
8077
|
+
direction: picklist(MONEY_DIRECTIONS),
|
|
8078
|
+
review: picklist(FINANCE_REVIEWS),
|
|
8079
|
+
currency: text,
|
|
8080
|
+
amount: text,
|
|
8081
|
+
date: day2,
|
|
8082
|
+
linked_by: linkedBy
|
|
8083
|
+
})),
|
|
8084
|
+
orders: optional(section(strictObject({
|
|
8085
|
+
ref: reference,
|
|
8086
|
+
title: text,
|
|
8087
|
+
status: picklist(ORDER_STATUSES),
|
|
8088
|
+
review: picklist(FINANCE_REVIEWS),
|
|
8089
|
+
currency: nullableText2,
|
|
8090
|
+
total: nullableText2,
|
|
8091
|
+
side: picklist(["customer", "supplier"])
|
|
8279
8092
|
}))),
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
source: picklist(["profile", "messages"])
|
|
8289
|
-
}))
|
|
8290
|
-
};
|
|
8291
|
-
|
|
8292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/entities/contact.js
|
|
8293
|
-
var contact = strictObject({
|
|
8093
|
+
/** Confirmed rows only, per status (payments: direction) and currency; nothing converted. */
|
|
8094
|
+
totals: strictObject({ invoices: array(financeTotal), payments: array(financeTotal) }),
|
|
8095
|
+
/** Invoices and payments still proposed, of every row read. */
|
|
8096
|
+
unconfirmed: count,
|
|
8097
|
+
/** `false` when a read stopped at the store's page: the totals may leave rows out. */
|
|
8098
|
+
complete: boolean()
|
|
8099
|
+
});
|
|
8100
|
+
var taskLine = strictObject({
|
|
8294
8101
|
ref: reference,
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
|
|
8298
|
-
|
|
8299
|
-
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
|
|
8305
|
-
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
|
|
8312
|
-
|
|
8313
|
-
|
|
8314
|
-
|
|
8315
|
-
|
|
8316
|
-
|
|
8317
|
-
|
|
8318
|
-
|
|
8319
|
-
|
|
8320
|
-
|
|
8102
|
+
key: text,
|
|
8103
|
+
title: text,
|
|
8104
|
+
status: picklist(TASK_STATES),
|
|
8105
|
+
project: reference,
|
|
8106
|
+
due_at: nullable(time)
|
|
8107
|
+
});
|
|
8108
|
+
var counts = { messages: count, mail: count, meetings: count };
|
|
8109
|
+
var personBusiness = strictObject({
|
|
8110
|
+
organizations: section(strictObject({ ...related.entries, categories })),
|
|
8111
|
+
reports_to: section(related),
|
|
8112
|
+
direct_reports: section(related),
|
|
8113
|
+
deals: section(related),
|
|
8114
|
+
projects: section(related),
|
|
8115
|
+
categories
|
|
8116
|
+
});
|
|
8117
|
+
var personContext = strictObject({
|
|
8118
|
+
...context.entries,
|
|
8119
|
+
person: linkedPerson,
|
|
8120
|
+
has_more: boolean(),
|
|
8121
|
+
business: personBusiness,
|
|
8122
|
+
coverage: coverage2
|
|
8123
|
+
});
|
|
8124
|
+
var organizationContext = strictObject({
|
|
8125
|
+
organization: strictObject({ ...organization.entries, own: boolean() }),
|
|
8126
|
+
categories,
|
|
8127
|
+
people: section(related),
|
|
8128
|
+
customers: section(related),
|
|
8129
|
+
/** Whom it is a customer of: "supplier of", read backwards. */
|
|
8130
|
+
suppliers: section(related),
|
|
8131
|
+
partners: section(related),
|
|
8132
|
+
projects: section(strictObject({ ref: reference, name: text, via: array(picklist(["organization", "deal"])) })),
|
|
8133
|
+
deals: section(strictObject({
|
|
8134
|
+
ref: reference,
|
|
8135
|
+
kind: picklist(DEAL_KINDS),
|
|
8136
|
+
title: text,
|
|
8137
|
+
summary: text,
|
|
8138
|
+
stage: text,
|
|
8139
|
+
status: picklist(DEAL_STATUSES),
|
|
8140
|
+
currency: nullableText2,
|
|
8141
|
+
amount: nullableText2,
|
|
8142
|
+
close_date: day2,
|
|
8143
|
+
project: nullable(reference)
|
|
8144
|
+
})),
|
|
8145
|
+
money,
|
|
8146
|
+
/** Counts only, through its own people, in the accounts read. */
|
|
8147
|
+
communications: strictObject({ ...counts, has_more: boolean() }),
|
|
8148
|
+
tasks: section(taskLine),
|
|
8149
|
+
coverage: coverage2
|
|
8150
|
+
});
|
|
8151
|
+
var { untrusted: _, ...dealRow } = deal.entries;
|
|
8152
|
+
var dealContext = strictObject({
|
|
8153
|
+
deal: strictObject(dealRow),
|
|
8154
|
+
stages: section(strictObject({ from: nullableText2, to: text, pipeline: reference, at: time })),
|
|
8155
|
+
organization: nullable(strictObject({ ref: reference, name: nullableText2, categories })),
|
|
8156
|
+
participants: section(related),
|
|
8157
|
+
owner: nullable(related),
|
|
8158
|
+
project: nullable(strictObject({ ref: reference, name: nullableText2 })),
|
|
8159
|
+
money,
|
|
8160
|
+
window: strictObject({ since: time, until: time }),
|
|
8161
|
+
/** Shared people within its lifetime: `proposed`, an overlap of people, never a link. */
|
|
8162
|
+
communications: strictObject({
|
|
8163
|
+
...section(strictObject({
|
|
8164
|
+
kind: picklist(["message", "mail", "meeting"]),
|
|
8165
|
+
ref: reference,
|
|
8166
|
+
title: nullableText2,
|
|
8167
|
+
at: nullable(time),
|
|
8168
|
+
people: array(reference),
|
|
8169
|
+
standing: literal("proposed")
|
|
8170
|
+
})).entries,
|
|
8171
|
+
counts: strictObject(counts)
|
|
8172
|
+
}),
|
|
8173
|
+
tasks: section(taskLine),
|
|
8174
|
+
coverage: coverage2
|
|
8175
|
+
});
|
|
8176
|
+
var dealBrief = strictObject({
|
|
8177
|
+
ref: reference,
|
|
8178
|
+
kind: picklist(DEAL_KINDS),
|
|
8179
|
+
title: text,
|
|
8180
|
+
pipeline: text,
|
|
8181
|
+
stage: text,
|
|
8182
|
+
status: picklist(DEAL_STATUSES),
|
|
8183
|
+
amount: nullableText2,
|
|
8184
|
+
currency: nullableText2,
|
|
8185
|
+
close_date: day2,
|
|
8186
|
+
organization: nullableText2,
|
|
8187
|
+
owner: nullableText2,
|
|
8188
|
+
people: array(strictObject({ ref: reference, name: nullableText2, roles: array(text), standing })),
|
|
8189
|
+
project: nullableText2,
|
|
8190
|
+
stages: array(text),
|
|
8191
|
+
money: strictObject({ ...money.entries.totals.entries, unconfirmed: count, complete: boolean() }),
|
|
8192
|
+
communications: strictObject({ ...counts, standing: literal("proposed") }),
|
|
8193
|
+
open_tasks: count,
|
|
8194
|
+
not_read: coverage2.entries.not_read
|
|
8195
|
+
});
|
|
8196
|
+
|
|
8197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/chart.js
|
|
8198
|
+
var chart = strictObject({
|
|
8199
|
+
version: literal(1),
|
|
8200
|
+
kind: picklist(["bar", "line", "grouped-bar"]),
|
|
8201
|
+
title: text,
|
|
8202
|
+
x: strictObject({ type: picklist(["day", "week"]), values: array(text) }),
|
|
8203
|
+
series: array(strictObject({ name: text, values: array(nullable(number())) })),
|
|
8204
|
+
unit: picklist(["messages", "people"]),
|
|
8205
|
+
timezone: text,
|
|
8206
|
+
/** Lower bounds: the store or the events did not hold the whole period. */
|
|
8207
|
+
partial: boolean(),
|
|
8208
|
+
reasons: array(picklist(["store-incomplete", "events-incomplete"])),
|
|
8209
|
+
file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
|
|
8321
8210
|
});
|
|
8322
8211
|
|
|
8323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8324
|
-
var
|
|
8325
|
-
bot: 3,
|
|
8326
|
-
scam: 3,
|
|
8327
|
-
fake: 3,
|
|
8328
|
-
deleted: 1,
|
|
8329
|
-
no_photo: 1,
|
|
8330
|
-
no_username: 1,
|
|
8331
|
-
odd_name: 1,
|
|
8332
|
-
never_wrote: 1,
|
|
8333
|
-
link_first: 2,
|
|
8334
|
-
burst_join: 1,
|
|
8335
|
-
mass_invited: 1,
|
|
8336
|
-
new_account: 2,
|
|
8337
|
-
no_bio: 1,
|
|
8338
|
-
same_text: 2,
|
|
8339
|
-
photo_recent: 1,
|
|
8340
|
-
cas_banned: 3,
|
|
8341
|
-
lols_banned: 3,
|
|
8342
|
-
lols_scammer: 3
|
|
8343
|
-
};
|
|
8344
|
-
var LINK = /https?:\/\/|t\.me\/|www\./i;
|
|
8345
|
-
var DIGITS = /\d{5,}/;
|
|
8346
|
-
var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
|
|
8347
|
-
|
|
8348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
|
|
8349
|
-
var linkedIdentity = strictObject({
|
|
8350
|
-
provider: text,
|
|
8212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/folder.js
|
|
8213
|
+
var named2 = strictObject({
|
|
8351
8214
|
id,
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
is_bot: nullable(boolean()),
|
|
8355
|
-
accounts: array(id),
|
|
8356
|
-
seen_in: array(strictObject({ account: id, scope: picklist(["personal", "work"]) })),
|
|
8357
|
-
method: text,
|
|
8358
|
-
linked_by: text,
|
|
8359
|
-
linked_at: time
|
|
8215
|
+
title: nullable(text),
|
|
8216
|
+
kind: nullable(picklist(["dialog", "group", "channel", "saved", "unknown"]))
|
|
8360
8217
|
});
|
|
8361
|
-
var
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8218
|
+
var folder = strictObject({
|
|
8219
|
+
id,
|
|
8220
|
+
title: text,
|
|
8221
|
+
/** Chats added by hand; a folder that selects chats by a rule of its own lists none. */
|
|
8222
|
+
chat_ids: array(id),
|
|
8223
|
+
emoji: optional(text),
|
|
8224
|
+
/** Kinds of chat it takes by itself. */
|
|
8225
|
+
include: optional(array(picklist(["contacts", "non-contacts", "groups", "channels", "bots"]))),
|
|
8226
|
+
skip: optional(array(picklist(["muted", "read", "archived"]))),
|
|
8227
|
+
excluded_chat_ids: optional(array(id)),
|
|
8228
|
+
pinned_chat_ids: optional(array(id)),
|
|
8229
|
+
/** `chats folders show`: the chats in it, pinned and left out, by name. */
|
|
8230
|
+
chats: optional(array(named2)),
|
|
8231
|
+
pinned_chats: optional(array(named2)),
|
|
8232
|
+
excluded_chats: optional(array(named2))
|
|
8373
8233
|
});
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8234
|
+
|
|
8235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
|
|
8236
|
+
var inviteLink = strictObject({
|
|
8237
|
+
link: text,
|
|
8238
|
+
/** Who joins by it asks first, and an admin lets them in. */
|
|
8239
|
+
approval: boolean(),
|
|
8240
|
+
/** `null` when it never expires. */
|
|
8241
|
+
expires_at: nullable(time),
|
|
8242
|
+
/** `null` for no limit. */
|
|
8243
|
+
max_uses: nullable(count),
|
|
8244
|
+
/** The group's own link; revoking it makes the messenger issue a new one. */
|
|
8245
|
+
primary: optional(boolean()),
|
|
8246
|
+
revoked: optional(boolean()),
|
|
8247
|
+
pending_count: optional(count),
|
|
8248
|
+
joined_count: optional(count)
|
|
8388
8249
|
});
|
|
8389
8250
|
|
|
8390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8391
|
-
var
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
text,
|
|
8397
|
-
|
|
8398
|
-
|
|
8251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
|
|
8252
|
+
var operated = { operation_id: id, chat_id: id };
|
|
8253
|
+
var group = strictObject({
|
|
8254
|
+
...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
|
|
8255
|
+
parent_chat_id: optional(nullable(id)),
|
|
8256
|
+
muted_until: optional(nullable(time)),
|
|
8257
|
+
description: nullable(text),
|
|
8258
|
+
link: nullable(text),
|
|
8259
|
+
settings: strictObject({
|
|
8260
|
+
...unwrap(chat.entries.settings).entries,
|
|
8261
|
+
all_can_pin: nullable(boolean()),
|
|
8262
|
+
only_admins_add: nullable(boolean()),
|
|
8263
|
+
only_admins_call: nullable(boolean()),
|
|
8264
|
+
only_owner_edits_info: nullable(boolean()),
|
|
8265
|
+
members_see_link: nullable(boolean())
|
|
8266
|
+
})
|
|
8399
8267
|
});
|
|
8400
|
-
var
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8268
|
+
var chatGroupChange = union([
|
|
8269
|
+
strictObject({ operation_id: id, chat: group }),
|
|
8270
|
+
strictObject({ operation_id: id, requested: literal(true) })
|
|
8271
|
+
]);
|
|
8272
|
+
var chatInspection = strictObject({
|
|
8273
|
+
kind: chat.entries.kind,
|
|
8274
|
+
title: nullable(text),
|
|
8275
|
+
id: nullable(id),
|
|
8276
|
+
username: nullable(text),
|
|
8277
|
+
participants_count: nullable(count),
|
|
8278
|
+
description: nullable(text),
|
|
8279
|
+
member: nullable(boolean()),
|
|
8280
|
+
approval_needed: optional(boolean())
|
|
8281
|
+
});
|
|
8282
|
+
var chatSender = strictObject({
|
|
8404
8283
|
id,
|
|
8405
|
-
|
|
8406
|
-
|
|
8284
|
+
title: text,
|
|
8285
|
+
kind: picklist(["self", "channel", "group"]),
|
|
8286
|
+
premium_required: boolean(),
|
|
8287
|
+
default: boolean()
|
|
8288
|
+
});
|
|
8289
|
+
var chatRead = strictObject({ ...operated, until: nullable(id), thread_id: optional(id) });
|
|
8290
|
+
var chatMembersFetch = strictObject({
|
|
8407
8291
|
chat_id: id,
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
follow_ups: optional(array(strictObject({
|
|
8454
|
-
ref: reference,
|
|
8455
|
-
chat_title: nullable(text),
|
|
8456
|
-
timestamp: time,
|
|
8457
|
-
sender_name: nullable(text),
|
|
8458
|
-
excerpt: text
|
|
8459
|
-
}))),
|
|
8460
|
-
outgoing: nullable(boolean()),
|
|
8461
|
-
attachments: array(attachment),
|
|
8462
|
-
reply_to: nullable(quoted),
|
|
8463
|
-
/** The id a reply answers, also when the provider sent no copy of that message. */
|
|
8464
|
-
reply_to_id: optional(id),
|
|
8465
|
-
forwarded_from: nullable(quoted),
|
|
8466
|
-
thread_id: optional(id),
|
|
8467
|
-
thread_root_id: optional(id),
|
|
8468
|
-
reactions: optional(nullable(strictObject({
|
|
8469
|
-
counts: array(strictObject({ reaction: text, count })),
|
|
8470
|
-
mine: nullable(text),
|
|
8471
|
-
total: count
|
|
8472
|
-
}))),
|
|
8473
|
-
scheduled_for: optional(time),
|
|
8474
|
-
/** The owner starred it; only where the messenger has stars, and only when set. */
|
|
8475
|
-
starred: optional(literal(true)),
|
|
8476
|
-
/** The owner's own message in a one-to-one chat: `delivered`, or `read` once opened; absent when no receipt came. */
|
|
8477
|
-
delivery: optional(picklist(["delivered", "read"])),
|
|
8478
|
-
email: optional(strictObject({
|
|
8479
|
-
subject: nullable(text),
|
|
8480
|
-
from: nullable(mailPerson),
|
|
8481
|
-
to: array(mailPerson),
|
|
8482
|
-
cc: array(mailPerson),
|
|
8483
|
-
bcc: array(mailPerson),
|
|
8484
|
-
/** The mail header Reply-To; `reply_to` is the quoted message a chat reply answers. */
|
|
8485
|
-
reply_addresses: array(mailPerson),
|
|
8486
|
-
labels: array(text),
|
|
8487
|
-
/** The thread as a `chat:` reference. */
|
|
8488
|
-
thread: reference,
|
|
8489
|
-
read: nullable(boolean()),
|
|
8490
|
-
flagged: nullable(boolean()),
|
|
8491
|
-
/** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
|
|
8492
|
-
sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) })),
|
|
8493
|
-
/** Mail `review`: filed in the mailbox of mail sent to many. */
|
|
8494
|
-
bulk: optional(boolean()),
|
|
8495
|
-
/** Mail `review`: its List-Id, `null` when it has none. */
|
|
8496
|
-
list_id: optional(nullable(text)),
|
|
8497
|
-
/** Mail `review`: the mail rule that decided how it is stored, by its id in `rules list`; `null` when none. */
|
|
8498
|
-
rule_id: optional(nullable(number())),
|
|
8499
|
-
/** Mail `review`: the evidence fingerprint a finding cites this email by. */
|
|
8500
|
-
fingerprint: optional(pipe(text, regex(/^[a-f0-9]{64}$/))),
|
|
8501
|
-
/** Mail `review`: no earlier stored email, in any account, came from this address. */
|
|
8502
|
-
new_sender: optional(boolean()),
|
|
8503
|
-
/** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
|
|
8504
|
-
sender_identities: optional(number())
|
|
8505
|
-
})),
|
|
8506
|
-
provider_metadata: providerMetadata
|
|
8292
|
+
joined: array(id),
|
|
8293
|
+
gone: array(id),
|
|
8294
|
+
changed: array(id),
|
|
8295
|
+
read: count,
|
|
8296
|
+
participants: nullable(count),
|
|
8297
|
+
complete: boolean(),
|
|
8298
|
+
more: boolean(),
|
|
8299
|
+
tracked: boolean()
|
|
8300
|
+
});
|
|
8301
|
+
var chatMembersChange = union([
|
|
8302
|
+
strictObject({ ...operated, added: array(id), not_added: array(id) }),
|
|
8303
|
+
strictObject({ ...operated, removed: array(id) })
|
|
8304
|
+
]);
|
|
8305
|
+
var chatInvite = strictObject({ chat_id: id, title: nullable(text), link: text });
|
|
8306
|
+
var chatInviteChange = strictObject({
|
|
8307
|
+
...operated,
|
|
8308
|
+
...omit(inviteLink, ["pending_count", "joined_count"]).entries,
|
|
8309
|
+
pending: optional(count),
|
|
8310
|
+
joined: optional(count)
|
|
8311
|
+
});
|
|
8312
|
+
var chatRequestChange = union([
|
|
8313
|
+
strictObject({ ...operated, person_id: id, accepted: boolean(), already: boolean() }),
|
|
8314
|
+
strictObject({ chat_id: id, accepted: boolean(), counted: count, operation_id: optional(id) })
|
|
8315
|
+
]);
|
|
8316
|
+
var chatAdminChange = strictObject({
|
|
8317
|
+
...operated,
|
|
8318
|
+
person_id: id,
|
|
8319
|
+
rights: optional(array(picklist(["read", "members", "admins", "info", "pin", "link", "post", "edit", "delete"])))
|
|
8320
|
+
});
|
|
8321
|
+
var chatFolderChange = strictObject({
|
|
8322
|
+
operation_id: id,
|
|
8323
|
+
folder: omit(folder, ["chats", "pinned_chats", "excluded_chats"])
|
|
8324
|
+
});
|
|
8325
|
+
var chatFolderRemoval = strictObject({ operation_id: id, folder_id: id });
|
|
8326
|
+
var chatFolderOrder = strictObject({
|
|
8327
|
+
operation_id: id,
|
|
8328
|
+
folders: array(strictObject({ id, title: text }))
|
|
8329
|
+
});
|
|
8330
|
+
|
|
8331
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
|
|
8332
|
+
var operated2 = { operation_id: id, chat_id: id };
|
|
8333
|
+
var chatRemoval = strictObject(operated2);
|
|
8334
|
+
var chatMuting = strictObject({
|
|
8335
|
+
...operated2,
|
|
8336
|
+
muted_until: nullable(union([time, literal("forever")]))
|
|
8507
8337
|
});
|
|
8338
|
+
var chatArchive = strictObject({ ...operated2, archived: boolean() });
|
|
8339
|
+
var chatPin = strictObject({ ...operated2, pinned: boolean() });
|
|
8340
|
+
var chatUnread = strictObject({ ...operated2, unread: literal(true) });
|
|
8508
8341
|
|
|
8509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8510
|
-
var
|
|
8511
|
-
var
|
|
8512
|
-
locator: reference,
|
|
8513
|
-
provider: text,
|
|
8514
|
-
account: id,
|
|
8342
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
|
|
8343
|
+
var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
|
|
8344
|
+
var chatEvent = strictObject({
|
|
8515
8345
|
chat_id: id,
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8522
|
-
|
|
8346
|
+
time,
|
|
8347
|
+
/** `join`, `leave`, `add`, `remove`, `create`, `title`, `pin`, `profile`; a messenger may pass others through. */
|
|
8348
|
+
type: text,
|
|
8349
|
+
/** The service message that says so, where there is one. */
|
|
8350
|
+
message_id: optional(id),
|
|
8351
|
+
by: optional(who),
|
|
8352
|
+
people: array(who),
|
|
8353
|
+
/** `create` and `title` carry the chat's title. */
|
|
8354
|
+
title: optional(text),
|
|
8355
|
+
/** `profile`: the name and username seen before. */
|
|
8356
|
+
before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
|
|
8523
8357
|
});
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8358
|
+
|
|
8359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
|
|
8360
|
+
var chatMetadata = strictObject({
|
|
8527
8361
|
chat_id: id,
|
|
8528
8362
|
title: nullable(text),
|
|
8529
|
-
|
|
8530
|
-
|
|
8363
|
+
username: nullable(text),
|
|
8364
|
+
description: nullable(text),
|
|
8365
|
+
fetched_at: time
|
|
8531
8366
|
});
|
|
8532
|
-
var
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
all_day: boolean(),
|
|
8538
|
-
location: nullable(text),
|
|
8539
|
-
status: nullable(text)
|
|
8367
|
+
var cachedChatMetadata = strictObject({ chat_id: id, metadata: nullable(chatMetadata) });
|
|
8368
|
+
var failedChatMetadata = strictObject({ chat_id: id, error: strictObject({ code: text, message: text }) });
|
|
8369
|
+
var chatMetadataRefresh = strictObject({
|
|
8370
|
+
chats: array(union([chatMetadata, failedChatMetadata])),
|
|
8371
|
+
has_more: boolean()
|
|
8540
8372
|
});
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
recent: strictObject({ direct: array(contextMessage), groups: array(contextMessage) }),
|
|
8552
|
-
mentions: array(contextMessage),
|
|
8553
|
-
/** Calendar events they are invited to, one occurrence per series. */
|
|
8554
|
-
events: optional(strictObject({ upcoming: array(contextEvent), recent: array(contextEvent) })),
|
|
8555
|
-
limits: strictObject({ messages: count, bytes: count }),
|
|
8556
|
-
complete: boolean(),
|
|
8557
|
-
not_read: array(strictObject({
|
|
8558
|
-
provider: text,
|
|
8559
|
-
account: id,
|
|
8560
|
-
chat_id: id,
|
|
8373
|
+
|
|
8374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
|
|
8375
|
+
var action = picklist(["report", "delete", "remove"]);
|
|
8376
|
+
var level = picklist(["deny", "readonly", "ask", "allow"]);
|
|
8377
|
+
var chatRules = strictObject({
|
|
8378
|
+
chat_id: id,
|
|
8379
|
+
title: nullable(text),
|
|
8380
|
+
file: text,
|
|
8381
|
+
saved: boolean(),
|
|
8382
|
+
rules: strictObject({
|
|
8561
8383
|
title: nullable(text),
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
})
|
|
8573
|
-
var counterObservation = strictObject({
|
|
8574
|
-
value: number(),
|
|
8575
|
-
observed_at: time,
|
|
8576
|
-
source: picklist(["remote_fetch", "remote_update"]),
|
|
8577
|
-
reactions: optional(message.entries.reactions.wrapped.wrapped)
|
|
8384
|
+
trusted: array(id),
|
|
8385
|
+
blocked: array(id),
|
|
8386
|
+
blocked_names: array(text),
|
|
8387
|
+
links: action,
|
|
8388
|
+
invites: action,
|
|
8389
|
+
forwards: action,
|
|
8390
|
+
blocked_people: action,
|
|
8391
|
+
flood: strictObject({ messages: count, minutes: count, action }),
|
|
8392
|
+
new_account: strictObject({ days: count, action: picklist(["report", "remove"]) }),
|
|
8393
|
+
consent: strictObject({ delete: level, remove: level })
|
|
8394
|
+
})
|
|
8578
8395
|
});
|
|
8579
|
-
var
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
"
|
|
8583
|
-
"
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
"
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
"edited_at",
|
|
8593
|
-
"text",
|
|
8594
|
-
"outgoing",
|
|
8595
|
-
"attachments",
|
|
8596
|
-
"reply_to",
|
|
8597
|
-
"reply_to_id",
|
|
8598
|
-
"forwarded_from",
|
|
8599
|
-
"thread_id",
|
|
8600
|
-
"thread_root_id",
|
|
8601
|
-
"scheduled_for",
|
|
8602
|
-
"provider_metadata",
|
|
8603
|
-
"delivery"
|
|
8604
|
-
]).entries,
|
|
8605
|
-
reactions: nullable(message.entries.reactions.wrapped.wrapped),
|
|
8606
|
-
starred: optional(boolean()),
|
|
8607
|
-
email: optional(strictObject({ ...mailFields, reply_to: mailReplyTo })),
|
|
8608
|
-
counter_observations: optional(partial(strictObject({
|
|
8609
|
-
views: counterObservation,
|
|
8610
|
-
reactions: counterObservation,
|
|
8611
|
-
comments: counterObservation
|
|
8612
|
-
}))),
|
|
8613
|
-
...shortMessage.entries,
|
|
8614
|
-
locator: reference
|
|
8396
|
+
var chatModeration = strictObject({
|
|
8397
|
+
chat_id: id,
|
|
8398
|
+
rows: array(strictObject({
|
|
8399
|
+
kind: picklist(["message", "member"]),
|
|
8400
|
+
rule: picklist(["blocked", "invites", "links", "forwards", "flood", "newAccount"]),
|
|
8401
|
+
person_id: id,
|
|
8402
|
+
person_name: nullable(text),
|
|
8403
|
+
message_id: optional(id),
|
|
8404
|
+
action,
|
|
8405
|
+
outcome: picklist(["reported", "done", "planned", "forbidden", "declined", "refused", "failed", "skipped"]),
|
|
8406
|
+
reason: optional(text),
|
|
8407
|
+
command: optional(text)
|
|
8408
|
+
}))
|
|
8615
8409
|
});
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
8410
|
+
|
|
8411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
|
|
8412
|
+
var optionalCount = optional(count);
|
|
8413
|
+
var minutes = nullable(number());
|
|
8414
|
+
var chatStats = strictObject({
|
|
8415
|
+
chat: reference,
|
|
8416
|
+
since: time,
|
|
8417
|
+
until: time,
|
|
8418
|
+
/** The store holds the chat whole and the messenger read every join and leave; otherwise lower bounds. */
|
|
8419
|
+
complete: boolean(),
|
|
8420
|
+
completeness: strictObject({
|
|
8421
|
+
state: picklist(["complete", "partial", "unknown"]),
|
|
8422
|
+
up_to_date: nullable(boolean()),
|
|
8423
|
+
gaps: boolean(),
|
|
8424
|
+
reaches_start: boolean(),
|
|
8425
|
+
fetched_at: nullable(time)
|
|
8426
|
+
}),
|
|
8427
|
+
messages: count,
|
|
8428
|
+
senders: count,
|
|
8429
|
+
replies: count,
|
|
8430
|
+
threads: count,
|
|
8431
|
+
reactions: count,
|
|
8432
|
+
views: optionalCount,
|
|
8433
|
+
forwards: optionalCount,
|
|
8434
|
+
comments: optionalCount,
|
|
8435
|
+
top_posts: array(strictObject({
|
|
8436
|
+
ref: reference,
|
|
8437
|
+
timestamp: time,
|
|
8438
|
+
reactions: count,
|
|
8439
|
+
views: optionalCount,
|
|
8440
|
+
forwards: optionalCount,
|
|
8441
|
+
comments: optionalCount
|
|
8442
|
+
})),
|
|
8443
|
+
questions: strictObject({
|
|
8444
|
+
asked: count,
|
|
8445
|
+
answered: count,
|
|
8446
|
+
median_minutes_to_answer: minutes,
|
|
8447
|
+
answered_by: picklist(["owner", "owner-and-admins"])
|
|
8448
|
+
}),
|
|
8449
|
+
member_counts: optional(array(strictObject({ day: text, participants: nullable(count), listed: count, complete: boolean() }))),
|
|
8450
|
+
/** Absent where joins and leaves were not asked, or not recorded for the chat yet (then `missing` says so). */
|
|
8451
|
+
members: optional(strictObject({
|
|
8452
|
+
joined: count,
|
|
8453
|
+
left: count,
|
|
8454
|
+
net: number(),
|
|
8455
|
+
wrote: count,
|
|
8456
|
+
median_minutes_to_first_message: minutes,
|
|
8457
|
+
/** The messenger stopped reading its history before `since`: the counts are lower bounds. */
|
|
8622
8458
|
more: boolean()
|
|
8623
8459
|
})),
|
|
8624
|
-
|
|
8460
|
+
series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
|
|
8625
8461
|
});
|
|
8626
|
-
var
|
|
8627
|
-
var
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8462
|
+
var ms = nullable(pipe(number(), minValue(0)));
|
|
8463
|
+
var taskStats = strictObject({
|
|
8464
|
+
/** Open tasks across every row. */
|
|
8465
|
+
open: count,
|
|
8466
|
+
created: count,
|
|
8467
|
+
closed: count,
|
|
8468
|
+
median_close_ms: ms,
|
|
8469
|
+
mean_open_age_ms: ms,
|
|
8470
|
+
rows: array(strictObject({
|
|
8471
|
+
/** Rows of `--by chat` only. */
|
|
8472
|
+
chat: optional(reference),
|
|
8473
|
+
/** The chat reference, `meeting:<account>/<meeting>` or `project:<id>`. */
|
|
8474
|
+
key: text,
|
|
8475
|
+
name: nullable(text),
|
|
8476
|
+
open: count,
|
|
8477
|
+
created: count,
|
|
8478
|
+
closed: count,
|
|
8479
|
+
oldest_open_at: nullable(time),
|
|
8480
|
+
median_close_ms: ms,
|
|
8481
|
+
mean_open_age_ms: ms
|
|
8482
|
+
}))
|
|
8483
|
+
});
|
|
8484
|
+
|
|
8485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
|
|
8486
|
+
var memberCount = strictObject({
|
|
8487
|
+
day: pipe(text, isoDate()),
|
|
8488
|
+
participants: nullable(count),
|
|
8489
|
+
listed: count,
|
|
8490
|
+
complete: boolean()
|
|
8491
|
+
});
|
|
8492
|
+
var trackedChat = strictObject({
|
|
8493
|
+
chat_id: id,
|
|
8494
|
+
title: nullable(text),
|
|
8495
|
+
tracked_at: time,
|
|
8496
|
+
last_count: nullable(memberCount)
|
|
8631
8497
|
});
|
|
8632
|
-
var
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
content_hash: nullable(text),
|
|
8637
|
-
position: count,
|
|
8638
|
-
start_ms: count,
|
|
8639
|
-
end_ms: count,
|
|
8640
|
-
speaker_participant_id: nullable(count),
|
|
8641
|
-
speaker_name: nullable(text),
|
|
8642
|
-
text,
|
|
8643
|
-
revision: picklist(["current", "superseded"])
|
|
8498
|
+
var trackedChatHistory = strictObject({
|
|
8499
|
+
chat_id: id,
|
|
8500
|
+
tracked_at: nullable(time),
|
|
8501
|
+
counts: array(memberCount)
|
|
8644
8502
|
});
|
|
8645
|
-
var
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8656
|
-
|
|
8657
|
-
|
|
8658
|
-
|
|
8659
|
-
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8680
|
-
|
|
8681
|
-
|
|
8682
|
-
|
|
8683
|
-
|
|
8684
|
-
|
|
8685
|
-
|
|
8686
|
-
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8503
|
+
var chatTracking = strictObject({
|
|
8504
|
+
chat_id: id,
|
|
8505
|
+
tracked: boolean()
|
|
8506
|
+
});
|
|
8507
|
+
|
|
8508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
|
|
8509
|
+
var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
8510
|
+
var contactSync = strictObject({ added: count, changed: count, known: count });
|
|
8511
|
+
var profileFields = {
|
|
8512
|
+
usernames: array(text),
|
|
8513
|
+
birthday: optional(nullable(text)),
|
|
8514
|
+
phone: optional(nullable(text)),
|
|
8515
|
+
flags: partial(strictObject({
|
|
8516
|
+
bot: boolean(),
|
|
8517
|
+
verified: boolean(),
|
|
8518
|
+
premium: boolean(),
|
|
8519
|
+
scam: boolean(),
|
|
8520
|
+
fake: boolean(),
|
|
8521
|
+
restricted: boolean(),
|
|
8522
|
+
deleted: boolean(),
|
|
8523
|
+
support: boolean()
|
|
8524
|
+
})),
|
|
8525
|
+
seen: optional(text),
|
|
8526
|
+
contact: optional(boolean()),
|
|
8527
|
+
mutual_contact: optional(boolean()),
|
|
8528
|
+
common_chats_count: optional(nullable(count)),
|
|
8529
|
+
registered: optional(nullable(strictObject({
|
|
8530
|
+
at: text,
|
|
8531
|
+
source: picklist(["telegram", "max", "estimate"]),
|
|
8532
|
+
precision: picklist(["day", "month"])
|
|
8533
|
+
}))),
|
|
8534
|
+
has_photo: optional(boolean()),
|
|
8535
|
+
/** Earlier names and usernames, oldest first; the current ones are not repeated. */
|
|
8536
|
+
aliases: array(strictObject({
|
|
8537
|
+
name: optional(text),
|
|
8538
|
+
username: optional(text),
|
|
8539
|
+
link: optional(text),
|
|
8540
|
+
first_seen_at: time,
|
|
8541
|
+
last_seen_at: time,
|
|
8542
|
+
source: picklist(["profile", "messages"])
|
|
8543
|
+
}))
|
|
8544
|
+
};
|
|
8545
|
+
|
|
8546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/contact.js
|
|
8547
|
+
var contact = strictObject({
|
|
8548
|
+
ref: reference,
|
|
8549
|
+
id,
|
|
8550
|
+
name: nullable(text),
|
|
8551
|
+
username: nullable(text),
|
|
8552
|
+
alias: optional(nullable(text)),
|
|
8553
|
+
display_name: optional(nullable(text)),
|
|
8554
|
+
/** Whatever they wrote about themselves. */
|
|
8555
|
+
description: nullable(text),
|
|
8556
|
+
/** The newest message in a one-to-one chat with them. */
|
|
8557
|
+
last_messaged_at: nullable(time),
|
|
8558
|
+
/** For a source that knows it, such as a Zoom contact. */
|
|
8559
|
+
email: optional(nullable(text)),
|
|
8560
|
+
phones: optional(array(strictObject({ number: text, label: nullable(text) }))),
|
|
8561
|
+
/** `contacts show`: the chats shared with them, and what the store holds of their messages in each. */
|
|
8562
|
+
chats: optional(array(strictObject({
|
|
8563
|
+
...pick(chat, ["ref", "id", "title", "kind", "last_message_at"]).entries,
|
|
8564
|
+
/** Their messages stored; a floor unless `complete`. */
|
|
8565
|
+
their_messages: optional(count),
|
|
8566
|
+
first_at: optional(nullable(time)),
|
|
8567
|
+
last_at: optional(nullable(time)),
|
|
8568
|
+
/** The store holds the whole chat, so the count is the real one. */
|
|
8569
|
+
complete: optional(boolean())
|
|
8570
|
+
}))),
|
|
8571
|
+
/** `contacts show`: what the messenger says about them, or with `--offline` what the store saw of them. */
|
|
8572
|
+
...partial(strictObject(profileFields)).entries,
|
|
8573
|
+
/** `contacts show --with-notes`: the owner's private notes about them. */
|
|
8574
|
+
notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
|
|
8707
8575
|
});
|
|
8708
8576
|
|
|
8709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
|
|
8710
8578
|
var contactNote = strictObject({
|
|
8711
8579
|
id,
|
|
8712
8580
|
/** The contact, as a `contact:` reference. */
|
|
@@ -8718,13 +8586,13 @@ var contactNote = strictObject({
|
|
|
8718
8586
|
updated_at: time
|
|
8719
8587
|
});
|
|
8720
8588
|
|
|
8721
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
|
|
8722
8590
|
var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
8723
8591
|
var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
|
|
8724
8592
|
var contactStateChange = strictObject({ operation_id: id, person_id: id });
|
|
8725
8593
|
var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
|
|
8726
8594
|
|
|
8727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/conversation.js
|
|
8728
8596
|
var conversation = strictObject({
|
|
8729
8597
|
id,
|
|
8730
8598
|
chat: reference,
|
|
@@ -8739,7 +8607,7 @@ var conversation = strictObject({
|
|
|
8739
8607
|
rules_version: count
|
|
8740
8608
|
});
|
|
8741
8609
|
|
|
8742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
|
|
8743
8611
|
var conversationBuild = strictObject({
|
|
8744
8612
|
chat: id,
|
|
8745
8613
|
messages: count,
|
|
@@ -8764,7 +8632,7 @@ var catchUpPreparation = strictObject({
|
|
|
8764
8632
|
prepared: optional(conversationPreparation)
|
|
8765
8633
|
});
|
|
8766
8634
|
|
|
8767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
|
|
8768
8636
|
var conversationDetails = union([
|
|
8769
8637
|
strictObject({ ...conversation.entries, messages: array(message) }),
|
|
8770
8638
|
message
|
|
@@ -8854,7 +8722,7 @@ var conversationHit = strictObject({
|
|
|
8854
8722
|
stale: boolean()
|
|
8855
8723
|
});
|
|
8856
8724
|
|
|
8857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/counters.js
|
|
8858
8726
|
var counters = strictObject({
|
|
8859
8727
|
cutoff: time,
|
|
8860
8728
|
max_age_ms: milliseconds,
|
|
@@ -8884,97 +8752,7 @@ var counterRefresh = strictObject({
|
|
|
8884
8752
|
complete: optional(boolean())
|
|
8885
8753
|
});
|
|
8886
8754
|
|
|
8887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8888
|
-
var nullableText = nullable(text);
|
|
8889
|
-
var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
|
|
8890
|
-
var outcome = picklist(["open", "won", "lost"]);
|
|
8891
|
-
var crmAccount = nullable(strictObject({ provider: text, account: text }));
|
|
8892
|
-
var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
|
|
8893
|
-
var deal = strictObject({
|
|
8894
|
-
id,
|
|
8895
|
-
ref: reference,
|
|
8896
|
-
kind: picklist(["deal", "lead"]),
|
|
8897
|
-
title: text,
|
|
8898
|
-
/** One line with the stage, amount and status. */
|
|
8899
|
-
summary: text,
|
|
8900
|
-
pipeline: reference,
|
|
8901
|
-
pipeline_name: text,
|
|
8902
|
-
stage: text,
|
|
8903
|
-
status: outcome,
|
|
8904
|
-
organization: nullable(party),
|
|
8905
|
-
currency: nullableText,
|
|
8906
|
-
amount: nullableText,
|
|
8907
|
-
close_date: day2,
|
|
8908
|
-
closed_date: day2,
|
|
8909
|
-
closed_reason: nullableText,
|
|
8910
|
-
rank: nullable(number()),
|
|
8911
|
-
/** A lead's deal, once it became one. */
|
|
8912
|
-
deal: nullable(reference),
|
|
8913
|
-
/** The CRM account it is a copy from; `null` for the owner's own. */
|
|
8914
|
-
account: crmAccount,
|
|
8915
|
-
external_id: nullableText,
|
|
8916
|
-
/** A CRM copy's assignee, the identity `<account>/user/<id>`. */
|
|
8917
|
-
assignee: nullableText,
|
|
8918
|
-
/** A CRM copy's own fields by code; a list field's value is its option's label, `option_id` its id. */
|
|
8919
|
-
provider_metadata: record(string(), strictObject({
|
|
8920
|
-
label: nullable(string()),
|
|
8921
|
-
value: unknown(),
|
|
8922
|
-
option_id: optional(union([string(), array(string())]))
|
|
8923
|
-
})),
|
|
8924
|
-
people: array(strictObject({ ...party.entries, role: picklist(DEAL_ROLES) })),
|
|
8925
|
-
author: strictObject({
|
|
8926
|
-
type: picklist(["person", "bot"]),
|
|
8927
|
-
id,
|
|
8928
|
-
name: nullableText,
|
|
8929
|
-
kind: nullable(picklist(["agent", "rule"]))
|
|
8930
|
-
}),
|
|
8931
|
-
model: nullableText,
|
|
8932
|
-
source: text,
|
|
8933
|
-
reason: nullableText,
|
|
8934
|
-
evidence: array(reference),
|
|
8935
|
-
project: nullable(reference),
|
|
8936
|
-
project_name: nullableText,
|
|
8937
|
-
created_at: time,
|
|
8938
|
-
updated_at: time,
|
|
8939
|
-
untrusted
|
|
8940
|
-
});
|
|
8941
|
-
var lead = deal;
|
|
8942
|
-
var pipelineStage = strictObject({
|
|
8943
|
-
name: text,
|
|
8944
|
-
position: count,
|
|
8945
|
-
outcome,
|
|
8946
|
-
external_id: nullableText,
|
|
8947
|
-
/** Open deals or leads in it now. */
|
|
8948
|
-
open: count,
|
|
8949
|
-
/** With a funnel: rows that got this far, and the share of them that reached the next stage. */
|
|
8950
|
-
reached: optional(count),
|
|
8951
|
-
conversion: optional(nullable(number())),
|
|
8952
|
-
/** With a funnel: rows standing in it now, and their sum per currency, never converted. */
|
|
8953
|
-
items: optional(count),
|
|
8954
|
-
amounts: optional(array(strictObject({ amount: text, currency: text, items: count })))
|
|
8955
|
-
});
|
|
8956
|
-
var pipeline = strictObject({
|
|
8957
|
-
id,
|
|
8958
|
-
ref: reference,
|
|
8959
|
-
name: text,
|
|
8960
|
-
kind: picklist(["deal", "lead"]),
|
|
8961
|
-
account: crmAccount,
|
|
8962
|
-
external_id: nullableText,
|
|
8963
|
-
stages: array(pipelineStage),
|
|
8964
|
-
created_at: time,
|
|
8965
|
-
totals: optional(strictObject({ items: count, open: count, won: count, lost: count, win_rate: nullable(number()) })),
|
|
8966
|
-
since: optional(day2),
|
|
8967
|
-
untrusted
|
|
8968
|
-
});
|
|
8969
|
-
var stage = strictObject({
|
|
8970
|
-
...pipelineStage.entries,
|
|
8971
|
-
pipeline: reference,
|
|
8972
|
-
pipeline_name: text,
|
|
8973
|
-
kind: picklist(["deal", "lead"]),
|
|
8974
|
-
untrusted
|
|
8975
|
-
});
|
|
8976
|
-
|
|
8977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.618.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.87.0_commander@15._c25084c4731872baba927966435ce31d/node_modules/@wirecat/cli-core/dist/entities/document.js
|
|
8755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/document.js
|
|
8978
8756
|
var document = strictObject({
|
|
8979
8757
|
ref: reference,
|
|
8980
8758
|
id,
|
|
@@ -8989,7 +8767,7 @@ var document = strictObject({
|
|
|
8989
8767
|
owners: optional(array(text))
|
|
8990
8768
|
});
|
|
8991
8769
|
|
|
8992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/document-link.js
|
|
8993
8771
|
var documentLink = strictObject({
|
|
8994
8772
|
ref: reference,
|
|
8995
8773
|
url: text,
|
|
@@ -9000,7 +8778,7 @@ var documentLink = strictObject({
|
|
|
9000
8778
|
sender: strictObject({ id: nullable(id), name: nullable(text) })
|
|
9001
8779
|
});
|
|
9002
8780
|
|
|
9003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/evidence.js
|
|
9004
8782
|
var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
|
|
9005
8783
|
var contribution = strictObject({
|
|
9006
8784
|
message: evidenceMessage,
|
|
@@ -9030,7 +8808,7 @@ var retentionStay = strictObject({
|
|
|
9030
8808
|
});
|
|
9031
8809
|
var evidence = union([contribution, retentionStay]);
|
|
9032
8810
|
|
|
9033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/fact.js
|
|
9034
8812
|
var fact = strictObject({
|
|
9035
8813
|
ref: reference,
|
|
9036
8814
|
id,
|
|
@@ -9061,7 +8839,7 @@ var fact = strictObject({
|
|
|
9061
8839
|
updated_at: time
|
|
9062
8840
|
});
|
|
9063
8841
|
|
|
9064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/hit.js
|
|
9065
8843
|
var hit = strictObject({
|
|
9066
8844
|
kind: picklist(["message", "mail", "note", "document", "event", "meeting", "deal", "lead", ...BUSINESS_KINDS]),
|
|
9067
8845
|
ref: reference,
|
|
@@ -9103,7 +8881,7 @@ var hit = strictObject({
|
|
|
9103
8881
|
untrusted
|
|
9104
8882
|
});
|
|
9105
8883
|
|
|
9106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/identity.js
|
|
9107
8885
|
var identity = strictObject({
|
|
9108
8886
|
ref: reference,
|
|
9109
8887
|
provider: text,
|
|
@@ -9116,7 +8894,7 @@ var identity = strictObject({
|
|
|
9116
8894
|
person: optional(nullable(reference))
|
|
9117
8895
|
});
|
|
9118
8896
|
|
|
9119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
|
|
9120
8898
|
var imageEmbedding = strictObject({
|
|
9121
8899
|
model: text,
|
|
9122
8900
|
embedded: count,
|
|
@@ -9125,13 +8903,13 @@ var imageEmbedding = strictObject({
|
|
|
9125
8903
|
more: boolean()
|
|
9126
8904
|
});
|
|
9127
8905
|
|
|
9128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
|
|
9129
8907
|
import { spawn } from "node:child_process";
|
|
9130
|
-
import { randomBytes
|
|
9131
|
-
import { closeSync, existsSync as
|
|
8908
|
+
import { randomBytes } from "node:crypto";
|
|
8909
|
+
import { closeSync, existsSync as existsSync6, mkdirSync as mkdirSync2, openSync, readdirSync as readdirSync3, readFileSync as readFileSync4, realpathSync, rmSync as rmSync2 } from "node:fs";
|
|
9132
8910
|
import { dirname as dirname2, join as join5 } from "node:path";
|
|
9133
8911
|
|
|
9134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/background/checkpoints.js
|
|
9135
8913
|
var progressOf = /* @__PURE__ */ __name((input) => {
|
|
9136
8914
|
const total = input.total ?? null;
|
|
9137
8915
|
const updated = input.updatedAt ?? null;
|
|
@@ -9147,7 +8925,7 @@ var progressOf = /* @__PURE__ */ __name((input) => {
|
|
|
9147
8925
|
};
|
|
9148
8926
|
}, "progressOf");
|
|
9149
8927
|
|
|
9150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/runs/record-log.js
|
|
9151
8929
|
var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
|
|
9152
8930
|
const run = currentRun();
|
|
9153
8931
|
const trace = traceId ?? run.traceId;
|
|
@@ -9161,7 +8939,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
|
|
|
9161
8939
|
}));
|
|
9162
8940
|
}, "recordLogFor");
|
|
9163
8941
|
|
|
9164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
|
|
9165
8943
|
var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
|
|
9166
8944
|
var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
9167
8945
|
const out = openSync(log, "a", 384);
|
|
@@ -9180,15 +8958,15 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
|
9180
8958
|
var jobsDir = /* @__PURE__ */ __name((app, env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
|
|
9181
8959
|
var jobPath = /* @__PURE__ */ __name((dir, id6) => join5(dir, `${id6}.json`), "jobPath");
|
|
9182
8960
|
var saveJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
9183
|
-
|
|
8961
|
+
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
9184
8962
|
writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
|
|
9185
8963
|
`, 384);
|
|
9186
8964
|
}, "saveJob");
|
|
9187
8965
|
var readJob = /* @__PURE__ */ __name((dir, id6) => {
|
|
9188
|
-
if (!/^[\w-]+$/.test(id6) || !
|
|
8966
|
+
if (!/^[\w-]+$/.test(id6) || !existsSync6(jobPath(dir, id6)))
|
|
9189
8967
|
return void 0;
|
|
9190
8968
|
try {
|
|
9191
|
-
return JSON.parse(
|
|
8969
|
+
return JSON.parse(readFileSync4(jobPath(dir, id6), "utf8"));
|
|
9192
8970
|
} catch {
|
|
9193
8971
|
return void 0;
|
|
9194
8972
|
}
|
|
@@ -9225,12 +9003,12 @@ var updateJob = /* @__PURE__ */ __name((dir, id6, change) => {
|
|
|
9225
9003
|
saveJob(dir, { ...job2, ...change });
|
|
9226
9004
|
}, "updateJob");
|
|
9227
9005
|
var removeJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
9228
|
-
|
|
9229
|
-
|
|
9006
|
+
rmSync2(jobPath(dir, job2.id), { force: true });
|
|
9007
|
+
rmSync2(recordsPath(dir, job2.id), { force: true });
|
|
9230
9008
|
if (dirname2(job2.log) === dir)
|
|
9231
|
-
|
|
9009
|
+
rmSync2(job2.log, { force: true });
|
|
9232
9010
|
}, "removeJob");
|
|
9233
|
-
var listJobs = /* @__PURE__ */ __name((dir) =>
|
|
9011
|
+
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");
|
|
9234
9012
|
var jobDetails = /* @__PURE__ */ __name((job2) => ({
|
|
9235
9013
|
job: job2.id,
|
|
9236
9014
|
profile: job2.profile,
|
|
@@ -9294,8 +9072,8 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
9294
9072
|
if (running)
|
|
9295
9073
|
throw new CliError("validation_error", `job ${running.id} already works on this chat; inspect store jobs show first`);
|
|
9296
9074
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
9297
|
-
const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${
|
|
9298
|
-
|
|
9075
|
+
const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes(3).toString("hex")}`;
|
|
9076
|
+
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
9299
9077
|
const log = join5(dir, `${id6}.log`);
|
|
9300
9078
|
const job2 = {
|
|
9301
9079
|
id: id6,
|
|
@@ -9316,7 +9094,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
9316
9094
|
return { job: id6, pid, chat: input.chat, log };
|
|
9317
9095
|
}, "startArchiveJob");
|
|
9318
9096
|
|
|
9319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/job.js
|
|
9320
9098
|
var problem = strictObject({ code: text, message: text });
|
|
9321
9099
|
var job = strictObject({
|
|
9322
9100
|
id,
|
|
@@ -9339,7 +9117,7 @@ var job = strictObject({
|
|
|
9339
9117
|
error: optional(problem)
|
|
9340
9118
|
});
|
|
9341
9119
|
|
|
9342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/join-request.js
|
|
9343
9121
|
var joinRequest = strictObject({
|
|
9344
9122
|
person_id: id,
|
|
9345
9123
|
name: nullable(text),
|
|
@@ -9350,7 +9128,7 @@ var joinRequest = strictObject({
|
|
|
9350
9128
|
about: optional(text)
|
|
9351
9129
|
});
|
|
9352
9130
|
|
|
9353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/list-results.js
|
|
9354
9132
|
var botProfile = strictObject({
|
|
9355
9133
|
name: text,
|
|
9356
9134
|
token: text,
|
|
@@ -9445,7 +9223,7 @@ var stickerInventory = strictObject({
|
|
|
9445
9223
|
url: optional(nullable(text))
|
|
9446
9224
|
});
|
|
9447
9225
|
|
|
9448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
|
|
9449
9227
|
var pollVote = strictObject({
|
|
9450
9228
|
person_id: id,
|
|
9451
9229
|
name: nullable(text),
|
|
@@ -9455,7 +9233,7 @@ var pollVote = strictObject({
|
|
|
9455
9233
|
voted_at: time
|
|
9456
9234
|
});
|
|
9457
9235
|
|
|
9458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/listener.js
|
|
9459
9237
|
var reactions = unwrap(unwrap(message.entries.reactions));
|
|
9460
9238
|
var observation = strictObject({
|
|
9461
9239
|
value: pipe(number(), minValue(0)),
|
|
@@ -9497,7 +9275,7 @@ var serveSummary = strictObject({
|
|
|
9497
9275
|
tasks: optional(strictObject({ added: count, closed: count, review: count }))
|
|
9498
9276
|
});
|
|
9499
9277
|
|
|
9500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
|
|
9501
9279
|
var mailCounts = strictObject({
|
|
9502
9280
|
by: picklist(["day", "week", "sender"]),
|
|
9503
9281
|
received: count,
|
|
@@ -9512,7 +9290,7 @@ var mailCounts = strictObject({
|
|
|
9512
9290
|
}))
|
|
9513
9291
|
});
|
|
9514
9292
|
|
|
9515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
|
|
9516
9294
|
var evidence2 = strictObject({ reference, fingerprint: text });
|
|
9517
9295
|
var base = { id, evidence: array(evidence2) };
|
|
9518
9296
|
var finding = variant("kind", [
|
|
@@ -9656,7 +9434,7 @@ var mailFindings = strictObject({
|
|
|
9656
9434
|
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
|
|
9657
9435
|
});
|
|
9658
9436
|
|
|
9659
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
|
|
9660
9438
|
var mediaArchive = strictObject({
|
|
9661
9439
|
directory: text,
|
|
9662
9440
|
chats: count,
|
|
@@ -9688,7 +9466,7 @@ var mediaArchiveTimer = union([
|
|
|
9688
9466
|
strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
|
|
9689
9467
|
]);
|
|
9690
9468
|
|
|
9691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
|
|
9692
9470
|
var preparationId = pipe(string(), minLength(1));
|
|
9693
9471
|
var preparationCount = pipe(number(), integer(), minValue(0));
|
|
9694
9472
|
var preparationTime = nullable(isoTime);
|
|
@@ -9780,7 +9558,7 @@ var preparationMeeting = strictObject({
|
|
|
9780
9558
|
updated_at: isoTime
|
|
9781
9559
|
});
|
|
9782
9560
|
|
|
9783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
|
|
9784
9562
|
var meetingEvidence = preparationEvidence;
|
|
9785
9563
|
var meetingPersonContext = strictObject({
|
|
9786
9564
|
person: strictObject({ uid: string(), name: nullable(string()) }),
|
|
@@ -9802,7 +9580,7 @@ var meetingPersonContext = strictObject({
|
|
|
9802
9580
|
})
|
|
9803
9581
|
});
|
|
9804
9582
|
|
|
9805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9583
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
|
|
9806
9584
|
var evidence3 = strictObject({ reference, fingerprint: text });
|
|
9807
9585
|
var base2 = { id, project: reference, evidence: array(evidence3) };
|
|
9808
9586
|
var finding2 = variant("kind", [
|
|
@@ -9840,7 +9618,7 @@ var meetingFindings = strictObject({
|
|
|
9840
9618
|
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome3) }))
|
|
9841
9619
|
});
|
|
9842
9620
|
|
|
9843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
|
|
9844
9622
|
var communicationCoverage = strictObject({
|
|
9845
9623
|
read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
|
|
9846
9624
|
query: string(),
|
|
@@ -9885,7 +9663,7 @@ var preparationCommunications = strictObject({
|
|
|
9885
9663
|
}))
|
|
9886
9664
|
});
|
|
9887
9665
|
|
|
9888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
|
|
9889
9667
|
var meetingPreparation = strictObject({
|
|
9890
9668
|
communications: optional(preparationCommunications),
|
|
9891
9669
|
schema_version: literal(1),
|
|
@@ -9998,7 +9776,7 @@ var meetingPreparation = strictObject({
|
|
|
9998
9776
|
})
|
|
9999
9777
|
});
|
|
10000
9778
|
|
|
10001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
|
|
10002
9780
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
10003
9781
|
var id3 = pipe(string(), minLength(1));
|
|
10004
9782
|
var text3 = string();
|
|
@@ -10062,7 +9840,7 @@ var meetingProjectCandidates = strictObject({
|
|
|
10062
9840
|
})
|
|
10063
9841
|
});
|
|
10064
9842
|
|
|
10065
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
|
|
10066
9844
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
10067
9845
|
var id4 = pipe(string(), minLength(1), maxLength(1e3));
|
|
10068
9846
|
var meetingSeriesInventory = strictObject({
|
|
@@ -10092,7 +9870,7 @@ var meetingSeriesInventory = strictObject({
|
|
|
10092
9870
|
})
|
|
10093
9871
|
});
|
|
10094
9872
|
|
|
10095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
|
|
10096
9874
|
var text4 = string();
|
|
10097
9875
|
var id5 = pipe(number(), integer(), minValue(1));
|
|
10098
9876
|
var revision = picklist(["current", "superseded"]);
|
|
@@ -10109,7 +9887,7 @@ var meetingTaskProposal = strictObject({
|
|
|
10109
9887
|
persistence: literal("proposal-only")
|
|
10110
9888
|
});
|
|
10111
9889
|
|
|
10112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/memory.js
|
|
10113
9891
|
var memory = strictObject({
|
|
10114
9892
|
ref: reference,
|
|
10115
9893
|
id,
|
|
@@ -10137,9 +9915,9 @@ var memory = strictObject({
|
|
|
10137
9915
|
updated_at: time
|
|
10138
9916
|
});
|
|
10139
9917
|
|
|
10140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/mention.js
|
|
10141
9919
|
var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
|
|
10142
|
-
var status = picklist(["found", "linked", "dismissed"]);
|
|
9920
|
+
var status = picklist(["found", "linked", "proposed", "dismissed"]);
|
|
10143
9921
|
var mention = strictObject({
|
|
10144
9922
|
id: count,
|
|
10145
9923
|
kind,
|
|
@@ -10169,7 +9947,8 @@ var mentionDecision = strictObject({
|
|
|
10169
9947
|
value: text,
|
|
10170
9948
|
status,
|
|
10171
9949
|
target: nullable(reference),
|
|
10172
|
-
mentions: count
|
|
9950
|
+
mentions: count,
|
|
9951
|
+
proposal: optional(text)
|
|
10173
9952
|
});
|
|
10174
9953
|
var mentionRebuild = strictObject({
|
|
10175
9954
|
messages: count,
|
|
@@ -10180,13 +9959,13 @@ var mentionRebuild = strictObject({
|
|
|
10180
9959
|
mentions: count
|
|
10181
9960
|
});
|
|
10182
9961
|
|
|
10183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/message-change.js
|
|
10184
9963
|
var operated3 = { operation_id: id, chat_id: id };
|
|
10185
9964
|
var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
|
|
10186
9965
|
var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
|
|
10187
9966
|
var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
|
|
10188
9967
|
|
|
10189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/message-read.js
|
|
10190
9969
|
var messageTranscript = strictObject({
|
|
10191
9970
|
message_id: id,
|
|
10192
9971
|
text,
|
|
@@ -10244,7 +10023,7 @@ var evidencePacket = strictObject({
|
|
|
10244
10023
|
}))
|
|
10245
10024
|
});
|
|
10246
10025
|
|
|
10247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10026
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/message-context.js
|
|
10248
10027
|
var messageThread = strictObject({
|
|
10249
10028
|
ref: reference,
|
|
10250
10029
|
chat: id,
|
|
@@ -10261,7 +10040,7 @@ var messageThread = strictObject({
|
|
|
10261
10040
|
});
|
|
10262
10041
|
var messageContext = union([message, messageThread]);
|
|
10263
10042
|
|
|
10264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
|
|
10265
10044
|
var messageCounts = strictObject({
|
|
10266
10045
|
by: picklist(["chat", "sender", "day", "hour"]),
|
|
10267
10046
|
total: count,
|
|
@@ -10274,7 +10053,7 @@ var messageCounts = strictObject({
|
|
|
10274
10053
|
}))
|
|
10275
10054
|
});
|
|
10276
10055
|
|
|
10277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10056
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/message-link.js
|
|
10278
10057
|
var messageLink = strictObject({
|
|
10279
10058
|
ref: reference,
|
|
10280
10059
|
url: nullable(text),
|
|
@@ -10291,7 +10070,7 @@ var messageLink = strictObject({
|
|
|
10291
10070
|
})))
|
|
10292
10071
|
});
|
|
10293
10072
|
|
|
10294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10073
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
|
|
10295
10074
|
var savedMessageFile = strictObject({
|
|
10296
10075
|
kind: text,
|
|
10297
10076
|
path: text,
|
|
@@ -10371,14 +10150,14 @@ var messageSyncAll = strictObject({
|
|
|
10371
10150
|
issue: optional(actionableError),
|
|
10372
10151
|
limited: optional(historyLimited)
|
|
10373
10152
|
})),
|
|
10374
|
-
/** How many chats the history limits left unread (big groups) or read only to the window's start. */
|
|
10375
|
-
limited: optional(strictObject({ group_too_large: count, older_than_window: count })),
|
|
10153
|
+
/** How many chats the history limits left unread (big groups) or read only to the window's start; muted, unread. */
|
|
10154
|
+
limited: optional(strictObject({ group_too_large: count, older_than_window: count, muted: optional(count) })),
|
|
10376
10155
|
tasks
|
|
10377
10156
|
});
|
|
10378
10157
|
var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
|
|
10379
10158
|
var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
|
|
10380
10159
|
|
|
10381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/message-write.js
|
|
10382
10161
|
var messageWrite = strictObject({
|
|
10383
10162
|
operation_id: id,
|
|
10384
10163
|
message,
|
|
@@ -10393,7 +10172,7 @@ var draftWrite = strictObject({
|
|
|
10393
10172
|
});
|
|
10394
10173
|
var messageSend = union([messageWrite, draftWrite]);
|
|
10395
10174
|
|
|
10396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/model.js
|
|
10397
10176
|
var model2 = strictObject({
|
|
10398
10177
|
id,
|
|
10399
10178
|
kind: picklist(["audio", "text", "image", "reranker"]),
|
|
@@ -10401,7 +10180,7 @@ var model2 = strictObject({
|
|
|
10401
10180
|
/** Which languages it reads, in words. */
|
|
10402
10181
|
languages: text,
|
|
10403
10182
|
licence: optional(text),
|
|
10404
|
-
/** A text model's licence
|
|
10183
|
+
/** A text model's licence page, for a model under conditions of its own (`NOTICE` beside its files says the same). */
|
|
10405
10184
|
terms: optional(text),
|
|
10406
10185
|
/** A text model's size next to the others: small is fastest, large reads best. */
|
|
10407
10186
|
size: optional(picklist(["small", "medium", "large"])),
|
|
@@ -10428,7 +10207,7 @@ var chosenModel = strictObject({
|
|
|
10428
10207
|
estimate_seconds: nullable(count)
|
|
10429
10208
|
});
|
|
10430
10209
|
|
|
10431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/model-key.js
|
|
10432
10211
|
var source = picklist(["environment", "keyring", "file"]);
|
|
10433
10212
|
var modelKey = strictObject({
|
|
10434
10213
|
provider: text,
|
|
@@ -10438,7 +10217,7 @@ var modelKey = strictObject({
|
|
|
10438
10217
|
var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
|
|
10439
10218
|
var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
|
|
10440
10219
|
|
|
10441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
|
|
10442
10221
|
var versus = strictObject({ current: number(), previous: number() });
|
|
10443
10222
|
var person = { person_ref: reference, name: nullable(text) };
|
|
10444
10223
|
var graph = strictObject({
|
|
@@ -10472,14 +10251,14 @@ var officialStats = strictObject({
|
|
|
10472
10251
|
graphs: record(string(), union([graph, strictObject({ error: text })]))
|
|
10473
10252
|
});
|
|
10474
10253
|
|
|
10475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/person.js
|
|
10476
10255
|
var person2 = strictObject({
|
|
10477
10256
|
ref: reference,
|
|
10478
10257
|
name: nullable(text),
|
|
10479
10258
|
identities: optional(array(identity))
|
|
10480
10259
|
});
|
|
10481
10260
|
|
|
10482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/poll.js
|
|
10483
10262
|
var poll = strictObject({
|
|
10484
10263
|
chat_id: id,
|
|
10485
10264
|
message_id: id,
|
|
@@ -10495,11 +10274,11 @@ var poll = strictObject({
|
|
|
10495
10274
|
});
|
|
10496
10275
|
var pollChange = strictObject({ operation_id: id, poll });
|
|
10497
10276
|
|
|
10498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10277
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
|
|
10499
10278
|
var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
|
|
10500
10279
|
var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
|
|
10501
10280
|
|
|
10502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/ranking.js
|
|
10503
10282
|
var figures = record(string(), number());
|
|
10504
10283
|
var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
|
|
10505
10284
|
var rankingRow = strictObject({
|
|
@@ -10546,7 +10325,7 @@ var ranking = strictObject({
|
|
|
10546
10325
|
rows: array(rankingRow)
|
|
10547
10326
|
});
|
|
10548
10327
|
|
|
10549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10328
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/reaction.js
|
|
10550
10329
|
var reaction = strictObject({
|
|
10551
10330
|
person: strictObject({ id, name: nullable(text), username: nullable(text) }),
|
|
10552
10331
|
/** The emoji, or `custom:<id>` for a custom one. */
|
|
@@ -10554,7 +10333,7 @@ var reaction = strictObject({
|
|
|
10554
10333
|
reacted_at: time
|
|
10555
10334
|
});
|
|
10556
10335
|
|
|
10557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
|
|
10558
10337
|
var reactionChange = strictObject({
|
|
10559
10338
|
operation_id: id,
|
|
10560
10339
|
chat_id: id,
|
|
@@ -10562,7 +10341,7 @@ var reactionChange = strictObject({
|
|
|
10562
10341
|
reaction: nullable(text)
|
|
10563
10342
|
});
|
|
10564
10343
|
|
|
10565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/recipient.js
|
|
10566
10345
|
var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
|
|
10567
10346
|
var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
|
|
10568
10347
|
var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
|
|
@@ -10573,7 +10352,7 @@ var recipientChange = strictObject({
|
|
|
10573
10352
|
...partial(recipientOff).entries
|
|
10574
10353
|
});
|
|
10575
10354
|
|
|
10576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
|
|
10577
10356
|
var events = array(record(string(), unknown()));
|
|
10578
10357
|
var recordedRun = strictObject({
|
|
10579
10358
|
run_id: id,
|
|
@@ -10645,7 +10424,7 @@ var runHit = strictObject({
|
|
|
10645
10424
|
});
|
|
10646
10425
|
var runLocation = strictObject({ path: text });
|
|
10647
10426
|
|
|
10648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/relationship.js
|
|
10649
10428
|
var relationship = strictObject({
|
|
10650
10429
|
id,
|
|
10651
10430
|
from: reference,
|
|
@@ -10665,10 +10444,14 @@ var relationship = strictObject({
|
|
|
10665
10444
|
position: nullable(text),
|
|
10666
10445
|
starts_at: nullable(time),
|
|
10667
10446
|
ends_at: nullable(time),
|
|
10447
|
+
/** The source account that reported it, `<provider>:<account>`. */
|
|
10448
|
+
account: optional(text),
|
|
10449
|
+
/** How a source made it when it stated none, such as `department-head`. */
|
|
10450
|
+
derived: optional(text),
|
|
10668
10451
|
created_at: time
|
|
10669
10452
|
});
|
|
10670
10453
|
|
|
10671
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
|
|
10672
10455
|
var milliseconds2 = nullable(pipe(number(), minValue(0)));
|
|
10673
10456
|
var figures2 = { replies: count, median_ms: milliseconds2, p90_ms: milliseconds2, mean_ms: milliseconds2 };
|
|
10674
10457
|
var responseTimes = strictObject({
|
|
@@ -10685,7 +10468,7 @@ var waitingChats = strictObject({
|
|
|
10685
10468
|
by_kind: strictObject({ private: count, group: count })
|
|
10686
10469
|
});
|
|
10687
10470
|
|
|
10688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/retention.js
|
|
10689
10472
|
var retentionCohort = strictObject({
|
|
10690
10473
|
/** The first day of the joining day or week. */
|
|
10691
10474
|
cohort: text,
|
|
@@ -10733,7 +10516,7 @@ var retention = strictObject({
|
|
|
10733
10516
|
rows: array(retentionCohort)
|
|
10734
10517
|
});
|
|
10735
10518
|
|
|
10736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
|
|
10737
10520
|
var savedSearch = strictObject({
|
|
10738
10521
|
id,
|
|
10739
10522
|
/** `null` for a run in the history. */
|
|
@@ -10750,7 +10533,7 @@ var savedSearch = strictObject({
|
|
|
10750
10533
|
});
|
|
10751
10534
|
var searchHistoryClear = strictObject({ cleared: count });
|
|
10752
10535
|
|
|
10753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
|
|
10754
10537
|
var sendAttempt = strictObject({
|
|
10755
10538
|
at: time,
|
|
10756
10539
|
profile: text,
|
|
@@ -10778,7 +10561,7 @@ var sendAttempt = strictObject({
|
|
|
10778
10561
|
error_code: optional(text)
|
|
10779
10562
|
});
|
|
10780
10563
|
|
|
10781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
|
|
10782
10565
|
var absent = strictObject({ path: text, exists: literal(false) });
|
|
10783
10566
|
var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
|
|
10784
10567
|
var infoSchema = strictObject({
|
|
@@ -10999,7 +10782,7 @@ var storeRepair = union([
|
|
|
10999
10782
|
]);
|
|
11000
10783
|
var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
|
|
11001
10784
|
|
|
11002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10785
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/store-records.js
|
|
11003
10786
|
var range = strictObject({ from: number(), to: number() });
|
|
11004
10787
|
var storeChatStatus = strictObject({
|
|
11005
10788
|
chat_id: id,
|
|
@@ -11097,7 +10880,7 @@ var storeJobRetry = union([
|
|
|
11097
10880
|
]);
|
|
11098
10881
|
var storeJobClear = strictObject({ cleared: array(id) });
|
|
11099
10882
|
|
|
11100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/store-table.js
|
|
11101
10884
|
var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
|
|
11102
10885
|
var storeTable = strictObject({
|
|
11103
10886
|
name: text,
|
|
@@ -11106,7 +10889,7 @@ var storeTable = strictObject({
|
|
|
11106
10889
|
bytes: optional(nullable(count))
|
|
11107
10890
|
});
|
|
11108
10891
|
|
|
11109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
|
|
11110
10893
|
var tagTarget = variant("type", [
|
|
11111
10894
|
strictObject({ type: literal("chat"), chat_id: id }),
|
|
11112
10895
|
strictObject({ type: literal("contact"), person_id: id }),
|
|
@@ -11137,7 +10920,7 @@ var automaticTags = strictObject({
|
|
|
11137
10920
|
dry_run: boolean()
|
|
11138
10921
|
});
|
|
11139
10922
|
|
|
11140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10923
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/tagging.js
|
|
11141
10924
|
var tagging = strictObject({
|
|
11142
10925
|
tag: text,
|
|
11143
10926
|
type: picklist(TAG_TYPES),
|
|
@@ -11150,7 +10933,7 @@ var tagging = strictObject({
|
|
|
11150
10933
|
created_at: time
|
|
11151
10934
|
});
|
|
11152
10935
|
|
|
11153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
|
|
11154
10937
|
var side = strictObject({ ref: reference, key: text, title: text, status: text });
|
|
11155
10938
|
var taskPair = strictObject({
|
|
11156
10939
|
task: nullable(side),
|
|
@@ -11173,7 +10956,7 @@ var taskPair = strictObject({
|
|
|
11173
10956
|
created_at: time
|
|
11174
10957
|
});
|
|
11175
10958
|
|
|
11176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/task-results.js
|
|
11177
10960
|
var nullableTime = nullable(time);
|
|
11178
10961
|
var link = strictObject({
|
|
11179
10962
|
id,
|
|
@@ -11347,7 +11130,7 @@ var taskReview = strictObject({
|
|
|
11347
11130
|
untrusted
|
|
11348
11131
|
});
|
|
11349
11132
|
|
|
11350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/template.js
|
|
11351
11134
|
var template = strictObject({
|
|
11352
11135
|
key: text,
|
|
11353
11136
|
channel: picklist(["telegram", "email", "text"]),
|
|
@@ -11359,7 +11142,7 @@ var template = strictObject({
|
|
|
11359
11142
|
updated_by: nullable(text)
|
|
11360
11143
|
});
|
|
11361
11144
|
|
|
11362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/topic.js
|
|
11363
11146
|
var topic = strictObject({
|
|
11364
11147
|
id,
|
|
11365
11148
|
title: text,
|
|
@@ -11373,7 +11156,7 @@ var topic = strictObject({
|
|
|
11373
11156
|
untrusted
|
|
11374
11157
|
});
|
|
11375
11158
|
|
|
11376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/entities/index.js
|
|
11377
11160
|
var ENTITIES = {
|
|
11378
11161
|
sync_progress: progress,
|
|
11379
11162
|
deal,
|
|
@@ -11445,6 +11228,10 @@ var ENTITIES = {
|
|
|
11445
11228
|
identity,
|
|
11446
11229
|
contact_context: contactContext,
|
|
11447
11230
|
contact_preparation: contactPreparation,
|
|
11231
|
+
person_context: personContext,
|
|
11232
|
+
organization_context: organizationContext,
|
|
11233
|
+
deal_context: dealContext,
|
|
11234
|
+
"deal_context.brief": dealBrief,
|
|
11448
11235
|
contact_activity: contactActivity,
|
|
11449
11236
|
contact_check: contactCheck,
|
|
11450
11237
|
linked_person: linkedPerson,
|
|
@@ -11658,11 +11445,11 @@ var ENTITIES = {
|
|
|
11658
11445
|
template
|
|
11659
11446
|
};
|
|
11660
11447
|
var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.entries(ENTITIES).map(([name, schema2]) => {
|
|
11661
|
-
const { $schema:
|
|
11448
|
+
const { $schema: _2, ...definition } = jsonSchemaOf(schema2);
|
|
11662
11449
|
return [name, definition];
|
|
11663
11450
|
})), "entityDefinitions");
|
|
11664
11451
|
|
|
11665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
|
|
11666
11453
|
var schemas = /* @__PURE__ */ new WeakMap();
|
|
11667
11454
|
var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
|
|
11668
11455
|
if (Object.hasOwn(ENTITIES, name))
|
|
@@ -11696,7 +11483,7 @@ var answerRow = /* @__PURE__ */ __name((command) => {
|
|
|
11696
11483
|
return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
|
|
11697
11484
|
}, "answerRow");
|
|
11698
11485
|
|
|
11699
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/images/picture/models.js
|
|
11700
11487
|
import { join as join6 } from "node:path";
|
|
11701
11488
|
var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
|
|
11702
11489
|
var IMAGE_MODELS = [
|
|
@@ -11750,7 +11537,7 @@ var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedM
|
|
|
11750
11537
|
var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file, join6(directory, model3.id, file.name)]), "placedImage");
|
|
11751
11538
|
var isImageModelInstalled = /* @__PURE__ */ __name((model3, directory) => filesPresent(placedImage(model3, directory)), "isImageModelInstalled");
|
|
11752
11539
|
|
|
11753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11540
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/steps.js
|
|
11754
11541
|
var STEPS2 = defineSteps([
|
|
11755
11542
|
...STEPS,
|
|
11756
11543
|
{
|
|
@@ -12037,7 +11824,7 @@ var stepLine = /* @__PURE__ */ __name((root, step2) => {
|
|
|
12037
11824
|
].join(" ");
|
|
12038
11825
|
}, "stepLine");
|
|
12039
11826
|
|
|
12040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
|
|
12041
11828
|
var where = [{ field: "ref" }];
|
|
12042
11829
|
var who2 = { field: ["who.owner", "who.name"], tag: "you" };
|
|
12043
11830
|
var ON_CHAT_ROW = /* @__PURE__ */ new Set(["reply-next", "coverage"]);
|
|
@@ -12129,7 +11916,7 @@ var STATUS_ROWS = {
|
|
|
12129
11916
|
"status.failed": { columns: [{ field: "signal" }], text: ["why"] }
|
|
12130
11917
|
};
|
|
12131
11918
|
|
|
12132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/compact.js
|
|
12133
11920
|
var TEXT_CHARS = 400;
|
|
12134
11921
|
var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
|
|
12135
11922
|
var messageRow = {
|
|
@@ -12371,8 +12158,8 @@ var dayColumn = /* @__PURE__ */ __name((rows2, shape, hoisted) => {
|
|
|
12371
12158
|
const dates = rows2.map(({ cells }) => cells[index]?.date);
|
|
12372
12159
|
if (dates.some((one) => one === void 0))
|
|
12373
12160
|
return -1;
|
|
12374
|
-
const
|
|
12375
|
-
return ordered(
|
|
12161
|
+
const days = dates;
|
|
12162
|
+
return ordered(days) && new Set(days).size * 3 <= days.length ? index : -1;
|
|
12376
12163
|
}, "dayColumn");
|
|
12377
12164
|
var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
|
|
12378
12165
|
const dates = [];
|
|
@@ -12388,7 +12175,7 @@ var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
|
|
|
12388
12175
|
const firstColumn = shape.columns[0];
|
|
12389
12176
|
const refs = rows2.map(({ item }) => item && firstColumn ? firstSet(item, firstColumn.field) : void 0);
|
|
12390
12177
|
const prefix = sharedPrefix(refs.map((ref) => typeof ref === "string" ? ref : void 0));
|
|
12391
|
-
const hoisted = rows2.length < 2 ? [] : shape.columns.map((
|
|
12178
|
+
const hoisted = rows2.length < 2 ? [] : shape.columns.map((_2, index) => index > 0 && sameEverywhere(rows2, index));
|
|
12392
12179
|
const named3 = hoisted.flatMap((hoist, index) => {
|
|
12393
12180
|
const column = shape.columns[index];
|
|
12394
12181
|
const item = rows2[0]?.item;
|
|
@@ -12495,11 +12282,11 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
|
|
|
12495
12282
|
return lines.concat(footerOf(body)).join("\n");
|
|
12496
12283
|
}, "compactText");
|
|
12497
12284
|
|
|
12498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
|
|
12499
12286
|
var SOFT_OUTPUT_BYTES = 256 * 1024;
|
|
12500
12287
|
var CARRIED = ["json", "compact", "offline", "timeout", "full", "brief", "maxOutputBytes"];
|
|
12501
12288
|
var NOT_WITH_COMPACT = /* @__PURE__ */ new Set(["json", "brief"]);
|
|
12502
|
-
var
|
|
12289
|
+
var snake2 = /* @__PURE__ */ __name((name) => name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
12503
12290
|
var typed = /* @__PURE__ */ __name((command, key) => command.getOptionValueSource(key) === "cli", "typed");
|
|
12504
12291
|
var typedArgs = /* @__PURE__ */ __name((command) => {
|
|
12505
12292
|
const root = rootOf2(command);
|
|
@@ -12512,8 +12299,8 @@ var typedArgs = /* @__PURE__ */ __name((command) => {
|
|
|
12512
12299
|
const word = Array.isArray(value) ? value.join(" ") : value;
|
|
12513
12300
|
return word === void 0 || word === "" ? [] : [[argument.name(), word]];
|
|
12514
12301
|
});
|
|
12515
|
-
const own = command.options.map((option) => option.attributeName()).filter((key) => typed(command, key)).map((key) => [
|
|
12516
|
-
const global = CARRIED.filter((key) => typed(root, key)).map((key) => [
|
|
12302
|
+
const own = command.options.map((option) => option.attributeName()).filter((key) => typed(command, key)).map((key) => [snake2(key), command.getOptionValue(key)]);
|
|
12303
|
+
const global = CARRIED.filter((key) => typed(root, key)).map((key) => [snake2(key), root.getOptionValue(key)]);
|
|
12517
12304
|
return Object.fromEntries([...positional, ...own, ...global]);
|
|
12518
12305
|
}, "typedArgs");
|
|
12519
12306
|
var declaresRow = /* @__PURE__ */ __name((command) => {
|
|
@@ -12553,7 +12340,7 @@ var largeAnswerSteps = /* @__PURE__ */ __name((command) => {
|
|
|
12553
12340
|
return args ? compactStep(command, args, "the answer is large as JSON; one line per item keeps every ref") : [];
|
|
12554
12341
|
}, "largeAnswerSteps");
|
|
12555
12342
|
|
|
12556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
|
|
12557
12344
|
var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
|
|
12558
12345
|
var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
|
|
12559
12346
|
var strip = /* @__PURE__ */ __name((value) => {
|
|
@@ -12567,7 +12354,7 @@ var strip = /* @__PURE__ */ __name((value) => {
|
|
|
12567
12354
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
|
|
12568
12355
|
}, "strip");
|
|
12569
12356
|
|
|
12570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.619.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._3343d636b3fedf7ef3285e4c7a47096e/node_modules/@wirecat/cli-core/dist/cli/envelope.js
|
|
12571
12358
|
var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
|
|
12572
12359
|
var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
|
|
12573
12360
|
var listOf = /* @__PURE__ */ __name((command, input) => {
|
|
@@ -12610,7 +12397,7 @@ var itemOf = /* @__PURE__ */ __name((item, { next = [], missing, meta } = {}) =>
|
|
|
12610
12397
|
};
|
|
12611
12398
|
return body;
|
|
12612
12399
|
}, "itemOf");
|
|
12613
|
-
var
|
|
12400
|
+
var snake3 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
12614
12401
|
var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
12615
12402
|
const kept = new Set(verbatim);
|
|
12616
12403
|
const convert = /* @__PURE__ */ __name((value) => {
|
|
@@ -12621,7 +12408,7 @@ var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
|
12621
12408
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => {
|
|
12622
12409
|
if (inner === void 0)
|
|
12623
12410
|
return [];
|
|
12624
|
-
const name =
|
|
12411
|
+
const name = snake3(key);
|
|
12625
12412
|
return [[name, kept.has(key) || kept.has(name) ? inner : convert(inner)]];
|
|
12626
12413
|
}));
|
|
12627
12414
|
}, "convert");
|
|
@@ -12738,26 +12525,6 @@ export {
|
|
|
12738
12525
|
sharedCommand,
|
|
12739
12526
|
customizeSharedCommand,
|
|
12740
12527
|
refuseJoinedPath,
|
|
12741
|
-
logAttributes,
|
|
12742
|
-
fromLogAttributes,
|
|
12743
|
-
LOG_ATTRIBUTES,
|
|
12744
|
-
runsDirFor,
|
|
12745
|
-
runtime,
|
|
12746
|
-
newRunId,
|
|
12747
|
-
listRuns,
|
|
12748
|
-
findRun,
|
|
12749
|
-
readEvents,
|
|
12750
|
-
currentRun,
|
|
12751
|
-
inRun,
|
|
12752
|
-
runEvent,
|
|
12753
|
-
typedCommand,
|
|
12754
|
-
useAsProcessRun,
|
|
12755
|
-
processRun,
|
|
12756
|
-
enclosingTraceId,
|
|
12757
|
-
traceOf,
|
|
12758
|
-
childTrace,
|
|
12759
|
-
withAttempt,
|
|
12760
|
-
currentAttempt,
|
|
12761
12528
|
recorded,
|
|
12762
12529
|
startRecording,
|
|
12763
12530
|
wasSettled,
|
|
@@ -12789,6 +12556,7 @@ export {
|
|
|
12789
12556
|
modelTarget,
|
|
12790
12557
|
parseDuration,
|
|
12791
12558
|
DEFAULT_TEXT_MODEL,
|
|
12559
|
+
PREVIOUS_DEFAULT_TEXT_MODEL,
|
|
12792
12560
|
CustomTextModelShape,
|
|
12793
12561
|
readTextModelsSection,
|
|
12794
12562
|
writeTextModelsSection,
|
|
@@ -12879,16 +12647,16 @@ export {
|
|
|
12879
12647
|
agenda,
|
|
12880
12648
|
analysisConsent,
|
|
12881
12649
|
attachment,
|
|
12650
|
+
WEIGHTS,
|
|
12651
|
+
LINK,
|
|
12652
|
+
oddName,
|
|
12882
12653
|
member,
|
|
12883
12654
|
chat,
|
|
12655
|
+
message,
|
|
12884
12656
|
folder,
|
|
12885
12657
|
inviteLink,
|
|
12886
12658
|
chatEvent,
|
|
12887
12659
|
contact,
|
|
12888
|
-
WEIGHTS,
|
|
12889
|
-
LINK,
|
|
12890
|
-
oddName,
|
|
12891
|
-
message,
|
|
12892
12660
|
contactNote,
|
|
12893
12661
|
conversation,
|
|
12894
12662
|
documentLink,
|