@wirecat/tg-cli 0.118.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 +7623 -0
- package/dist/bin/tg.js +2 -2
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +15 -8
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-4YNP6VCO.js → adapter-OJKHXGBC.js} +49 -50
- package/dist/bundle/{all-profiles-MIQDYAGO.js → all-profiles-URIWNL23.js} +10 -10
- package/dist/bundle/{anthropic-NTASPJYE.js → anthropic-YUKNB63B.js} +10 -8
- package/dist/bundle/{app-server-UJZBJ2SK.js → app-server-H5QNHGH4.js} +43 -43
- package/dist/bundle/{bot-api-JZAD4L3N.js → bot-api-27GN4Y3D.js} +49 -49
- package/dist/bundle/{bot-history-OUDHH3NU.js → bot-history-VVSWLVZM.js} +18 -18
- package/dist/bundle/{bun-EC4HDIRD.js → bun-PAAJX3GU.js} +2 -2
- package/dist/bundle/{bun-sqlite-A4HJR6KO.js → bun-sqlite-TPEBWFZH.js} +5 -5
- package/dist/bundle/{chunk-KEDHX6XG.js → chunk-34DSPJNN.js} +2 -2
- package/dist/bundle/{chunk-JZETEZHC.js → chunk-3FPFRDG2.js} +10 -8
- package/dist/bundle/{chunk-2KQHUBTV.js → chunk-3GLLWDM6.js} +12 -12
- package/dist/bundle/{chunk-NMT2VGEI.js → chunk-3SANNNWS.js} +3 -3
- package/dist/bundle/{chunk-65XV5PPI.js → chunk-4JATS2J5.js} +3 -3
- package/dist/bundle/{chunk-OTQDJUES.js → chunk-4OWY7QBE.js} +6 -6
- package/dist/bundle/{chunk-QOGYHU3Q.js → chunk-4W4EVVL4.js} +61 -21
- package/dist/bundle/{chunk-BNEP5EOV.js → chunk-6XHZV7AQ.js} +4 -4
- package/dist/bundle/{chunk-3MQOLYAN.js → chunk-7DPWVKYS.js} +4 -4
- package/dist/bundle/{chunk-NUCDEOFC.js → chunk-7I6YVQHW.js} +2 -2
- package/dist/bundle/{chunk-HJNRIK5X.js → chunk-7N4IUEX3.js} +9 -8
- package/dist/bundle/{chunk-RG2E7ZQZ.js → chunk-7VNV426X.js} +85 -17
- package/dist/bundle/{chunk-DSZJREEO.js → chunk-7WS3ULOO.js} +2205 -911
- package/dist/bundle/{chunk-TMTEWOQS.js → chunk-B7B65ZLU.js} +5 -3
- package/dist/bundle/{chunk-EPXVRJAX.js → chunk-CGUDXNJE.js} +2 -2
- package/dist/bundle/{chunk-EQJ6NLF5.js → chunk-CLTMVPGT.js} +13 -13
- package/dist/bundle/{chunk-6ZMTEUVU.js → chunk-CLURRDNU.js} +6 -6
- package/dist/bundle/{chunk-ZXXTJF4Z.js → chunk-CYWV2RLN.js} +4 -4
- package/dist/bundle/{chunk-5IIU7X4S.js → chunk-D2WNQJUQ.js} +1 -1
- package/dist/bundle/{chunk-PB252TT3.js → chunk-DDKFAUQD.js} +2 -2
- package/dist/bundle/{chunk-5LDWBEWU.js → chunk-DE7QIEUP.js} +53 -35
- package/dist/bundle/{chunk-JPVFYMSQ.js → chunk-DH7VKHTZ.js} +4 -4
- package/dist/bundle/{chunk-GXCJ47SJ.js → chunk-DQTQO6PB.js} +3265 -1034
- package/dist/bundle/{chunk-JWIUK3SK.js → chunk-FATTEYZH.js} +2 -2
- package/dist/bundle/{chunk-I4TI5HDJ.js → chunk-FPWXG53C.js} +11 -11
- package/dist/bundle/{chunk-PO74BDER.js → chunk-H5XC2WYO.js} +35 -589
- package/dist/bundle/{chunk-ZMUC3UQO.js → chunk-HDSKBXAF.js} +3 -3
- package/dist/bundle/{chunk-PWCQC56A.js → chunk-HIBYYKGO.js} +1 -1
- package/dist/bundle/{chunk-GLRRCKP6.js → chunk-JJY3TQTM.js} +23 -5
- package/dist/bundle/{chunk-YPRUWRKE.js → chunk-JQLGS3SG.js} +1 -1
- package/dist/bundle/{chunk-MBH7IKLT.js → chunk-JSEIT2WO.js} +1 -1
- package/dist/bundle/{chunk-57LKX6N2.js → chunk-KLHOQ6XQ.js} +1 -1
- package/dist/bundle/{chunk-4BV4UMBB.js → chunk-KP26Y5OA.js} +1628 -367
- package/dist/bundle/{chunk-MZNOASAW.js → chunk-KRCMKFUV.js} +16 -3
- package/dist/bundle/{chunk-6AXUEJGL.js → chunk-KTV5Y5EX.js} +2 -2
- package/dist/bundle/{chunk-YEOSV6JC.js → chunk-KW6JZGG3.js} +1 -1
- package/dist/bundle/{chunk-H6S3C3MH.js → chunk-LLCGOZ44.js} +4 -4
- package/dist/bundle/{chunk-CEY43D3A.js → chunk-LS72R7DN.js} +34 -34
- package/dist/bundle/chunk-LVGX7VTD.js +138 -0
- package/dist/bundle/{chunk-VW6BF6M7.js → chunk-MCPOZNWG.js} +1 -1
- package/dist/bundle/{chunk-G3RT2EQI.js → chunk-MMPISXSU.js} +2 -2
- package/dist/bundle/{chunk-6RI4TEIC.js → chunk-MTD6WZKV.js} +2 -2
- package/dist/bundle/{chunk-JLJKGKU2.js → chunk-PDYTNTQI.js} +6 -6
- package/dist/bundle/{chunk-P3ASN72F.js → chunk-RX5CJ55S.js} +1 -1
- package/dist/bundle/{chunk-76EKXFX2.js → chunk-S6OC367D.js} +24 -2
- package/dist/bundle/{chunk-PW3HFIJA.js → chunk-THJHYMFR.js} +1489 -1548
- package/dist/bundle/{chunk-5QYU7B27.js → chunk-U2TPRUWK.js} +689 -482
- package/dist/bundle/{chunk-YHZFGUAP.js → chunk-U6HEZPCR.js} +19 -19
- package/dist/bundle/{chunk-BXTDAGM4.js → chunk-VUBZFMGP.js} +2 -2
- package/dist/bundle/{chunk-2NA5KVP6.js → chunk-VUUR2SRS.js} +264 -45
- package/dist/bundle/{chunk-EPCFXKTX.js → chunk-WGGSFGNZ.js} +34 -8
- package/dist/bundle/{chunk-Y64SI2RO.js → chunk-WLBPNLDF.js} +3 -3
- package/dist/bundle/{chunk-GI4MTNA2.js → chunk-WQ55F4Y3.js} +8 -8
- package/dist/bundle/{chunk-FHMK6OK4.js → chunk-YBOVL25O.js} +96 -30
- package/dist/bundle/{chunk-DKFC5ZZ3.js → chunk-YDROJG2Y.js} +86 -29
- package/dist/bundle/{chunk-NKFTZVQU.js → chunk-YQKEPT22.js} +1 -1
- package/dist/bundle/{chunk-GIM37COQ.js → chunk-ZON7K5QE.js} +3 -3
- package/dist/bundle/{chunk-JWPSVS6C.js → chunk-ZRRZTPSB.js} +19059 -17055
- package/dist/bundle/command-contract-KW6FNOJO.js +33 -0
- package/dist/bundle/{decode-NMNPLKNR.js → decode-RVWSCZW4.js} +5 -5
- package/dist/bundle/{dispatch-OP27MWX5.js → dispatch-U2DW6UI7.js} +10 -10
- package/dist/bundle/{echarts-S46LEIPS.js → echarts-6VNUD3JF.js} +2 -2
- package/dist/bundle/{embed-I5ZYHGYC.js → embed-LWLCQKIK.js} +6 -6
- package/dist/bundle/{embedder-LTJI67N2.js → embedder-CXKHLRJT.js} +9 -9
- package/dist/bundle/{entry-O6BUPXF7.js → entry-HV4NSX3Z.js} +7 -7
- package/dist/bundle/{failure-4JUQFXJT.js → failure-HJD7S5UA.js} +2 -2
- package/dist/bundle/{first-run-PMZNCDGD.js → first-run-OPI6NIWQ.js} +11 -11
- package/dist/bundle/first-screen-BVQLF4LN.js +31 -0
- package/dist/bundle/{instructions-AUEGY3VO.js → instructions-TK4HXL3A.js} +1 -1
- package/dist/bundle/{mcp-M4QN2E7R.js → mcp-7KQUJNFN.js} +2 -2
- package/dist/bundle/{node-XRA7RBCQ.js → node-WFPNBUCU.js} +2 -2
- package/dist/bundle/{node-sqlite-DEZO6LRS.js → node-sqlite-L5BRGJLK.js} +6 -6
- package/dist/bundle/{oauth-DAVC7WCD.js → oauth-CGVWL35B.js} +7 -7
- package/dist/bundle/{open-DE2YO4T7.js → open-HLL55C5S.js} +5 -5
- package/dist/bundle/{openai-5BKGAULH.js → openai-YFCNXIJ4.js} +16 -37
- package/dist/bundle/{process-4ZHPNUIQ.js → process-4A5JP5LO.js} +1 -1
- package/dist/bundle/{program-EGTKSNB4.js → program-IFGQGSUF.js} +56 -53
- package/dist/bundle/{prompt-HWCWHHPE.js → prompt-B5FYE2DQ.js} +7 -5
- package/dist/bundle/{proxy-transport-4DPZB2W2.js → proxy-transport-ENU2SJYT.js} +5 -5
- package/dist/bundle/{recognize-NG6RXNGF.js → recognize-ZHMHGIV3.js} +4 -4
- package/dist/bundle/{remote-ZKXIIGYH.js → remote-A3W5HE52.js} +7 -7
- package/dist/bundle/{rerank-TX5QFURV.js → rerank-HWJAQOZM.js} +7 -7
- package/dist/bundle/{serve-XAS6DECW.js → serve-PP326Q2F.js} +9 -9
- package/dist/bundle/{server-CNPIWBYU.js → server-MV6CL63L.js} +35 -35
- package/dist/bundle/server-TZGGOJ26.js +60 -0
- package/dist/bundle/{state-3HTUETTS.js → state-Y3RJ7ZXB.js} +6 -6
- package/dist/bundle/{store-B5VZWJHN.js → store-EVNI2MHZ.js} +36 -13
- package/dist/bundle/store-maintenance-command-XPQE47RE.js +49 -0
- package/dist/bundle/tg.js +38 -14
- package/dist/commands/account-removal.d.ts +3 -0
- package/dist/commands/account-removal.d.ts.map +1 -0
- package/dist/commands/account-removal.js +57 -0
- package/dist/commands/account-removal.js.map +1 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +2 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/http.d.ts +6 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +8 -0
- package/dist/http.js.map +1 -0
- package/dist/identity.d.ts +4 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +14 -0
- package/dist/identity.js.map +1 -1
- package/dist/telegram/map.d.ts.map +1 -1
- package/dist/telegram/map.js +3 -0
- package/dist/telegram/map.js.map +1 -1
- package/dist/telegram/registration.d.ts +1 -1
- package/dist/telegram/registration.d.ts.map +1 -1
- package/dist/telegram/registration.js +4 -1
- package/dist/telegram/registration.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +7 -6
- package/dist/bundle/chunk-TSTEZNSX.js +0 -33
- package/dist/bundle/command-contract-7GZ6HAA6.js +0 -33
- package/dist/bundle/first-screen-BGML5DSO.js +0 -31
- package/dist/bundle/server-FRTKLHZF.js +0 -60
- package/dist/bundle/store-maintenance-command-VG3CLELA.js +0 -50
- /package/dist/bundle/{chunk-VOXIGICJ.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,26 +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
|
+
BUSINESS_KINDS,
|
|
29
|
+
CATEGORIES,
|
|
30
|
+
DEAL_KINDS,
|
|
28
31
|
DEAL_ROLES,
|
|
32
|
+
DEAL_STATUSES,
|
|
29
33
|
FACT_STATUSES,
|
|
30
34
|
FACT_TYPES,
|
|
31
35
|
FIELD_TYPES,
|
|
36
|
+
FINANCE_REVIEWS,
|
|
32
37
|
INVOICE_DIRECTIONS,
|
|
38
|
+
INVOICE_STATUSES,
|
|
39
|
+
KEEP_STORE_RUNS_FOR_DAYS,
|
|
40
|
+
KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
33
41
|
LINK_KINDS,
|
|
34
42
|
LINK_SOURCES,
|
|
43
|
+
LOG_ATTRIBUTES,
|
|
35
44
|
MEETING_RESULT_ENTITIES,
|
|
36
45
|
MEMORY_KINDS,
|
|
37
46
|
MEMORY_SCOPES,
|
|
@@ -42,6 +51,7 @@ import {
|
|
|
42
51
|
PRIORITY_LABELS,
|
|
43
52
|
QUERY_BACKENDS,
|
|
44
53
|
RELATION_KINDS,
|
|
54
|
+
RUNS_SIZE_LIMIT_MB,
|
|
45
55
|
STANDINGS,
|
|
46
56
|
TAG_TYPES,
|
|
47
57
|
TASK_KINDS,
|
|
@@ -51,11 +61,16 @@ import {
|
|
|
51
61
|
TASK_VERDICTS,
|
|
52
62
|
WORK_TASK_TYPES,
|
|
53
63
|
author,
|
|
64
|
+
childTrace,
|
|
54
65
|
count,
|
|
66
|
+
currentRun,
|
|
55
67
|
describeQuery,
|
|
68
|
+
enclosingTraceId,
|
|
56
69
|
event,
|
|
57
70
|
evidenceSource,
|
|
58
71
|
id,
|
|
72
|
+
inRun,
|
|
73
|
+
logAttributes,
|
|
59
74
|
markStoreDamaged,
|
|
60
75
|
meeting,
|
|
61
76
|
meetingCounts,
|
|
@@ -70,28 +85,38 @@ import {
|
|
|
70
85
|
meetingStats,
|
|
71
86
|
meetingSummary,
|
|
72
87
|
meetingTranscript,
|
|
88
|
+
newRunId,
|
|
73
89
|
organization,
|
|
74
90
|
project,
|
|
75
91
|
providerMetadata,
|
|
76
92
|
reminder,
|
|
93
|
+
runsDirFor,
|
|
94
|
+
snakeLogger,
|
|
95
|
+
sourceReview,
|
|
96
|
+
startRun,
|
|
77
97
|
text,
|
|
78
98
|
time,
|
|
79
|
-
|
|
80
|
-
|
|
99
|
+
traceOf,
|
|
100
|
+
typedCommand,
|
|
101
|
+
untrusted,
|
|
102
|
+
useAsProcessRun
|
|
103
|
+
} from "./chunk-KP26Y5OA.js";
|
|
81
104
|
import {
|
|
82
105
|
isCliFailure,
|
|
83
106
|
storeDamaged
|
|
84
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-WLBPNLDF.js";
|
|
85
108
|
import {
|
|
86
|
-
|
|
87
|
-
|
|
109
|
+
readSharedSection,
|
|
110
|
+
sharedConfigPath,
|
|
111
|
+
writeSharedSection
|
|
112
|
+
} from "./chunk-CLURRDNU.js";
|
|
88
113
|
import {
|
|
89
114
|
filesPresent,
|
|
90
115
|
sharedModelsDirectory
|
|
91
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-DH7VKHTZ.js";
|
|
92
117
|
import {
|
|
93
118
|
storePath
|
|
94
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-MMPISXSU.js";
|
|
95
120
|
import {
|
|
96
121
|
configFilePath,
|
|
97
122
|
createRecordLog,
|
|
@@ -102,9 +127,8 @@ import {
|
|
|
102
127
|
projectFields,
|
|
103
128
|
resolvePaths,
|
|
104
129
|
saveConfigFile,
|
|
105
|
-
traceIdOf,
|
|
106
130
|
writeSecurely
|
|
107
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-U6HEZPCR.js";
|
|
108
132
|
import {
|
|
109
133
|
COMPACT_FLAG,
|
|
110
134
|
MAX_NEXT_STEPS,
|
|
@@ -147,6 +171,7 @@ import {
|
|
|
147
171
|
regex,
|
|
148
172
|
safeInteger,
|
|
149
173
|
safeParse,
|
|
174
|
+
startsWith,
|
|
150
175
|
stepOf,
|
|
151
176
|
strictObject,
|
|
152
177
|
string,
|
|
@@ -154,20 +179,21 @@ import {
|
|
|
154
179
|
union,
|
|
155
180
|
unknown,
|
|
156
181
|
unwrap,
|
|
182
|
+
url,
|
|
157
183
|
variant,
|
|
158
184
|
writes
|
|
159
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-WGGSFGNZ.js";
|
|
160
186
|
import {
|
|
161
187
|
CliError,
|
|
162
188
|
isCliError,
|
|
163
189
|
singleLine,
|
|
164
190
|
visibleControls
|
|
165
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-VUBZFMGP.js";
|
|
166
192
|
import {
|
|
167
193
|
__name
|
|
168
194
|
} from "./chunk-ZVVMGPBJ.js";
|
|
169
195
|
|
|
170
|
-
// 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
|
|
171
197
|
var labels = /* @__PURE__ */ new WeakMap();
|
|
172
198
|
var annotate = /* @__PURE__ */ __name((command, meta) => {
|
|
173
199
|
labels.set(command, { ...labels.get(command), ...meta });
|
|
@@ -3668,7 +3694,7 @@ __name(useColor, "useColor");
|
|
|
3668
3694
|
// node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
|
|
3669
3695
|
var program = new Command();
|
|
3670
3696
|
|
|
3671
|
-
// 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
|
|
3672
3698
|
import { isDeepStrictEqual } from "node:util";
|
|
3673
3699
|
var protectedCommands = /* @__PURE__ */ new WeakMap();
|
|
3674
3700
|
var hasSharedContract = /* @__PURE__ */ __name((command) => protectedCommands.has(command), "hasSharedContract");
|
|
@@ -3676,7 +3702,7 @@ var hidden = /* @__PURE__ */ __name((command) => Boolean(command._hidden), "hidd
|
|
|
3676
3702
|
var snapshot = /* @__PURE__ */ __name((command, known = /* @__PURE__ */ new Map(), children) => {
|
|
3677
3703
|
if (hidden(command))
|
|
3678
3704
|
throw new Error("a hidden command cannot own a shared contract");
|
|
3679
|
-
const { commands:
|
|
3705
|
+
const { commands: _2, usage: __, path: ___, ...contract } = describeAlone(command, known);
|
|
3680
3706
|
return {
|
|
3681
3707
|
...contract,
|
|
3682
3708
|
aliases: [...command.aliases()],
|
|
@@ -3870,7 +3896,7 @@ var customizeSharedCommand = /* @__PURE__ */ __name((reference2, reason, build,
|
|
|
3870
3896
|
return command;
|
|
3871
3897
|
}, "customizeSharedCommand");
|
|
3872
3898
|
|
|
3873
|
-
// 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
|
|
3874
3900
|
var argumentInfoSchema = object({
|
|
3875
3901
|
name: string(),
|
|
3876
3902
|
required: boolean(),
|
|
@@ -3944,7 +3970,7 @@ var commandsDocumentSchema = strictObject({
|
|
|
3944
3970
|
exit_codes: record(string(), pipe(number(), integer()))
|
|
3945
3971
|
});
|
|
3946
3972
|
|
|
3947
|
-
// 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
|
|
3948
3974
|
var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
3949
3975
|
let command = root;
|
|
3950
3976
|
const path2 = [];
|
|
@@ -3962,7 +3988,7 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
|
3962
3988
|
}
|
|
3963
3989
|
}, "refuseJoinedPath");
|
|
3964
3990
|
|
|
3965
|
-
// 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
|
|
3966
3992
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3967
3993
|
var sentIds = /* @__PURE__ */ __name((typed2, message2) => ({
|
|
3968
3994
|
messageId: message2.id,
|
|
@@ -3989,18 +4015,18 @@ var stopWrites = /* @__PURE__ */ __name((scope, reason) => {
|
|
|
3989
4015
|
for (const write of scope)
|
|
3990
4016
|
write.cut();
|
|
3991
4017
|
}, "stopWrites");
|
|
3992
|
-
var refuseStopped = /* @__PURE__ */ __name((
|
|
3993
|
-
for (const scope of
|
|
4018
|
+
var refuseStopped = /* @__PURE__ */ __name((scopes2) => {
|
|
4019
|
+
for (const scope of scopes2)
|
|
3994
4020
|
if (stopped.has(scope))
|
|
3995
4021
|
throw stopped.get(scope);
|
|
3996
4022
|
}, "refuseStopped");
|
|
3997
4023
|
var currentOperation = /* @__PURE__ */ __name(() => current.getStore(), "currentOperation");
|
|
3998
4024
|
var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 = () => ({}), prepare) => {
|
|
3999
|
-
const
|
|
4000
|
-
refuseStopped(
|
|
4025
|
+
const scopes2 = scopesFor();
|
|
4026
|
+
refuseStopped(scopes2);
|
|
4001
4027
|
try {
|
|
4002
4028
|
await guard.ask?.(attempt);
|
|
4003
|
-
refuseStopped(
|
|
4029
|
+
refuseStopped(scopes2);
|
|
4004
4030
|
if (guard.reserve) {
|
|
4005
4031
|
guard.check(attempt, { reserve: false });
|
|
4006
4032
|
await guard.reserve(attempt);
|
|
@@ -4011,7 +4037,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
4011
4037
|
throw error;
|
|
4012
4038
|
}
|
|
4013
4039
|
try {
|
|
4014
|
-
refuseStopped(
|
|
4040
|
+
refuseStopped(scopes2);
|
|
4015
4041
|
} catch (error) {
|
|
4016
4042
|
guard.record({ ...attempt, outcome: "failed", errorCode: codeOf(error) });
|
|
4017
4043
|
throw error;
|
|
@@ -4036,7 +4062,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
4036
4062
|
});
|
|
4037
4063
|
}, "cut")
|
|
4038
4064
|
};
|
|
4039
|
-
for (const scope of
|
|
4065
|
+
for (const scope of scopes2)
|
|
4040
4066
|
scope.add(flight);
|
|
4041
4067
|
try {
|
|
4042
4068
|
if (prepare !== void 0)
|
|
@@ -4062,13 +4088,13 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
4062
4088
|
throw new CliError(error.code, error.message, { ...error.details, sent: false });
|
|
4063
4089
|
throw error;
|
|
4064
4090
|
} finally {
|
|
4065
|
-
for (const scope of
|
|
4091
|
+
for (const scope of scopes2)
|
|
4066
4092
|
scope.delete(flight);
|
|
4067
4093
|
}
|
|
4068
4094
|
}, "guardedWrite");
|
|
4069
4095
|
var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
|
|
4070
4096
|
|
|
4071
|
-
// 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
|
|
4072
4098
|
var named = /* @__PURE__ */ __name((work) => {
|
|
4073
4099
|
try {
|
|
4074
4100
|
return work();
|
|
@@ -4095,7 +4121,7 @@ var projectFields2 = /* @__PURE__ */ __name((value, fields) => named(() => {
|
|
|
4095
4121
|
return projectFields(value, fields);
|
|
4096
4122
|
}), "projectFields");
|
|
4097
4123
|
|
|
4098
|
-
// 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
|
|
4099
4125
|
var DEFAULT_COMMAND_MS = 3e4;
|
|
4100
4126
|
var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
|
|
4101
4127
|
var DEFAULT_SYNC_MS = 15 * 6e4;
|
|
@@ -4120,7 +4146,7 @@ var execution = /* @__PURE__ */ __name((streams, { timeoutMs, fields, maxOutputB
|
|
|
4120
4146
|
let interrupted;
|
|
4121
4147
|
let reject = /* @__PURE__ */ __name(() => {
|
|
4122
4148
|
}, "reject");
|
|
4123
|
-
const interruption = new Promise((
|
|
4149
|
+
const interruption = new Promise((_2, fail) => {
|
|
4124
4150
|
reject = fail;
|
|
4125
4151
|
});
|
|
4126
4152
|
void interruption.catch(() => {
|
|
@@ -4267,7 +4293,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
|
|
|
4267
4293
|
throw signal.reason;
|
|
4268
4294
|
let abort = /* @__PURE__ */ __name(() => {
|
|
4269
4295
|
}, "abort");
|
|
4270
|
-
const interrupted = new Promise((
|
|
4296
|
+
const interrupted = new Promise((_2, reject) => {
|
|
4271
4297
|
abort = /* @__PURE__ */ __name(() => reject(signal.reason), "abort");
|
|
4272
4298
|
signal.addEventListener("abort", abort, { once: true });
|
|
4273
4299
|
});
|
|
@@ -4278,7 +4304,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
|
|
|
4278
4304
|
}
|
|
4279
4305
|
}, "withAbort");
|
|
4280
4306
|
|
|
4281
|
-
// 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
|
|
4282
4308
|
var LEVELS = ["deny", "readonly", "ask", "allow"];
|
|
4283
4309
|
var DANGEROUS = /* @__PURE__ */ new Set(["messages.delete", "bot.messages.delete", "topics.delete", "chats.delete", "chats.clear"]);
|
|
4284
4310
|
var skipFlagFor = /* @__PURE__ */ __name((key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes", "skipFlagFor");
|
|
@@ -4307,6 +4333,10 @@ var DEFAULT_PERMISSIONS = {
|
|
|
4307
4333
|
"server.stop": "ask",
|
|
4308
4334
|
"server.restart": "ask",
|
|
4309
4335
|
"models.download": "ask",
|
|
4336
|
+
// NEED-2357.f: many MCP clients (ChatGPT) cannot answer a question, and a switch deletes nothing; kept as a key so a
|
|
4337
|
+
// profile can still deny it.
|
|
4338
|
+
"models.set": "allow",
|
|
4339
|
+
"models.add": "ask",
|
|
4310
4340
|
"images.models.download": "ask",
|
|
4311
4341
|
"schedule.run": "ask",
|
|
4312
4342
|
"schedule.exec": "ask",
|
|
@@ -4674,7 +4704,7 @@ var assertRetentionEvidenceRead = /* @__PURE__ */ __name((permissions) => {
|
|
|
4674
4704
|
}
|
|
4675
4705
|
}, "assertRetentionEvidenceRead");
|
|
4676
4706
|
|
|
4677
|
-
// 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
|
|
4678
4708
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
4679
4709
|
import { join } from "node:path";
|
|
4680
4710
|
var botsDirectory = /* @__PURE__ */ __name((app, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "bots"), "botsDirectory");
|
|
@@ -4763,7 +4793,7 @@ var registryProfiles = /* @__PURE__ */ __name((app, env = process.env) => {
|
|
|
4763
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));
|
|
4764
4794
|
}, "registryProfiles");
|
|
4765
4795
|
|
|
4766
|
-
// 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
|
|
4767
4797
|
import { existsSync as existsSync2, readdirSync as readdirSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
4768
4798
|
import { join as join2 } from "node:path";
|
|
4769
4799
|
var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
|
|
@@ -4785,7 +4815,7 @@ var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
|
|
|
4785
4815
|
}, "profilesWithAccounts");
|
|
4786
4816
|
var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
|
|
4787
4817
|
|
|
4788
|
-
// 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
|
|
4789
4819
|
var RARELY_SET = ["editedAt", "replyTo", "forwardedFrom", "reactions"];
|
|
4790
4820
|
var BRIEF = ["locator", "chatTitle", "timestamp", "senderName", "excerpt", "score"];
|
|
4791
4821
|
var SNAKE_BRIEF = ["ref", "chat_title", "timestamp", "sender_name", "excerpt", "score"];
|
|
@@ -4821,7 +4851,7 @@ var atDetail = /* @__PURE__ */ __name((value, detail = "default") => {
|
|
|
4821
4851
|
return value;
|
|
4822
4852
|
}, "atDetail");
|
|
4823
4853
|
|
|
4824
|
-
// 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
|
|
4825
4855
|
var refuseCompact = /* @__PURE__ */ __name(({ json, jsonl, fields, hitDetail }) => {
|
|
4826
4856
|
const other = jsonl ? "--jsonl" : fields !== void 0 ? "--json=\u2026" : json ? "--json" : hitDetail === "brief" ? "--brief" : "";
|
|
4827
4857
|
if (other)
|
|
@@ -4885,7 +4915,7 @@ var silence = /* @__PURE__ */ __name((renderer) => ({
|
|
|
4885
4915
|
}, "warn")
|
|
4886
4916
|
}), "silence");
|
|
4887
4917
|
|
|
4888
|
-
// 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
|
|
4889
4919
|
var CORE_LOG_EVENTS = defineLogEvents([
|
|
4890
4920
|
{ id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
|
|
4891
4921
|
{ id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
|
|
@@ -4895,6 +4925,7 @@ var CORE_LOG_EVENTS = defineLogEvents([
|
|
|
4895
4925
|
meaning: "a read was answered from what was kept, without asking the messenger",
|
|
4896
4926
|
keys: ["operation", "reason"]
|
|
4897
4927
|
},
|
|
4928
|
+
{ id: "store.write", meaning: "a committed write changed rows of one store table", keys: ["table", "op", "n"] },
|
|
4898
4929
|
{ id: "command.crashed", meaning: "a command failed on a bug; where, never what", keys: ["error_class", "frames"] },
|
|
4899
4930
|
{
|
|
4900
4931
|
id: "events.dropped",
|
|
@@ -4916,490 +4947,11 @@ var DIAGNOSTIC_LOG_EVENTS = {
|
|
|
4916
4947
|
request: "provider.request",
|
|
4917
4948
|
response: "provider.response",
|
|
4918
4949
|
warning: "client.warning",
|
|
4919
|
-
cache: "cache.answered"
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
|
|
4923
|
-
var snake2 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
4924
|
-
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
4925
|
-
var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
|
|
4926
|
-
var logAttributes = /* @__PURE__ */ __name((event2) => renamed(event2, snake2), "logAttributes");
|
|
4927
|
-
var fromLogAttributes = /* @__PURE__ */ __name((attributes) => renamed(attributes, camel), "fromLogAttributes");
|
|
4928
|
-
var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
4929
|
-
debug: /* @__PURE__ */ __name((event2, message2) => logger.debug(logAttributes(event2), message2), "debug"),
|
|
4930
|
-
info: /* @__PURE__ */ __name((event2, message2) => logger.info(logAttributes(event2), message2), "info"),
|
|
4931
|
-
warn: /* @__PURE__ */ __name((event2, message2) => logger.warn(logAttributes(event2), message2), "warn"),
|
|
4932
|
-
error: /* @__PURE__ */ __name((event2, message2) => logger.error(logAttributes(event2), message2), "error")
|
|
4933
|
-
}), "snakeLogger");
|
|
4934
|
-
|
|
4935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
4936
|
-
import { randomUUID } from "node:crypto";
|
|
4937
|
-
import { appendFileSync, mkdirSync, readdirSync as readdirSync3, readFileSync as readFileSync3, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4938
|
-
import { userInfo } from "node:os";
|
|
4939
|
-
import { join as join3, sep } from "node:path";
|
|
4940
|
-
|
|
4941
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
4942
|
-
var diagnostic = {
|
|
4943
|
-
event: true,
|
|
4944
|
-
operation: true,
|
|
4945
|
-
opcode: true,
|
|
4946
|
-
seq: true,
|
|
4947
|
-
status: true,
|
|
4948
|
-
method: true,
|
|
4949
|
-
endpointTemplate: true,
|
|
4950
|
-
bytes: true,
|
|
4951
|
-
ids: true,
|
|
4952
|
-
counts: true,
|
|
4953
|
-
durationMs: true,
|
|
4954
|
-
outcome: true,
|
|
4955
|
-
errorCode: true,
|
|
4956
|
-
providerError: true,
|
|
4957
|
-
level: true,
|
|
4958
|
-
transport: true,
|
|
4959
|
-
attempt: true,
|
|
4960
|
-
waitMs: true,
|
|
4961
|
-
code: true,
|
|
4962
|
-
detail: true,
|
|
4963
|
-
reason: true,
|
|
4964
|
-
ageMs: true
|
|
4965
|
-
};
|
|
4966
|
-
var send = {
|
|
4967
|
-
profile: true,
|
|
4968
|
-
chatId: true,
|
|
4969
|
-
outcome: true,
|
|
4970
|
-
kind: true,
|
|
4971
|
-
action: true,
|
|
4972
|
-
people: true,
|
|
4973
|
-
messageId: true,
|
|
4974
|
-
key: true,
|
|
4975
|
-
count: true,
|
|
4976
|
-
forEveryone: true,
|
|
4977
|
-
sendId: true,
|
|
4978
|
-
operationId: true,
|
|
4979
|
-
parentOperationId: true,
|
|
4980
|
-
replyTo: true,
|
|
4981
|
-
threadId: true,
|
|
4982
|
-
sendAs: true,
|
|
4983
|
-
resultChatId: true,
|
|
4984
|
-
length: true,
|
|
4985
|
-
attachments: true,
|
|
4986
|
-
scheduledFor: true,
|
|
4987
|
-
notify: true,
|
|
4988
|
-
origin: true,
|
|
4989
|
-
reservation: true,
|
|
4990
|
-
errorCode: true
|
|
4950
|
+
cache: "cache.answered",
|
|
4951
|
+
store: "store.write"
|
|
4991
4952
|
};
|
|
4992
|
-
var background = [
|
|
4993
|
-
"job",
|
|
4994
|
-
"pid",
|
|
4995
|
-
"schedule",
|
|
4996
|
-
"exitCode",
|
|
4997
|
-
"tool",
|
|
4998
|
-
"tier",
|
|
4999
|
-
"actorType",
|
|
5000
|
-
"actorId",
|
|
5001
|
-
"agent",
|
|
5002
|
-
"targetType",
|
|
5003
|
-
"targetId"
|
|
5004
|
-
];
|
|
5005
|
-
var crash = ["errorClass", "frames"];
|
|
5006
|
-
var dropped = ["dropped"];
|
|
5007
|
-
var LOG_ATTRIBUTES = [
|
|
5008
|
-
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
5009
|
-
].sort();
|
|
5010
|
-
|
|
5011
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
5012
|
-
var KEEP_RUNS_FOR_DAYS = 30;
|
|
5013
|
-
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
5014
|
-
var RUNS_SIZE_LIMIT_MB = 200;
|
|
5015
|
-
var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "runs"), "runsDirFor");
|
|
5016
|
-
var startRun = /* @__PURE__ */ __name((options) => {
|
|
5017
|
-
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
5018
|
-
const startedAt = options.startedAt ?? now();
|
|
5019
|
-
const id6 = options.runId ?? newRunId(startedAt, options.command);
|
|
5020
|
-
const dir = join3(options.runsDir, day(startedAt), id6);
|
|
5021
|
-
pruneRuns(options.runsDir, {
|
|
5022
|
-
keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
|
|
5023
|
-
keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
5024
|
-
maxBytes: options.maxBytes ?? RUNS_SIZE_LIMIT_MB * 1024 * 1024,
|
|
5025
|
-
now: startedAt
|
|
5026
|
-
});
|
|
5027
|
-
refuseRealStateInTests(dir);
|
|
5028
|
-
const metadata = {
|
|
5029
|
-
runId: id6,
|
|
5030
|
-
command: options.command,
|
|
5031
|
-
...options.profile === void 0 ? {} : { profile: options.profile },
|
|
5032
|
-
startedAt: startedAt.toISOString(),
|
|
5033
|
-
status: "running",
|
|
5034
|
-
cliVersion: options.cliVersion,
|
|
5035
|
-
runtime: runtime(),
|
|
5036
|
-
platform: process.platform,
|
|
5037
|
-
arch: process.arch,
|
|
5038
|
-
...options.traceId === void 0 ? {} : { traceId: options.traceId },
|
|
5039
|
-
...options.context
|
|
5040
|
-
};
|
|
5041
|
-
let file;
|
|
5042
|
-
const opened = /* @__PURE__ */ __name(() => {
|
|
5043
|
-
if (file)
|
|
5044
|
-
return file;
|
|
5045
|
-
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
5046
|
-
const events2 = join3(dir, "events.jsonl");
|
|
5047
|
-
writeFileSync(events2, "", { flag: "a", mode: 384 });
|
|
5048
|
-
file = snakeLogger(createRecordLog({
|
|
5049
|
-
to: events2,
|
|
5050
|
-
runId: id6,
|
|
5051
|
-
command: options.command,
|
|
5052
|
-
resource: { service: options.service, version: options.cliVersion },
|
|
5053
|
-
allow: LOG_ATTRIBUTES,
|
|
5054
|
-
...options.traceId === void 0 ? {} : { traceId: options.traceId },
|
|
5055
|
-
...options.onError === void 0 ? {} : { onError: options.onError }
|
|
5056
|
-
}));
|
|
5057
|
-
writeRunFile(dir, metadata);
|
|
5058
|
-
return file;
|
|
5059
|
-
}, "opened");
|
|
5060
|
-
if (!options.lazy)
|
|
5061
|
-
opened();
|
|
5062
|
-
let finished = false;
|
|
5063
|
-
const operations = /* @__PURE__ */ new Set();
|
|
5064
|
-
const codes = /* @__PURE__ */ new Set();
|
|
5065
|
-
const noted = /* @__PURE__ */ __name((level2) => (event2, message2) => {
|
|
5066
|
-
const { operation, errorCode, error_code, code } = event2;
|
|
5067
|
-
if (typeof operation === "string")
|
|
5068
|
-
operations.add(operation);
|
|
5069
|
-
for (const value of [errorCode, error_code, code])
|
|
5070
|
-
if (typeof value === "string")
|
|
5071
|
-
codes.add(value);
|
|
5072
|
-
if (finished)
|
|
5073
|
-
return;
|
|
5074
|
-
opened()[level2](event2, message2);
|
|
5075
|
-
}, "noted");
|
|
5076
|
-
const logger = { debug: noted("debug"), info: noted("info"), warn: noted("warn"), error: noted("error") };
|
|
5077
|
-
return {
|
|
5078
|
-
id: id6,
|
|
5079
|
-
dir,
|
|
5080
|
-
logger,
|
|
5081
|
-
finish: /* @__PURE__ */ __name(async (status2, extra = {}) => {
|
|
5082
|
-
if (finished)
|
|
5083
|
-
return;
|
|
5084
|
-
finished = true;
|
|
5085
|
-
const completedAt = now();
|
|
5086
|
-
const final = {
|
|
5087
|
-
...metadata,
|
|
5088
|
-
...extra,
|
|
5089
|
-
status: status2,
|
|
5090
|
-
completedAt: completedAt.toISOString(),
|
|
5091
|
-
durationMs: completedAt.getTime() - startedAt.getTime(),
|
|
5092
|
-
operations: [...operations].sort(),
|
|
5093
|
-
codes: [...codes].sort()
|
|
5094
|
-
};
|
|
5095
|
-
if (file || status2 !== "success") {
|
|
5096
|
-
opened();
|
|
5097
|
-
writeRunFile(dir, final);
|
|
5098
|
-
return;
|
|
5099
|
-
}
|
|
5100
|
-
try {
|
|
5101
|
-
mkdirSync(join3(dir, ".."), { recursive: true, mode: 448 });
|
|
5102
|
-
appendIndex(join3(dir, ".."), runFileOf(final));
|
|
5103
|
-
} catch (error) {
|
|
5104
|
-
options.onError?.(error);
|
|
5105
|
-
}
|
|
5106
|
-
}, "finish")
|
|
5107
|
-
};
|
|
5108
|
-
}, "startRun");
|
|
5109
|
-
var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) => {
|
|
5110
|
-
if (env.VITEST === void 0)
|
|
5111
|
-
return;
|
|
5112
|
-
let home;
|
|
5113
|
-
try {
|
|
5114
|
-
home = userInfo().homedir;
|
|
5115
|
-
} catch {
|
|
5116
|
-
return;
|
|
5117
|
-
}
|
|
5118
|
-
if (dir.startsWith(join3(home, ".local", "share") + sep))
|
|
5119
|
-
throw new Error(`a test opened a run in the real data folder: ${dir}`);
|
|
5120
|
-
}, "refuseRealStateInTests");
|
|
5121
|
-
var runtime = /* @__PURE__ */ __name(() => {
|
|
5122
|
-
const bun = process.versions.bun;
|
|
5123
|
-
return bun ? `bun ${bun}` : `node ${process.versions.node}`;
|
|
5124
|
-
}, "runtime");
|
|
5125
|
-
var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
|
|
5126
|
-
const stamp = startedAt.toISOString().replace(/[-:]/g, "").replace(/\.\d+Z$/, "Z");
|
|
5127
|
-
const slug = command.replace(/[^a-z0-9]+/gi, "-").toLowerCase();
|
|
5128
|
-
return `${stamp}-${slug}-${randomUUID().slice(0, 6)}`;
|
|
5129
|
-
}, "newRunId");
|
|
5130
|
-
var INDEX = "index.jsonl";
|
|
5131
|
-
var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
|
|
5132
|
-
appendFileSync(join3(dayDir, INDEX), `${JSON.stringify(written)}
|
|
5133
|
-
`, { mode: 384 });
|
|
5134
|
-
}, "appendIndex");
|
|
5135
|
-
var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
|
|
5136
|
-
const written = runFileOf(metadata);
|
|
5137
|
-
writeSecurely(join3(dir, "run.json"), `${JSON.stringify(written, null, 2)}
|
|
5138
|
-
`, 384);
|
|
5139
|
-
try {
|
|
5140
|
-
appendIndex(join3(dir, ".."), written);
|
|
5141
|
-
} catch {
|
|
5142
|
-
}
|
|
5143
|
-
}, "writeRunFile");
|
|
5144
|
-
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");
|
|
5145
|
-
var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITIVE_INFINITY, filter = {} } = {}) => {
|
|
5146
|
-
const first2 = since === void 0 ? void 0 : day(new Date(since));
|
|
5147
|
-
const runs = [];
|
|
5148
|
-
for (const date of days(runsDir).sort().reverse()) {
|
|
5149
|
-
if (first2 !== void 0 && date < first2 || runs.length >= atLeast)
|
|
5150
|
-
break;
|
|
5151
|
-
for (const metadata of runsOfDay(join3(runsDir, date))) {
|
|
5152
|
-
if (matchesListFilter(metadata, filter))
|
|
5153
|
-
runs.push(metadata);
|
|
5154
|
-
}
|
|
5155
|
-
}
|
|
5156
|
-
return runs;
|
|
5157
|
-
}, "listRuns");
|
|
5158
|
-
var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
|
|
5159
|
-
const latest = /* @__PURE__ */ new Map();
|
|
5160
|
-
let raw = "";
|
|
5161
|
-
try {
|
|
5162
|
-
raw = readFileSync3(join3(dayDir, INDEX), "utf8");
|
|
5163
|
-
} catch {
|
|
5164
|
-
}
|
|
5165
|
-
for (const line of raw.split("\n")) {
|
|
5166
|
-
if (line.trim() === "")
|
|
5167
|
-
continue;
|
|
5168
|
-
try {
|
|
5169
|
-
const metadata = metadataOf(JSON.parse(line));
|
|
5170
|
-
if (typeof metadata.runId === "string")
|
|
5171
|
-
latest.set(metadata.runId, metadata);
|
|
5172
|
-
} catch {
|
|
5173
|
-
}
|
|
5174
|
-
}
|
|
5175
|
-
return latest;
|
|
5176
|
-
}, "indexedRuns");
|
|
5177
|
-
var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
|
|
5178
|
-
const latest = indexedRuns(dayDir);
|
|
5179
|
-
for (const entry of safeReaddir(dayDir)) {
|
|
5180
|
-
if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
|
|
5181
|
-
continue;
|
|
5182
|
-
const metadata = readRun(join3(dayDir, entry));
|
|
5183
|
-
if (metadata)
|
|
5184
|
-
latest.set(metadata.runId, metadata);
|
|
5185
|
-
}
|
|
5186
|
-
return [...latest.values()].sort((a, b) => a.runId < b.runId ? 1 : a.runId > b.runId ? -1 : 0);
|
|
5187
|
-
}, "runsOfDay");
|
|
5188
|
-
var findRun = /* @__PURE__ */ __name((runsDir, id6) => {
|
|
5189
|
-
const stamped = /^(\d{4})(\d{2})(\d{2})T/.exec(id6);
|
|
5190
|
-
const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
|
|
5191
|
-
const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
|
|
5192
|
-
for (const date of dates) {
|
|
5193
|
-
const dir = join3(runsDir, date, id6);
|
|
5194
|
-
const metadata = readRun(dir);
|
|
5195
|
-
if (metadata)
|
|
5196
|
-
return { dir, metadata };
|
|
5197
|
-
}
|
|
5198
|
-
for (const date of dates) {
|
|
5199
|
-
const metadata = indexedRuns(join3(runsDir, date)).get(id6);
|
|
5200
|
-
if (metadata)
|
|
5201
|
-
return { dir: join3(runsDir, date, id6), metadata };
|
|
5202
|
-
}
|
|
5203
|
-
return void 0;
|
|
5204
|
-
}, "findRun");
|
|
5205
|
-
var readEvents = /* @__PURE__ */ __name((dir) => {
|
|
5206
|
-
let raw;
|
|
5207
|
-
try {
|
|
5208
|
-
raw = readFileSync3(join3(dir, "events.jsonl"), "utf8");
|
|
5209
|
-
} catch {
|
|
5210
|
-
return [];
|
|
5211
|
-
}
|
|
5212
|
-
const events2 = [];
|
|
5213
|
-
for (const line of raw.split("\n")) {
|
|
5214
|
-
if (line.trim() === "")
|
|
5215
|
-
continue;
|
|
5216
|
-
try {
|
|
5217
|
-
const parsed = JSON.parse(line);
|
|
5218
|
-
if (parsed !== null && typeof parsed === "object")
|
|
5219
|
-
events2.push(eventOf(parsed));
|
|
5220
|
-
} catch {
|
|
5221
|
-
}
|
|
5222
|
-
}
|
|
5223
|
-
return events2;
|
|
5224
|
-
}, "readEvents");
|
|
5225
|
-
var eventOf = /* @__PURE__ */ __name((line) => {
|
|
5226
|
-
const { attributes, time: time2, severity } = line;
|
|
5227
|
-
if (attributes === null || typeof attributes !== "object")
|
|
5228
|
-
return logAttributes(line);
|
|
5229
|
-
return { time: time2, severity, ...logAttributes(attributes) };
|
|
5230
|
-
}, "eventOf");
|
|
5231
|
-
var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = keepDays, maxBytes, now }) => {
|
|
5232
|
-
const cutoff = day(new Date(now.getTime() - keepDays * DAY_MS));
|
|
5233
|
-
const successCutoff = day(new Date(now.getTime() - Math.min(keepSuccessDays, keepDays) * DAY_MS));
|
|
5234
|
-
let removed = 0;
|
|
5235
|
-
for (const date of days(runsDir)) {
|
|
5236
|
-
if (date >= cutoff) {
|
|
5237
|
-
if (date < successCutoff)
|
|
5238
|
-
dropSuccesses(join3(runsDir, date));
|
|
5239
|
-
continue;
|
|
5240
|
-
}
|
|
5241
|
-
try {
|
|
5242
|
-
rmSync(join3(runsDir, date), { recursive: true, force: true });
|
|
5243
|
-
removed += 1;
|
|
5244
|
-
} catch {
|
|
5245
|
-
}
|
|
5246
|
-
}
|
|
5247
|
-
if (maxBytes !== void 0)
|
|
5248
|
-
removed += fitSize(runsDir, maxBytes, now);
|
|
5249
|
-
return removed;
|
|
5250
|
-
}, "pruneRuns");
|
|
5251
|
-
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
5252
|
-
var SUCCESSES_DROPPED = ".successes-dropped";
|
|
5253
|
-
var SIZE_CHECKED = ".size-checked";
|
|
5254
|
-
var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
5255
|
-
const marker = join3(dayDir, SUCCESSES_DROPPED);
|
|
5256
|
-
try {
|
|
5257
|
-
statSync(marker);
|
|
5258
|
-
return;
|
|
5259
|
-
} catch {
|
|
5260
|
-
}
|
|
5261
|
-
try {
|
|
5262
|
-
const kept = [];
|
|
5263
|
-
for (const [id6, metadata] of indexedRuns(dayDir)) {
|
|
5264
|
-
if (metadata.status === "success")
|
|
5265
|
-
rmSync(join3(dayDir, id6), { recursive: true, force: true });
|
|
5266
|
-
else
|
|
5267
|
-
kept.push(JSON.stringify(runFileOf(metadata)));
|
|
5268
|
-
}
|
|
5269
|
-
for (const entry of safeReaddir(dayDir)) {
|
|
5270
|
-
if (entry === INDEX || entry.startsWith("."))
|
|
5271
|
-
continue;
|
|
5272
|
-
if (readRun(join3(dayDir, entry))?.status === "success")
|
|
5273
|
-
rmSync(join3(dayDir, entry), { recursive: true, force: true });
|
|
5274
|
-
}
|
|
5275
|
-
writeSecurely(join3(dayDir, INDEX), kept.map((line) => `${line}
|
|
5276
|
-
`).join(""), 384);
|
|
5277
|
-
writeFileSync(marker, "", { mode: 384 });
|
|
5278
|
-
} catch {
|
|
5279
|
-
}
|
|
5280
|
-
}, "dropSuccesses");
|
|
5281
|
-
var sizeOf = /* @__PURE__ */ __name((path2) => {
|
|
5282
|
-
let total = 0;
|
|
5283
|
-
for (const entry of safeReaddir(path2)) {
|
|
5284
|
-
const full = join3(path2, entry);
|
|
5285
|
-
try {
|
|
5286
|
-
const stat = statSync(full);
|
|
5287
|
-
total += stat.isDirectory() ? sizeOf(full) : stat.size;
|
|
5288
|
-
} catch {
|
|
5289
|
-
}
|
|
5290
|
-
}
|
|
5291
|
-
return total;
|
|
5292
|
-
}, "sizeOf");
|
|
5293
|
-
var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
5294
|
-
const stamp = join3(runsDir, SIZE_CHECKED);
|
|
5295
|
-
const today = day(now);
|
|
5296
|
-
try {
|
|
5297
|
-
if (readFileSync3(stamp, "utf8").trim() === today)
|
|
5298
|
-
return 0;
|
|
5299
|
-
} catch {
|
|
5300
|
-
}
|
|
5301
|
-
const dates = days(runsDir).sort();
|
|
5302
|
-
const sizes = new Map(dates.map((date) => [date, sizeOf(join3(runsDir, date))]));
|
|
5303
|
-
let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
|
|
5304
|
-
let removed = 0;
|
|
5305
|
-
for (const date of dates) {
|
|
5306
|
-
if (total <= maxBytes || date === today)
|
|
5307
|
-
break;
|
|
5308
|
-
dropSuccesses(join3(runsDir, date));
|
|
5309
|
-
const after = sizeOf(join3(runsDir, date));
|
|
5310
|
-
total -= (sizes.get(date) ?? 0) - after;
|
|
5311
|
-
sizes.set(date, after);
|
|
5312
|
-
}
|
|
5313
|
-
for (const date of dates) {
|
|
5314
|
-
if (total <= maxBytes || date === today)
|
|
5315
|
-
break;
|
|
5316
|
-
try {
|
|
5317
|
-
rmSync(join3(runsDir, date), { recursive: true, force: true });
|
|
5318
|
-
total -= sizes.get(date) ?? 0;
|
|
5319
|
-
removed += 1;
|
|
5320
|
-
} catch {
|
|
5321
|
-
}
|
|
5322
|
-
}
|
|
5323
|
-
try {
|
|
5324
|
-
mkdirSync(runsDir, { recursive: true, mode: 448 });
|
|
5325
|
-
writeFileSync(stamp, today, { mode: 384 });
|
|
5326
|
-
} catch {
|
|
5327
|
-
}
|
|
5328
|
-
return removed;
|
|
5329
|
-
}, "fitSize");
|
|
5330
|
-
var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day");
|
|
5331
|
-
var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
|
|
5332
|
-
var readRun = /* @__PURE__ */ __name((dir) => {
|
|
5333
|
-
try {
|
|
5334
|
-
return metadataOf(JSON.parse(readFileSync3(join3(dir, "run.json"), "utf8")));
|
|
5335
|
-
} catch {
|
|
5336
|
-
return void 0;
|
|
5337
|
-
}
|
|
5338
|
-
}, "readRun");
|
|
5339
|
-
var safeReaddir = /* @__PURE__ */ __name((dir) => {
|
|
5340
|
-
try {
|
|
5341
|
-
return readdirSync3(dir);
|
|
5342
|
-
} catch {
|
|
5343
|
-
return [];
|
|
5344
|
-
}
|
|
5345
|
-
}, "safeReaddir");
|
|
5346
|
-
var runFileOf = /* @__PURE__ */ __name(({ partial: partial2, ...metadata }) => ({
|
|
5347
|
-
...logAttributes(metadata),
|
|
5348
|
-
...partial2 ? { partial: { ...logAttributes(partial2), failures: partial2.failures.map((failure) => logAttributes(failure)) } } : {}
|
|
5349
|
-
}), "runFileOf");
|
|
5350
|
-
var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
5351
|
-
const { partial: partial2, ...metadata } = fromLogAttributes(parsed);
|
|
5352
|
-
if (partial2 === null || typeof partial2 !== "object")
|
|
5353
|
-
return metadata;
|
|
5354
|
-
const { failures, ...rest } = fromLogAttributes(partial2);
|
|
5355
|
-
return {
|
|
5356
|
-
...metadata,
|
|
5357
|
-
partial: {
|
|
5358
|
-
...rest,
|
|
5359
|
-
failures: Array.isArray(failures) ? failures.map((failure) => fromLogAttributes(failure)) : []
|
|
5360
|
-
}
|
|
5361
|
-
};
|
|
5362
|
-
}, "metadataOf");
|
|
5363
4953
|
|
|
5364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5365
|
-
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
5366
|
-
import { randomBytes } from "node:crypto";
|
|
5367
|
-
var scopes = new AsyncLocalStorage2();
|
|
5368
|
-
var processScope;
|
|
5369
|
-
var currentRun = /* @__PURE__ */ __name(() => {
|
|
5370
|
-
const scope = scopes.getStore();
|
|
5371
|
-
if (scope)
|
|
5372
|
-
return scope;
|
|
5373
|
-
processScope ??= {
|
|
5374
|
-
runId: newRunId(/* @__PURE__ */ new Date(), "process"),
|
|
5375
|
-
command: "",
|
|
5376
|
-
startedAt: Date.now(),
|
|
5377
|
-
...traceOf(process.env)
|
|
5378
|
-
};
|
|
5379
|
-
return processScope;
|
|
5380
|
-
}, "currentRun");
|
|
5381
|
-
var inRun = /* @__PURE__ */ __name((scope, body) => scopes.run(scope, body), "inRun");
|
|
5382
|
-
var runEvent = /* @__PURE__ */ __name((event2) => scopes.getStore()?.events?.(event2), "runEvent");
|
|
5383
|
-
var typedCommand = /* @__PURE__ */ __name((tool, words, profile = currentRun().profile) => [tool, profile, words].filter((part) => part !== void 0 && part !== "").join(" "), "typedCommand");
|
|
5384
|
-
var useAsProcessRun = /* @__PURE__ */ __name((scope) => {
|
|
5385
|
-
processScope = scope;
|
|
5386
|
-
}, "useAsProcessRun");
|
|
5387
|
-
var processRun = /* @__PURE__ */ __name(() => processScope, "processRun");
|
|
5388
|
-
var enclosingTraceId = /* @__PURE__ */ __name(() => scopes.getStore()?.traceId, "enclosingTraceId");
|
|
5389
|
-
var traceOf = /* @__PURE__ */ __name((env) => {
|
|
5390
|
-
const traceId = traceIdOf(env.TRACEPARENT);
|
|
5391
|
-
return traceId === void 0 ? {} : { traceId };
|
|
5392
|
-
}, "traceOf");
|
|
5393
|
-
var childTrace = /* @__PURE__ */ __name(() => {
|
|
5394
|
-
const hex = /* @__PURE__ */ __name((bytes) => randomBytes(bytes).toString("hex"), "hex");
|
|
5395
|
-
const traceId = hex(16);
|
|
5396
|
-
return { traceId, traceparent: `00-${traceId}-${hex(8)}-01` };
|
|
5397
|
-
}, "childTrace");
|
|
5398
|
-
var attempts = new AsyncLocalStorage2();
|
|
5399
|
-
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
5400
|
-
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
5401
|
-
|
|
5402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/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
|
|
5403
4955
|
var recorded = /* @__PURE__ */ __name(async (options, body) => {
|
|
5404
4956
|
const recording = startRecording(options);
|
|
5405
4957
|
try {
|
|
@@ -5445,6 +4997,7 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
5445
4997
|
}, "onError"),
|
|
5446
4998
|
...options.keepDays === void 0 ? {} : { keepDays: options.keepDays },
|
|
5447
4999
|
...options.keepSuccessDays === void 0 ? {} : { keepSuccessDays: options.keepSuccessDays },
|
|
5000
|
+
...options.keepStoreDays === void 0 ? {} : { keepStoreDays: options.keepStoreDays },
|
|
5448
5001
|
...options.maxBytes === void 0 ? {} : { maxBytes: options.maxBytes },
|
|
5449
5002
|
now,
|
|
5450
5003
|
...extra
|
|
@@ -5453,6 +5006,7 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
5453
5006
|
const held = !run && options.keepFailed ? [] : void 0;
|
|
5454
5007
|
const counted = { wire: 0, operation: 0 };
|
|
5455
5008
|
let refused;
|
|
5009
|
+
let wroteStore = false;
|
|
5456
5010
|
const cap = capped();
|
|
5457
5011
|
const requests = /* @__PURE__ */ __name(() => counted.wire > 0 ? counted.wire : counted.operation, "requests");
|
|
5458
5012
|
const events2 = /* @__PURE__ */ __name((event2) => {
|
|
@@ -5460,6 +5014,8 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
5460
5014
|
counted[event2.level === "wire" ? "wire" : "operation"] += 1;
|
|
5461
5015
|
if (event2.event === "response" && event2.outcome === "error")
|
|
5462
5016
|
refused = event2;
|
|
5017
|
+
if (event2.event === "store")
|
|
5018
|
+
wroteStore = true;
|
|
5463
5019
|
if (options.trace)
|
|
5464
5020
|
streams.diagnostic(options.format === "pretty" ? renderEvent(event2) : JSON.stringify(logAttributes(event2)));
|
|
5465
5021
|
if (run)
|
|
@@ -5481,13 +5037,14 @@ var startRecording = /* @__PURE__ */ __name((options) => {
|
|
|
5481
5037
|
events: events2,
|
|
5482
5038
|
succeed: /* @__PURE__ */ __name(async (answer) => {
|
|
5483
5039
|
const partial2 = partialOutcome(answer);
|
|
5484
|
-
const kept = run ?? (partial2 && held ? keep(open({ startedAt })) : void 0);
|
|
5040
|
+
const kept = run ?? ((partial2 || wroteStore) && held ? keep(open({ startedAt })) : void 0);
|
|
5485
5041
|
if (kept)
|
|
5486
5042
|
cap.close(kept);
|
|
5487
5043
|
await kept?.finish(partial2 ? "partial" : "success", {
|
|
5488
5044
|
requests: requests(),
|
|
5489
5045
|
...cap.dropped(),
|
|
5490
|
-
...partial2 ? { partial: partial2 } : {}
|
|
5046
|
+
...partial2 ? { partial: partial2 } : {},
|
|
5047
|
+
...!run && !partial2 && wroteStore ? { keptBecauseStore: true } : {}
|
|
5491
5048
|
});
|
|
5492
5049
|
}, "succeed"),
|
|
5493
5050
|
fail: /* @__PURE__ */ __name(async (thrown) => {
|
|
@@ -5522,29 +5079,47 @@ var wasSettled = /* @__PURE__ */ __name((error) => typeof error === "object" &&
|
|
|
5522
5079
|
var HELD_AT_MOST = 500;
|
|
5523
5080
|
var EVENTS_AT_MOST = 2e3;
|
|
5524
5081
|
var EVENT_BYTES_AT_MOST = 1024 * 1024;
|
|
5082
|
+
var STORE_EVENTS_AT_MOST = 100;
|
|
5525
5083
|
var capped = /* @__PURE__ */ __name(() => {
|
|
5526
5084
|
let lines = 0;
|
|
5527
5085
|
let bytes = 0;
|
|
5528
|
-
let
|
|
5086
|
+
let dropped = 0;
|
|
5087
|
+
let stores = 0;
|
|
5529
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");
|
|
5530
5102
|
return {
|
|
5531
5103
|
log: /* @__PURE__ */ __name((run, event2) => {
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
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 });
|
|
5537
5111
|
return;
|
|
5538
5112
|
}
|
|
5539
|
-
|
|
5540
|
-
bytes += size;
|
|
5541
|
-
logEvent(run, event2);
|
|
5113
|
+
write(run, event2);
|
|
5542
5114
|
}, "log"),
|
|
5543
5115
|
close: /* @__PURE__ */ __name((run) => {
|
|
5544
|
-
|
|
5545
|
-
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 });
|
|
5546
5121
|
}, "close"),
|
|
5547
|
-
dropped: /* @__PURE__ */ __name(() =>
|
|
5122
|
+
dropped: /* @__PURE__ */ __name(() => dropped > 0 ? { eventsDropped: dropped } : {}, "dropped")
|
|
5548
5123
|
};
|
|
5549
5124
|
}, "capped");
|
|
5550
5125
|
var logEvent = /* @__PURE__ */ __name((run, event2) => {
|
|
@@ -5555,7 +5130,7 @@ var logEvent = /* @__PURE__ */ __name((run, event2) => {
|
|
|
5555
5130
|
};
|
|
5556
5131
|
if (event2.event === "warning")
|
|
5557
5132
|
run.logger.warn(record2);
|
|
5558
|
-
else if (event2.event
|
|
5133
|
+
else if ((event2.event === "request" || event2.event === "response") && event2.outcome === "error")
|
|
5559
5134
|
run.logger.error(record2);
|
|
5560
5135
|
else
|
|
5561
5136
|
run.logger.info(record2);
|
|
@@ -5591,14 +5166,14 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
|
|
|
5591
5166
|
return void 0;
|
|
5592
5167
|
}, "partialOutcome");
|
|
5593
5168
|
|
|
5594
|
-
// 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
|
|
5595
5170
|
var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
|
|
5596
5171
|
if (ms2 === void 0)
|
|
5597
5172
|
return body();
|
|
5598
5173
|
let timer2;
|
|
5599
5174
|
let timedOut;
|
|
5600
5175
|
const writes2 = /* @__PURE__ */ new Set();
|
|
5601
|
-
const expired = new Promise((
|
|
5176
|
+
const expired = new Promise((_2, reject) => {
|
|
5602
5177
|
timer2 = setTimeout(() => {
|
|
5603
5178
|
const pending = [...writes2];
|
|
5604
5179
|
const cut2 = pending.filter((write) => !write.preparing);
|
|
@@ -5617,7 +5192,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
|
|
|
5617
5192
|
}
|
|
5618
5193
|
}, "withDeadline");
|
|
5619
5194
|
|
|
5620
|
-
// 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
|
|
5621
5196
|
var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
|
|
5622
5197
|
var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
5623
5198
|
var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
|
|
@@ -5643,19 +5218,19 @@ var takesProfile = /* @__PURE__ */ __name((command) => {
|
|
|
5643
5218
|
return top !== void 0 && !PROFILE_FREE.has(top.name());
|
|
5644
5219
|
}, "takesProfile");
|
|
5645
5220
|
var commandWords = /* @__PURE__ */ __name((program2) => /* @__PURE__ */ new Set(["help", ...program2.commands.flatMap((command) => [command.name(), ...command.aliases()])]), "commandWords");
|
|
5646
|
-
var liftProfile = /* @__PURE__ */ __name((argv,
|
|
5221
|
+
var liftProfile = /* @__PURE__ */ __name((argv, words2, valued = /* @__PURE__ */ new Set()) => {
|
|
5647
5222
|
let at2 = 0;
|
|
5648
5223
|
while (argv[at2]?.startsWith("-") && argv[at2] !== "--")
|
|
5649
5224
|
at2 += valued.has(argv[at2]) ? 2 : 1;
|
|
5650
5225
|
const first2 = argv[at2];
|
|
5651
|
-
if (first2 === void 0 || first2.startsWith("-") ||
|
|
5226
|
+
if (first2 === void 0 || first2.startsWith("-") || words2.has(first2))
|
|
5652
5227
|
return { rest: argv };
|
|
5653
5228
|
return { profile: first2, rest: [...argv.slice(0, at2), ...argv.slice(at2 + 1)] };
|
|
5654
5229
|
}, "liftProfile");
|
|
5655
5230
|
var valuedOptions = /* @__PURE__ */ __name((program2) => new Set(program2.options.filter((option) => option.required).flatMap((option) => [option.long, option.short].filter((flag2) => flag2 !== void 0))), "valuedOptions");
|
|
5656
|
-
var refuseCommandName = /* @__PURE__ */ __name((profile,
|
|
5657
|
-
if (
|
|
5658
|
-
throw new CliError("validation_error", `"${profile}" is a command, so \`${command} ${profile} \u2026\` would always mean the command and never this profile. Pick a name that is not one of: ` + [...
|
|
5231
|
+
var refuseCommandName = /* @__PURE__ */ __name((profile, words2, command) => {
|
|
5232
|
+
if (words2.has(profile)) {
|
|
5233
|
+
throw new CliError("validation_error", `"${profile}" is a command, so \`${command} ${profile} \u2026\` would always mean the command and never this profile. Pick a name that is not one of: ` + [...words2].sort().join(", "));
|
|
5659
5234
|
}
|
|
5660
5235
|
}, "refuseCommandName");
|
|
5661
5236
|
var rootOf = /* @__PURE__ */ __name((command) => {
|
|
@@ -5686,20 +5261,20 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
|
|
|
5686
5261
|
return void 0;
|
|
5687
5262
|
}, "sampleCommand");
|
|
5688
5263
|
|
|
5689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5690
|
-
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";
|
|
5691
5266
|
|
|
5692
|
-
// 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
|
|
5693
5268
|
var endpoint = /* @__PURE__ */ __name((value) => {
|
|
5694
5269
|
try {
|
|
5695
|
-
const
|
|
5696
|
-
return ["https:", "http:"].includes(
|
|
5270
|
+
const url3 = new URL(value);
|
|
5271
|
+
return ["https:", "http:"].includes(url3.protocol) && !url3.username && !url3.password && !url3.search && !url3.hash;
|
|
5697
5272
|
} catch {
|
|
5698
5273
|
return false;
|
|
5699
5274
|
}
|
|
5700
5275
|
}, "endpoint");
|
|
5701
5276
|
|
|
5702
|
-
// 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
|
|
5703
5278
|
var MODEL_FIELDS = ["provider", "model", "base_url"];
|
|
5704
5279
|
var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
|
|
5705
5280
|
provider: optional(picklist(["off", "openai", "anthropic"])),
|
|
@@ -5768,13 +5343,13 @@ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
|
|
|
5768
5343
|
};
|
|
5769
5344
|
}, "modelTarget");
|
|
5770
5345
|
|
|
5771
|
-
// 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
|
|
5772
5347
|
var model = pipe(string(), trim(), minLength(1), maxLength(200));
|
|
5773
|
-
var
|
|
5348
|
+
var url2 = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
|
|
5774
5349
|
var AI_FIELDS = {
|
|
5775
5350
|
embeddingProvider: optional(picklist(["local", "openai"])),
|
|
5776
5351
|
embeddingModel: optional(model),
|
|
5777
|
-
embeddingBaseUrl: optional(
|
|
5352
|
+
embeddingBaseUrl: optional(url2),
|
|
5778
5353
|
embeddingDims: optional(pipe(number(), integer(), minValue(1), maxValue(65536))),
|
|
5779
5354
|
models: optional(modelSettingsShape)
|
|
5780
5355
|
};
|
|
@@ -5812,7 +5387,7 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
|
|
|
5812
5387
|
};
|
|
5813
5388
|
}, "resolveAISettings");
|
|
5814
5389
|
|
|
5815
|
-
// 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
|
|
5816
5391
|
var DURATION = /^(\d+)(ms|s|m|h|d)$/;
|
|
5817
5392
|
var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
|
|
5818
5393
|
var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
@@ -5826,14 +5401,18 @@ var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
|
5826
5401
|
return ms2;
|
|
5827
5402
|
}, "parseDuration");
|
|
5828
5403
|
|
|
5829
|
-
// 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";
|
|
5830
5407
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
5831
5408
|
var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
|
|
5409
|
+
var e5Large = huggingFace("Xenova/multilingual-e5-large", "00fc3aeb3dbb95842de2ac1961d33c6319acf57b");
|
|
5832
5410
|
var gemma = huggingFace("onnx-community/embeddinggemma-300m-ONNX", "5090578d9565bb06545b4552f76e6bc2c93e4a66");
|
|
5833
5411
|
var TEXT_MODELS = [
|
|
5834
5412
|
{
|
|
5835
5413
|
id: "e5-small",
|
|
5836
5414
|
title: "multilingual-e5-small, 8-bit",
|
|
5415
|
+
size: "small",
|
|
5837
5416
|
languages: "about 100 languages, Russian and English among them",
|
|
5838
5417
|
licence: "MIT",
|
|
5839
5418
|
dims: 384,
|
|
@@ -5867,12 +5446,17 @@ var TEXT_MODELS = [
|
|
|
5867
5446
|
{
|
|
5868
5447
|
id: "embeddinggemma",
|
|
5869
5448
|
title: "EmbeddingGemma 300M, 4-bit",
|
|
5449
|
+
size: "medium",
|
|
5870
5450
|
languages: "over 100 languages \u2014 the best of the two on chat, about seven times slower",
|
|
5871
5451
|
licence: "Gemma Terms of Use",
|
|
5872
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",
|
|
5873
5455
|
dims: 768,
|
|
5874
5456
|
maxTokens: 2048,
|
|
5875
|
-
|
|
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,
|
|
5876
5460
|
pooling: "sentence_embedding",
|
|
5877
5461
|
prefix: { query: "task: search result | query: ", passage: "title: none | text: " },
|
|
5878
5462
|
onnx: "onnx/model_q4.onnx",
|
|
@@ -5903,16 +5487,122 @@ var TEXT_MODELS = [
|
|
|
5903
5487
|
bytes: 1156830
|
|
5904
5488
|
}
|
|
5905
5489
|
]
|
|
5490
|
+
},
|
|
5491
|
+
{
|
|
5492
|
+
id: "e5-large",
|
|
5493
|
+
title: "multilingual-e5-large, 8-bit",
|
|
5494
|
+
size: "large",
|
|
5495
|
+
languages: "about 100 languages, Russian and English among them \u2014 reads better than e5-small, several times slower",
|
|
5496
|
+
licence: "MIT",
|
|
5497
|
+
dims: 1024,
|
|
5498
|
+
maxTokens: 512,
|
|
5499
|
+
// 2026-11-07, one 8-thread session on the Ryzen AI 9 HX 470 while other benchmarks ran: 3.4 chunks/s.
|
|
5500
|
+
chunksPerSecond: 4,
|
|
5501
|
+
pooling: "mean",
|
|
5502
|
+
prefix: { query: "query: ", passage: "passage: " },
|
|
5503
|
+
onnx: "onnx/model_quantized.onnx",
|
|
5504
|
+
files: [
|
|
5505
|
+
{
|
|
5506
|
+
name: "onnx/model_quantized.onnx",
|
|
5507
|
+
url: e5Large("onnx/model_quantized.onnx"),
|
|
5508
|
+
sha256: "0a8d65db9a36f810ba5da15249f13145fcdc7890e6656f1fd38cd8b7c4db1fca",
|
|
5509
|
+
bytes: 561768762
|
|
5510
|
+
},
|
|
5511
|
+
{
|
|
5512
|
+
name: "tokenizer.json",
|
|
5513
|
+
url: e5Large("tokenizer.json"),
|
|
5514
|
+
sha256: "62c24cdc13d4c9952d63718d6c9fa4c287974249e16b7ade6d5a85e7bbb75626",
|
|
5515
|
+
bytes: 17082660
|
|
5516
|
+
},
|
|
5517
|
+
{
|
|
5518
|
+
name: "tokenizer_config.json",
|
|
5519
|
+
url: e5Large("tokenizer_config.json"),
|
|
5520
|
+
sha256: "efb5c0d09722e5fe59a462cd2a9976ee216d55b037597d997cd3fe833216da15",
|
|
5521
|
+
bytes: 418
|
|
5522
|
+
}
|
|
5523
|
+
]
|
|
5906
5524
|
}
|
|
5907
5525
|
];
|
|
5908
|
-
var DEFAULT_TEXT_MODEL = "
|
|
5909
|
-
var
|
|
5910
|
-
|
|
5526
|
+
var DEFAULT_TEXT_MODEL = "embeddinggemma";
|
|
5527
|
+
var PREVIOUS_DEFAULT_TEXT_MODEL = "e5-small";
|
|
5528
|
+
var SECTION = "text_models";
|
|
5529
|
+
var slug = pipe(string(), regex(/^[a-z0-9][a-z0-9._-]{0,62}$/, "is not a model id: a-z, 0-9, . _ -"));
|
|
5530
|
+
var words = pipe(string(), trim(), minLength(1), maxLength(300));
|
|
5531
|
+
var fileName = pipe(string(), check((name) => /^[\w.-]+(\/[\w.-]+)*$/.test(name) && !name.split("/").some((part) => part === ".." || part === "."), "is not a file inside the model's folder"));
|
|
5532
|
+
var modelFile = strictObject({
|
|
5533
|
+
name: fileName,
|
|
5534
|
+
url: pipe(string(), url(), startsWith("https://", "has to be an https address")),
|
|
5535
|
+
sha256: pipe(string(), regex(/^[0-9a-f]{64}$/, "has to be a sha256 in hex")),
|
|
5536
|
+
bytes: pipe(number(), integer(), minValue(1))
|
|
5537
|
+
});
|
|
5538
|
+
var CustomTextModelShape = pipe(strictObject({
|
|
5539
|
+
id: slug,
|
|
5540
|
+
title: words,
|
|
5541
|
+
languages: words,
|
|
5542
|
+
licence: words,
|
|
5543
|
+
terms: optional(pipe(string(), url())),
|
|
5544
|
+
dims: pipe(number(), integer(), minValue(1), maxValue(8192)),
|
|
5545
|
+
maxTokens: pipe(number(), integer(), minValue(16), maxValue(32768)),
|
|
5546
|
+
chunksPerSecond: optional(pipe(number(), minValue(0.01))),
|
|
5547
|
+
pooling: picklist(["mean", "sentence_embedding"]),
|
|
5548
|
+
prefix: strictObject({
|
|
5549
|
+
query: pipe(string(), maxLength(200)),
|
|
5550
|
+
passage: pipe(string(), maxLength(200))
|
|
5551
|
+
}),
|
|
5552
|
+
onnx: fileName,
|
|
5553
|
+
externalData: optional(fileName),
|
|
5554
|
+
files: pipe(array(modelFile), minLength(1), maxLength(16))
|
|
5555
|
+
}), check((model3) => !TEXT_MODELS.some((one) => one.id === model3.id), "takes the id of a model this version ships; choose another"), check((model3) => {
|
|
5556
|
+
const names = model3.files.map(({ name }) => name);
|
|
5557
|
+
return [model3.onnx, model3.externalData, "tokenizer.json", "tokenizer_config.json"].every((name) => name === void 0 || names.includes(name));
|
|
5558
|
+
}, "has to list its onnx file, its external data and tokenizer.json and tokenizer_config.json among files"));
|
|
5559
|
+
var TextModelsSection = strictObject({
|
|
5560
|
+
use: optional(slug),
|
|
5561
|
+
custom: optional(array(CustomTextModelShape))
|
|
5562
|
+
});
|
|
5563
|
+
var textModelsFile = /* @__PURE__ */ __name((env = process.env) => sharedConfigPath(storePath(env), env), "textModelsFile");
|
|
5564
|
+
var readTextModelsSection = /* @__PURE__ */ __name((env = process.env) => {
|
|
5565
|
+
const path2 = textModelsFile(env);
|
|
5566
|
+
const section2 = readSharedSection(path2, SECTION);
|
|
5567
|
+
if (section2 === void 0)
|
|
5568
|
+
return {};
|
|
5569
|
+
const checked = safeParse(TextModelsSection, section2);
|
|
5570
|
+
if (!checked.success) {
|
|
5571
|
+
const issue = checked.issues[0];
|
|
5572
|
+
const at2 = issue ? getDotPath(issue) : null;
|
|
5573
|
+
throw new CliError("configuration_error", `${path2}: ${SECTION}${at2 ? `.${at2}` : ""} ${issue?.message ?? "is not valid"}`);
|
|
5574
|
+
}
|
|
5575
|
+
const ids = checked.output.custom?.map(({ id: id6 }) => id6) ?? [];
|
|
5576
|
+
const twice = ids.find((id6, at2) => ids.indexOf(id6) !== at2);
|
|
5577
|
+
if (twice)
|
|
5578
|
+
throw new CliError("configuration_error", `${path2}: ${SECTION}.custom names ${twice} twice`);
|
|
5579
|
+
return checked.output;
|
|
5580
|
+
}, "readTextModelsSection");
|
|
5581
|
+
var writeTextModelsSection = /* @__PURE__ */ __name((section2, env = process.env) => writeSharedSection(textModelsFile(env), SECTION, section2.use === void 0 && !section2.custom?.length ? void 0 : section2), "writeTextModelsSection");
|
|
5582
|
+
var textModels = /* @__PURE__ */ __name((env = process.env) => [
|
|
5583
|
+
...TEXT_MODELS,
|
|
5584
|
+
...(readTextModelsSection(env).custom ?? []).map((model3) => ({ ...model3, custom: true }))
|
|
5585
|
+
], "textModels");
|
|
5586
|
+
var textModel = /* @__PURE__ */ __name((id6, env = process.env) => {
|
|
5587
|
+
const known = textModels(env);
|
|
5588
|
+
const found = known.find((model3) => model3.id === id6);
|
|
5911
5589
|
if (!found) {
|
|
5912
|
-
throw new CliError("validation_error", `no text model ${id6} \u2014 one of: ${
|
|
5590
|
+
throw new CliError("validation_error", `no text model ${id6} \u2014 one of: ${known.map((model3) => model3.id).join(", ")}`);
|
|
5913
5591
|
}
|
|
5914
5592
|
return found;
|
|
5915
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");
|
|
5599
|
+
var chosenTextModel = /* @__PURE__ */ __name((env = process.env) => {
|
|
5600
|
+
const use = readTextModelsSection(env).use;
|
|
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" };
|
|
5605
|
+
}, "chosenTextModel");
|
|
5916
5606
|
var mmarco = huggingFace("cross-encoder/mmarco-mMiniLMv2-L12-H384-v1", "1427fd652930e4ba29e8149678df786c240d8825");
|
|
5917
5607
|
var bge = huggingFace("onnx-community/bge-reranker-v2-m3-ONNX", "6f5ff65298512715a1e669753bc754d2bc8f367b");
|
|
5918
5608
|
var RERANK_MODELS = [
|
|
@@ -5982,19 +5672,22 @@ var rerankModel = /* @__PURE__ */ __name((id6) => {
|
|
|
5982
5672
|
}
|
|
5983
5673
|
return found;
|
|
5984
5674
|
}, "rerankModel");
|
|
5985
|
-
var vectorModelKey = /* @__PURE__ */ __name((model3) =>
|
|
5675
|
+
var vectorModelKey = /* @__PURE__ */ __name((model3) => {
|
|
5676
|
+
const weights = model3.custom ? model3.files.find(({ name }) => name === model3.onnx)?.sha256.slice(0, 12) : void 0;
|
|
5677
|
+
return `local:${model3.id}${weights ? `@${weights}` : ""}:${model3.dims}`;
|
|
5678
|
+
}, "vectorModelKey");
|
|
5986
5679
|
var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
|
|
5987
5680
|
|
|
5988
|
-
// 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
|
|
5989
5682
|
var HISTORY_MAX_DAYS = 1095;
|
|
5990
5683
|
var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
|
|
5991
|
-
var
|
|
5684
|
+
var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
5992
5685
|
var historyWindow = /* @__PURE__ */ __name((shape, limits, now) => {
|
|
5993
5686
|
const group2 = shape !== void 0 && shape.kind !== "dialog" && shape.kind !== "saved";
|
|
5994
5687
|
if (group2 && (shape.participantsCount ?? 0) > limits.groupMembersMax)
|
|
5995
5688
|
return { skip: "group_too_large", members: shape.participantsCount ?? 0 };
|
|
5996
|
-
const
|
|
5997
|
-
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 };
|
|
5998
5691
|
}, "historyWindow");
|
|
5999
5692
|
var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now = Date.now()) => {
|
|
6000
5693
|
const skipped = /* @__PURE__ */ new Map();
|
|
@@ -6032,10 +5725,10 @@ var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now =
|
|
|
6032
5725
|
return { batch: { ...batch, messages }, skipped };
|
|
6033
5726
|
}, "limitBatch");
|
|
6034
5727
|
|
|
6035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6036
|
-
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";
|
|
6037
5730
|
|
|
6038
|
-
// 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
|
|
6039
5732
|
var REPAIR_WORDS = {
|
|
6040
5733
|
byte_order_mark: "an invisible byte-order mark at the start",
|
|
6041
5734
|
comment: "a comment, which JSON does not allow",
|
|
@@ -6276,7 +5969,7 @@ ${parts.join(",\n")}
|
|
|
6276
5969
|
${indent}${close}`;
|
|
6277
5970
|
}, "serialise");
|
|
6278
5971
|
|
|
6279
|
-
// 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
|
|
6280
5973
|
var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
6281
5974
|
var SECTIONS = ["personal", "bot"];
|
|
6282
5975
|
var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
|
|
@@ -6455,7 +6148,7 @@ var schemaIssues = /* @__PURE__ */ __name((raw, schema2, context2) => {
|
|
|
6455
6148
|
return [...found.values()];
|
|
6456
6149
|
}
|
|
6457
6150
|
}, "schemaIssues");
|
|
6458
|
-
var
|
|
6151
|
+
var scopes = /* @__PURE__ */ __name((raw) => {
|
|
6459
6152
|
if (!isNode(raw))
|
|
6460
6153
|
return [];
|
|
6461
6154
|
const out = [];
|
|
@@ -6463,12 +6156,12 @@ var scopes2 = /* @__PURE__ */ __name((raw) => {
|
|
|
6463
6156
|
if (isNode(node))
|
|
6464
6157
|
out.push([path2, node]);
|
|
6465
6158
|
}, "add");
|
|
6466
|
-
const addSection = /* @__PURE__ */ __name((path2,
|
|
6467
|
-
if (!isNode(
|
|
6159
|
+
const addSection = /* @__PURE__ */ __name((path2, section2) => {
|
|
6160
|
+
if (!isNode(section2))
|
|
6468
6161
|
return;
|
|
6469
|
-
add([...path2, "defaults"],
|
|
6470
|
-
if (isNode(
|
|
6471
|
-
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))
|
|
6472
6165
|
add([...path2, "profiles", name], scope);
|
|
6473
6166
|
}, "addSection");
|
|
6474
6167
|
add([], raw);
|
|
@@ -6477,7 +6170,7 @@ var scopes2 = /* @__PURE__ */ __name((raw) => {
|
|
|
6477
6170
|
addSection([name], raw[name]);
|
|
6478
6171
|
return out;
|
|
6479
6172
|
}, "scopes");
|
|
6480
|
-
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");
|
|
6481
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");
|
|
6482
6175
|
var pathId = /* @__PURE__ */ __name((path2) => path2.join("\0"), "pathId");
|
|
6483
6176
|
var prune = /* @__PURE__ */ __name((raw, paths) => {
|
|
@@ -6485,7 +6178,7 @@ var prune = /* @__PURE__ */ __name((raw, paths) => {
|
|
|
6485
6178
|
const kept = /* @__PURE__ */ new Map();
|
|
6486
6179
|
const walk = /* @__PURE__ */ __name((node, at2) => {
|
|
6487
6180
|
if (Array.isArray(node)) {
|
|
6488
|
-
const indices = node.flatMap((
|
|
6181
|
+
const indices = node.flatMap((_2, index) => drop.has(pathId([...at2, String(index)])) ? [] : [index]);
|
|
6489
6182
|
kept.set(pathId(at2), indices);
|
|
6490
6183
|
return indices.map((index) => walk(node[index], [...at2, String(index)]));
|
|
6491
6184
|
}
|
|
@@ -6521,7 +6214,7 @@ var withoutPath = /* @__PURE__ */ __name((raw, at2) => {
|
|
|
6521
6214
|
}
|
|
6522
6215
|
return { config: prune(raw, [gone]).pruned, removed: true };
|
|
6523
6216
|
}, "withoutPath");
|
|
6524
|
-
var publicIssue = /* @__PURE__ */ __name(({ at:
|
|
6217
|
+
var publicIssue = /* @__PURE__ */ __name(({ at: _2, ...issue }) => issue, "publicIssue");
|
|
6525
6218
|
var fixVerb = /* @__PURE__ */ __name((issue) => issue.kind === "invalid_json" ? "repair" : "remove", "fixVerb");
|
|
6526
6219
|
var issueMessage = /* @__PURE__ */ __name((issues, doctor = "doctor") => {
|
|
6527
6220
|
const [first2] = issues;
|
|
@@ -6550,7 +6243,7 @@ var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schem
|
|
|
6550
6243
|
var wholeFile = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what }), "wholeFile");
|
|
6551
6244
|
var readConfigText = /* @__PURE__ */ __name((path2) => {
|
|
6552
6245
|
try {
|
|
6553
|
-
return { text:
|
|
6246
|
+
return { text: readFileSync3(path2, "utf8") };
|
|
6554
6247
|
} catch (error) {
|
|
6555
6248
|
const code = error.code;
|
|
6556
6249
|
if (code === "ENOENT")
|
|
@@ -6570,22 +6263,22 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
|
|
|
6570
6263
|
return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
|
|
6571
6264
|
}, "readConfigFile");
|
|
6572
6265
|
|
|
6573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6574
|
-
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";
|
|
6575
6268
|
import { dirname, join as join4 } from "node:path";
|
|
6576
6269
|
var DEFAULT_CONFIG = {
|
|
6577
6270
|
defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
|
|
6578
6271
|
profiles: {}
|
|
6579
6272
|
};
|
|
6580
6273
|
function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
6581
|
-
if (
|
|
6274
|
+
if (existsSync4(path2))
|
|
6582
6275
|
return;
|
|
6583
6276
|
const directory = dirname(path2);
|
|
6584
|
-
|
|
6277
|
+
mkdirSync(directory, { recursive: true, mode: 448 });
|
|
6585
6278
|
const temporary = mkdtempSync(join4(directory, ".config-"));
|
|
6586
6279
|
const candidate = join4(temporary, "config.json");
|
|
6587
6280
|
try {
|
|
6588
|
-
|
|
6281
|
+
writeFileSync(candidate, `${JSON.stringify(config, null, 2)}
|
|
6589
6282
|
`, { flag: "wx", mode: 384 });
|
|
6590
6283
|
try {
|
|
6591
6284
|
linkSync(candidate, path2);
|
|
@@ -6594,12 +6287,12 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
|
6594
6287
|
throw error;
|
|
6595
6288
|
}
|
|
6596
6289
|
} finally {
|
|
6597
|
-
|
|
6290
|
+
rmSync(temporary, { recursive: true, force: true });
|
|
6598
6291
|
}
|
|
6599
6292
|
}
|
|
6600
6293
|
__name(ensureDefaultConfig, "ensureDefaultConfig");
|
|
6601
6294
|
|
|
6602
|
-
// 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
|
|
6603
6296
|
var isNode2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
6604
6297
|
var parentOf = /* @__PURE__ */ __name((config, key) => {
|
|
6605
6298
|
const path2 = key.split(".");
|
|
@@ -6621,7 +6314,7 @@ var withSettingDefaults = /* @__PURE__ */ __name((raw, declared) => {
|
|
|
6621
6314
|
return { config, added };
|
|
6622
6315
|
}, "withSettingDefaults");
|
|
6623
6316
|
|
|
6624
|
-
// 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
|
|
6625
6318
|
var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
|
|
6626
6319
|
var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
|
|
6627
6320
|
var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
|
|
@@ -6660,6 +6353,7 @@ var SHARED_PROFILE_ENTRIES = {
|
|
|
6660
6353
|
record_input: optional(recordInputSetting),
|
|
6661
6354
|
keep_runs_for_days: optional(count2),
|
|
6662
6355
|
keep_successful_runs_for_days: optional(count2),
|
|
6356
|
+
keep_store_runs_for_days: optional(count2),
|
|
6663
6357
|
runs_size_limit_mb: optional(count2),
|
|
6664
6358
|
permissions: optional(permissionLevels),
|
|
6665
6359
|
sends_per_hour: optional(count2),
|
|
@@ -6670,6 +6364,7 @@ var SHARED_PROFILE_ENTRIES = {
|
|
|
6670
6364
|
history_dialog_days: optional(historyDays),
|
|
6671
6365
|
history_group_days: optional(historyDays),
|
|
6672
6366
|
history_group_members_max: optional(count2),
|
|
6367
|
+
history_muted: optional(flag),
|
|
6673
6368
|
picture_search: optional(flag),
|
|
6674
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(", ")}`))),
|
|
6675
6370
|
...AI_ENTRIES
|
|
@@ -6685,6 +6380,7 @@ var MESSENGER_ONLY_SETTINGS = [
|
|
|
6685
6380
|
"history_dialog_days",
|
|
6686
6381
|
"history_group_days",
|
|
6687
6382
|
"history_group_members_max",
|
|
6383
|
+
"history_muted",
|
|
6688
6384
|
"read_other_bots",
|
|
6689
6385
|
"speech_model",
|
|
6690
6386
|
"picture_search"
|
|
@@ -6718,6 +6414,11 @@ var SHARED_SETTINGS = [
|
|
|
6718
6414
|
default: KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
6719
6415
|
description: "days a successful run is kept"
|
|
6720
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
|
+
},
|
|
6721
6422
|
{ key: "runs_size_limit_mb", default: RUNS_SIZE_LIMIT_MB, description: "the most megabytes all runs may take" },
|
|
6722
6423
|
{ key: "sender_colors", default: false, description: "color each sender's name in a conversation" },
|
|
6723
6424
|
{ key: "search_catch_up", default: false, description: "prepare local search after a gaps repair" },
|
|
@@ -6736,6 +6437,7 @@ var SHARED_SETTINGS = [
|
|
|
6736
6437
|
default: DEFAULT_HISTORY_LIMITS.groupMembersMax,
|
|
6737
6438
|
description: "a group with more people than this keeps no pushed history"
|
|
6738
6439
|
},
|
|
6440
|
+
{ key: "history_muted", default: false, description: "messages sync --all reads muted chats too" },
|
|
6739
6441
|
{
|
|
6740
6442
|
key: "picture_search",
|
|
6741
6443
|
default: false,
|
|
@@ -6765,8 +6467,8 @@ var NoProfileHere = class extends CliError {
|
|
|
6765
6467
|
this.app = app;
|
|
6766
6468
|
}
|
|
6767
6469
|
/** `words`: the command that was typed, without its arguments, so the suggestion runs as written. */
|
|
6768
|
-
withoutSetup(
|
|
6769
|
-
const command =
|
|
6470
|
+
withoutSetup(words2) {
|
|
6471
|
+
const command = words2 ? `${this.app.command} personal ${words2}` : `${this.app.command} personal \u2026`;
|
|
6770
6472
|
return new CliError("validation_error", `name a profile: there is none on this computer yet \u2014 any name works, such as \`${command}\` (or set ${envName(this.app, "PROFILE")})`, { profiles: [] });
|
|
6771
6473
|
}
|
|
6772
6474
|
};
|
|
@@ -6860,7 +6562,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6860
6562
|
const env = options.env ?? process.env;
|
|
6861
6563
|
const configPath = configPathFor(options);
|
|
6862
6564
|
try {
|
|
6863
|
-
if (!options.readOnly)
|
|
6565
|
+
if (!options.readOnly && !readOnlyLockOf(app, env))
|
|
6864
6566
|
ensureDefaultConfig(configPath, withDefaults(DEFAULT_CONFIG).config);
|
|
6865
6567
|
} catch (error) {
|
|
6866
6568
|
throw new CliError("configuration_error", error instanceof Error ? error.message : String(error));
|
|
@@ -6881,11 +6583,11 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6881
6583
|
const name = usableProfileName(profile.value);
|
|
6882
6584
|
const configured = config.profiles[name] ?? {};
|
|
6883
6585
|
const shared = config.defaults ?? {};
|
|
6884
|
-
const
|
|
6586
|
+
const section2 = config[kind2];
|
|
6885
6587
|
const layers = [
|
|
6886
|
-
[`config file: ${kind2}.profiles.${name}`,
|
|
6588
|
+
[`config file: ${kind2}.profiles.${name}`, section2?.profiles?.[name]],
|
|
6887
6589
|
[extension.sourcePaths ? `config file: profiles.${name}` : "config file", configured],
|
|
6888
|
-
[`config file: ${kind2}.defaults`,
|
|
6590
|
+
[`config file: ${kind2}.defaults`, section2?.defaults],
|
|
6889
6591
|
[extension.sourcePaths ? "config file: defaults" : "config defaults", shared]
|
|
6890
6592
|
];
|
|
6891
6593
|
const fromLayers = /* @__PURE__ */ __name((key, fallback, only = layers) => first(only.map(([from, scope]) => [from, scope?.[key]]), fallback), "fromLayers");
|
|
@@ -6899,11 +6601,13 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6899
6601
|
const historyDialogDays = fromLayers("history_dialog_days", DEFAULT_HISTORY_LIMITS.dialogDays);
|
|
6900
6602
|
const historyGroupDays = fromLayers("history_group_days", DEFAULT_HISTORY_LIMITS.groupDays);
|
|
6901
6603
|
const historyGroupMembersMax = fromLayers("history_group_members_max", DEFAULT_HISTORY_LIMITS.groupMembersMax);
|
|
6604
|
+
const historyMuted = fromLayers("history_muted", false);
|
|
6902
6605
|
const pictureSearch = fromLayers("picture_search", false);
|
|
6903
6606
|
const searchReranker = fromLayers("search_reranker", DEFAULT_RERANK_MODEL);
|
|
6904
6607
|
const recordInput = fromLayers("record_input", true);
|
|
6905
6608
|
const keepRunsForDays = fromLayers("keep_runs_for_days", DEFAULT_KEEP_RUNS_FOR_DAYS);
|
|
6906
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);
|
|
6907
6611
|
const runsSizeLimitMb = fromLayers("runs_size_limit_mb", RUNS_SIZE_LIMIT_MB);
|
|
6908
6612
|
const readOnlyLock = readOnlyLockOf(app, env);
|
|
6909
6613
|
const sendsPerHour = kind2 === "bot" ? fromLayers("sends_per_hour", Number.POSITIVE_INFINITY, kindLayers) : fromLayers("sends_per_hour", DEFAULT_SENDS_PER_HOUR);
|
|
@@ -6946,6 +6650,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6946
6650
|
groupDays: historyGroupDays.value,
|
|
6947
6651
|
groupMembersMax: historyGroupMembersMax.value
|
|
6948
6652
|
},
|
|
6653
|
+
historyMuted: historyMuted.value,
|
|
6949
6654
|
pictureSearch: pictureSearch.value,
|
|
6950
6655
|
searchReranker: searchReranker.value,
|
|
6951
6656
|
limit: limit.value,
|
|
@@ -6958,6 +6663,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6958
6663
|
keepFailedRuns: record2.value || record2.from !== "flag",
|
|
6959
6664
|
keepRunsForDays: keepRunsForDays.value,
|
|
6960
6665
|
keepSuccessfulRunsForDays: keepSuccessfulRunsForDays.value,
|
|
6666
|
+
keepStoreRunsForDays: keepStoreRunsForDays.value,
|
|
6961
6667
|
runsSizeLimitMb: runsSizeLimitMb.value,
|
|
6962
6668
|
...readOnlyLock ? { readOnlyLock } : {},
|
|
6963
6669
|
permissions: permissions.levels,
|
|
@@ -6969,7 +6675,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6969
6675
|
updateCheck: updateCheck.value,
|
|
6970
6676
|
skillHint: skillHint.value,
|
|
6971
6677
|
configPath,
|
|
6972
|
-
configFound:
|
|
6678
|
+
configFound: existsSync5(configPath),
|
|
6973
6679
|
configuredProfiles: namedProfiles(config),
|
|
6974
6680
|
profilesHere: profilesOf(config, env),
|
|
6975
6681
|
accountProfiles: accountsOf(config, env, bots),
|
|
@@ -6986,12 +6692,14 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6986
6692
|
historyDialogDays: historyDialogDays.from,
|
|
6987
6693
|
historyGroupDays: historyGroupDays.from,
|
|
6988
6694
|
historyGroupMembersMax: historyGroupMembersMax.from,
|
|
6695
|
+
historyMuted: historyMuted.from,
|
|
6989
6696
|
pictureSearch: pictureSearch.from,
|
|
6990
6697
|
searchReranker: searchReranker.from,
|
|
6991
6698
|
record: record2.from,
|
|
6992
6699
|
recordInput: recordInput.from,
|
|
6993
6700
|
keepRunsForDays: keepRunsForDays.from,
|
|
6994
6701
|
keepSuccessfulRunsForDays: keepSuccessfulRunsForDays.from,
|
|
6702
|
+
keepStoreRunsForDays: keepStoreRunsForDays.from,
|
|
6995
6703
|
runsSizeLimitMb: runsSizeLimitMb.from,
|
|
6996
6704
|
sendsPerHour: sendsPerHour.from,
|
|
6997
6705
|
requestsPerMinute: requestsPerMinute.from,
|
|
@@ -7131,7 +6839,7 @@ var given = /* @__PURE__ */ __name((value) => {
|
|
|
7131
6839
|
return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
|
|
7132
6840
|
}, "given");
|
|
7133
6841
|
|
|
7134
|
-
// 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
|
|
7135
6843
|
var setExitCode = /* @__PURE__ */ __name((command, code) => {
|
|
7136
6844
|
const slot = environmentOf(command).exit;
|
|
7137
6845
|
if (slot)
|
|
@@ -7226,6 +6934,7 @@ var baseContext = /* @__PURE__ */ __name((command, resolveSettings) => {
|
|
|
7226
6934
|
trace: settings.trace,
|
|
7227
6935
|
keepDays: settings.keepRunsForDays,
|
|
7228
6936
|
...settings.keepSuccessfulRunsForDays === void 0 ? {} : { keepSuccessDays: settings.keepSuccessfulRunsForDays },
|
|
6937
|
+
...settings.keepStoreRunsForDays === void 0 ? {} : { keepStoreDays: settings.keepStoreRunsForDays },
|
|
7229
6938
|
...settings.runsSizeLimitMb === void 0 ? {} : { maxBytes: settings.runsSizeLimitMb * 1024 * 1024 },
|
|
7230
6939
|
processRun: !environment.agent,
|
|
7231
6940
|
format,
|
|
@@ -7247,13 +6956,13 @@ var inCommandRun = /* @__PURE__ */ __name((command, body) => {
|
|
|
7247
6956
|
return baseContext(command, (flags, options) => resolveSettings(flags, { ...options, needsProfile: false })).run(body);
|
|
7248
6957
|
}, "inCommandRun");
|
|
7249
6958
|
var commandPath = /* @__PURE__ */ __name((command) => {
|
|
7250
|
-
const
|
|
6959
|
+
const words2 = [];
|
|
7251
6960
|
for (let current2 = command; current2?.parent; current2 = current2.parent)
|
|
7252
|
-
|
|
7253
|
-
return
|
|
6961
|
+
words2.unshift(current2.name());
|
|
6962
|
+
return words2.join(" ");
|
|
7254
6963
|
}, "commandPath");
|
|
7255
6964
|
|
|
7256
|
-
// 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
|
|
7257
6966
|
var REMOTE_READ = { remote: "read", local: "read" };
|
|
7258
6967
|
var FETCH = { remote: "read", local: "write" };
|
|
7259
6968
|
var REMOTE_WRITE = { remote: "write", local: "write" };
|
|
@@ -7348,10 +7057,10 @@ var refuseStoreChange = /* @__PURE__ */ __name((app, env) => {
|
|
|
7348
7057
|
throw readOnlyRefusal(lock, storeChangeRefusal(app));
|
|
7349
7058
|
}, "refuseStoreChange");
|
|
7350
7059
|
var pathOf2 = /* @__PURE__ */ __name((command) => {
|
|
7351
|
-
const
|
|
7060
|
+
const words2 = [];
|
|
7352
7061
|
for (let at2 = command; at2.parent; at2 = at2.parent)
|
|
7353
|
-
|
|
7354
|
-
return
|
|
7062
|
+
words2.unshift(at2.name());
|
|
7063
|
+
return words2;
|
|
7355
7064
|
}, "pathOf");
|
|
7356
7065
|
var changesMessenger = /* @__PURE__ */ __name((command) => {
|
|
7357
7066
|
const { path: path2, effects, lifetime, reaches } = "path" in command ? command : { path: pathOf2(command), ...metaOf(command) };
|
|
@@ -7385,7 +7094,7 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
|
|
|
7385
7094
|
throw readOnlyRefusal(lock, what);
|
|
7386
7095
|
}, "refuseUnderReadOnly");
|
|
7387
7096
|
|
|
7388
|
-
// 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
|
|
7389
7098
|
var account = strictObject({
|
|
7390
7099
|
provider: text,
|
|
7391
7100
|
id,
|
|
@@ -7395,7 +7104,7 @@ var account = strictObject({
|
|
|
7395
7104
|
scope: optional(picklist(["personal", "work"]))
|
|
7396
7105
|
});
|
|
7397
7106
|
|
|
7398
|
-
// 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
|
|
7399
7108
|
var accountSession = strictObject({
|
|
7400
7109
|
current: boolean(),
|
|
7401
7110
|
client: nullable(text),
|
|
@@ -7405,7 +7114,7 @@ var accountSession = strictObject({
|
|
|
7405
7114
|
created_at: optional(nullable(time))
|
|
7406
7115
|
});
|
|
7407
7116
|
|
|
7408
|
-
// 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
|
|
7409
7118
|
var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
|
|
7410
7119
|
var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
|
|
7411
7120
|
var audience = picklist(["everyone", "contacts", "nobody"]);
|
|
@@ -7422,8 +7131,19 @@ var accountPrivacy = strictObject({
|
|
|
7422
7131
|
last_seen: optional(shownAudience)
|
|
7423
7132
|
});
|
|
7424
7133
|
var accountPrivacyChange = strictObject({ operation_id: id, privacy: accountPrivacy });
|
|
7134
|
+
var removalKind = picklist(["sign_in", "keyring", "config", "file", "store", "unit", "schedule"]);
|
|
7135
|
+
var accountRemoval = strictObject({
|
|
7136
|
+
profile: text,
|
|
7137
|
+
data: picklist(["kept", "deleted"]),
|
|
7138
|
+
dry_run: boolean(),
|
|
7139
|
+
account: nullable(strictObject({ provider: text, account: text })),
|
|
7140
|
+
revoked: nullable(boolean()),
|
|
7141
|
+
config_file: text,
|
|
7142
|
+
removed: array(strictObject({ kind: removalKind, target: text })),
|
|
7143
|
+
kept: array(strictObject({ kind: removalKind, target: text, reason: text }))
|
|
7144
|
+
});
|
|
7425
7145
|
|
|
7426
|
-
// 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
|
|
7427
7147
|
var accountProfile = strictObject({
|
|
7428
7148
|
profile: id,
|
|
7429
7149
|
current: boolean(),
|
|
@@ -7435,7 +7155,7 @@ var accountProfile = strictObject({
|
|
|
7435
7155
|
bot: optional(literal(true))
|
|
7436
7156
|
});
|
|
7437
7157
|
|
|
7438
|
-
// 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
|
|
7439
7159
|
var milliseconds = pipe(number(), minValue(0));
|
|
7440
7160
|
var counterReading = strictObject({
|
|
7441
7161
|
counter: picklist(["views", "reactions", "comments"]),
|
|
@@ -7447,7 +7167,7 @@ var counterReading = strictObject({
|
|
|
7447
7167
|
});
|
|
7448
7168
|
var selection = record(string(), unknown());
|
|
7449
7169
|
|
|
7450
|
-
// 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
|
|
7451
7171
|
var adminRow = strictObject({
|
|
7452
7172
|
ref: reference,
|
|
7453
7173
|
/** What `stats * evidence` takes: a person id, a stay or a message locator. */
|
|
@@ -7500,7 +7220,7 @@ var adminReport = strictObject({
|
|
|
7500
7220
|
rows: array(adminRow)
|
|
7501
7221
|
});
|
|
7502
7222
|
|
|
7503
|
-
// 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
|
|
7504
7224
|
var closeSuggestion = strictObject({
|
|
7505
7225
|
as: picklist(["done", "dismissed"]),
|
|
7506
7226
|
/** The agent's name. */
|
|
@@ -7562,7 +7282,7 @@ var task = strictObject({
|
|
|
7562
7282
|
updated_at: optional(time)
|
|
7563
7283
|
});
|
|
7564
7284
|
|
|
7565
|
-
// 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
|
|
7566
7286
|
var agendaChat = strictObject({
|
|
7567
7287
|
chat: reference,
|
|
7568
7288
|
title: nullable(text),
|
|
@@ -7632,11 +7352,11 @@ var agenda = strictObject({
|
|
|
7632
7352
|
unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
|
|
7633
7353
|
});
|
|
7634
7354
|
|
|
7635
|
-
// 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
|
|
7636
7356
|
var analysisConsent = strictObject({ chat: id, provider: text, at: time });
|
|
7637
7357
|
var analysisConsentRevocation = strictObject({ revoked: boolean() });
|
|
7638
7358
|
|
|
7639
|
-
// 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
|
|
7640
7360
|
var attachment = strictObject({
|
|
7641
7361
|
/** The message it came with, as a locator; absent inside that message. */
|
|
7642
7362
|
message: optional(reference),
|
|
@@ -7674,7 +7394,7 @@ var attachment = strictObject({
|
|
|
7674
7394
|
});
|
|
7675
7395
|
var hitFile = strictObject({ position: count, kind: text, name: optional(text), size: optional(count) });
|
|
7676
7396
|
|
|
7677
|
-
// 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
|
|
7678
7398
|
var actionableError = objectWithRest({
|
|
7679
7399
|
code: text,
|
|
7680
7400
|
message: text,
|
|
@@ -7691,7 +7411,7 @@ var batchResult = strictObject({
|
|
|
7691
7411
|
max_error_percent: count
|
|
7692
7412
|
});
|
|
7693
7413
|
|
|
7694
|
-
// 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
|
|
7695
7415
|
var extractionItem = strictObject({
|
|
7696
7416
|
ref: reference,
|
|
7697
7417
|
attachment: count,
|
|
@@ -7724,7 +7444,7 @@ var extractionReport = strictObject({
|
|
|
7724
7444
|
cursor: optional(text)
|
|
7725
7445
|
});
|
|
7726
7446
|
|
|
7727
|
-
// 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
|
|
7728
7448
|
var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
|
|
7729
7449
|
var attachmentBytes = strictObject({
|
|
7730
7450
|
ref: reference,
|
|
@@ -7752,22 +7472,80 @@ var attachmentTextChange = strictObject({
|
|
|
7752
7472
|
replaced: nullable(picklist(["extracted", "agent"]))
|
|
7753
7473
|
});
|
|
7754
7474
|
|
|
7755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7756
|
-
var
|
|
7757
|
-
|
|
7758
|
-
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
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
|
|
7768
7546
|
});
|
|
7769
7547
|
|
|
7770
|
-
// 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
|
|
7771
7549
|
var member = strictObject({
|
|
7772
7550
|
id,
|
|
7773
7551
|
name: nullable(text),
|
|
@@ -7790,7 +7568,7 @@ var member = strictObject({
|
|
|
7790
7568
|
check: optional(record(string(), unknown()))
|
|
7791
7569
|
});
|
|
7792
7570
|
|
|
7793
|
-
// 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
|
|
7794
7572
|
var setting = optional(nullable(boolean()));
|
|
7795
7573
|
var chat = strictObject({
|
|
7796
7574
|
ref: reference,
|
|
@@ -7831,758 +7609,972 @@ var chat = strictObject({
|
|
|
7831
7609
|
members: optional(array(member))
|
|
7832
7610
|
});
|
|
7833
7611
|
|
|
7834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7835
|
-
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({
|
|
7836
7614
|
id,
|
|
7837
|
-
|
|
7838
|
-
|
|
7615
|
+
sender_id: nullable(id),
|
|
7616
|
+
sender_name: nullable(text),
|
|
7617
|
+
timestamp: nullable(time),
|
|
7618
|
+
text,
|
|
7619
|
+
attachments: array(attachment),
|
|
7620
|
+
outgoing: nullable(boolean())
|
|
7839
7621
|
});
|
|
7840
|
-
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,
|
|
7841
7626
|
id,
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
/**
|
|
7861
|
-
|
|
7862
|
-
/** `
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7627
|
+
provider: optional(text),
|
|
7628
|
+
account: optional(text),
|
|
7629
|
+
chat_id: id,
|
|
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
|
|
7871
7729
|
});
|
|
7872
7730
|
|
|
7873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7874
|
-
var
|
|
7875
|
-
var
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
7881
|
-
settings: strictObject({
|
|
7882
|
-
...unwrap(chat.entries.settings).entries,
|
|
7883
|
-
all_can_pin: nullable(boolean()),
|
|
7884
|
-
only_admins_add: nullable(boolean()),
|
|
7885
|
-
only_admins_call: nullable(boolean()),
|
|
7886
|
-
only_owner_edits_info: nullable(boolean()),
|
|
7887
|
-
members_see_link: nullable(boolean())
|
|
7888
|
-
})
|
|
7889
|
-
});
|
|
7890
|
-
var chatGroupChange = union([
|
|
7891
|
-
strictObject({ operation_id: id, chat: group }),
|
|
7892
|
-
strictObject({ operation_id: id, requested: literal(true) })
|
|
7893
|
-
]);
|
|
7894
|
-
var chatInspection = strictObject({
|
|
7895
|
-
kind: chat.entries.kind,
|
|
7896
|
-
title: nullable(text),
|
|
7897
|
-
id: nullable(id),
|
|
7898
|
-
username: nullable(text),
|
|
7899
|
-
participants_count: nullable(count),
|
|
7900
|
-
description: nullable(text),
|
|
7901
|
-
member: nullable(boolean()),
|
|
7902
|
-
approval_needed: optional(boolean())
|
|
7903
|
-
});
|
|
7904
|
-
var chatSender = strictObject({
|
|
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,
|
|
7737
|
+
chat_id: id,
|
|
7738
|
+
chat_title: nullable(text),
|
|
7905
7739
|
id,
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7740
|
+
timestamp: time,
|
|
7741
|
+
sender_id: nullable(id),
|
|
7742
|
+
sender_name: nullable(text),
|
|
7743
|
+
outgoing: nullable(boolean()),
|
|
7744
|
+
text
|
|
7910
7745
|
});
|
|
7911
|
-
var
|
|
7912
|
-
|
|
7746
|
+
var sharedChat = strictObject({
|
|
7747
|
+
provider: text,
|
|
7748
|
+
account: id,
|
|
7913
7749
|
chat_id: id,
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
read: count,
|
|
7918
|
-
participants: nullable(count),
|
|
7919
|
-
complete: boolean(),
|
|
7920
|
-
more: boolean(),
|
|
7921
|
-
tracked: boolean()
|
|
7922
|
-
});
|
|
7923
|
-
var chatMembersChange = union([
|
|
7924
|
-
strictObject({ ...operated, added: array(id), not_added: array(id) }),
|
|
7925
|
-
strictObject({ ...operated, removed: array(id) })
|
|
7926
|
-
]);
|
|
7927
|
-
var chatInvite = strictObject({ chat_id: id, title: nullable(text), link: text });
|
|
7928
|
-
var chatInviteChange = strictObject({
|
|
7929
|
-
...operated,
|
|
7930
|
-
...omit(inviteLink, ["pending_count", "joined_count"]).entries,
|
|
7931
|
-
pending: optional(count),
|
|
7932
|
-
joined: optional(count)
|
|
7750
|
+
title: nullable(text),
|
|
7751
|
+
kind: chat.entries.kind,
|
|
7752
|
+
last_message_at: nullable(time)
|
|
7933
7753
|
});
|
|
7934
|
-
var
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7754
|
+
var contextEvent = strictObject({
|
|
7755
|
+
ref: reference,
|
|
7756
|
+
title: nullable(text),
|
|
7757
|
+
starts_at: nullable(time),
|
|
7758
|
+
ends_at: nullable(time),
|
|
7759
|
+
all_day: boolean(),
|
|
7760
|
+
location: nullable(text),
|
|
7761
|
+
status: nullable(text)
|
|
7942
7762
|
});
|
|
7943
|
-
var
|
|
7944
|
-
|
|
7945
|
-
|
|
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)
|
|
7772
|
+
}),
|
|
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
|
+
}))
|
|
7946
7786
|
});
|
|
7947
|
-
var
|
|
7948
|
-
var
|
|
7949
|
-
|
|
7950
|
-
|
|
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)
|
|
7951
7794
|
});
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
...operated2,
|
|
7958
|
-
muted_until: nullable(union([time, literal("forever")]))
|
|
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)
|
|
7959
7800
|
});
|
|
7960
|
-
var
|
|
7961
|
-
var
|
|
7962
|
-
|
|
7963
|
-
|
|
7964
|
-
|
|
7965
|
-
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
|
|
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
|
|
7979
7837
|
});
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
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(),
|
|
7844
|
+
more: boolean()
|
|
7845
|
+
})),
|
|
7846
|
+
limits: strictObject({ messages: count })
|
|
7988
7847
|
});
|
|
7989
|
-
var
|
|
7990
|
-
var
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7848
|
+
var contactContext = union([context, contactMessages]);
|
|
7849
|
+
var coverage = strictObject({
|
|
7850
|
+
included: count,
|
|
7851
|
+
has_more: boolean(),
|
|
7852
|
+
cut_by: nullable(picklist(["limit", "bytes"]))
|
|
7994
7853
|
});
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8007
|
-
blocked: array(id),
|
|
8008
|
-
blocked_names: array(text),
|
|
8009
|
-
links: action,
|
|
8010
|
-
invites: action,
|
|
8011
|
-
forwards: action,
|
|
8012
|
-
blocked_people: action,
|
|
8013
|
-
flood: strictObject({ messages: count, minutes: count, action }),
|
|
8014
|
-
new_account: strictObject({ days: count, action: picklist(["report", "remove"]) }),
|
|
8015
|
-
consent: strictObject({ delete: level, remove: level })
|
|
8016
|
-
})
|
|
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"])
|
|
8017
7866
|
});
|
|
8018
|
-
var
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
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
|
+
})
|
|
8031
7929
|
});
|
|
8032
7930
|
|
|
8033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8034
|
-
var
|
|
8035
|
-
var
|
|
8036
|
-
var
|
|
8037
|
-
|
|
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
|
-
|
|
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())]))
|
|
8064
7969
|
})),
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
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"]))
|
|
8070
7976
|
}),
|
|
8071
|
-
|
|
8072
|
-
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
|
|
8080
|
-
more: boolean()
|
|
8081
|
-
})),
|
|
8082
|
-
series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
|
|
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
|
|
8083
7986
|
});
|
|
8084
|
-
var
|
|
8085
|
-
var
|
|
8086
|
-
|
|
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. */
|
|
8087
7994
|
open: count,
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
}))
|
|
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 })))
|
|
8001
|
+
});
|
|
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
|
|
8014
|
+
});
|
|
8015
|
+
var stage = strictObject({
|
|
8016
|
+
...pipelineStage.entries,
|
|
8017
|
+
pipeline: reference,
|
|
8018
|
+
pipeline_name: text,
|
|
8019
|
+
kind: picklist(["deal", "lead"]),
|
|
8020
|
+
untrusted
|
|
8105
8021
|
});
|
|
8106
8022
|
|
|
8107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8108
|
-
var
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
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
|
|
8073
|
+
})),
|
|
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"])
|
|
8092
|
+
}))),
|
|
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. */
|
|
8112
8098
|
complete: boolean()
|
|
8113
8099
|
});
|
|
8114
|
-
var
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8100
|
+
var taskLine = strictObject({
|
|
8101
|
+
ref: reference,
|
|
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
|
|
8119
8175
|
});
|
|
8120
|
-
var
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
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 }))
|
|
8124
8210
|
});
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8211
|
+
|
|
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({
|
|
8214
|
+
id,
|
|
8215
|
+
title: nullable(text),
|
|
8216
|
+
kind: nullable(picklist(["dialog", "group", "channel", "saved", "unknown"]))
|
|
8217
|
+
});
|
|
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))
|
|
8128
8233
|
});
|
|
8129
8234
|
|
|
8130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8131
|
-
var
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8145
|
-
support: boolean()
|
|
8146
|
-
})),
|
|
8147
|
-
seen: optional(text),
|
|
8148
|
-
contact: optional(boolean()),
|
|
8149
|
-
mutual_contact: optional(boolean()),
|
|
8150
|
-
common_chats_count: optional(nullable(count)),
|
|
8151
|
-
registered: optional(nullable(strictObject({
|
|
8152
|
-
at: text,
|
|
8153
|
-
source: picklist(["telegram", "max", "estimate"]),
|
|
8154
|
-
precision: picklist(["day", "month"])
|
|
8155
|
-
}))),
|
|
8156
|
-
has_photo: optional(boolean()),
|
|
8157
|
-
/** Earlier names and usernames, oldest first; the current ones are not repeated. */
|
|
8158
|
-
aliases: array(strictObject({
|
|
8159
|
-
name: optional(text),
|
|
8160
|
-
username: optional(text),
|
|
8161
|
-
link: optional(text),
|
|
8162
|
-
first_seen_at: time,
|
|
8163
|
-
last_seen_at: time,
|
|
8164
|
-
source: picklist(["profile", "messages"])
|
|
8165
|
-
}))
|
|
8166
|
-
};
|
|
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)
|
|
8249
|
+
});
|
|
8167
8250
|
|
|
8168
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8169
|
-
var
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
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
|
+
})
|
|
8267
|
+
});
|
|
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),
|
|
8173
8276
|
username: nullable(text),
|
|
8174
|
-
|
|
8175
|
-
display_name: optional(nullable(text)),
|
|
8176
|
-
/** Whatever they wrote about themselves. */
|
|
8277
|
+
participants_count: nullable(count),
|
|
8177
8278
|
description: nullable(text),
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
/** For a source that knows it, such as a Zoom contact. */
|
|
8181
|
-
email: optional(nullable(text)),
|
|
8182
|
-
phones: optional(array(strictObject({ number: text, label: nullable(text) }))),
|
|
8183
|
-
/** `contacts show`: the chats shared with them, and what the store holds of their messages in each. */
|
|
8184
|
-
chats: optional(array(strictObject({
|
|
8185
|
-
...pick(chat, ["ref", "id", "title", "kind", "last_message_at"]).entries,
|
|
8186
|
-
/** Their messages stored; a floor unless `complete`. */
|
|
8187
|
-
their_messages: optional(count),
|
|
8188
|
-
first_at: optional(nullable(time)),
|
|
8189
|
-
last_at: optional(nullable(time)),
|
|
8190
|
-
/** The store holds the whole chat, so the count is the real one. */
|
|
8191
|
-
complete: optional(boolean())
|
|
8192
|
-
}))),
|
|
8193
|
-
/** `contacts show`: what the messenger says about them, or with `--offline` what the store saw of them. */
|
|
8194
|
-
...partial(strictObject(profileFields)).entries,
|
|
8195
|
-
/** `contacts show --with-notes`: the owner's private notes about them. */
|
|
8196
|
-
notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
|
|
8279
|
+
member: nullable(boolean()),
|
|
8280
|
+
approval_needed: optional(boolean())
|
|
8197
8281
|
});
|
|
8198
|
-
|
|
8199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
|
|
8200
|
-
var WEIGHTS = {
|
|
8201
|
-
bot: 3,
|
|
8202
|
-
scam: 3,
|
|
8203
|
-
fake: 3,
|
|
8204
|
-
deleted: 1,
|
|
8205
|
-
no_photo: 1,
|
|
8206
|
-
no_username: 1,
|
|
8207
|
-
odd_name: 1,
|
|
8208
|
-
never_wrote: 1,
|
|
8209
|
-
link_first: 2,
|
|
8210
|
-
burst_join: 1,
|
|
8211
|
-
mass_invited: 1,
|
|
8212
|
-
new_account: 2,
|
|
8213
|
-
no_bio: 1,
|
|
8214
|
-
same_text: 2,
|
|
8215
|
-
photo_recent: 1,
|
|
8216
|
-
cas_banned: 3,
|
|
8217
|
-
lols_banned: 3,
|
|
8218
|
-
lols_scammer: 3
|
|
8219
|
-
};
|
|
8220
|
-
var LINK = /https?:\/\/|t\.me\/|www\./i;
|
|
8221
|
-
var DIGITS = /\d{5,}/;
|
|
8222
|
-
var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
|
|
8223
|
-
|
|
8224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
|
|
8225
|
-
var linkedIdentity = strictObject({
|
|
8226
|
-
provider: text,
|
|
8282
|
+
var chatSender = strictObject({
|
|
8227
8283
|
id,
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
seen_in: array(strictObject({ account: id, scope: picklist(["personal", "work"]) })),
|
|
8233
|
-
method: text,
|
|
8234
|
-
linked_by: text,
|
|
8235
|
-
linked_at: time
|
|
8284
|
+
title: text,
|
|
8285
|
+
kind: picklist(["self", "channel", "group"]),
|
|
8286
|
+
premium_required: boolean(),
|
|
8287
|
+
default: boolean()
|
|
8236
8288
|
});
|
|
8237
|
-
var
|
|
8238
|
-
var
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
|
|
8242
|
-
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
project_id: nullable(count)
|
|
8289
|
+
var chatRead = strictObject({ ...operated, until: nullable(id), thread_id: optional(id) });
|
|
8290
|
+
var chatMembersFetch = strictObject({
|
|
8291
|
+
chat_id: id,
|
|
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()
|
|
8249
8300
|
});
|
|
8250
|
-
var
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
|
|
8259
|
-
|
|
8260
|
-
reasons: optional(array(picklist(["cas_banned", "lols_banned", "lols_scammer"])))
|
|
8261
|
-
})),
|
|
8262
|
-
unknown: array(botReason),
|
|
8263
|
-
checked_at: time
|
|
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)
|
|
8264
8311
|
});
|
|
8265
|
-
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8273
|
-
attachments: array(attachment),
|
|
8274
|
-
outgoing: nullable(boolean())
|
|
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"])))
|
|
8275
8320
|
});
|
|
8276
|
-
var
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
timestamp: time,
|
|
8293
|
-
edited_at: nullable(time),
|
|
8294
|
-
text,
|
|
8295
|
-
/** What a voice message says, once heard. */
|
|
8296
|
-
transcript: optional(text),
|
|
8297
|
-
/** In a window of messages around one, the one asked for. */
|
|
8298
|
-
anchor: optional(boolean()),
|
|
8299
|
-
/** A stretch of the text, transcript, file name or file text around what a search matched. */
|
|
8300
|
-
excerpt: optional(text),
|
|
8301
|
-
/** `picture`: the picture search lane found it by what the picture shows; it follows the text hits. */
|
|
8302
|
-
matched_in: optional(picklist(["text", "transcript", "filename", "file", "context", "picture"])),
|
|
8303
|
-
score: optional(number()),
|
|
8304
|
-
/**
|
|
8305
|
-
* `corrected`: a query word matched only a spelling speech recognition garbled in a voice note's transcript,
|
|
8306
|
-
* listed in `corrections`. `words` and `beginnings`: what a discovery search matched.
|
|
8307
|
-
*/
|
|
8308
|
-
match: optional(picklist(["words", "beginnings", "corrected"])),
|
|
8309
|
-
corrections: optional(array(strictObject({ from: text, to: array(text) }))),
|
|
8310
|
-
/** Where a search found it: the local archive, the messenger's server, or both. */
|
|
8311
|
-
found_in: optional(picklist(["archive", "server", "both"])),
|
|
8312
|
-
/** A discovery search's partial match: how much of the question it covers, and which words it lacks. */
|
|
8313
|
-
discovery: optional(strictObject({
|
|
8314
|
-
coverage: number(),
|
|
8315
|
-
matched_terms: array(text),
|
|
8316
|
-
missing_terms: array(text),
|
|
8317
|
-
parent: optional(reference),
|
|
8318
|
-
/** Present when meaning was searched too: which of the two lists found it. */
|
|
8319
|
-
found_by: optional(array(picklist(["words", "meaning"]))),
|
|
8320
|
-
/** Present when the reranker read it: its own score, higher is better. It ordered the first hits with `score`. */
|
|
8321
|
-
reranker_score: optional(number())
|
|
8322
|
-
})),
|
|
8323
|
-
/** The messages around a search hit, or its thread, oldest first; the hit itself is among them. */
|
|
8324
|
-
context: optional(array(strictObject({ ref: reference, timestamp: time, sender_name: nullable(text), text }))),
|
|
8325
|
-
/**
|
|
8326
|
-
* A discovery hit's later messages, from any chat the search reads, that share a rare word with it, latest first:
|
|
8327
|
-
* one may change or cancel what the hit says. An excerpt, as the hit's own: `messages context <ref>` has the whole text.
|
|
8328
|
-
*/
|
|
8329
|
-
follow_ups: optional(array(strictObject({
|
|
8330
|
-
ref: reference,
|
|
8331
|
-
chat_title: nullable(text),
|
|
8332
|
-
timestamp: time,
|
|
8333
|
-
sender_name: nullable(text),
|
|
8334
|
-
excerpt: text
|
|
8335
|
-
}))),
|
|
8336
|
-
outgoing: nullable(boolean()),
|
|
8337
|
-
attachments: array(attachment),
|
|
8338
|
-
reply_to: nullable(quoted),
|
|
8339
|
-
/** The id a reply answers, also when the provider sent no copy of that message. */
|
|
8340
|
-
reply_to_id: optional(id),
|
|
8341
|
-
forwarded_from: nullable(quoted),
|
|
8342
|
-
thread_id: optional(id),
|
|
8343
|
-
thread_root_id: optional(id),
|
|
8344
|
-
reactions: optional(nullable(strictObject({
|
|
8345
|
-
counts: array(strictObject({ reaction: text, count })),
|
|
8346
|
-
mine: nullable(text),
|
|
8347
|
-
total: count
|
|
8348
|
-
}))),
|
|
8349
|
-
scheduled_for: optional(time),
|
|
8350
|
-
/** The owner starred it; only where the messenger has stars, and only when set. */
|
|
8351
|
-
starred: optional(literal(true)),
|
|
8352
|
-
/** The owner's own message in a one-to-one chat: `delivered`, or `read` once opened; absent when no receipt came. */
|
|
8353
|
-
delivery: optional(picklist(["delivered", "read"])),
|
|
8354
|
-
email: optional(strictObject({
|
|
8355
|
-
subject: nullable(text),
|
|
8356
|
-
from: nullable(mailPerson),
|
|
8357
|
-
to: array(mailPerson),
|
|
8358
|
-
cc: array(mailPerson),
|
|
8359
|
-
bcc: array(mailPerson),
|
|
8360
|
-
/** The mail header Reply-To; `reply_to` is the quoted message a chat reply answers. */
|
|
8361
|
-
reply_addresses: array(mailPerson),
|
|
8362
|
-
labels: array(text),
|
|
8363
|
-
/** The thread as a `chat:` reference. */
|
|
8364
|
-
thread: reference,
|
|
8365
|
-
read: nullable(boolean()),
|
|
8366
|
-
flagged: nullable(boolean()),
|
|
8367
|
-
/** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
|
|
8368
|
-
sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) })),
|
|
8369
|
-
/** Mail `review`: filed in the mailbox of mail sent to many. */
|
|
8370
|
-
bulk: optional(boolean()),
|
|
8371
|
-
/** Mail `review`: its List-Id, `null` when it has none. */
|
|
8372
|
-
list_id: optional(nullable(text)),
|
|
8373
|
-
/** Mail `review`: the mail rule that decided how it is stored, by its id in `rules list`; `null` when none. */
|
|
8374
|
-
rule_id: optional(nullable(number())),
|
|
8375
|
-
/** Mail `review`: the evidence fingerprint a finding cites this email by. */
|
|
8376
|
-
fingerprint: optional(pipe(text, regex(/^[a-f0-9]{64}$/))),
|
|
8377
|
-
/** Mail `review`: no earlier stored email, in any account, came from this address. */
|
|
8378
|
-
new_sender: optional(boolean()),
|
|
8379
|
-
/** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
|
|
8380
|
-
sender_identities: optional(number())
|
|
8381
|
-
})),
|
|
8382
|
-
provider_metadata: providerMetadata
|
|
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")]))
|
|
8383
8337
|
});
|
|
8338
|
+
var chatArchive = strictObject({ ...operated2, archived: boolean() });
|
|
8339
|
+
var chatPin = strictObject({ ...operated2, pinned: boolean() });
|
|
8340
|
+
var chatUnread = strictObject({ ...operated2, unread: literal(true) });
|
|
8384
8341
|
|
|
8385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8386
|
-
var
|
|
8387
|
-
var
|
|
8388
|
-
locator: reference,
|
|
8389
|
-
provider: text,
|
|
8390
|
-
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({
|
|
8391
8345
|
chat_id: id,
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
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) }))
|
|
8399
8357
|
});
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
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({
|
|
8403
8361
|
chat_id: id,
|
|
8404
8362
|
title: nullable(text),
|
|
8405
|
-
|
|
8406
|
-
|
|
8363
|
+
username: nullable(text),
|
|
8364
|
+
description: nullable(text),
|
|
8365
|
+
fetched_at: time
|
|
8407
8366
|
});
|
|
8408
|
-
var
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
all_day: boolean(),
|
|
8414
|
-
location: nullable(text),
|
|
8415
|
-
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()
|
|
8416
8372
|
});
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
recent: strictObject({ direct: array(contextMessage), groups: array(contextMessage) }),
|
|
8428
|
-
mentions: array(contextMessage),
|
|
8429
|
-
/** Calendar events they are invited to, one occurrence per series. */
|
|
8430
|
-
events: optional(strictObject({ upcoming: array(contextEvent), recent: array(contextEvent) })),
|
|
8431
|
-
limits: strictObject({ messages: count, bytes: count }),
|
|
8432
|
-
complete: boolean(),
|
|
8433
|
-
not_read: array(strictObject({
|
|
8434
|
-
provider: text,
|
|
8435
|
-
account: id,
|
|
8436
|
-
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({
|
|
8437
8383
|
title: nullable(text),
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
})
|
|
8449
|
-
var counterObservation = strictObject({
|
|
8450
|
-
value: number(),
|
|
8451
|
-
observed_at: time,
|
|
8452
|
-
source: picklist(["remote_fetch", "remote_update"]),
|
|
8453
|
-
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
|
+
})
|
|
8454
8395
|
});
|
|
8455
|
-
var
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
"
|
|
8459
|
-
"
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
"
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
"edited_at",
|
|
8469
|
-
"text",
|
|
8470
|
-
"outgoing",
|
|
8471
|
-
"attachments",
|
|
8472
|
-
"reply_to",
|
|
8473
|
-
"reply_to_id",
|
|
8474
|
-
"forwarded_from",
|
|
8475
|
-
"thread_id",
|
|
8476
|
-
"thread_root_id",
|
|
8477
|
-
"scheduled_for",
|
|
8478
|
-
"provider_metadata",
|
|
8479
|
-
"delivery"
|
|
8480
|
-
]).entries,
|
|
8481
|
-
reactions: nullable(message.entries.reactions.wrapped.wrapped),
|
|
8482
|
-
starred: optional(boolean()),
|
|
8483
|
-
email: optional(strictObject({ ...mailFields, reply_to: mailReplyTo })),
|
|
8484
|
-
counter_observations: optional(partial(strictObject({
|
|
8485
|
-
views: counterObservation,
|
|
8486
|
-
reactions: counterObservation,
|
|
8487
|
-
comments: counterObservation
|
|
8488
|
-
}))),
|
|
8489
|
-
...shortMessage.entries,
|
|
8490
|
-
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
|
+
}))
|
|
8491
8409
|
});
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
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. */
|
|
8498
8458
|
more: boolean()
|
|
8499
8459
|
})),
|
|
8500
|
-
|
|
8460
|
+
series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
|
|
8501
8461
|
});
|
|
8502
|
-
var
|
|
8503
|
-
var
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
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
|
+
}))
|
|
8507
8483
|
});
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
text,
|
|
8519
|
-
|
|
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)
|
|
8520
8497
|
});
|
|
8521
|
-
var
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8527
|
-
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8556
|
-
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8581
|
-
|
|
8582
|
-
|
|
8498
|
+
var trackedChatHistory = strictObject({
|
|
8499
|
+
chat_id: id,
|
|
8500
|
+
tracked_at: nullable(time),
|
|
8501
|
+
counts: array(memberCount)
|
|
8502
|
+
});
|
|
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 })))
|
|
8583
8575
|
});
|
|
8584
8576
|
|
|
8585
|
-
// 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
|
|
8586
8578
|
var contactNote = strictObject({
|
|
8587
8579
|
id,
|
|
8588
8580
|
/** The contact, as a `contact:` reference. */
|
|
@@ -8594,13 +8586,13 @@ var contactNote = strictObject({
|
|
|
8594
8586
|
updated_at: time
|
|
8595
8587
|
});
|
|
8596
8588
|
|
|
8597
|
-
// 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
|
|
8598
8590
|
var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
8599
8591
|
var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
|
|
8600
8592
|
var contactStateChange = strictObject({ operation_id: id, person_id: id });
|
|
8601
8593
|
var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
|
|
8602
8594
|
|
|
8603
|
-
// 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
|
|
8604
8596
|
var conversation = strictObject({
|
|
8605
8597
|
id,
|
|
8606
8598
|
chat: reference,
|
|
@@ -8615,7 +8607,7 @@ var conversation = strictObject({
|
|
|
8615
8607
|
rules_version: count
|
|
8616
8608
|
});
|
|
8617
8609
|
|
|
8618
|
-
// 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
|
|
8619
8611
|
var conversationBuild = strictObject({
|
|
8620
8612
|
chat: id,
|
|
8621
8613
|
messages: count,
|
|
@@ -8640,7 +8632,7 @@ var catchUpPreparation = strictObject({
|
|
|
8640
8632
|
prepared: optional(conversationPreparation)
|
|
8641
8633
|
});
|
|
8642
8634
|
|
|
8643
|
-
// 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
|
|
8644
8636
|
var conversationDetails = union([
|
|
8645
8637
|
strictObject({ ...conversation.entries, messages: array(message) }),
|
|
8646
8638
|
message
|
|
@@ -8730,7 +8722,7 @@ var conversationHit = strictObject({
|
|
|
8730
8722
|
stale: boolean()
|
|
8731
8723
|
});
|
|
8732
8724
|
|
|
8733
|
-
// 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
|
|
8734
8726
|
var counters = strictObject({
|
|
8735
8727
|
cutoff: time,
|
|
8736
8728
|
max_age_ms: milliseconds,
|
|
@@ -8760,97 +8752,7 @@ var counterRefresh = strictObject({
|
|
|
8760
8752
|
complete: optional(boolean())
|
|
8761
8753
|
});
|
|
8762
8754
|
|
|
8763
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8764
|
-
var nullableText = nullable(text);
|
|
8765
|
-
var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
|
|
8766
|
-
var outcome = picklist(["open", "won", "lost"]);
|
|
8767
|
-
var crmAccount = nullable(strictObject({ provider: text, account: text }));
|
|
8768
|
-
var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
|
|
8769
|
-
var deal = strictObject({
|
|
8770
|
-
id,
|
|
8771
|
-
ref: reference,
|
|
8772
|
-
kind: picklist(["deal", "lead"]),
|
|
8773
|
-
title: text,
|
|
8774
|
-
/** One line with the stage, amount and status. */
|
|
8775
|
-
summary: text,
|
|
8776
|
-
pipeline: reference,
|
|
8777
|
-
pipeline_name: text,
|
|
8778
|
-
stage: text,
|
|
8779
|
-
status: outcome,
|
|
8780
|
-
organization: nullable(party),
|
|
8781
|
-
currency: nullableText,
|
|
8782
|
-
amount: nullableText,
|
|
8783
|
-
close_date: day2,
|
|
8784
|
-
closed_date: day2,
|
|
8785
|
-
closed_reason: nullableText,
|
|
8786
|
-
rank: nullable(number()),
|
|
8787
|
-
/** A lead's deal, once it became one. */
|
|
8788
|
-
deal: nullable(reference),
|
|
8789
|
-
/** The CRM account it is a copy from; `null` for the owner's own. */
|
|
8790
|
-
account: crmAccount,
|
|
8791
|
-
external_id: nullableText,
|
|
8792
|
-
/** A CRM copy's assignee, the identity `<account>/user/<id>`. */
|
|
8793
|
-
assignee: nullableText,
|
|
8794
|
-
/** A CRM copy's own fields by code; a list field's value is its option's label, `option_id` its id. */
|
|
8795
|
-
provider_metadata: record(string(), strictObject({
|
|
8796
|
-
label: nullable(string()),
|
|
8797
|
-
value: unknown(),
|
|
8798
|
-
option_id: optional(union([string(), array(string())]))
|
|
8799
|
-
})),
|
|
8800
|
-
people: array(strictObject({ ...party.entries, role: picklist(DEAL_ROLES) })),
|
|
8801
|
-
author: strictObject({
|
|
8802
|
-
type: picklist(["person", "bot"]),
|
|
8803
|
-
id,
|
|
8804
|
-
name: nullableText,
|
|
8805
|
-
kind: nullable(picklist(["agent", "rule"]))
|
|
8806
|
-
}),
|
|
8807
|
-
model: nullableText,
|
|
8808
|
-
source: text,
|
|
8809
|
-
reason: nullableText,
|
|
8810
|
-
evidence: array(reference),
|
|
8811
|
-
project: nullable(reference),
|
|
8812
|
-
project_name: nullableText,
|
|
8813
|
-
created_at: time,
|
|
8814
|
-
updated_at: time,
|
|
8815
|
-
untrusted
|
|
8816
|
-
});
|
|
8817
|
-
var lead = deal;
|
|
8818
|
-
var pipelineStage = strictObject({
|
|
8819
|
-
name: text,
|
|
8820
|
-
position: count,
|
|
8821
|
-
outcome,
|
|
8822
|
-
external_id: nullableText,
|
|
8823
|
-
/** Open deals or leads in it now. */
|
|
8824
|
-
open: count,
|
|
8825
|
-
/** With a funnel: rows that got this far, and the share of them that reached the next stage. */
|
|
8826
|
-
reached: optional(count),
|
|
8827
|
-
conversion: optional(nullable(number())),
|
|
8828
|
-
/** With a funnel: rows standing in it now, and their sum per currency, never converted. */
|
|
8829
|
-
items: optional(count),
|
|
8830
|
-
amounts: optional(array(strictObject({ amount: text, currency: text, items: count })))
|
|
8831
|
-
});
|
|
8832
|
-
var pipeline = strictObject({
|
|
8833
|
-
id,
|
|
8834
|
-
ref: reference,
|
|
8835
|
-
name: text,
|
|
8836
|
-
kind: picklist(["deal", "lead"]),
|
|
8837
|
-
account: crmAccount,
|
|
8838
|
-
external_id: nullableText,
|
|
8839
|
-
stages: array(pipelineStage),
|
|
8840
|
-
created_at: time,
|
|
8841
|
-
totals: optional(strictObject({ items: count, open: count, won: count, lost: count, win_rate: nullable(number()) })),
|
|
8842
|
-
since: optional(day2),
|
|
8843
|
-
untrusted
|
|
8844
|
-
});
|
|
8845
|
-
var stage = strictObject({
|
|
8846
|
-
...pipelineStage.entries,
|
|
8847
|
-
pipeline: reference,
|
|
8848
|
-
pipeline_name: text,
|
|
8849
|
-
kind: picklist(["deal", "lead"]),
|
|
8850
|
-
untrusted
|
|
8851
|
-
});
|
|
8852
|
-
|
|
8853
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/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
|
|
8854
8756
|
var document = strictObject({
|
|
8855
8757
|
ref: reference,
|
|
8856
8758
|
id,
|
|
@@ -8865,7 +8767,7 @@ var document = strictObject({
|
|
|
8865
8767
|
owners: optional(array(text))
|
|
8866
8768
|
});
|
|
8867
8769
|
|
|
8868
|
-
// 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
|
|
8869
8771
|
var documentLink = strictObject({
|
|
8870
8772
|
ref: reference,
|
|
8871
8773
|
url: text,
|
|
@@ -8876,7 +8778,7 @@ var documentLink = strictObject({
|
|
|
8876
8778
|
sender: strictObject({ id: nullable(id), name: nullable(text) })
|
|
8877
8779
|
});
|
|
8878
8780
|
|
|
8879
|
-
// 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
|
|
8880
8782
|
var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
|
|
8881
8783
|
var contribution = strictObject({
|
|
8882
8784
|
message: evidenceMessage,
|
|
@@ -8906,7 +8808,7 @@ var retentionStay = strictObject({
|
|
|
8906
8808
|
});
|
|
8907
8809
|
var evidence = union([contribution, retentionStay]);
|
|
8908
8810
|
|
|
8909
|
-
// 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
|
|
8910
8812
|
var fact = strictObject({
|
|
8911
8813
|
ref: reference,
|
|
8912
8814
|
id,
|
|
@@ -8932,13 +8834,14 @@ var fact = strictObject({
|
|
|
8932
8834
|
evidence: array(reference),
|
|
8933
8835
|
/** With `--sources`: each piece of evidence read back. */
|
|
8934
8836
|
sources: optional(array(evidenceSource)),
|
|
8837
|
+
source_review: optional(sourceReview),
|
|
8935
8838
|
created_at: time,
|
|
8936
8839
|
updated_at: time
|
|
8937
8840
|
});
|
|
8938
8841
|
|
|
8939
|
-
// 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
|
|
8940
8843
|
var hit = strictObject({
|
|
8941
|
-
kind: picklist(["message", "mail", "note", "document", "event", "meeting", "deal", "lead"]),
|
|
8844
|
+
kind: picklist(["message", "mail", "note", "document", "event", "meeting", "deal", "lead", ...BUSINESS_KINDS]),
|
|
8942
8845
|
ref: reference,
|
|
8943
8846
|
provider: text,
|
|
8944
8847
|
url: optional(text),
|
|
@@ -8968,13 +8871,17 @@ var hit = strictObject({
|
|
|
8968
8871
|
lines_total: optional(count),
|
|
8969
8872
|
/** A meeting passage's stored line, so two passages of one meeting stay apart; `search meetings` gives the same. */
|
|
8970
8873
|
id: optional(pipe(string(), minLength(1))),
|
|
8874
|
+
/** A business hit's: `proposed` waits for the owner; a product or a wallet has no review and is `confirmed`. */
|
|
8875
|
+
review: optional(picklist(["proposed", "confirmed"])),
|
|
8876
|
+
/** A business hit's record in the import that made it; absent for one the owner or an agent wrote. */
|
|
8877
|
+
source_record: optional(strictObject({ provider: text, account: text, external_id: text })),
|
|
8971
8878
|
/** A message's files; absent when it has none. */
|
|
8972
8879
|
attachments: optional(array(hitFile)),
|
|
8973
8880
|
/** Absent on a note hit: the owner wrote it. */
|
|
8974
8881
|
untrusted
|
|
8975
8882
|
});
|
|
8976
8883
|
|
|
8977
|
-
// 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
|
|
8978
8885
|
var identity = strictObject({
|
|
8979
8886
|
ref: reference,
|
|
8980
8887
|
provider: text,
|
|
@@ -8987,7 +8894,7 @@ var identity = strictObject({
|
|
|
8987
8894
|
person: optional(nullable(reference))
|
|
8988
8895
|
});
|
|
8989
8896
|
|
|
8990
|
-
// 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
|
|
8991
8898
|
var imageEmbedding = strictObject({
|
|
8992
8899
|
model: text,
|
|
8993
8900
|
embedded: count,
|
|
@@ -8996,13 +8903,13 @@ var imageEmbedding = strictObject({
|
|
|
8996
8903
|
more: boolean()
|
|
8997
8904
|
});
|
|
8998
8905
|
|
|
8999
|
-
// 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
|
|
9000
8907
|
import { spawn } from "node:child_process";
|
|
9001
|
-
import { randomBytes
|
|
9002
|
-
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";
|
|
9003
8910
|
import { dirname as dirname2, join as join5 } from "node:path";
|
|
9004
8911
|
|
|
9005
|
-
// 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
|
|
9006
8913
|
var progressOf = /* @__PURE__ */ __name((input) => {
|
|
9007
8914
|
const total = input.total ?? null;
|
|
9008
8915
|
const updated = input.updatedAt ?? null;
|
|
@@ -9018,7 +8925,7 @@ var progressOf = /* @__PURE__ */ __name((input) => {
|
|
|
9018
8925
|
};
|
|
9019
8926
|
}, "progressOf");
|
|
9020
8927
|
|
|
9021
|
-
// 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
|
|
9022
8929
|
var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
|
|
9023
8930
|
const run = currentRun();
|
|
9024
8931
|
const trace = traceId ?? run.traceId;
|
|
@@ -9032,7 +8939,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
|
|
|
9032
8939
|
}));
|
|
9033
8940
|
}, "recordLogFor");
|
|
9034
8941
|
|
|
9035
|
-
// 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
|
|
9036
8943
|
var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
|
|
9037
8944
|
var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
9038
8945
|
const out = openSync(log, "a", 384);
|
|
@@ -9051,15 +8958,15 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
|
9051
8958
|
var jobsDir = /* @__PURE__ */ __name((app, env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
|
|
9052
8959
|
var jobPath = /* @__PURE__ */ __name((dir, id6) => join5(dir, `${id6}.json`), "jobPath");
|
|
9053
8960
|
var saveJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
9054
|
-
|
|
8961
|
+
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
9055
8962
|
writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
|
|
9056
8963
|
`, 384);
|
|
9057
8964
|
}, "saveJob");
|
|
9058
8965
|
var readJob = /* @__PURE__ */ __name((dir, id6) => {
|
|
9059
|
-
if (!/^[\w-]+$/.test(id6) || !
|
|
8966
|
+
if (!/^[\w-]+$/.test(id6) || !existsSync6(jobPath(dir, id6)))
|
|
9060
8967
|
return void 0;
|
|
9061
8968
|
try {
|
|
9062
|
-
return JSON.parse(
|
|
8969
|
+
return JSON.parse(readFileSync4(jobPath(dir, id6), "utf8"));
|
|
9063
8970
|
} catch {
|
|
9064
8971
|
return void 0;
|
|
9065
8972
|
}
|
|
@@ -9096,12 +9003,12 @@ var updateJob = /* @__PURE__ */ __name((dir, id6, change) => {
|
|
|
9096
9003
|
saveJob(dir, { ...job2, ...change });
|
|
9097
9004
|
}, "updateJob");
|
|
9098
9005
|
var removeJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
9099
|
-
|
|
9100
|
-
|
|
9006
|
+
rmSync2(jobPath(dir, job2.id), { force: true });
|
|
9007
|
+
rmSync2(recordsPath(dir, job2.id), { force: true });
|
|
9101
9008
|
if (dirname2(job2.log) === dir)
|
|
9102
|
-
|
|
9009
|
+
rmSync2(job2.log, { force: true });
|
|
9103
9010
|
}, "removeJob");
|
|
9104
|
-
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");
|
|
9105
9012
|
var jobDetails = /* @__PURE__ */ __name((job2) => ({
|
|
9106
9013
|
job: job2.id,
|
|
9107
9014
|
profile: job2.profile,
|
|
@@ -9165,8 +9072,8 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
9165
9072
|
if (running)
|
|
9166
9073
|
throw new CliError("validation_error", `job ${running.id} already works on this chat; inspect store jobs show first`);
|
|
9167
9074
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
9168
|
-
const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${
|
|
9169
|
-
|
|
9075
|
+
const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes(3).toString("hex")}`;
|
|
9076
|
+
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
9170
9077
|
const log = join5(dir, `${id6}.log`);
|
|
9171
9078
|
const job2 = {
|
|
9172
9079
|
id: id6,
|
|
@@ -9187,7 +9094,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
9187
9094
|
return { job: id6, pid, chat: input.chat, log };
|
|
9188
9095
|
}, "startArchiveJob");
|
|
9189
9096
|
|
|
9190
|
-
// 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
|
|
9191
9098
|
var problem = strictObject({ code: text, message: text });
|
|
9192
9099
|
var job = strictObject({
|
|
9193
9100
|
id,
|
|
@@ -9210,7 +9117,7 @@ var job = strictObject({
|
|
|
9210
9117
|
error: optional(problem)
|
|
9211
9118
|
});
|
|
9212
9119
|
|
|
9213
|
-
// 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
|
|
9214
9121
|
var joinRequest = strictObject({
|
|
9215
9122
|
person_id: id,
|
|
9216
9123
|
name: nullable(text),
|
|
@@ -9221,7 +9128,7 @@ var joinRequest = strictObject({
|
|
|
9221
9128
|
about: optional(text)
|
|
9222
9129
|
});
|
|
9223
9130
|
|
|
9224
|
-
// 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
|
|
9225
9132
|
var botProfile = strictObject({
|
|
9226
9133
|
name: text,
|
|
9227
9134
|
token: text,
|
|
@@ -9266,11 +9173,13 @@ var scheduledJob = strictObject({
|
|
|
9266
9173
|
failing_since: optional(time),
|
|
9267
9174
|
failures: optional(number()),
|
|
9268
9175
|
cost_usd: optional(number()),
|
|
9269
|
-
|
|
9176
|
+
input_hash: optional(text),
|
|
9177
|
+
/** The last time a run did not start, and why: the day's cost cap, too little new mail, or the same input. */
|
|
9270
9178
|
skipped: optional(strictObject({
|
|
9271
9179
|
at: time,
|
|
9272
9180
|
why: text,
|
|
9273
|
-
/** A dotted id for `why`, so a client can translate it: `cost.day-cap`, `mail.none-new`, `mail.below-threshold
|
|
9181
|
+
/** A dotted id for `why`, so a client can translate it: `cost.day-cap`, `mail.none-new`, `mail.below-threshold`,
|
|
9182
|
+
* `mail.same-input`. */
|
|
9274
9183
|
reason: optional(pipe(text, regex(/^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/)))
|
|
9275
9184
|
})),
|
|
9276
9185
|
/** How the run's result went along each route; `reason` a dotted id, `error` the sending CLI's code and reason id. */
|
|
@@ -9314,7 +9223,7 @@ var stickerInventory = strictObject({
|
|
|
9314
9223
|
url: optional(nullable(text))
|
|
9315
9224
|
});
|
|
9316
9225
|
|
|
9317
|
-
// 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
|
|
9318
9227
|
var pollVote = strictObject({
|
|
9319
9228
|
person_id: id,
|
|
9320
9229
|
name: nullable(text),
|
|
@@ -9324,7 +9233,7 @@ var pollVote = strictObject({
|
|
|
9324
9233
|
voted_at: time
|
|
9325
9234
|
});
|
|
9326
9235
|
|
|
9327
|
-
// 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
|
|
9328
9237
|
var reactions = unwrap(unwrap(message.entries.reactions));
|
|
9329
9238
|
var observation = strictObject({
|
|
9330
9239
|
value: pipe(number(), minValue(0)),
|
|
@@ -9366,7 +9275,7 @@ var serveSummary = strictObject({
|
|
|
9366
9275
|
tasks: optional(strictObject({ added: count, closed: count, review: count }))
|
|
9367
9276
|
});
|
|
9368
9277
|
|
|
9369
|
-
// 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
|
|
9370
9279
|
var mailCounts = strictObject({
|
|
9371
9280
|
by: picklist(["day", "week", "sender"]),
|
|
9372
9281
|
received: count,
|
|
@@ -9381,7 +9290,7 @@ var mailCounts = strictObject({
|
|
|
9381
9290
|
}))
|
|
9382
9291
|
});
|
|
9383
9292
|
|
|
9384
|
-
// 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
|
|
9385
9294
|
var evidence2 = strictObject({ reference, fingerprint: text });
|
|
9386
9295
|
var base = { id, evidence: array(evidence2) };
|
|
9387
9296
|
var finding = variant("kind", [
|
|
@@ -9525,7 +9434,7 @@ var mailFindings = strictObject({
|
|
|
9525
9434
|
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
|
|
9526
9435
|
});
|
|
9527
9436
|
|
|
9528
|
-
// 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
|
|
9529
9438
|
var mediaArchive = strictObject({
|
|
9530
9439
|
directory: text,
|
|
9531
9440
|
chats: count,
|
|
@@ -9557,7 +9466,7 @@ var mediaArchiveTimer = union([
|
|
|
9557
9466
|
strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
|
|
9558
9467
|
]);
|
|
9559
9468
|
|
|
9560
|
-
// 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
|
|
9561
9470
|
var preparationId = pipe(string(), minLength(1));
|
|
9562
9471
|
var preparationCount = pipe(number(), integer(), minValue(0));
|
|
9563
9472
|
var preparationTime = nullable(isoTime);
|
|
@@ -9649,7 +9558,7 @@ var preparationMeeting = strictObject({
|
|
|
9649
9558
|
updated_at: isoTime
|
|
9650
9559
|
});
|
|
9651
9560
|
|
|
9652
|
-
// 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
|
|
9653
9562
|
var meetingEvidence = preparationEvidence;
|
|
9654
9563
|
var meetingPersonContext = strictObject({
|
|
9655
9564
|
person: strictObject({ uid: string(), name: nullable(string()) }),
|
|
@@ -9671,7 +9580,7 @@ var meetingPersonContext = strictObject({
|
|
|
9671
9580
|
})
|
|
9672
9581
|
});
|
|
9673
9582
|
|
|
9674
|
-
// 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
|
|
9675
9584
|
var evidence3 = strictObject({ reference, fingerprint: text });
|
|
9676
9585
|
var base2 = { id, project: reference, evidence: array(evidence3) };
|
|
9677
9586
|
var finding2 = variant("kind", [
|
|
@@ -9709,7 +9618,7 @@ var meetingFindings = strictObject({
|
|
|
9709
9618
|
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome3) }))
|
|
9710
9619
|
});
|
|
9711
9620
|
|
|
9712
|
-
// 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
|
|
9713
9622
|
var communicationCoverage = strictObject({
|
|
9714
9623
|
read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
|
|
9715
9624
|
query: string(),
|
|
@@ -9754,7 +9663,7 @@ var preparationCommunications = strictObject({
|
|
|
9754
9663
|
}))
|
|
9755
9664
|
});
|
|
9756
9665
|
|
|
9757
|
-
// 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
|
|
9758
9667
|
var meetingPreparation = strictObject({
|
|
9759
9668
|
communications: optional(preparationCommunications),
|
|
9760
9669
|
schema_version: literal(1),
|
|
@@ -9867,7 +9776,7 @@ var meetingPreparation = strictObject({
|
|
|
9867
9776
|
})
|
|
9868
9777
|
});
|
|
9869
9778
|
|
|
9870
|
-
// 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
|
|
9871
9780
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
9872
9781
|
var id3 = pipe(string(), minLength(1));
|
|
9873
9782
|
var text3 = string();
|
|
@@ -9931,7 +9840,7 @@ var meetingProjectCandidates = strictObject({
|
|
|
9931
9840
|
})
|
|
9932
9841
|
});
|
|
9933
9842
|
|
|
9934
|
-
// 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
|
|
9935
9844
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
9936
9845
|
var id4 = pipe(string(), minLength(1), maxLength(1e3));
|
|
9937
9846
|
var meetingSeriesInventory = strictObject({
|
|
@@ -9961,7 +9870,7 @@ var meetingSeriesInventory = strictObject({
|
|
|
9961
9870
|
})
|
|
9962
9871
|
});
|
|
9963
9872
|
|
|
9964
|
-
// 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
|
|
9965
9874
|
var text4 = string();
|
|
9966
9875
|
var id5 = pipe(number(), integer(), minValue(1));
|
|
9967
9876
|
var revision = picklist(["current", "superseded"]);
|
|
@@ -9978,7 +9887,7 @@ var meetingTaskProposal = strictObject({
|
|
|
9978
9887
|
persistence: literal("proposal-only")
|
|
9979
9888
|
});
|
|
9980
9889
|
|
|
9981
|
-
// 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
|
|
9982
9891
|
var memory = strictObject({
|
|
9983
9892
|
ref: reference,
|
|
9984
9893
|
id,
|
|
@@ -10001,13 +9910,14 @@ var memory = strictObject({
|
|
|
10001
9910
|
/** With `--sources`: each piece of evidence read back. */
|
|
10002
9911
|
sources: optional(array(evidenceSource)),
|
|
10003
9912
|
last_verified_at: nullable(time),
|
|
9913
|
+
source_review: optional(sourceReview),
|
|
10004
9914
|
created_at: time,
|
|
10005
9915
|
updated_at: time
|
|
10006
9916
|
});
|
|
10007
9917
|
|
|
10008
|
-
// 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
|
|
10009
9919
|
var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
|
|
10010
|
-
var status = picklist(["found", "linked", "dismissed"]);
|
|
9920
|
+
var status = picklist(["found", "linked", "proposed", "dismissed"]);
|
|
10011
9921
|
var mention = strictObject({
|
|
10012
9922
|
id: count,
|
|
10013
9923
|
kind,
|
|
@@ -10037,7 +9947,8 @@ var mentionDecision = strictObject({
|
|
|
10037
9947
|
value: text,
|
|
10038
9948
|
status,
|
|
10039
9949
|
target: nullable(reference),
|
|
10040
|
-
mentions: count
|
|
9950
|
+
mentions: count,
|
|
9951
|
+
proposal: optional(text)
|
|
10041
9952
|
});
|
|
10042
9953
|
var mentionRebuild = strictObject({
|
|
10043
9954
|
messages: count,
|
|
@@ -10048,13 +9959,13 @@ var mentionRebuild = strictObject({
|
|
|
10048
9959
|
mentions: count
|
|
10049
9960
|
});
|
|
10050
9961
|
|
|
10051
|
-
// 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
|
|
10052
9963
|
var operated3 = { operation_id: id, chat_id: id };
|
|
10053
9964
|
var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
|
|
10054
9965
|
var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
|
|
10055
9966
|
var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
|
|
10056
9967
|
|
|
10057
|
-
// 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
|
|
10058
9969
|
var messageTranscript = strictObject({
|
|
10059
9970
|
message_id: id,
|
|
10060
9971
|
text,
|
|
@@ -10112,7 +10023,7 @@ var evidencePacket = strictObject({
|
|
|
10112
10023
|
}))
|
|
10113
10024
|
});
|
|
10114
10025
|
|
|
10115
|
-
// 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
|
|
10116
10027
|
var messageThread = strictObject({
|
|
10117
10028
|
ref: reference,
|
|
10118
10029
|
chat: id,
|
|
@@ -10129,7 +10040,7 @@ var messageThread = strictObject({
|
|
|
10129
10040
|
});
|
|
10130
10041
|
var messageContext = union([message, messageThread]);
|
|
10131
10042
|
|
|
10132
|
-
// 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
|
|
10133
10044
|
var messageCounts = strictObject({
|
|
10134
10045
|
by: picklist(["chat", "sender", "day", "hour"]),
|
|
10135
10046
|
total: count,
|
|
@@ -10142,7 +10053,7 @@ var messageCounts = strictObject({
|
|
|
10142
10053
|
}))
|
|
10143
10054
|
});
|
|
10144
10055
|
|
|
10145
|
-
// 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
|
|
10146
10057
|
var messageLink = strictObject({
|
|
10147
10058
|
ref: reference,
|
|
10148
10059
|
url: nullable(text),
|
|
@@ -10159,7 +10070,7 @@ var messageLink = strictObject({
|
|
|
10159
10070
|
})))
|
|
10160
10071
|
});
|
|
10161
10072
|
|
|
10162
|
-
// 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
|
|
10163
10074
|
var savedMessageFile = strictObject({
|
|
10164
10075
|
kind: text,
|
|
10165
10076
|
path: text,
|
|
@@ -10239,14 +10150,14 @@ var messageSyncAll = strictObject({
|
|
|
10239
10150
|
issue: optional(actionableError),
|
|
10240
10151
|
limited: optional(historyLimited)
|
|
10241
10152
|
})),
|
|
10242
|
-
/** How many chats the history limits left unread (big groups) or read only to the window's start. */
|
|
10243
|
-
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) })),
|
|
10244
10155
|
tasks
|
|
10245
10156
|
});
|
|
10246
10157
|
var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
|
|
10247
10158
|
var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
|
|
10248
10159
|
|
|
10249
|
-
// 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
|
|
10250
10161
|
var messageWrite = strictObject({
|
|
10251
10162
|
operation_id: id,
|
|
10252
10163
|
message,
|
|
@@ -10261,7 +10172,7 @@ var draftWrite = strictObject({
|
|
|
10261
10172
|
});
|
|
10262
10173
|
var messageSend = union([messageWrite, draftWrite]);
|
|
10263
10174
|
|
|
10264
|
-
// 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
|
|
10265
10176
|
var model2 = strictObject({
|
|
10266
10177
|
id,
|
|
10267
10178
|
kind: picklist(["audio", "text", "image", "reranker"]),
|
|
@@ -10269,16 +10180,34 @@ var model2 = strictObject({
|
|
|
10269
10180
|
/** Which languages it reads, in words. */
|
|
10270
10181
|
languages: text,
|
|
10271
10182
|
licence: optional(text),
|
|
10183
|
+
/** A text model's licence page, for a model under conditions of its own (`NOTICE` beside its files says the same). */
|
|
10184
|
+
terms: optional(text),
|
|
10185
|
+
/** A text model's size next to the others: small is fastest, large reads best. */
|
|
10186
|
+
size: optional(picklist(["small", "medium", "large"])),
|
|
10187
|
+
/** A text model's vector length. */
|
|
10188
|
+
dims: optional(count),
|
|
10189
|
+
/** About how many chunks a second a text model embeds here, when measured. */
|
|
10190
|
+
chunks_per_second: optional(number()),
|
|
10191
|
+
/** A text model the owner added with `models add`. */
|
|
10192
|
+
custom: optional(boolean()),
|
|
10272
10193
|
/** What its files take on disk once downloaded. */
|
|
10273
10194
|
size_bytes: count,
|
|
10274
10195
|
downloaded: boolean(),
|
|
10275
|
-
/** The one used when no model is named. */
|
|
10196
|
+
/** The one used when no model is named: for text, the one `models use` chose. */
|
|
10276
10197
|
default: boolean(),
|
|
10277
10198
|
/** The folder its files are in once downloaded, so an agent can place them by hand. */
|
|
10278
10199
|
path: text
|
|
10279
10200
|
});
|
|
10201
|
+
var chosenModel = strictObject({
|
|
10202
|
+
...model2.entries,
|
|
10203
|
+
previous: id,
|
|
10204
|
+
/** Chunk texts the previous model has vectors for and this one has not; `null` when no store is there to count. */
|
|
10205
|
+
to_embed: nullable(count),
|
|
10206
|
+
/** Embedding time alone at the model's speed, done a part per sync; `null` when the speed or the count is unknown. */
|
|
10207
|
+
estimate_seconds: nullable(count)
|
|
10208
|
+
});
|
|
10280
10209
|
|
|
10281
|
-
// 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
|
|
10282
10211
|
var source = picklist(["environment", "keyring", "file"]);
|
|
10283
10212
|
var modelKey = strictObject({
|
|
10284
10213
|
provider: text,
|
|
@@ -10288,7 +10217,7 @@ var modelKey = strictObject({
|
|
|
10288
10217
|
var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
|
|
10289
10218
|
var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
|
|
10290
10219
|
|
|
10291
|
-
// 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
|
|
10292
10221
|
var versus = strictObject({ current: number(), previous: number() });
|
|
10293
10222
|
var person = { person_ref: reference, name: nullable(text) };
|
|
10294
10223
|
var graph = strictObject({
|
|
@@ -10322,14 +10251,14 @@ var officialStats = strictObject({
|
|
|
10322
10251
|
graphs: record(string(), union([graph, strictObject({ error: text })]))
|
|
10323
10252
|
});
|
|
10324
10253
|
|
|
10325
|
-
// 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
|
|
10326
10255
|
var person2 = strictObject({
|
|
10327
10256
|
ref: reference,
|
|
10328
10257
|
name: nullable(text),
|
|
10329
10258
|
identities: optional(array(identity))
|
|
10330
10259
|
});
|
|
10331
10260
|
|
|
10332
|
-
// 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
|
|
10333
10262
|
var poll = strictObject({
|
|
10334
10263
|
chat_id: id,
|
|
10335
10264
|
message_id: id,
|
|
@@ -10345,11 +10274,11 @@ var poll = strictObject({
|
|
|
10345
10274
|
});
|
|
10346
10275
|
var pollChange = strictObject({ operation_id: id, poll });
|
|
10347
10276
|
|
|
10348
|
-
// 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
|
|
10349
10278
|
var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
|
|
10350
10279
|
var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
|
|
10351
10280
|
|
|
10352
|
-
// 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
|
|
10353
10282
|
var figures = record(string(), number());
|
|
10354
10283
|
var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
|
|
10355
10284
|
var rankingRow = strictObject({
|
|
@@ -10396,7 +10325,7 @@ var ranking = strictObject({
|
|
|
10396
10325
|
rows: array(rankingRow)
|
|
10397
10326
|
});
|
|
10398
10327
|
|
|
10399
|
-
// 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
|
|
10400
10329
|
var reaction = strictObject({
|
|
10401
10330
|
person: strictObject({ id, name: nullable(text), username: nullable(text) }),
|
|
10402
10331
|
/** The emoji, or `custom:<id>` for a custom one. */
|
|
@@ -10404,7 +10333,7 @@ var reaction = strictObject({
|
|
|
10404
10333
|
reacted_at: time
|
|
10405
10334
|
});
|
|
10406
10335
|
|
|
10407
|
-
// 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
|
|
10408
10337
|
var reactionChange = strictObject({
|
|
10409
10338
|
operation_id: id,
|
|
10410
10339
|
chat_id: id,
|
|
@@ -10412,7 +10341,7 @@ var reactionChange = strictObject({
|
|
|
10412
10341
|
reaction: nullable(text)
|
|
10413
10342
|
});
|
|
10414
10343
|
|
|
10415
|
-
// 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
|
|
10416
10345
|
var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
|
|
10417
10346
|
var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
|
|
10418
10347
|
var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
|
|
@@ -10423,7 +10352,7 @@ var recipientChange = strictObject({
|
|
|
10423
10352
|
...partial(recipientOff).entries
|
|
10424
10353
|
});
|
|
10425
10354
|
|
|
10426
|
-
// 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
|
|
10427
10356
|
var events = array(record(string(), unknown()));
|
|
10428
10357
|
var recordedRun = strictObject({
|
|
10429
10358
|
run_id: id,
|
|
@@ -10495,7 +10424,7 @@ var runHit = strictObject({
|
|
|
10495
10424
|
});
|
|
10496
10425
|
var runLocation = strictObject({ path: text });
|
|
10497
10426
|
|
|
10498
|
-
// 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
|
|
10499
10428
|
var relationship = strictObject({
|
|
10500
10429
|
id,
|
|
10501
10430
|
from: reference,
|
|
@@ -10515,10 +10444,14 @@ var relationship = strictObject({
|
|
|
10515
10444
|
position: nullable(text),
|
|
10516
10445
|
starts_at: nullable(time),
|
|
10517
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),
|
|
10518
10451
|
created_at: time
|
|
10519
10452
|
});
|
|
10520
10453
|
|
|
10521
|
-
// 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
|
|
10522
10455
|
var milliseconds2 = nullable(pipe(number(), minValue(0)));
|
|
10523
10456
|
var figures2 = { replies: count, median_ms: milliseconds2, p90_ms: milliseconds2, mean_ms: milliseconds2 };
|
|
10524
10457
|
var responseTimes = strictObject({
|
|
@@ -10535,7 +10468,7 @@ var waitingChats = strictObject({
|
|
|
10535
10468
|
by_kind: strictObject({ private: count, group: count })
|
|
10536
10469
|
});
|
|
10537
10470
|
|
|
10538
|
-
// 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
|
|
10539
10472
|
var retentionCohort = strictObject({
|
|
10540
10473
|
/** The first day of the joining day or week. */
|
|
10541
10474
|
cohort: text,
|
|
@@ -10583,7 +10516,7 @@ var retention = strictObject({
|
|
|
10583
10516
|
rows: array(retentionCohort)
|
|
10584
10517
|
});
|
|
10585
10518
|
|
|
10586
|
-
// 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
|
|
10587
10520
|
var savedSearch = strictObject({
|
|
10588
10521
|
id,
|
|
10589
10522
|
/** `null` for a run in the history. */
|
|
@@ -10600,7 +10533,7 @@ var savedSearch = strictObject({
|
|
|
10600
10533
|
});
|
|
10601
10534
|
var searchHistoryClear = strictObject({ cleared: count });
|
|
10602
10535
|
|
|
10603
|
-
// 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
|
|
10604
10537
|
var sendAttempt = strictObject({
|
|
10605
10538
|
at: time,
|
|
10606
10539
|
profile: text,
|
|
@@ -10628,7 +10561,7 @@ var sendAttempt = strictObject({
|
|
|
10628
10561
|
error_code: optional(text)
|
|
10629
10562
|
});
|
|
10630
10563
|
|
|
10631
|
-
// 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
|
|
10632
10565
|
var absent = strictObject({ path: text, exists: literal(false) });
|
|
10633
10566
|
var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
|
|
10634
10567
|
var infoSchema = strictObject({
|
|
@@ -10849,7 +10782,7 @@ var storeRepair = union([
|
|
|
10849
10782
|
]);
|
|
10850
10783
|
var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
|
|
10851
10784
|
|
|
10852
|
-
// 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
|
|
10853
10786
|
var range = strictObject({ from: number(), to: number() });
|
|
10854
10787
|
var storeChatStatus = strictObject({
|
|
10855
10788
|
chat_id: id,
|
|
@@ -10947,7 +10880,7 @@ var storeJobRetry = union([
|
|
|
10947
10880
|
]);
|
|
10948
10881
|
var storeJobClear = strictObject({ cleared: array(id) });
|
|
10949
10882
|
|
|
10950
|
-
// 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
|
|
10951
10884
|
var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
|
|
10952
10885
|
var storeTable = strictObject({
|
|
10953
10886
|
name: text,
|
|
@@ -10956,7 +10889,7 @@ var storeTable = strictObject({
|
|
|
10956
10889
|
bytes: optional(nullable(count))
|
|
10957
10890
|
});
|
|
10958
10891
|
|
|
10959
|
-
// 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
|
|
10960
10893
|
var tagTarget = variant("type", [
|
|
10961
10894
|
strictObject({ type: literal("chat"), chat_id: id }),
|
|
10962
10895
|
strictObject({ type: literal("contact"), person_id: id }),
|
|
@@ -10987,7 +10920,7 @@ var automaticTags = strictObject({
|
|
|
10987
10920
|
dry_run: boolean()
|
|
10988
10921
|
});
|
|
10989
10922
|
|
|
10990
|
-
// 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
|
|
10991
10924
|
var tagging = strictObject({
|
|
10992
10925
|
tag: text,
|
|
10993
10926
|
type: picklist(TAG_TYPES),
|
|
@@ -11000,7 +10933,7 @@ var tagging = strictObject({
|
|
|
11000
10933
|
created_at: time
|
|
11001
10934
|
});
|
|
11002
10935
|
|
|
11003
|
-
// 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
|
|
11004
10937
|
var side = strictObject({ ref: reference, key: text, title: text, status: text });
|
|
11005
10938
|
var taskPair = strictObject({
|
|
11006
10939
|
task: nullable(side),
|
|
@@ -11023,7 +10956,7 @@ var taskPair = strictObject({
|
|
|
11023
10956
|
created_at: time
|
|
11024
10957
|
});
|
|
11025
10958
|
|
|
11026
|
-
// 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
|
|
11027
10960
|
var nullableTime = nullable(time);
|
|
11028
10961
|
var link = strictObject({
|
|
11029
10962
|
id,
|
|
@@ -11197,7 +11130,19 @@ var taskReview = strictObject({
|
|
|
11197
11130
|
untrusted
|
|
11198
11131
|
});
|
|
11199
11132
|
|
|
11200
|
-
// 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
|
|
11134
|
+
var template = strictObject({
|
|
11135
|
+
key: text,
|
|
11136
|
+
channel: picklist(["telegram", "email", "text"]),
|
|
11137
|
+
language: text,
|
|
11138
|
+
about: text,
|
|
11139
|
+
renders: boolean(),
|
|
11140
|
+
source: picklist(["stored", "default"]),
|
|
11141
|
+
updated_at: nullable(time),
|
|
11142
|
+
updated_by: nullable(text)
|
|
11143
|
+
});
|
|
11144
|
+
|
|
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
|
|
11201
11146
|
var topic = strictObject({
|
|
11202
11147
|
id,
|
|
11203
11148
|
title: text,
|
|
@@ -11211,7 +11156,7 @@ var topic = strictObject({
|
|
|
11211
11156
|
untrusted
|
|
11212
11157
|
});
|
|
11213
11158
|
|
|
11214
|
-
// 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
|
|
11215
11160
|
var ENTITIES = {
|
|
11216
11161
|
sync_progress: progress,
|
|
11217
11162
|
deal,
|
|
@@ -11283,6 +11228,10 @@ var ENTITIES = {
|
|
|
11283
11228
|
identity,
|
|
11284
11229
|
contact_context: contactContext,
|
|
11285
11230
|
contact_preparation: contactPreparation,
|
|
11231
|
+
person_context: personContext,
|
|
11232
|
+
organization_context: organizationContext,
|
|
11233
|
+
deal_context: dealContext,
|
|
11234
|
+
"deal_context.brief": dealBrief,
|
|
11286
11235
|
contact_activity: contactActivity,
|
|
11287
11236
|
contact_check: contactCheck,
|
|
11288
11237
|
linked_person: linkedPerson,
|
|
@@ -11299,6 +11248,7 @@ var ENTITIES = {
|
|
|
11299
11248
|
account_session: accountSession,
|
|
11300
11249
|
account_change: accountChange,
|
|
11301
11250
|
ended_account_sessions: endedAccountSessions,
|
|
11251
|
+
account_removal: accountRemoval,
|
|
11302
11252
|
account_privacy: accountPrivacy,
|
|
11303
11253
|
account_privacy_change: accountPrivacyChange,
|
|
11304
11254
|
account_profile: accountProfile,
|
|
@@ -11453,6 +11403,7 @@ var ENTITIES = {
|
|
|
11453
11403
|
chat_folder_order: chatFolderOrder,
|
|
11454
11404
|
chat_rules: chatRules,
|
|
11455
11405
|
chat_moderation: chatModeration,
|
|
11406
|
+
"model.chosen": chosenModel,
|
|
11456
11407
|
model_key: modelKey,
|
|
11457
11408
|
"model_key.stored": storedModelKey,
|
|
11458
11409
|
"model_key.removed": removedModelKey,
|
|
@@ -11490,14 +11441,15 @@ var ENTITIES = {
|
|
|
11490
11441
|
tracked_chat: trackedChat,
|
|
11491
11442
|
tracked_chat_history: trackedChatHistory,
|
|
11492
11443
|
chat_tracking: chatTracking,
|
|
11493
|
-
task_stats: taskStats
|
|
11444
|
+
task_stats: taskStats,
|
|
11445
|
+
template
|
|
11494
11446
|
};
|
|
11495
11447
|
var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.entries(ENTITIES).map(([name, schema2]) => {
|
|
11496
|
-
const { $schema:
|
|
11448
|
+
const { $schema: _2, ...definition } = jsonSchemaOf(schema2);
|
|
11497
11449
|
return [name, definition];
|
|
11498
11450
|
})), "entityDefinitions");
|
|
11499
11451
|
|
|
11500
|
-
// 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
|
|
11501
11453
|
var schemas = /* @__PURE__ */ new WeakMap();
|
|
11502
11454
|
var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
|
|
11503
11455
|
if (Object.hasOwn(ENTITIES, name))
|
|
@@ -11531,7 +11483,7 @@ var answerRow = /* @__PURE__ */ __name((command) => {
|
|
|
11531
11483
|
return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
|
|
11532
11484
|
}, "answerRow");
|
|
11533
11485
|
|
|
11534
|
-
// 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
|
|
11535
11487
|
import { join as join6 } from "node:path";
|
|
11536
11488
|
var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
|
|
11537
11489
|
var IMAGE_MODELS = [
|
|
@@ -11585,7 +11537,7 @@ var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedM
|
|
|
11585
11537
|
var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file, join6(directory, model3.id, file.name)]), "placedImage");
|
|
11586
11538
|
var isImageModelInstalled = /* @__PURE__ */ __name((model3, directory) => filesPresent(placedImage(model3, directory)), "isImageModelInstalled");
|
|
11587
11539
|
|
|
11588
|
-
// 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
|
|
11589
11541
|
var STEPS2 = defineSteps([
|
|
11590
11542
|
...STEPS,
|
|
11591
11543
|
{
|
|
@@ -11819,10 +11771,10 @@ var nextStep = /* @__PURE__ */ __name((id6, input) => {
|
|
|
11819
11771
|
const args = Object.fromEntries(Object.entries(input.args ?? {}).filter(([, value]) => value !== void 0));
|
|
11820
11772
|
return stepOf(definition, { ...input, args });
|
|
11821
11773
|
}, "nextStep");
|
|
11822
|
-
var lineOf = /* @__PURE__ */ __name((command,
|
|
11774
|
+
var lineOf = /* @__PURE__ */ __name((command, words2) => {
|
|
11823
11775
|
const root = rootOf2(command);
|
|
11824
11776
|
const profile = root.getOptionValue("profile");
|
|
11825
|
-
return typedCommand(root.name(),
|
|
11777
|
+
return typedCommand(root.name(), words2, typeof profile === "string" && profile !== "" ? profile : void 0);
|
|
11826
11778
|
}, "lineOf");
|
|
11827
11779
|
var rootOf2 = /* @__PURE__ */ __name((command) => {
|
|
11828
11780
|
let root = command;
|
|
@@ -11872,7 +11824,7 @@ var stepLine = /* @__PURE__ */ __name((root, step2) => {
|
|
|
11872
11824
|
].join(" ");
|
|
11873
11825
|
}, "stepLine");
|
|
11874
11826
|
|
|
11875
|
-
// 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
|
|
11876
11828
|
var where = [{ field: "ref" }];
|
|
11877
11829
|
var who2 = { field: ["who.owner", "who.name"], tag: "you" };
|
|
11878
11830
|
var ON_CHAT_ROW = /* @__PURE__ */ new Set(["reply-next", "coverage"]);
|
|
@@ -11964,7 +11916,7 @@ var STATUS_ROWS = {
|
|
|
11964
11916
|
"status.failed": { columns: [{ field: "signal" }], text: ["why"] }
|
|
11965
11917
|
};
|
|
11966
11918
|
|
|
11967
|
-
// 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
|
|
11968
11920
|
var TEXT_CHARS = 400;
|
|
11969
11921
|
var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
|
|
11970
11922
|
var messageRow = {
|
|
@@ -12206,8 +12158,8 @@ var dayColumn = /* @__PURE__ */ __name((rows2, shape, hoisted) => {
|
|
|
12206
12158
|
const dates = rows2.map(({ cells }) => cells[index]?.date);
|
|
12207
12159
|
if (dates.some((one) => one === void 0))
|
|
12208
12160
|
return -1;
|
|
12209
|
-
const
|
|
12210
|
-
return ordered(
|
|
12161
|
+
const days = dates;
|
|
12162
|
+
return ordered(days) && new Set(days).size * 3 <= days.length ? index : -1;
|
|
12211
12163
|
}, "dayColumn");
|
|
12212
12164
|
var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
|
|
12213
12165
|
const dates = [];
|
|
@@ -12223,7 +12175,7 @@ var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
|
|
|
12223
12175
|
const firstColumn = shape.columns[0];
|
|
12224
12176
|
const refs = rows2.map(({ item }) => item && firstColumn ? firstSet(item, firstColumn.field) : void 0);
|
|
12225
12177
|
const prefix = sharedPrefix(refs.map((ref) => typeof ref === "string" ? ref : void 0));
|
|
12226
|
-
const hoisted = rows2.length < 2 ? [] : shape.columns.map((
|
|
12178
|
+
const hoisted = rows2.length < 2 ? [] : shape.columns.map((_2, index) => index > 0 && sameEverywhere(rows2, index));
|
|
12227
12179
|
const named3 = hoisted.flatMap((hoist, index) => {
|
|
12228
12180
|
const column = shape.columns[index];
|
|
12229
12181
|
const item = rows2[0]?.item;
|
|
@@ -12330,11 +12282,11 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
|
|
|
12330
12282
|
return lines.concat(footerOf(body)).join("\n");
|
|
12331
12283
|
}, "compactText");
|
|
12332
12284
|
|
|
12333
|
-
// 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
|
|
12334
12286
|
var SOFT_OUTPUT_BYTES = 256 * 1024;
|
|
12335
12287
|
var CARRIED = ["json", "compact", "offline", "timeout", "full", "brief", "maxOutputBytes"];
|
|
12336
12288
|
var NOT_WITH_COMPACT = /* @__PURE__ */ new Set(["json", "brief"]);
|
|
12337
|
-
var
|
|
12289
|
+
var snake2 = /* @__PURE__ */ __name((name) => name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
12338
12290
|
var typed = /* @__PURE__ */ __name((command, key) => command.getOptionValueSource(key) === "cli", "typed");
|
|
12339
12291
|
var typedArgs = /* @__PURE__ */ __name((command) => {
|
|
12340
12292
|
const root = rootOf2(command);
|
|
@@ -12347,8 +12299,8 @@ var typedArgs = /* @__PURE__ */ __name((command) => {
|
|
|
12347
12299
|
const word = Array.isArray(value) ? value.join(" ") : value;
|
|
12348
12300
|
return word === void 0 || word === "" ? [] : [[argument.name(), word]];
|
|
12349
12301
|
});
|
|
12350
|
-
const own = command.options.map((option) => option.attributeName()).filter((key) => typed(command, key)).map((key) => [
|
|
12351
|
-
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)]);
|
|
12352
12304
|
return Object.fromEntries([...positional, ...own, ...global]);
|
|
12353
12305
|
}, "typedArgs");
|
|
12354
12306
|
var declaresRow = /* @__PURE__ */ __name((command) => {
|
|
@@ -12356,10 +12308,10 @@ var declaresRow = /* @__PURE__ */ __name((command) => {
|
|
|
12356
12308
|
return rowShapeOf(command, rows2 && entityRows(rows2)) !== GENERIC_ROW;
|
|
12357
12309
|
}, "declaresRow");
|
|
12358
12310
|
var pathOf3 = /* @__PURE__ */ __name((command) => {
|
|
12359
|
-
const
|
|
12311
|
+
const words2 = [];
|
|
12360
12312
|
for (let at2 = command; at2.parent; at2 = at2.parent)
|
|
12361
|
-
|
|
12362
|
-
return
|
|
12313
|
+
words2.unshift(at2.name());
|
|
12314
|
+
return words2.join(" ");
|
|
12363
12315
|
}, "pathOf");
|
|
12364
12316
|
var step = /* @__PURE__ */ __name((command, id6, args, why) => ({
|
|
12365
12317
|
kind: "command",
|
|
@@ -12388,7 +12340,7 @@ var largeAnswerSteps = /* @__PURE__ */ __name((command) => {
|
|
|
12388
12340
|
return args ? compactStep(command, args, "the answer is large as JSON; one line per item keeps every ref") : [];
|
|
12389
12341
|
}, "largeAnswerSteps");
|
|
12390
12342
|
|
|
12391
|
-
// 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
|
|
12392
12344
|
var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
|
|
12393
12345
|
var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
|
|
12394
12346
|
var strip = /* @__PURE__ */ __name((value) => {
|
|
@@ -12402,7 +12354,7 @@ var strip = /* @__PURE__ */ __name((value) => {
|
|
|
12402
12354
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
|
|
12403
12355
|
}, "strip");
|
|
12404
12356
|
|
|
12405
|
-
// 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
|
|
12406
12358
|
var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
|
|
12407
12359
|
var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
|
|
12408
12360
|
var listOf = /* @__PURE__ */ __name((command, input) => {
|
|
@@ -12445,7 +12397,7 @@ var itemOf = /* @__PURE__ */ __name((item, { next = [], missing, meta } = {}) =>
|
|
|
12445
12397
|
};
|
|
12446
12398
|
return body;
|
|
12447
12399
|
}, "itemOf");
|
|
12448
|
-
var
|
|
12400
|
+
var snake3 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
12449
12401
|
var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
12450
12402
|
const kept = new Set(verbatim);
|
|
12451
12403
|
const convert = /* @__PURE__ */ __name((value) => {
|
|
@@ -12456,7 +12408,7 @@ var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
|
12456
12408
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => {
|
|
12457
12409
|
if (inner === void 0)
|
|
12458
12410
|
return [];
|
|
12459
|
-
const name =
|
|
12411
|
+
const name = snake3(key);
|
|
12460
12412
|
return [[name, kept.has(key) || kept.has(name) ? inner : convert(inner)]];
|
|
12461
12413
|
}));
|
|
12462
12414
|
}, "convert");
|
|
@@ -12573,26 +12525,6 @@ export {
|
|
|
12573
12525
|
sharedCommand,
|
|
12574
12526
|
customizeSharedCommand,
|
|
12575
12527
|
refuseJoinedPath,
|
|
12576
|
-
logAttributes,
|
|
12577
|
-
fromLogAttributes,
|
|
12578
|
-
LOG_ATTRIBUTES,
|
|
12579
|
-
runsDirFor,
|
|
12580
|
-
runtime,
|
|
12581
|
-
newRunId,
|
|
12582
|
-
listRuns,
|
|
12583
|
-
findRun,
|
|
12584
|
-
readEvents,
|
|
12585
|
-
currentRun,
|
|
12586
|
-
inRun,
|
|
12587
|
-
runEvent,
|
|
12588
|
-
typedCommand,
|
|
12589
|
-
useAsProcessRun,
|
|
12590
|
-
processRun,
|
|
12591
|
-
enclosingTraceId,
|
|
12592
|
-
traceOf,
|
|
12593
|
-
childTrace,
|
|
12594
|
-
withAttempt,
|
|
12595
|
-
currentAttempt,
|
|
12596
12528
|
recorded,
|
|
12597
12529
|
startRecording,
|
|
12598
12530
|
wasSettled,
|
|
@@ -12623,9 +12555,14 @@ export {
|
|
|
12623
12555
|
endpoint,
|
|
12624
12556
|
modelTarget,
|
|
12625
12557
|
parseDuration,
|
|
12626
|
-
TEXT_MODELS,
|
|
12627
12558
|
DEFAULT_TEXT_MODEL,
|
|
12559
|
+
PREVIOUS_DEFAULT_TEXT_MODEL,
|
|
12560
|
+
CustomTextModelShape,
|
|
12561
|
+
readTextModelsSection,
|
|
12562
|
+
writeTextModelsSection,
|
|
12563
|
+
textModels,
|
|
12628
12564
|
textModel,
|
|
12565
|
+
chosenTextModel,
|
|
12629
12566
|
RERANK_MODELS,
|
|
12630
12567
|
DEFAULT_RERANK_MODEL,
|
|
12631
12568
|
rerankModel,
|
|
@@ -12655,9 +12592,12 @@ export {
|
|
|
12655
12592
|
REPAIR_WORDS,
|
|
12656
12593
|
repairConfigText,
|
|
12657
12594
|
permissionIssues,
|
|
12595
|
+
withoutPath,
|
|
12658
12596
|
publicIssue,
|
|
12659
12597
|
fixVerb,
|
|
12660
12598
|
issueMessage,
|
|
12599
|
+
readConfigFile,
|
|
12600
|
+
accountFileFor,
|
|
12661
12601
|
rememberAccount,
|
|
12662
12602
|
recalledAccount,
|
|
12663
12603
|
NONE_NAMED,
|
|
@@ -12707,16 +12647,16 @@ export {
|
|
|
12707
12647
|
agenda,
|
|
12708
12648
|
analysisConsent,
|
|
12709
12649
|
attachment,
|
|
12650
|
+
WEIGHTS,
|
|
12651
|
+
LINK,
|
|
12652
|
+
oddName,
|
|
12710
12653
|
member,
|
|
12711
12654
|
chat,
|
|
12655
|
+
message,
|
|
12712
12656
|
folder,
|
|
12713
12657
|
inviteLink,
|
|
12714
12658
|
chatEvent,
|
|
12715
12659
|
contact,
|
|
12716
|
-
WEIGHTS,
|
|
12717
|
-
LINK,
|
|
12718
|
-
oddName,
|
|
12719
|
-
message,
|
|
12720
12660
|
contactNote,
|
|
12721
12661
|
conversation,
|
|
12722
12662
|
documentLink,
|
|
@@ -12758,6 +12698,7 @@ export {
|
|
|
12758
12698
|
sendAttempt,
|
|
12759
12699
|
storeTable,
|
|
12760
12700
|
tagging,
|
|
12701
|
+
template,
|
|
12761
12702
|
topic,
|
|
12762
12703
|
ENTITIES,
|
|
12763
12704
|
entityDefinitions,
|