@wirecat/tg-cli 0.114.0 → 0.116.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/dist/bin/tg.js +2 -2
- package/dist/bin/tg.js.map +1 -1
- package/dist/bot/transport.d.ts +10 -8
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +16 -2
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-YAEHX3QB.js → adapter-6CLMTQOV.js} +85 -56
- package/dist/bundle/{all-profiles-R5CW42HQ.js → all-profiles-R2UZMH24.js} +10 -8
- package/dist/bundle/{anthropic-F25RHYV2.js → anthropic-QKIPHV2Z.js} +6 -5
- package/dist/bundle/{app-server-FAG6FNXR.js → app-server-AZB2MFK6.js} +47 -43
- package/dist/bundle/{bot-api-KOIAXTQR.js → bot-api-2IM243J4.js} +53 -48
- package/dist/bundle/{bot-history-PRAOZEWC.js → bot-history-G6CRVCL2.js} +19 -17
- package/dist/bundle/{bun-XIMM6EHD.js → bun-JDKPISPX.js} +2 -2
- package/dist/bundle/{bun-sqlite-DSUCO4TR.js → bun-sqlite-X5PY5IQT.js} +5 -4
- package/dist/bundle/{chunk-CDCBFMEI.js → chunk-42GK3XRS.js} +2 -2
- package/dist/bundle/{chunk-YQ64ZNLD.js → chunk-4D5AUWAY.js} +28 -15
- package/dist/bundle/{chunk-IN25CJ3D.js → chunk-4IQZRW4O.js} +13 -13
- package/dist/bundle/{chunk-Y4LCSCSH.js → chunk-577MFPCP.js} +3 -3
- package/dist/bundle/{chunk-O7CBGHI7.js → chunk-5FCONCJO.js} +1 -1
- package/dist/bundle/{chunk-CS5DQ6KM.js → chunk-5VFPUOJO.js} +17 -14
- package/dist/bundle/{chunk-ZFMOPKPT.js → chunk-5ZIBAYIZ.js} +2 -2
- package/dist/bundle/{chunk-EARO464A.js → chunk-76CX2YPT.js} +210 -129
- package/dist/bundle/{chunk-E2IRSRTB.js → chunk-B4UOCWM4.js} +4 -2
- package/dist/bundle/{chunk-Y3AQHPAJ.js → chunk-BGMV66FC.js} +1 -1
- package/dist/bundle/{chunk-LPUFOWL3.js → chunk-D72URWJE.js} +1 -39
- package/dist/bundle/{chunk-WOQGUIXE.js → chunk-DP5LRU7K.js} +1 -1
- package/dist/bundle/chunk-EB2IULWB.js +72 -0
- package/dist/bundle/{chunk-4JOKO4IW.js → chunk-FDI4GOIP.js} +912 -493
- package/dist/bundle/{chunk-P4YBABUC.js → chunk-GV7ZJ33M.js} +6 -4
- package/dist/bundle/{chunk-C7K7AP6G.js → chunk-H72UEHNG.js} +69 -36
- package/dist/bundle/{chunk-2PAKHXIV.js → chunk-HBUJNNZD.js} +35 -35
- package/dist/bundle/{chunk-NTF34HJP.js → chunk-HK6SIIGG.js} +3 -3
- package/dist/bundle/{chunk-NUVBC3LJ.js → chunk-HLNYJPAB.js} +2 -2
- package/dist/bundle/{chunk-WIRDTH3J.js → chunk-HUOXUI2M.js} +22 -22
- package/dist/bundle/{chunk-RBC7JQ4Y.js → chunk-I6JF43YP.js} +5 -3
- package/dist/bundle/{chunk-OFDMD3YF.js → chunk-IR4S7POE.js} +8 -8
- package/dist/bundle/{chunk-3R43O3GG.js → chunk-JFTCOV37.js} +80 -24
- package/dist/bundle/{chunk-YPABTT7A.js → chunk-JJMQA272.js} +14 -89
- package/dist/bundle/{chunk-DQQEN3X4.js → chunk-K2RYCCTP.js} +4 -4
- package/dist/bundle/{chunk-OWHF6BON.js → chunk-K62YATVD.js} +6 -6
- package/dist/bundle/{chunk-6SPLZI5P.js → chunk-KA6EGOJY.js} +4 -4
- package/dist/bundle/chunk-KV4267S4.js +23 -0
- package/dist/bundle/{chunk-AL36NHO6.js → chunk-LFKEKSI5.js} +1043 -307
- package/dist/bundle/{chunk-7FOT4XD2.js → chunk-LSKGCJWD.js} +3426 -1298
- package/dist/bundle/{chunk-M3IWROIF.js → chunk-LXH3SKY3.js} +10 -8
- package/dist/bundle/{chunk-QCXYJKPF.js → chunk-MQ7MCVZV.js} +2 -2
- package/dist/bundle/{chunk-EQJG44KE.js → chunk-N42VUNTO.js} +2 -2
- package/dist/bundle/{chunk-KIZT2MI6.js → chunk-N6TIFJHW.js} +1 -1
- package/dist/bundle/{chunk-MQTTVQ3V.js → chunk-NL3PAFAE.js} +8 -8
- package/dist/bundle/{chunk-ULFTCR5W.js → chunk-NUYRMU56.js} +2 -2
- package/dist/bundle/{chunk-34USFPBF.js → chunk-OX6EWGSG.js} +185 -291
- package/dist/bundle/{chunk-KZQXOZFC.js → chunk-PPLFOIYX.js} +7 -20
- package/dist/bundle/{chunk-TTTDZOBW.js → chunk-PPSUA3IZ.js} +3 -3
- package/dist/bundle/{chunk-ALHKUQDZ.js → chunk-PXMHBTK3.js} +4 -4
- package/dist/bundle/{chunk-VVKEWWSO.js → chunk-QAKL3GXB.js} +1 -1
- package/dist/bundle/{chunk-I6BKSGZQ.js → chunk-QGL2UGML.js} +306 -190
- package/dist/bundle/{chunk-J5U2HKGZ.js → chunk-QHBVGKC3.js} +51 -30
- package/dist/bundle/{chunk-NJ2I4KFZ.js → chunk-R52RMHWF.js} +2 -2
- package/dist/bundle/chunk-RSDIPQXP.js +35 -0
- package/dist/bundle/{chunk-XDOPONC3.js → chunk-RSNGMNU5.js} +6 -6
- package/dist/bundle/{chunk-NKP3RUM4.js → chunk-SD5PUYKF.js} +14 -12
- package/dist/bundle/chunk-SKZ2E3WC.js +91 -0
- package/dist/bundle/{chunk-HA35XN2Z.js → chunk-T7CDLV33.js} +4 -4
- package/dist/bundle/{chunk-C34IDOA5.js → chunk-TZVL4U7U.js} +2 -2
- package/dist/bundle/{chunk-3EZ43DAF.js → chunk-UCSFO5GW.js} +3 -3
- package/dist/bundle/{chunk-NMVFFWF2.js → chunk-VQPLHOVQ.js} +9 -9
- package/dist/bundle/chunk-XBIPSSKI.js +166 -0
- package/dist/bundle/{chunk-VHO66SMY.js → chunk-XQUTJITP.js} +59 -57
- package/dist/bundle/{chunk-L4CMCC3V.js → chunk-Y6VWGJ4Q.js} +1 -1
- package/dist/bundle/{chunk-RFRI2HFT.js → chunk-YLRTLZF6.js} +1 -1
- package/dist/bundle/chunk-YPF6OS37.js +46 -0
- package/dist/bundle/{chunk-TKNCJMYN.js → chunk-YYKJN6H5.js} +946 -589
- package/dist/bundle/{chunk-5HKMEXVQ.js → chunk-ZDIAPICE.js} +4 -4
- package/dist/bundle/command-contract-DPXM4SZT.js +33 -0
- package/dist/bundle/{decode-7U4SXPAN.js → decode-W6YPTGJA.js} +7 -6
- package/dist/bundle/dispatch-H7EFNBEH.js +411 -0
- package/dist/bundle/{echarts-GKEZEAL7.js → echarts-YAWDIC5D.js} +2 -2
- package/dist/bundle/{embed-IDZDQMSW.js → embed-EN4UTLV5.js} +6 -5
- package/dist/bundle/{embedder-RY5R2PGO.js → embedder-HEKHRL7E.js} +11 -10
- package/dist/bundle/{entry-P6YZ3ZV6.js → entry-2KB6MTCG.js} +7 -6
- package/dist/bundle/failure-3DU3HLBQ.js +24 -0
- package/dist/bundle/first-run-LBG26WWO.js +27 -0
- package/dist/bundle/first-screen-TGTSLUI6.js +31 -0
- package/dist/bundle/{instructions-P5E34PQR.js → instructions-HA62QNPR.js} +1 -1
- package/dist/bundle/{mcp-FUSDPAOL.js → mcp-PPVOM4SE.js} +5 -3
- package/dist/bundle/{node-GKPRXS5Y.js → node-MZ2VWSQQ.js} +2 -2
- package/dist/bundle/{node-sqlite-VUXFVPJ6.js → node-sqlite-KNNS6DCM.js} +6 -5
- package/dist/bundle/{oauth-7SQIPMOY.js → oauth-KWUABBSQ.js} +7 -6
- package/dist/bundle/{open-W3BN2SIO.js → open-JXMCYCIV.js} +5 -4
- package/dist/bundle/{openai-LQTK3ZMC.js → openai-HL3IR4VT.js} +15 -14
- package/dist/bundle/{process-U2P5Z6UF.js → process-K2FICLWY.js} +1 -1
- package/dist/bundle/{program-DIPSLR6O.js → program-IFOMT4JS.js} +70 -57
- package/dist/bundle/{prompt-GESHKSM5.js → prompt-HVD3Q77P.js} +5 -4
- package/dist/bundle/{proxy-transport-C2EUUT32.js → proxy-transport-PA5SGMRY.js} +5 -4
- package/dist/bundle/{recognize-FEQTIJET.js → recognize-HHLVETKI.js} +4 -3
- package/dist/bundle/{remote-UXOPBPKS.js → remote-HUAKXJCS.js} +7 -6
- package/dist/bundle/{rerank-L4JM4REK.js → rerank-NWFIV7OF.js} +7 -6
- package/dist/bundle/{serve-DDWW44DB.js → serve-ANUKAJJN.js} +10 -9
- package/dist/bundle/{server-UTWBIZHB.js → server-7Q7WAOHO.js} +37 -34
- package/dist/bundle/server-HCQS4YDQ.js +60 -0
- package/dist/bundle/{state-EV7FGEK4.js → state-Y2AJ5XTP.js} +6 -5
- package/dist/bundle/{store-EXBUF4OG.js → store-S3IG5KWL.js} +15 -11
- package/dist/bundle/store-maintenance-command-V2WC4G6J.js +50 -0
- package/dist/bundle/tg.js +159 -14
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +7 -0
- package/dist/commands/session.js.map +1 -1
- package/dist/telegram/login.d.ts +2 -0
- package/dist/telegram/login.d.ts.map +1 -1
- package/dist/telegram/login.js +31 -2
- package/dist/telegram/login.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -4
- package/skills/tg-cli/SKILL.md +2 -0
- package/dist/bundle/chunk-TRRRRGMI.js +0 -18
- package/dist/bundle/command-contract-SOTDPG22.js +0 -31
- package/dist/bundle/first-run-66KTCVQK.js +0 -24
- package/dist/bundle/first-screen-NY46X6QU.js +0 -29
- package/dist/bundle/identity-GXVKGCNU.js +0 -11
- package/dist/bundle/server-ZI7WDAW6.js +0 -56
- package/dist/bundle/store-maintenance-command-UBZE2Z6T.js +0 -46
- /package/dist/bundle/{chunk-NUN6OGOV.js → chunk-LU3WKZBA.js} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
text,
|
|
14
14
|
time,
|
|
15
15
|
untrusted
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZDIAPICE.js";
|
|
17
17
|
import {
|
|
18
18
|
currentCaller,
|
|
19
19
|
endpointTemplate,
|
|
@@ -24,22 +24,18 @@ import {
|
|
|
24
24
|
providerErrorKey,
|
|
25
25
|
renderEvent,
|
|
26
26
|
runContextOf
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-JJMQA272.js";
|
|
28
28
|
import {
|
|
29
29
|
permissionCeiling
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-PPSUA3IZ.js";
|
|
31
31
|
import {
|
|
32
32
|
envName,
|
|
33
33
|
readOnlyLockOf,
|
|
34
34
|
readOnlyRefusal
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-TZVL4U7U.js";
|
|
36
36
|
import {
|
|
37
37
|
carries
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import {
|
|
40
|
-
filesPresent,
|
|
41
|
-
sharedModelsDirectory
|
|
42
|
-
} from "./chunk-HA35XN2Z.js";
|
|
38
|
+
} from "./chunk-N6TIFJHW.js";
|
|
43
39
|
import {
|
|
44
40
|
FACT_STATUSES,
|
|
45
41
|
FACT_TYPES,
|
|
@@ -50,8 +46,6 @@ import {
|
|
|
50
46
|
MEMORY_KINDS,
|
|
51
47
|
MEMORY_SCOPES,
|
|
52
48
|
MEMORY_STATUSES,
|
|
53
|
-
PAYMENT_DIRECTIONS,
|
|
54
|
-
PAYMENT_STATES,
|
|
55
49
|
PRIORITY_LABELS,
|
|
56
50
|
QUERY_BACKENDS,
|
|
57
51
|
RELATION_KINDS,
|
|
@@ -65,6 +59,7 @@ import {
|
|
|
65
59
|
describeQuery,
|
|
66
60
|
event,
|
|
67
61
|
meeting,
|
|
62
|
+
meetingCounts,
|
|
68
63
|
meetingDetails,
|
|
69
64
|
meetingHit,
|
|
70
65
|
meetingLink,
|
|
@@ -76,41 +71,42 @@ import {
|
|
|
76
71
|
meetingStats,
|
|
77
72
|
meetingSummary,
|
|
78
73
|
meetingTranscript
|
|
79
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-QGL2UGML.js";
|
|
80
75
|
import {
|
|
81
76
|
sharedConfigPath
|
|
82
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-VQPLHOVQ.js";
|
|
78
|
+
import {
|
|
79
|
+
filesPresent,
|
|
80
|
+
sharedModelsDirectory
|
|
81
|
+
} from "./chunk-T7CDLV33.js";
|
|
83
82
|
import {
|
|
84
83
|
storePath
|
|
85
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-RSDIPQXP.js";
|
|
86
85
|
import {
|
|
87
86
|
configFilePath,
|
|
88
87
|
createRecordLog,
|
|
89
88
|
createRenderer,
|
|
90
|
-
|
|
89
|
+
defineLogEvents,
|
|
91
90
|
fieldsOf,
|
|
92
91
|
processStreams,
|
|
93
92
|
projectFields,
|
|
94
93
|
resolvePaths,
|
|
95
94
|
saveConfigFile,
|
|
96
|
-
|
|
97
|
-
visibleControls,
|
|
95
|
+
traceIdOf,
|
|
98
96
|
writeSecurely
|
|
99
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-OX6EWGSG.js";
|
|
100
98
|
import {
|
|
101
99
|
COMPACT_FLAG,
|
|
102
|
-
CliError,
|
|
103
100
|
MAX_NEXT_STEPS,
|
|
104
101
|
STEPS,
|
|
105
102
|
array,
|
|
106
103
|
boolean,
|
|
107
104
|
check,
|
|
108
|
-
defineLogEvents,
|
|
109
105
|
defineSteps,
|
|
110
106
|
effectsSchema,
|
|
107
|
+
exitCodeOfAnswer,
|
|
111
108
|
getDotPath,
|
|
112
109
|
integer,
|
|
113
|
-
isCliError,
|
|
114
110
|
isoDate,
|
|
115
111
|
isoTime,
|
|
116
112
|
itemEnvelopeSchema,
|
|
@@ -144,19 +140,24 @@ import {
|
|
|
144
140
|
stepOf,
|
|
145
141
|
strictObject,
|
|
146
142
|
string,
|
|
147
|
-
traceIdOf,
|
|
148
143
|
trim,
|
|
149
144
|
union,
|
|
150
145
|
unknown,
|
|
151
146
|
unwrap,
|
|
152
147
|
variant,
|
|
153
148
|
writes
|
|
154
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-76CX2YPT.js";
|
|
150
|
+
import {
|
|
151
|
+
CliError,
|
|
152
|
+
isCliError,
|
|
153
|
+
singleLine,
|
|
154
|
+
visibleControls
|
|
155
|
+
} from "./chunk-EB2IULWB.js";
|
|
155
156
|
import {
|
|
156
157
|
__name
|
|
157
158
|
} from "./chunk-ZVVMGPBJ.js";
|
|
158
159
|
|
|
159
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
160
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.1_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
|
|
160
161
|
var labels = /* @__PURE__ */ new WeakMap();
|
|
161
162
|
var annotate = /* @__PURE__ */ __name((command, meta) => {
|
|
162
163
|
labels.set(command, { ...labels.get(command), ...meta });
|
|
@@ -3657,7 +3658,7 @@ __name(useColor, "useColor");
|
|
|
3657
3658
|
// node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
|
|
3658
3659
|
var program = new Command();
|
|
3659
3660
|
|
|
3660
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3661
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.1_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
|
|
3661
3662
|
import { isDeepStrictEqual } from "node:util";
|
|
3662
3663
|
var protectedCommands = /* @__PURE__ */ new WeakMap();
|
|
3663
3664
|
var hasSharedContract = /* @__PURE__ */ __name((command) => protectedCommands.has(command), "hasSharedContract");
|
|
@@ -3859,7 +3860,7 @@ var customizeSharedCommand = /* @__PURE__ */ __name((reference2, reason, build,
|
|
|
3859
3860
|
return command;
|
|
3860
3861
|
}, "customizeSharedCommand");
|
|
3861
3862
|
|
|
3862
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3863
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.1_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
|
|
3863
3864
|
var argumentInfoSchema = object({
|
|
3864
3865
|
name: string(),
|
|
3865
3866
|
required: boolean(),
|
|
@@ -3933,7 +3934,7 @@ var commandsDocumentSchema = strictObject({
|
|
|
3933
3934
|
exit_codes: record(string(), pipe(number(), integer()))
|
|
3934
3935
|
});
|
|
3935
3936
|
|
|
3936
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3937
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.1_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
|
|
3937
3938
|
var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
3938
3939
|
let command = root;
|
|
3939
3940
|
const path2 = [];
|
|
@@ -3951,11 +3952,11 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
|
3951
3952
|
}
|
|
3952
3953
|
}, "refuseJoinedPath");
|
|
3953
3954
|
|
|
3954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/sends/guarded.js
|
|
3955
3956
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3956
|
-
var sentIds = /* @__PURE__ */ __name((
|
|
3957
|
+
var sentIds = /* @__PURE__ */ __name((typed2, message2) => ({
|
|
3957
3958
|
messageId: message2.id,
|
|
3958
|
-
...message2.chatId && message2.chatId !==
|
|
3959
|
+
...message2.chatId && message2.chatId !== typed2 ? { resultChatId: message2.chatId } : {}
|
|
3959
3960
|
}), "sentIds");
|
|
3960
3961
|
var current = new AsyncLocalStorage();
|
|
3961
3962
|
var writesInFlight = new AsyncLocalStorage();
|
|
@@ -4057,7 +4058,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
4057
4058
|
}, "guardedWrite");
|
|
4058
4059
|
var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
|
|
4059
4060
|
|
|
4060
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/result-fields.js
|
|
4061
4062
|
var named = /* @__PURE__ */ __name((work) => {
|
|
4062
4063
|
try {
|
|
4063
4064
|
return work();
|
|
@@ -4084,7 +4085,7 @@ var projectFields2 = /* @__PURE__ */ __name((value, fields) => named(() => {
|
|
|
4084
4085
|
return projectFields(value, fields);
|
|
4085
4086
|
}), "projectFields");
|
|
4086
4087
|
|
|
4087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/execution.js
|
|
4088
4089
|
var DEFAULT_COMMAND_MS = 3e4;
|
|
4089
4090
|
var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
|
|
4090
4091
|
var DEFAULT_SYNC_MS = 15 * 6e4;
|
|
@@ -4190,6 +4191,7 @@ var execution = /* @__PURE__ */ __name((streams, { timeoutMs, fields, maxOutputB
|
|
|
4190
4191
|
reason: "output.too-large",
|
|
4191
4192
|
max_bytes: maxOutputBytes,
|
|
4192
4193
|
emitted_bytes: bytes,
|
|
4194
|
+
needed_bytes: bytes + size,
|
|
4193
4195
|
partial_output: bytes > 0
|
|
4194
4196
|
});
|
|
4195
4197
|
bytes += size;
|
|
@@ -4266,7 +4268,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
|
|
|
4266
4268
|
}
|
|
4267
4269
|
}, "withAbort");
|
|
4268
4270
|
|
|
4269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/sends/permissions.js
|
|
4270
4272
|
var LEVELS = ["deny", "readonly", "ask", "allow"];
|
|
4271
4273
|
var DANGEROUS = /* @__PURE__ */ new Set(["messages.delete", "bot.messages.delete", "topics.delete", "chats.delete", "chats.clear"]);
|
|
4272
4274
|
var skipFlagFor = /* @__PURE__ */ __name((key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes", "skipFlagFor");
|
|
@@ -4512,6 +4514,7 @@ var NAMED_WRITE_KEYS = [
|
|
|
4512
4514
|
"mentions.reject",
|
|
4513
4515
|
"tags.add",
|
|
4514
4516
|
"tags.remove",
|
|
4517
|
+
"tasks.acknowledge",
|
|
4515
4518
|
"tasks.add",
|
|
4516
4519
|
"tasks.claim",
|
|
4517
4520
|
"tasks.close",
|
|
@@ -4661,29 +4664,118 @@ var assertRetentionEvidenceRead = /* @__PURE__ */ __name((permissions) => {
|
|
|
4661
4664
|
}
|
|
4662
4665
|
}, "assertRetentionEvidenceRead");
|
|
4663
4666
|
|
|
4664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4667
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/bot/registry.js
|
|
4665
4668
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
4666
4669
|
import { join } from "node:path";
|
|
4667
|
-
var
|
|
4670
|
+
var botsDirectory = /* @__PURE__ */ __name((app, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "bots"), "botsDirectory");
|
|
4671
|
+
var botFiles = /* @__PURE__ */ __name((app, profile, env = process.env) => {
|
|
4672
|
+
const directory = botsDirectory(app, env);
|
|
4673
|
+
return {
|
|
4674
|
+
registry: join(directory, `${profile}.json`),
|
|
4675
|
+
recipients: join(directory, "recipients", `${profile}.json`),
|
|
4676
|
+
journal: join(directory, "sends", `${profile}.jsonl`),
|
|
4677
|
+
updates: join(directory, "updates", `${profile}.json`),
|
|
4678
|
+
presses: join(directory, "presses", `${profile}.json`),
|
|
4679
|
+
checks: join(directory, "checks", `${profile}.json`)
|
|
4680
|
+
};
|
|
4681
|
+
}, "botFiles");
|
|
4682
|
+
var ChatRegistry = class {
|
|
4683
|
+
static {
|
|
4684
|
+
__name(this, "ChatRegistry");
|
|
4685
|
+
}
|
|
4686
|
+
#path;
|
|
4687
|
+
constructor(app, profile, env = process.env) {
|
|
4688
|
+
this.#path = botFiles(app, profile, env).registry;
|
|
4689
|
+
}
|
|
4690
|
+
list(filter = {}) {
|
|
4691
|
+
const { chats } = this.#read();
|
|
4692
|
+
return (Array.isArray(chats) ? chats : []).filter((chat2) => (filter.id === void 0 || chat2.id === filter.id) && (filter.kind === void 0 || chat2.kind === filter.kind) && (filter.title === void 0 || chat2.title?.toLocaleLowerCase() === filter.title?.toLocaleLowerCase()));
|
|
4693
|
+
}
|
|
4694
|
+
/** The bot's own user id, once any command has learned it — the key its messages are stored under. */
|
|
4695
|
+
botId() {
|
|
4696
|
+
const { botId } = this.#read();
|
|
4697
|
+
return typeof botId === "string" ? botId : void 0;
|
|
4698
|
+
}
|
|
4699
|
+
rememberBot(id6) {
|
|
4700
|
+
const file = this.#read();
|
|
4701
|
+
if (file.botId !== id6)
|
|
4702
|
+
this.#write({ ...file, botId: id6 });
|
|
4703
|
+
}
|
|
4704
|
+
/** Makes this bot known to `bot list` before it has seen any chat. */
|
|
4705
|
+
touch() {
|
|
4706
|
+
if (!existsSync(this.#path))
|
|
4707
|
+
writeSecurely(this.#path, `${JSON.stringify({ chats: [] }, null, 2)}
|
|
4708
|
+
`, 384);
|
|
4709
|
+
}
|
|
4710
|
+
/** Newer facts win; a chat seen only as an id keeps the title it had. */
|
|
4711
|
+
observe(chats, now = /* @__PURE__ */ new Date()) {
|
|
4712
|
+
if (chats.length === 0)
|
|
4713
|
+
return;
|
|
4714
|
+
const byId = new Map(this.list().map((chat2) => [chat2.id, chat2]));
|
|
4715
|
+
const at2 = now.toISOString();
|
|
4716
|
+
for (const chat2 of chats) {
|
|
4717
|
+
const known = byId.get(chat2.id);
|
|
4718
|
+
const defined = Object.fromEntries(Object.entries(chat2).filter(([, value]) => value !== void 0 && value !== null));
|
|
4719
|
+
byId.set(chat2.id, {
|
|
4720
|
+
title: null,
|
|
4721
|
+
kind: "unknown",
|
|
4722
|
+
unreadCount: null,
|
|
4723
|
+
lastMessageAt: null,
|
|
4724
|
+
participantsCount: null,
|
|
4725
|
+
...known,
|
|
4726
|
+
...defined,
|
|
4727
|
+
id: chat2.id,
|
|
4728
|
+
firstSeenAt: known?.firstSeenAt ?? at2,
|
|
4729
|
+
lastSeenAt: at2
|
|
4730
|
+
});
|
|
4731
|
+
}
|
|
4732
|
+
this.#write({ ...this.#read(), chats: [...byId.values()] });
|
|
4733
|
+
}
|
|
4734
|
+
#read() {
|
|
4735
|
+
if (!existsSync(this.#path))
|
|
4736
|
+
return {};
|
|
4737
|
+
try {
|
|
4738
|
+
const parsed = JSON.parse(readFileSync(this.#path, "utf8"));
|
|
4739
|
+
return parsed && typeof parsed === "object" ? parsed : {};
|
|
4740
|
+
} catch {
|
|
4741
|
+
return {};
|
|
4742
|
+
}
|
|
4743
|
+
}
|
|
4744
|
+
#write(file) {
|
|
4745
|
+
writeSecurely(this.#path, `${JSON.stringify(file, null, 2)}
|
|
4746
|
+
`, 384);
|
|
4747
|
+
}
|
|
4748
|
+
};
|
|
4749
|
+
var registryProfiles = /* @__PURE__ */ __name((app, env = process.env) => {
|
|
4750
|
+
const directory = botsDirectory(app, env);
|
|
4751
|
+
if (!existsSync(directory))
|
|
4752
|
+
return [];
|
|
4753
|
+
return readdirSync(directory, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => entry.name).map((name) => name.slice(0, -".json".length));
|
|
4754
|
+
}, "registryProfiles");
|
|
4755
|
+
|
|
4756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
|
|
4757
|
+
import { existsSync as existsSync2, readdirSync as readdirSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
4758
|
+
import { join as join2 } from "node:path";
|
|
4759
|
+
var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
|
|
4668
4760
|
var rememberAccount = /* @__PURE__ */ __name((app, profile, id6, env) => writeSecurely(accountFileFor(app, profile, env), `${JSON.stringify({ account: id6 })}
|
|
4669
4761
|
`, 384), "rememberAccount");
|
|
4670
4762
|
var recalledAccount = /* @__PURE__ */ __name((app, provider, profile, env) => {
|
|
4671
4763
|
try {
|
|
4672
|
-
const { account: account2 } = JSON.parse(
|
|
4764
|
+
const { account: account2 } = JSON.parse(readFileSync2(accountFileFor(app, profile, env), "utf8"));
|
|
4673
4765
|
return typeof account2 === "string" ? { provider, account: account2 } : void 0;
|
|
4674
4766
|
} catch {
|
|
4675
4767
|
return void 0;
|
|
4676
4768
|
}
|
|
4677
4769
|
}, "recalledAccount");
|
|
4678
4770
|
var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
|
|
4679
|
-
const dir =
|
|
4680
|
-
if (!
|
|
4771
|
+
const dir = join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts");
|
|
4772
|
+
if (!existsSync2(dir))
|
|
4681
4773
|
return [];
|
|
4682
|
-
return
|
|
4774
|
+
return readdirSync2(dir).filter((name) => name.endsWith(".json")).map((name) => name.slice(0, -".json".length));
|
|
4683
4775
|
}, "profilesWithAccounts");
|
|
4684
4776
|
var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
|
|
4685
4777
|
|
|
4686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/output-detail.js
|
|
4687
4779
|
var RARELY_SET = ["editedAt", "replyTo", "forwardedFrom", "reactions"];
|
|
4688
4780
|
var BRIEF = ["locator", "chatTitle", "timestamp", "senderName", "excerpt", "score"];
|
|
4689
4781
|
var SNAKE_BRIEF = ["ref", "chat_title", "timestamp", "sender_name", "excerpt", "score"];
|
|
@@ -4719,7 +4811,7 @@ var atDetail = /* @__PURE__ */ __name((value, detail = "default") => {
|
|
|
4719
4811
|
return value;
|
|
4720
4812
|
}, "atDetail");
|
|
4721
4813
|
|
|
4722
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/output.js
|
|
4723
4815
|
var refuseCompact = /* @__PURE__ */ __name(({ json, jsonl, fields, hitDetail }) => {
|
|
4724
4816
|
const other = jsonl ? "--jsonl" : fields !== void 0 ? "--json=\u2026" : json ? "--json" : hitDetail === "brief" ? "--brief" : "";
|
|
4725
4817
|
if (other)
|
|
@@ -4783,7 +4875,7 @@ var silence = /* @__PURE__ */ __name((renderer) => ({
|
|
|
4783
4875
|
}, "warn")
|
|
4784
4876
|
}), "silence");
|
|
4785
4877
|
|
|
4786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/runs/log-events.js
|
|
4787
4879
|
var CORE_LOG_EVENTS = defineLogEvents([
|
|
4788
4880
|
{ id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
|
|
4789
4881
|
{ id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
|
|
@@ -4817,7 +4909,7 @@ var DIAGNOSTIC_LOG_EVENTS = {
|
|
|
4817
4909
|
cache: "cache.answered"
|
|
4818
4910
|
};
|
|
4819
4911
|
|
|
4820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
|
|
4821
4913
|
var snake2 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
4822
4914
|
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
4823
4915
|
var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
|
|
@@ -4830,13 +4922,13 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
|
4830
4922
|
error: /* @__PURE__ */ __name((event2, message2) => logger.error(logAttributes(event2), message2), "error")
|
|
4831
4923
|
}), "snakeLogger");
|
|
4832
4924
|
|
|
4833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
4834
4926
|
import { randomUUID } from "node:crypto";
|
|
4835
|
-
import { appendFileSync, mkdirSync, readdirSync as
|
|
4927
|
+
import { appendFileSync, mkdirSync, readdirSync as readdirSync3, readFileSync as readFileSync3, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4836
4928
|
import { userInfo } from "node:os";
|
|
4837
|
-
import { join as
|
|
4929
|
+
import { join as join3, sep } from "node:path";
|
|
4838
4930
|
|
|
4839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4931
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
4840
4932
|
var diagnostic = {
|
|
4841
4933
|
event: true,
|
|
4842
4934
|
operation: true,
|
|
@@ -4906,16 +4998,16 @@ var LOG_ATTRIBUTES = [
|
|
|
4906
4998
|
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
4907
4999
|
].sort();
|
|
4908
5000
|
|
|
4909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5001
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
4910
5002
|
var KEEP_RUNS_FOR_DAYS = 30;
|
|
4911
5003
|
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
4912
5004
|
var RUNS_SIZE_LIMIT_MB = 200;
|
|
4913
|
-
var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) =>
|
|
5005
|
+
var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "runs"), "runsDirFor");
|
|
4914
5006
|
var startRun = /* @__PURE__ */ __name((options) => {
|
|
4915
5007
|
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
4916
5008
|
const startedAt = options.startedAt ?? now();
|
|
4917
5009
|
const id6 = options.runId ?? newRunId(startedAt, options.command);
|
|
4918
|
-
const dir =
|
|
5010
|
+
const dir = join3(options.runsDir, day(startedAt), id6);
|
|
4919
5011
|
pruneRuns(options.runsDir, {
|
|
4920
5012
|
keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
|
|
4921
5013
|
keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
@@ -4941,7 +5033,7 @@ var startRun = /* @__PURE__ */ __name((options) => {
|
|
|
4941
5033
|
if (file)
|
|
4942
5034
|
return file;
|
|
4943
5035
|
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
4944
|
-
const events2 =
|
|
5036
|
+
const events2 = join3(dir, "events.jsonl");
|
|
4945
5037
|
writeFileSync(events2, "", { flag: "a", mode: 384 });
|
|
4946
5038
|
file = snakeLogger(createRecordLog({
|
|
4947
5039
|
to: events2,
|
|
@@ -4996,8 +5088,8 @@ var startRun = /* @__PURE__ */ __name((options) => {
|
|
|
4996
5088
|
return;
|
|
4997
5089
|
}
|
|
4998
5090
|
try {
|
|
4999
|
-
mkdirSync(
|
|
5000
|
-
appendIndex(
|
|
5091
|
+
mkdirSync(join3(dir, ".."), { recursive: true, mode: 448 });
|
|
5092
|
+
appendIndex(join3(dir, ".."), runFileOf(final));
|
|
5001
5093
|
} catch (error) {
|
|
5002
5094
|
options.onError?.(error);
|
|
5003
5095
|
}
|
|
@@ -5013,7 +5105,7 @@ var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) =>
|
|
|
5013
5105
|
} catch {
|
|
5014
5106
|
return;
|
|
5015
5107
|
}
|
|
5016
|
-
if (dir.startsWith(
|
|
5108
|
+
if (dir.startsWith(join3(home, ".local", "share") + sep))
|
|
5017
5109
|
throw new Error(`a test opened a run in the real data folder: ${dir}`);
|
|
5018
5110
|
}, "refuseRealStateInTests");
|
|
5019
5111
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -5027,15 +5119,15 @@ var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
|
|
|
5027
5119
|
}, "newRunId");
|
|
5028
5120
|
var INDEX = "index.jsonl";
|
|
5029
5121
|
var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
|
|
5030
|
-
appendFileSync(
|
|
5122
|
+
appendFileSync(join3(dayDir, INDEX), `${JSON.stringify(written)}
|
|
5031
5123
|
`, { mode: 384 });
|
|
5032
5124
|
}, "appendIndex");
|
|
5033
5125
|
var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
|
|
5034
5126
|
const written = runFileOf(metadata);
|
|
5035
|
-
writeSecurely(
|
|
5127
|
+
writeSecurely(join3(dir, "run.json"), `${JSON.stringify(written, null, 2)}
|
|
5036
5128
|
`, 384);
|
|
5037
5129
|
try {
|
|
5038
|
-
appendIndex(
|
|
5130
|
+
appendIndex(join3(dir, ".."), written);
|
|
5039
5131
|
} catch {
|
|
5040
5132
|
}
|
|
5041
5133
|
}, "writeRunFile");
|
|
@@ -5046,7 +5138,7 @@ var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITI
|
|
|
5046
5138
|
for (const date of days(runsDir).sort().reverse()) {
|
|
5047
5139
|
if (first2 !== void 0 && date < first2 || runs.length >= atLeast)
|
|
5048
5140
|
break;
|
|
5049
|
-
for (const metadata of runsOfDay(
|
|
5141
|
+
for (const metadata of runsOfDay(join3(runsDir, date))) {
|
|
5050
5142
|
if (matchesListFilter(metadata, filter))
|
|
5051
5143
|
runs.push(metadata);
|
|
5052
5144
|
}
|
|
@@ -5057,7 +5149,7 @@ var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5057
5149
|
const latest = /* @__PURE__ */ new Map();
|
|
5058
5150
|
let raw = "";
|
|
5059
5151
|
try {
|
|
5060
|
-
raw =
|
|
5152
|
+
raw = readFileSync3(join3(dayDir, INDEX), "utf8");
|
|
5061
5153
|
} catch {
|
|
5062
5154
|
}
|
|
5063
5155
|
for (const line of raw.split("\n")) {
|
|
@@ -5077,7 +5169,7 @@ var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5077
5169
|
for (const entry of safeReaddir(dayDir)) {
|
|
5078
5170
|
if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
|
|
5079
5171
|
continue;
|
|
5080
|
-
const metadata = readRun(
|
|
5172
|
+
const metadata = readRun(join3(dayDir, entry));
|
|
5081
5173
|
if (metadata)
|
|
5082
5174
|
latest.set(metadata.runId, metadata);
|
|
5083
5175
|
}
|
|
@@ -5088,22 +5180,22 @@ var findRun = /* @__PURE__ */ __name((runsDir, id6) => {
|
|
|
5088
5180
|
const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
|
|
5089
5181
|
const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
|
|
5090
5182
|
for (const date of dates) {
|
|
5091
|
-
const dir =
|
|
5183
|
+
const dir = join3(runsDir, date, id6);
|
|
5092
5184
|
const metadata = readRun(dir);
|
|
5093
5185
|
if (metadata)
|
|
5094
5186
|
return { dir, metadata };
|
|
5095
5187
|
}
|
|
5096
5188
|
for (const date of dates) {
|
|
5097
|
-
const metadata = indexedRuns(
|
|
5189
|
+
const metadata = indexedRuns(join3(runsDir, date)).get(id6);
|
|
5098
5190
|
if (metadata)
|
|
5099
|
-
return { dir:
|
|
5191
|
+
return { dir: join3(runsDir, date, id6), metadata };
|
|
5100
5192
|
}
|
|
5101
5193
|
return void 0;
|
|
5102
5194
|
}, "findRun");
|
|
5103
5195
|
var readEvents = /* @__PURE__ */ __name((dir) => {
|
|
5104
5196
|
let raw;
|
|
5105
5197
|
try {
|
|
5106
|
-
raw =
|
|
5198
|
+
raw = readFileSync3(join3(dir, "events.jsonl"), "utf8");
|
|
5107
5199
|
} catch {
|
|
5108
5200
|
return [];
|
|
5109
5201
|
}
|
|
@@ -5133,11 +5225,11 @@ var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = k
|
|
|
5133
5225
|
for (const date of days(runsDir)) {
|
|
5134
5226
|
if (date >= cutoff) {
|
|
5135
5227
|
if (date < successCutoff)
|
|
5136
|
-
dropSuccesses(
|
|
5228
|
+
dropSuccesses(join3(runsDir, date));
|
|
5137
5229
|
continue;
|
|
5138
5230
|
}
|
|
5139
5231
|
try {
|
|
5140
|
-
rmSync(
|
|
5232
|
+
rmSync(join3(runsDir, date), { recursive: true, force: true });
|
|
5141
5233
|
removed += 1;
|
|
5142
5234
|
} catch {
|
|
5143
5235
|
}
|
|
@@ -5150,7 +5242,7 @@ var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
|
5150
5242
|
var SUCCESSES_DROPPED = ".successes-dropped";
|
|
5151
5243
|
var SIZE_CHECKED = ".size-checked";
|
|
5152
5244
|
var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
5153
|
-
const marker =
|
|
5245
|
+
const marker = join3(dayDir, SUCCESSES_DROPPED);
|
|
5154
5246
|
try {
|
|
5155
5247
|
statSync(marker);
|
|
5156
5248
|
return;
|
|
@@ -5160,17 +5252,17 @@ var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5160
5252
|
const kept = [];
|
|
5161
5253
|
for (const [id6, metadata] of indexedRuns(dayDir)) {
|
|
5162
5254
|
if (metadata.status === "success")
|
|
5163
|
-
rmSync(
|
|
5255
|
+
rmSync(join3(dayDir, id6), { recursive: true, force: true });
|
|
5164
5256
|
else
|
|
5165
5257
|
kept.push(JSON.stringify(runFileOf(metadata)));
|
|
5166
5258
|
}
|
|
5167
5259
|
for (const entry of safeReaddir(dayDir)) {
|
|
5168
5260
|
if (entry === INDEX || entry.startsWith("."))
|
|
5169
5261
|
continue;
|
|
5170
|
-
if (readRun(
|
|
5171
|
-
rmSync(
|
|
5262
|
+
if (readRun(join3(dayDir, entry))?.status === "success")
|
|
5263
|
+
rmSync(join3(dayDir, entry), { recursive: true, force: true });
|
|
5172
5264
|
}
|
|
5173
|
-
writeSecurely(
|
|
5265
|
+
writeSecurely(join3(dayDir, INDEX), kept.map((line) => `${line}
|
|
5174
5266
|
`).join(""), 384);
|
|
5175
5267
|
writeFileSync(marker, "", { mode: 384 });
|
|
5176
5268
|
} catch {
|
|
@@ -5179,7 +5271,7 @@ var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5179
5271
|
var sizeOf = /* @__PURE__ */ __name((path2) => {
|
|
5180
5272
|
let total = 0;
|
|
5181
5273
|
for (const entry of safeReaddir(path2)) {
|
|
5182
|
-
const full =
|
|
5274
|
+
const full = join3(path2, entry);
|
|
5183
5275
|
try {
|
|
5184
5276
|
const stat = statSync(full);
|
|
5185
5277
|
total += stat.isDirectory() ? sizeOf(full) : stat.size;
|
|
@@ -5189,22 +5281,22 @@ var sizeOf = /* @__PURE__ */ __name((path2) => {
|
|
|
5189
5281
|
return total;
|
|
5190
5282
|
}, "sizeOf");
|
|
5191
5283
|
var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
5192
|
-
const stamp =
|
|
5284
|
+
const stamp = join3(runsDir, SIZE_CHECKED);
|
|
5193
5285
|
const today = day(now);
|
|
5194
5286
|
try {
|
|
5195
|
-
if (
|
|
5287
|
+
if (readFileSync3(stamp, "utf8").trim() === today)
|
|
5196
5288
|
return 0;
|
|
5197
5289
|
} catch {
|
|
5198
5290
|
}
|
|
5199
5291
|
const dates = days(runsDir).sort();
|
|
5200
|
-
const sizes = new Map(dates.map((date) => [date, sizeOf(
|
|
5292
|
+
const sizes = new Map(dates.map((date) => [date, sizeOf(join3(runsDir, date))]));
|
|
5201
5293
|
let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
|
|
5202
5294
|
let removed = 0;
|
|
5203
5295
|
for (const date of dates) {
|
|
5204
5296
|
if (total <= maxBytes || date === today)
|
|
5205
5297
|
break;
|
|
5206
|
-
dropSuccesses(
|
|
5207
|
-
const after = sizeOf(
|
|
5298
|
+
dropSuccesses(join3(runsDir, date));
|
|
5299
|
+
const after = sizeOf(join3(runsDir, date));
|
|
5208
5300
|
total -= (sizes.get(date) ?? 0) - after;
|
|
5209
5301
|
sizes.set(date, after);
|
|
5210
5302
|
}
|
|
@@ -5212,7 +5304,7 @@ var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
|
5212
5304
|
if (total <= maxBytes || date === today)
|
|
5213
5305
|
break;
|
|
5214
5306
|
try {
|
|
5215
|
-
rmSync(
|
|
5307
|
+
rmSync(join3(runsDir, date), { recursive: true, force: true });
|
|
5216
5308
|
total -= sizes.get(date) ?? 0;
|
|
5217
5309
|
removed += 1;
|
|
5218
5310
|
} catch {
|
|
@@ -5229,14 +5321,14 @@ var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day
|
|
|
5229
5321
|
var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
|
|
5230
5322
|
var readRun = /* @__PURE__ */ __name((dir) => {
|
|
5231
5323
|
try {
|
|
5232
|
-
return metadataOf(JSON.parse(
|
|
5324
|
+
return metadataOf(JSON.parse(readFileSync3(join3(dir, "run.json"), "utf8")));
|
|
5233
5325
|
} catch {
|
|
5234
5326
|
return void 0;
|
|
5235
5327
|
}
|
|
5236
5328
|
}, "readRun");
|
|
5237
5329
|
var safeReaddir = /* @__PURE__ */ __name((dir) => {
|
|
5238
5330
|
try {
|
|
5239
|
-
return
|
|
5331
|
+
return readdirSync3(dir);
|
|
5240
5332
|
} catch {
|
|
5241
5333
|
return [];
|
|
5242
5334
|
}
|
|
@@ -5259,7 +5351,7 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
|
5259
5351
|
};
|
|
5260
5352
|
}, "metadataOf");
|
|
5261
5353
|
|
|
5262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5354
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
5263
5355
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
5264
5356
|
import { randomBytes } from "node:crypto";
|
|
5265
5357
|
var scopes = new AsyncLocalStorage2();
|
|
@@ -5297,7 +5389,7 @@ var attempts = new AsyncLocalStorage2();
|
|
|
5297
5389
|
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
5298
5390
|
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
5299
5391
|
|
|
5300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/runs/recording.js
|
|
5301
5393
|
var recorded = /* @__PURE__ */ __name(async (options, body) => {
|
|
5302
5394
|
const recording = startRecording(options);
|
|
5303
5395
|
try {
|
|
@@ -5482,9 +5574,9 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
|
|
|
5482
5574
|
return void 0;
|
|
5483
5575
|
}, "partialOutcome");
|
|
5484
5576
|
|
|
5485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5486
|
-
var withDeadline = /* @__PURE__ */ __name(async (
|
|
5487
|
-
if (
|
|
5577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/deadline.js
|
|
5578
|
+
var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
|
|
5579
|
+
if (ms2 === void 0)
|
|
5488
5580
|
return body();
|
|
5489
5581
|
let timer2;
|
|
5490
5582
|
let timedOut;
|
|
@@ -5493,10 +5585,10 @@ var withDeadline = /* @__PURE__ */ __name(async (ms, closeables, body) => {
|
|
|
5493
5585
|
timer2 = setTimeout(() => {
|
|
5494
5586
|
const pending = [...writes2];
|
|
5495
5587
|
const cut2 = pending.filter((write) => !write.preparing);
|
|
5496
|
-
timedOut = cut2.length > 0 ? new CliError("outcome_unknown", `\`--timeout\` ended the command after ${
|
|
5588
|
+
timedOut = cut2.length > 0 ? new CliError("outcome_unknown", `\`--timeout\` ended the command after ${ms2}ms with ${cut2.length === 1 ? "a write" : `${cut2.length} writes`} in flight; the messenger may or may not have carried it out \u2014 check before repeating it`, { operation_ids: cut2.map((write) => write.operationId), retryable: false }) : new CliError("timeout", `the command did not finish within ${ms2}ms \u2014 \`--timeout\` ended it`);
|
|
5497
5589
|
stopWrites(writes2, timedOut);
|
|
5498
5590
|
void Promise.allSettled(closeables.map((closeable) => closeable.close())).then(() => reject(timedOut));
|
|
5499
|
-
},
|
|
5591
|
+
}, ms2);
|
|
5500
5592
|
});
|
|
5501
5593
|
try {
|
|
5502
5594
|
return await Promise.race([withWriteScope(writes2, body), expired]);
|
|
@@ -5508,7 +5600,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms, closeables, body) => {
|
|
|
5508
5600
|
}
|
|
5509
5601
|
}, "withDeadline");
|
|
5510
5602
|
|
|
5511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/profile.js
|
|
5512
5604
|
var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
|
|
5513
5605
|
var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
5514
5606
|
var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
|
|
@@ -5577,10 +5669,10 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
|
|
|
5577
5669
|
return void 0;
|
|
5578
5670
|
}, "sampleCommand");
|
|
5579
5671
|
|
|
5580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5581
|
-
import { existsSync as
|
|
5672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/settings.js
|
|
5673
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
5582
5674
|
|
|
5583
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/models/endpoint.js
|
|
5584
5676
|
var endpoint = /* @__PURE__ */ __name((value) => {
|
|
5585
5677
|
try {
|
|
5586
5678
|
const url2 = new URL(value);
|
|
@@ -5590,7 +5682,7 @@ var endpoint = /* @__PURE__ */ __name((value) => {
|
|
|
5590
5682
|
}
|
|
5591
5683
|
}, "endpoint");
|
|
5592
5684
|
|
|
5593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5685
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/models/settings.js
|
|
5594
5686
|
var MODEL_FIELDS = ["provider", "model", "base_url"];
|
|
5595
5687
|
var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
|
|
5596
5688
|
provider: optional(picklist(["off", "openai", "anthropic"])),
|
|
@@ -5659,7 +5751,7 @@ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
|
|
|
5659
5751
|
};
|
|
5660
5752
|
}, "modelTarget");
|
|
5661
5753
|
|
|
5662
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/analysis/settings.js
|
|
5663
5755
|
var model = pipe(string(), trim(), minLength(1), maxLength(200));
|
|
5664
5756
|
var url = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
|
|
5665
5757
|
var AI_FIELDS = {
|
|
@@ -5703,7 +5795,7 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
|
|
|
5703
5795
|
};
|
|
5704
5796
|
}, "resolveAISettings");
|
|
5705
5797
|
|
|
5706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/domain/duration.js
|
|
5707
5799
|
var DURATION = /^(\d+)(ms|s|m|h|d)$/;
|
|
5708
5800
|
var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
|
|
5709
5801
|
var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
@@ -5711,13 +5803,13 @@ var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
|
5711
5803
|
if (!match?.[1] || !match[2]) {
|
|
5712
5804
|
throw new CliError("validation_error", `${source2} takes a duration with a unit \u2014 500ms, 30s, 2m, 4h or 1d \u2014 not "${value}"`);
|
|
5713
5805
|
}
|
|
5714
|
-
const
|
|
5715
|
-
if (
|
|
5806
|
+
const ms2 = Number(match[1]) * (UNIT_MS[match[2]] ?? 0);
|
|
5807
|
+
if (ms2 <= 0)
|
|
5716
5808
|
throw new CliError("validation_error", `${source2} has to be more than zero, and "${value}" is not`);
|
|
5717
|
-
return
|
|
5809
|
+
return ms2;
|
|
5718
5810
|
}, "parseDuration");
|
|
5719
5811
|
|
|
5720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/embeddings/models.js
|
|
5721
5813
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
5722
5814
|
var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
|
|
5723
5815
|
var gemma = huggingFace("onnx-community/embeddinggemma-300m-ONNX", "5090578d9565bb06545b4552f76e6bc2c93e4a66");
|
|
@@ -5876,7 +5968,7 @@ var rerankModel = /* @__PURE__ */ __name((id6) => {
|
|
|
5876
5968
|
var vectorModelKey = /* @__PURE__ */ __name((model3) => `local:${model3.id}:${model3.dims}`, "vectorModelKey");
|
|
5877
5969
|
var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
|
|
5878
5970
|
|
|
5879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/services/history-limits.js
|
|
5880
5972
|
var HISTORY_MAX_DAYS = 1095;
|
|
5881
5973
|
var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
|
|
5882
5974
|
var DAY_MS2 = 24 * 60 * 60 * 1e3;
|
|
@@ -5923,8 +6015,251 @@ var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now =
|
|
|
5923
6015
|
return { batch: { ...batch, messages }, skipped };
|
|
5924
6016
|
}, "limitBatch");
|
|
5925
6017
|
|
|
5926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5927
|
-
import { readFileSync as
|
|
6018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
|
|
6019
|
+
import { readFileSync as readFileSync4 } from "node:fs";
|
|
6020
|
+
|
|
6021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/config-repair.js
|
|
6022
|
+
var REPAIR_WORDS = {
|
|
6023
|
+
byte_order_mark: "an invisible byte-order mark at the start",
|
|
6024
|
+
comment: "a comment, which JSON does not allow",
|
|
6025
|
+
trailing_comma: "a comma before a closing bracket",
|
|
6026
|
+
missing_comma: "a missing comma",
|
|
6027
|
+
unquoted_key: "a key without double quotes",
|
|
6028
|
+
single_quotes: "text in single quotes",
|
|
6029
|
+
missing_closer: "the file stops before its closing brackets \u2014 whatever followed this line was already lost"
|
|
6030
|
+
};
|
|
6031
|
+
var GiveUp = class {
|
|
6032
|
+
static {
|
|
6033
|
+
__name(this, "GiveUp");
|
|
6034
|
+
}
|
|
6035
|
+
at;
|
|
6036
|
+
why;
|
|
6037
|
+
constructor(at2, why) {
|
|
6038
|
+
this.at = at2;
|
|
6039
|
+
this.why = why;
|
|
6040
|
+
}
|
|
6041
|
+
};
|
|
6042
|
+
var NUMBER = /^-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/;
|
|
6043
|
+
var LITERAL = /^(true|false|null)/;
|
|
6044
|
+
var KEY = /^[A-Za-z_$][\w$.-]*/;
|
|
6045
|
+
var ENDS_VALUE = /^[\s,\]}/]?$/;
|
|
6046
|
+
var repairConfigText = /* @__PURE__ */ __name((text5) => {
|
|
6047
|
+
try {
|
|
6048
|
+
JSON.parse(text5);
|
|
6049
|
+
return { state: "valid" };
|
|
6050
|
+
} catch {
|
|
6051
|
+
}
|
|
6052
|
+
const fixes = [];
|
|
6053
|
+
const lineAt = /* @__PURE__ */ __name((offset) => text5.slice(0, offset).split("\n").length, "lineAt");
|
|
6054
|
+
const fix = /* @__PURE__ */ __name((kind2, offset) => fixes.push({ kind: kind2, line: lineAt(offset) }), "fix");
|
|
6055
|
+
const giveUp = /* @__PURE__ */ __name((why, offset = at2) => {
|
|
6056
|
+
throw new GiveUp(offset, why);
|
|
6057
|
+
}, "giveUp");
|
|
6058
|
+
let at2 = 0;
|
|
6059
|
+
let truncated = false;
|
|
6060
|
+
let last = "open";
|
|
6061
|
+
let lastEnd = 0;
|
|
6062
|
+
const previous = /* @__PURE__ */ __name(() => last, "previous");
|
|
6063
|
+
const skip = /* @__PURE__ */ __name(() => {
|
|
6064
|
+
for (; ; ) {
|
|
6065
|
+
while (/\s/.test(text5[at2] ?? ""))
|
|
6066
|
+
at2++;
|
|
6067
|
+
if (text5.startsWith("//", at2)) {
|
|
6068
|
+
fix("comment", at2);
|
|
6069
|
+
while (at2 < text5.length && text5[at2] !== "\n")
|
|
6070
|
+
at2++;
|
|
6071
|
+
} else if (text5.startsWith("/*", at2)) {
|
|
6072
|
+
const end = text5.indexOf("*/", at2 + 2);
|
|
6073
|
+
if (end < 0)
|
|
6074
|
+
giveUp("a /* comment is never closed");
|
|
6075
|
+
fix("comment", at2);
|
|
6076
|
+
at2 = end + 2;
|
|
6077
|
+
} else
|
|
6078
|
+
return;
|
|
6079
|
+
}
|
|
6080
|
+
}, "skip");
|
|
6081
|
+
const string2 = /* @__PURE__ */ __name(() => {
|
|
6082
|
+
const quote = text5[at2];
|
|
6083
|
+
const start = at2;
|
|
6084
|
+
if (quote === "'")
|
|
6085
|
+
fix("single_quotes", at2);
|
|
6086
|
+
at2++;
|
|
6087
|
+
let body = "";
|
|
6088
|
+
for (; ; ) {
|
|
6089
|
+
if (at2 >= text5.length)
|
|
6090
|
+
giveUp("the file stops inside a quoted text", start);
|
|
6091
|
+
const char = text5[at2];
|
|
6092
|
+
if (char === quote)
|
|
6093
|
+
break;
|
|
6094
|
+
if (text5.charCodeAt(at2) < 32)
|
|
6095
|
+
giveUp("a line break inside a quoted text");
|
|
6096
|
+
if (char === "\\") {
|
|
6097
|
+
const next = text5[at2 + 1] ?? "";
|
|
6098
|
+
if (quote === "'" && next === "'")
|
|
6099
|
+
body += "'";
|
|
6100
|
+
else if (/^["\\/bfnrt]$/.test(next))
|
|
6101
|
+
body += `\\${next}`;
|
|
6102
|
+
else if (next === "u" && /^[0-9a-fA-F]{4}$/.test(text5.slice(at2 + 2, at2 + 6))) {
|
|
6103
|
+
body += text5.slice(at2, at2 + 6);
|
|
6104
|
+
at2 += 4;
|
|
6105
|
+
} else
|
|
6106
|
+
giveUp("an escape JSON has no meaning for");
|
|
6107
|
+
at2 += 2;
|
|
6108
|
+
continue;
|
|
6109
|
+
}
|
|
6110
|
+
body += char === '"' ? '\\"' : char;
|
|
6111
|
+
at2++;
|
|
6112
|
+
}
|
|
6113
|
+
at2++;
|
|
6114
|
+
return JSON.parse(`"${body}"`);
|
|
6115
|
+
}, "string");
|
|
6116
|
+
const key = /* @__PURE__ */ __name(() => {
|
|
6117
|
+
const char = text5[at2] ?? "";
|
|
6118
|
+
if (char === '"' || char === "'")
|
|
6119
|
+
return string2();
|
|
6120
|
+
const word = KEY.exec(text5.slice(at2))?.[0];
|
|
6121
|
+
if (!word)
|
|
6122
|
+
return giveUp("something other than a key where a key should be");
|
|
6123
|
+
fix("unquoted_key", at2);
|
|
6124
|
+
at2 += word.length;
|
|
6125
|
+
return word;
|
|
6126
|
+
}, "key");
|
|
6127
|
+
const scalar = /* @__PURE__ */ __name(() => {
|
|
6128
|
+
const char = text5[at2] ?? "";
|
|
6129
|
+
if (char === '"' || char === "'")
|
|
6130
|
+
return { json: JSON.stringify(string2()) };
|
|
6131
|
+
const word = (NUMBER.exec(text5.slice(at2)) ?? LITERAL.exec(text5.slice(at2)))?.[0];
|
|
6132
|
+
if (!word || !ENDS_VALUE.test(text5[at2 + word.length] ?? ""))
|
|
6133
|
+
return giveUp("a value that is not JSON \u2014 text needs quotes, and only true, false and null go without");
|
|
6134
|
+
if (at2 + word.length === text5.length && NUMBER.test(word))
|
|
6135
|
+
giveUp("the file stops inside a number");
|
|
6136
|
+
at2 += word.length;
|
|
6137
|
+
return { json: word };
|
|
6138
|
+
}, "scalar");
|
|
6139
|
+
const members = /* @__PURE__ */ __name((close, one) => {
|
|
6140
|
+
const out = [];
|
|
6141
|
+
at2++;
|
|
6142
|
+
last = "open";
|
|
6143
|
+
let comma = -1;
|
|
6144
|
+
for (; ; ) {
|
|
6145
|
+
skip();
|
|
6146
|
+
if (truncated)
|
|
6147
|
+
return out;
|
|
6148
|
+
if (at2 >= text5.length) {
|
|
6149
|
+
if (previous() === "close")
|
|
6150
|
+
giveUp("the file stops after a closing bracket, so which brackets are missing has two readings");
|
|
6151
|
+
if (previous() === "comma")
|
|
6152
|
+
fix("trailing_comma", comma);
|
|
6153
|
+
fix("missing_closer", text5.length);
|
|
6154
|
+
truncated = true;
|
|
6155
|
+
return out;
|
|
6156
|
+
}
|
|
6157
|
+
const char = text5[at2];
|
|
6158
|
+
if (char === close) {
|
|
6159
|
+
if (previous() === "comma")
|
|
6160
|
+
fix("trailing_comma", comma);
|
|
6161
|
+
at2++;
|
|
6162
|
+
last = "close";
|
|
6163
|
+
return out;
|
|
6164
|
+
}
|
|
6165
|
+
if (char === "}" || char === "]")
|
|
6166
|
+
giveUp(`a ${char} where ${close} should close`);
|
|
6167
|
+
if (char === ",") {
|
|
6168
|
+
if (previous() !== "value" && previous() !== "close")
|
|
6169
|
+
giveUp("a comma with nothing before it");
|
|
6170
|
+
comma = at2;
|
|
6171
|
+
at2++;
|
|
6172
|
+
last = "comma";
|
|
6173
|
+
continue;
|
|
6174
|
+
}
|
|
6175
|
+
if (previous() === "value" || previous() === "close") {
|
|
6176
|
+
if (lineAt(at2) === lineAt(lastEnd))
|
|
6177
|
+
giveUp("two entries on one line with no comma between them");
|
|
6178
|
+
fix("missing_comma", lastEnd);
|
|
6179
|
+
}
|
|
6180
|
+
out.push(one());
|
|
6181
|
+
}
|
|
6182
|
+
}, "members");
|
|
6183
|
+
const value = /* @__PURE__ */ __name(() => {
|
|
6184
|
+
const char = text5[at2] ?? "";
|
|
6185
|
+
let node;
|
|
6186
|
+
if (char === "{") {
|
|
6187
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6188
|
+
node = {
|
|
6189
|
+
object: members("}", () => {
|
|
6190
|
+
const start = at2;
|
|
6191
|
+
const name = key();
|
|
6192
|
+
if (seen.has(name))
|
|
6193
|
+
giveUp("a key appears twice in one object", start);
|
|
6194
|
+
seen.add(name);
|
|
6195
|
+
skip();
|
|
6196
|
+
if (at2 >= text5.length)
|
|
6197
|
+
giveUp("the file stops after a key, before its value");
|
|
6198
|
+
if (text5[at2] !== ":")
|
|
6199
|
+
giveUp("a key with no colon after it");
|
|
6200
|
+
at2++;
|
|
6201
|
+
skip();
|
|
6202
|
+
if (at2 >= text5.length)
|
|
6203
|
+
giveUp("the file stops after a key, before its value");
|
|
6204
|
+
return [name, value()];
|
|
6205
|
+
})
|
|
6206
|
+
};
|
|
6207
|
+
} else if (char === "[") {
|
|
6208
|
+
node = {
|
|
6209
|
+
array: members("]", () => {
|
|
6210
|
+
return value();
|
|
6211
|
+
})
|
|
6212
|
+
};
|
|
6213
|
+
} else
|
|
6214
|
+
node = scalar();
|
|
6215
|
+
if (!truncated) {
|
|
6216
|
+
last = "json" in node ? "value" : "close";
|
|
6217
|
+
lastEnd = at2;
|
|
6218
|
+
}
|
|
6219
|
+
return node;
|
|
6220
|
+
}, "value");
|
|
6221
|
+
try {
|
|
6222
|
+
if (text5.includes("\0") || text5.includes(String.fromCharCode(65533)))
|
|
6223
|
+
giveUp("the file is not text", 0);
|
|
6224
|
+
if (text5.charCodeAt(0) === 65279) {
|
|
6225
|
+
fix("byte_order_mark", 0);
|
|
6226
|
+
at2 = 1;
|
|
6227
|
+
}
|
|
6228
|
+
skip();
|
|
6229
|
+
if (text5[at2] !== "{")
|
|
6230
|
+
giveUp(at2 >= text5.length ? "the file is empty" : "the file does not start with {");
|
|
6231
|
+
const root = value();
|
|
6232
|
+
skip();
|
|
6233
|
+
if (at2 < text5.length)
|
|
6234
|
+
giveUp("more text after the closing }");
|
|
6235
|
+
const repaired = `${serialise(root, "")}
|
|
6236
|
+
`;
|
|
6237
|
+
JSON.parse(repaired);
|
|
6238
|
+
return { state: "repaired", text: repaired, fixes };
|
|
6239
|
+
} catch (error) {
|
|
6240
|
+
if (!(error instanceof GiveUp))
|
|
6241
|
+
throw error;
|
|
6242
|
+
const before = text5.slice(0, error.at).split("\n");
|
|
6243
|
+
return {
|
|
6244
|
+
state: "refused",
|
|
6245
|
+
line: before.length,
|
|
6246
|
+
column: (before.at(-1)?.length ?? 0) + 1,
|
|
6247
|
+
why: error.why
|
|
6248
|
+
};
|
|
6249
|
+
}
|
|
6250
|
+
}, "repairConfigText");
|
|
6251
|
+
var serialise = /* @__PURE__ */ __name((node, indent) => {
|
|
6252
|
+
if ("json" in node)
|
|
6253
|
+
return node.json;
|
|
6254
|
+
const inner = `${indent} `;
|
|
6255
|
+
const parts = "object" in node ? node.object.map(([name, item]) => `${inner}${JSON.stringify(name)}: ${serialise(item, inner)}`) : node.array.map((item) => `${inner}${serialise(item, inner)}`);
|
|
6256
|
+
const [open, close] = "object" in node ? ["{", "}"] : ["[", "]"];
|
|
6257
|
+
return parts.length === 0 ? `${open}${close}` : `${open}
|
|
6258
|
+
${parts.join(",\n")}
|
|
6259
|
+
${indent}${close}`;
|
|
6260
|
+
}, "serialise");
|
|
6261
|
+
|
|
6262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
|
|
5928
6263
|
var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
5929
6264
|
var SECTIONS = ["personal", "bot"];
|
|
5930
6265
|
var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
|
|
@@ -6170,17 +6505,22 @@ var withoutPath = /* @__PURE__ */ __name((raw, at2) => {
|
|
|
6170
6505
|
return { config: prune(raw, [gone]).pruned, removed: true };
|
|
6171
6506
|
}, "withoutPath");
|
|
6172
6507
|
var publicIssue = /* @__PURE__ */ __name(({ at: _, ...issue }) => issue, "publicIssue");
|
|
6508
|
+
var fixVerb = /* @__PURE__ */ __name((issue) => issue.kind === "invalid_json" ? "repair" : "remove", "fixVerb");
|
|
6173
6509
|
var issueMessage = /* @__PURE__ */ __name((issues, doctor = "doctor") => {
|
|
6174
6510
|
const [first2] = issues;
|
|
6175
6511
|
if (!first2)
|
|
6176
6512
|
return "";
|
|
6177
6513
|
const more = issues.length - 1;
|
|
6178
|
-
return `${first2.file}: ${first2.what}` + (first2.fix ? ` \u2014
|
|
6514
|
+
return `${first2.file}: ${first2.what}` + (first2.fix ? ` \u2014 ${fixVerb(first2)} it with \`${first2.fix}\`` : "") + (more === 0 ? "" : ` (and ${more} more problem${more === 1 ? "" : "s"} \u2014 \`${doctor}\` lists them all)`);
|
|
6179
6515
|
}, "issueMessage");
|
|
6180
|
-
var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schema2, knownPermissions }) => {
|
|
6516
|
+
var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schema2, knownPermissions, repair = true }) => {
|
|
6181
6517
|
const parsed = parseConfigText(text5, file);
|
|
6182
|
-
if ("issue" in parsed)
|
|
6183
|
-
|
|
6518
|
+
if ("issue" in parsed) {
|
|
6519
|
+
const issue = publicIssue(parsed.issue);
|
|
6520
|
+
if (repair && repairConfigText(text5).state === "repaired")
|
|
6521
|
+
issue.fix = `${tool} config repair`;
|
|
6522
|
+
return { issues: [issue], config: void 0 };
|
|
6523
|
+
}
|
|
6184
6524
|
if (!isNode(parsed.raw))
|
|
6185
6525
|
return { issues: [wholeFile(file, "the file must hold a JSON object")], config: void 0 };
|
|
6186
6526
|
const context2 = { file, tool };
|
|
@@ -6193,7 +6533,7 @@ var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schem
|
|
|
6193
6533
|
var wholeFile = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what }), "wholeFile");
|
|
6194
6534
|
var readConfigText = /* @__PURE__ */ __name((path2) => {
|
|
6195
6535
|
try {
|
|
6196
|
-
return { text:
|
|
6536
|
+
return { text: readFileSync4(path2, "utf8") };
|
|
6197
6537
|
} catch (error) {
|
|
6198
6538
|
const code = error.code;
|
|
6199
6539
|
if (code === "ENOENT")
|
|
@@ -6213,20 +6553,20 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
|
|
|
6213
6553
|
return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
|
|
6214
6554
|
}, "readConfigFile");
|
|
6215
6555
|
|
|
6216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6217
|
-
import { existsSync as
|
|
6218
|
-
import { dirname, join as
|
|
6556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/default-config.js
|
|
6557
|
+
import { existsSync as existsSync3, linkSync, mkdirSync as mkdirSync2, mkdtempSync, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
6558
|
+
import { dirname, join as join4 } from "node:path";
|
|
6219
6559
|
var DEFAULT_CONFIG = {
|
|
6220
6560
|
defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
|
|
6221
6561
|
profiles: {}
|
|
6222
6562
|
};
|
|
6223
6563
|
function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
6224
|
-
if (
|
|
6564
|
+
if (existsSync3(path2))
|
|
6225
6565
|
return;
|
|
6226
6566
|
const directory = dirname(path2);
|
|
6227
6567
|
mkdirSync2(directory, { recursive: true, mode: 448 });
|
|
6228
|
-
const temporary = mkdtempSync(
|
|
6229
|
-
const candidate =
|
|
6568
|
+
const temporary = mkdtempSync(join4(directory, ".config-"));
|
|
6569
|
+
const candidate = join4(temporary, "config.json");
|
|
6230
6570
|
try {
|
|
6231
6571
|
writeFileSync2(candidate, `${JSON.stringify(config, null, 2)}
|
|
6232
6572
|
`, { flag: "wx", mode: 384 });
|
|
@@ -6242,7 +6582,29 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
|
6242
6582
|
}
|
|
6243
6583
|
__name(ensureDefaultConfig, "ensureDefaultConfig");
|
|
6244
6584
|
|
|
6245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
|
|
6586
|
+
var isNode2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
6587
|
+
var parentOf = /* @__PURE__ */ __name((config, key) => {
|
|
6588
|
+
const path2 = key.split(".");
|
|
6589
|
+
const leaf = path2.pop();
|
|
6590
|
+
return { node: path2.reduce((node, part) => isNode2(node) ? node[part] : void 0, config), leaf };
|
|
6591
|
+
}, "parentOf");
|
|
6592
|
+
var withSettingDefaults = /* @__PURE__ */ __name((raw, declared) => {
|
|
6593
|
+
if (raw !== void 0 && !isNode2(raw))
|
|
6594
|
+
return { config: raw, added: [] };
|
|
6595
|
+
const config = raw === void 0 ? {} : structuredClone(raw);
|
|
6596
|
+
const added = [];
|
|
6597
|
+
for (const setting2 of declared) {
|
|
6598
|
+
const { node, leaf } = parentOf(config, setting2.key);
|
|
6599
|
+
if (!isNode2(node) || Object.hasOwn(node, leaf))
|
|
6600
|
+
continue;
|
|
6601
|
+
node[leaf] = setting2.default;
|
|
6602
|
+
added.push(setting2.key);
|
|
6603
|
+
}
|
|
6604
|
+
return { config, added };
|
|
6605
|
+
}, "withSettingDefaults");
|
|
6606
|
+
|
|
6607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/settings.js
|
|
6246
6608
|
var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
|
|
6247
6609
|
var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
|
|
6248
6610
|
var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
|
|
@@ -6306,12 +6668,73 @@ var MESSENGER_ONLY_SETTINGS = [
|
|
|
6306
6668
|
"history_dialog_days",
|
|
6307
6669
|
"history_group_days",
|
|
6308
6670
|
"history_group_members_max",
|
|
6309
|
-
"read_other_bots"
|
|
6671
|
+
"read_other_bots",
|
|
6672
|
+
"speech_model",
|
|
6673
|
+
"picture_search"
|
|
6310
6674
|
];
|
|
6311
6675
|
var SHARED_DEFAULTS_ONLY = {
|
|
6312
6676
|
update_check: optional(flag),
|
|
6313
6677
|
skill_hint: optional(flag)
|
|
6314
6678
|
};
|
|
6679
|
+
var SHARED_SETTINGS = [
|
|
6680
|
+
{ key: "limit", default: DEFAULT_LIMIT, description: "how many items a list shows at once" },
|
|
6681
|
+
{ key: "keep_runs_for_days", default: DEFAULT_KEEP_RUNS_FOR_DAYS, description: "days a run is kept" },
|
|
6682
|
+
{
|
|
6683
|
+
key: "sends_per_hour",
|
|
6684
|
+
default: DEFAULT_SENDS_PER_HOUR,
|
|
6685
|
+
description: "the most messages an account sends in an hour; a bot has none unless its section sets one"
|
|
6686
|
+
},
|
|
6687
|
+
{ key: "update_check", default: true, description: "check once a day for a newer version" },
|
|
6688
|
+
{
|
|
6689
|
+
key: "skill_hint",
|
|
6690
|
+
default: true,
|
|
6691
|
+
description: "tell an agent once a day that `skill install` would give it this tool's guide"
|
|
6692
|
+
},
|
|
6693
|
+
{ key: "record", default: true, description: "keep every run in runs list; false keeps failed runs only" },
|
|
6694
|
+
{
|
|
6695
|
+
key: "record_input",
|
|
6696
|
+
default: true,
|
|
6697
|
+
description: `keep what was typed in a run's command line: true, false, or "failed" for failed runs only`
|
|
6698
|
+
},
|
|
6699
|
+
{
|
|
6700
|
+
key: "keep_successful_runs_for_days",
|
|
6701
|
+
default: KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
6702
|
+
description: "days a successful run is kept"
|
|
6703
|
+
},
|
|
6704
|
+
{ key: "runs_size_limit_mb", default: RUNS_SIZE_LIMIT_MB, description: "the most megabytes all runs may take" },
|
|
6705
|
+
{ key: "sender_colors", default: false, description: "color each sender's name in a conversation" },
|
|
6706
|
+
{ key: "search_catch_up", default: false, description: "prepare local search after a gaps repair" },
|
|
6707
|
+
{
|
|
6708
|
+
key: "history_dialog_days",
|
|
6709
|
+
default: DEFAULT_HISTORY_LIMITS.dialogDays,
|
|
6710
|
+
description: "days of a one-to-one chat's pushed history the store keeps"
|
|
6711
|
+
},
|
|
6712
|
+
{
|
|
6713
|
+
key: "history_group_days",
|
|
6714
|
+
default: DEFAULT_HISTORY_LIMITS.groupDays,
|
|
6715
|
+
description: "days of a group's pushed history the store keeps"
|
|
6716
|
+
},
|
|
6717
|
+
{
|
|
6718
|
+
key: "history_group_members_max",
|
|
6719
|
+
default: DEFAULT_HISTORY_LIMITS.groupMembersMax,
|
|
6720
|
+
description: "a group with more people than this keeps no pushed history"
|
|
6721
|
+
},
|
|
6722
|
+
{
|
|
6723
|
+
key: "picture_search",
|
|
6724
|
+
default: false,
|
|
6725
|
+
description: "search and images embed read the pictures themselves, with a model on this computer"
|
|
6726
|
+
},
|
|
6727
|
+
{
|
|
6728
|
+
key: "search_reranker",
|
|
6729
|
+
default: DEFAULT_RERANK_MODEL,
|
|
6730
|
+
description: "the reranker that orders search's first hits, or off"
|
|
6731
|
+
},
|
|
6732
|
+
{
|
|
6733
|
+
key: "embedding_provider",
|
|
6734
|
+
default: AI_DEFAULTS.embeddingProvider,
|
|
6735
|
+
description: "local or openai: what turns text into vectors for search by meaning"
|
|
6736
|
+
}
|
|
6737
|
+
];
|
|
6315
6738
|
var NONE_NAMED = "none named";
|
|
6316
6739
|
var NO_PROFILE = "default";
|
|
6317
6740
|
var namedProfile = /* @__PURE__ */ __name((settings) => settings.sources?.profile === NONE_NAMED ? void 0 : settings.profile, "namedProfile");
|
|
@@ -6364,12 +6787,14 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6364
6787
|
const defaultsOnlyKeys = Object.keys(defaultsOnly);
|
|
6365
6788
|
const botOnlyKeys = Object.keys(BOT_ONLY_ENTRIES);
|
|
6366
6789
|
const allSettings = [...Object.keys(profileEntries), ...botOnlyKeys, ...defaultsOnlyKeys].filter((setting2) => app.messenger !== false || !MESSENGER_ONLY_SETTINGS.includes(setting2) || app.sends === true && setting2 === "sends_per_hour");
|
|
6790
|
+
const readSchema = extension.schema ?? schema2;
|
|
6791
|
+
const declaredSettings = [...SHARED_SETTINGS, ...extension.settings ?? []].filter(({ key, default: value }) => allSettings.includes(key) && safeParse(readSchema, { defaults: { [key]: value } }).success).map((setting2) => ({ ...setting2, key: `defaults.${setting2.key}` }));
|
|
6792
|
+
const withDefaults = /* @__PURE__ */ __name((raw, except = []) => withSettingDefaults(isScope(raw) && !Object.hasOwn(raw, "defaults") ? { ...raw, defaults: {} } : raw, declaredSettings.filter(({ key }) => !except.includes(key))), "withDefaults");
|
|
6367
6793
|
const PROFILE = envName(app, "PROFILE");
|
|
6368
6794
|
const PROFILE_LOCK = envName(app, "PROFILE_LOCK");
|
|
6369
6795
|
const TIMEOUT = envName(app, "TIMEOUT");
|
|
6370
6796
|
const REQUESTS_PER_MINUTE = envName(app, "REQUESTS_PER_MINUTE");
|
|
6371
6797
|
const configPathFor = /* @__PURE__ */ __name(({ env = process.env, configDir }) => configFilePath(configDir ?? resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config), "configPathFor");
|
|
6372
|
-
const readSchema = extension.schema ?? schema2;
|
|
6373
6798
|
const context2 = /* @__PURE__ */ __name((file) => ({ file, tool: app.command }), "context");
|
|
6374
6799
|
const loadConfig = /* @__PURE__ */ __name((path2) => {
|
|
6375
6800
|
const read = readConfigText(path2);
|
|
@@ -6377,7 +6802,12 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6377
6802
|
return { config: { profiles: {} }, issues: [read.issue] };
|
|
6378
6803
|
if (read.text === void 0)
|
|
6379
6804
|
return { config: { profiles: {} }, issues: [] };
|
|
6380
|
-
const { config, issues } = checkConfigText(read.text, {
|
|
6805
|
+
const { config, issues } = checkConfigText(read.text, {
|
|
6806
|
+
file: path2,
|
|
6807
|
+
tool: app.command,
|
|
6808
|
+
schema: readSchema,
|
|
6809
|
+
repair: extension.configRepair !== false
|
|
6810
|
+
});
|
|
6381
6811
|
return { config: config ?? { profiles: {} }, issues };
|
|
6382
6812
|
}, "loadConfig");
|
|
6383
6813
|
const locked = /* @__PURE__ */ __name((profile, lock) => {
|
|
@@ -6400,12 +6830,21 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6400
6830
|
throw new CliError("validation_error", `name a profile: \`${app.command} <profile> \u2026\` \u2014 profiles here: ${here.join(", ")} (or set ${PROFILE})`, { profiles: here });
|
|
6401
6831
|
}, "unnamed");
|
|
6402
6832
|
const profilesOf = /* @__PURE__ */ __name((config, env) => profilesHere(app, [...namedProfiles(config), ...extension.profiles?.(env) ?? []], env), "profilesOf");
|
|
6833
|
+
const botsOf = /* @__PURE__ */ __name((config, env) => [.../* @__PURE__ */ new Set([...Object.keys(config.bot?.profiles ?? {}), ...registryProfiles(app, env)])].sort(), "botsOf");
|
|
6834
|
+
const accountsOf = /* @__PURE__ */ __name((config, env, bots) => {
|
|
6835
|
+
const personal = /* @__PURE__ */ new Set([
|
|
6836
|
+
...Object.keys(config.personal?.profiles ?? {}),
|
|
6837
|
+
...profilesWithAccounts(app, env),
|
|
6838
|
+
...extension.profiles?.(env) ?? []
|
|
6839
|
+
]);
|
|
6840
|
+
return profilesOf(config, env).filter((name) => !bots.includes(name) || personal.has(name));
|
|
6841
|
+
}, "accountsOf");
|
|
6403
6842
|
const resolveSettings = /* @__PURE__ */ __name((flags = {}, options = {}) => {
|
|
6404
6843
|
const env = options.env ?? process.env;
|
|
6405
6844
|
const configPath = configPathFor(options);
|
|
6406
6845
|
try {
|
|
6407
6846
|
if (!options.readOnly)
|
|
6408
|
-
ensureDefaultConfig(configPath);
|
|
6847
|
+
ensureDefaultConfig(configPath, withDefaults(DEFAULT_CONFIG).config);
|
|
6409
6848
|
} catch (error) {
|
|
6410
6849
|
throw new CliError("configuration_error", error instanceof Error ? error.message : String(error));
|
|
6411
6850
|
}
|
|
@@ -6421,6 +6860,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6421
6860
|
], void 0);
|
|
6422
6861
|
const profile = locked(named3.value === void 0 ? unnamed(config, env, options.needsProfile !== false) : { value: named3.value, from: named3.from }, lock);
|
|
6423
6862
|
const kind2 = options.kind ?? "personal";
|
|
6863
|
+
const bots = botsOf(config, env);
|
|
6424
6864
|
const name = usableProfileName(profile.value);
|
|
6425
6865
|
const configured = config.profiles[name] ?? {};
|
|
6426
6866
|
const shared = config.defaults ?? {};
|
|
@@ -6512,9 +6952,11 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6512
6952
|
updateCheck: updateCheck.value,
|
|
6513
6953
|
skillHint: skillHint.value,
|
|
6514
6954
|
configPath,
|
|
6515
|
-
configFound:
|
|
6955
|
+
configFound: existsSync4(configPath),
|
|
6516
6956
|
configuredProfiles: namedProfiles(config),
|
|
6517
6957
|
profilesHere: profilesOf(config, env),
|
|
6958
|
+
accountProfiles: accountsOf(config, env, bots),
|
|
6959
|
+
botProfiles: bots,
|
|
6518
6960
|
sources: {
|
|
6519
6961
|
...ai.sources,
|
|
6520
6962
|
profile: profile.from,
|
|
@@ -6583,7 +7025,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6583
7025
|
throw new CliError("validation_error", `${setting2} has no problem to remove \u2014 name the profile, or add --defaults, to unset a setting`);
|
|
6584
7026
|
if (!known && valueAt(raw, at2) === void 0)
|
|
6585
7027
|
throw new CliError("validation_error", `no setting called "${setting2}" \u2014 one of: ${allSettings.join(", ")}`);
|
|
6586
|
-
saveConfigFile(path2, withoutPath(raw, at2).config);
|
|
7028
|
+
saveConfigFile(path2, withDefaults(withoutPath(raw, at2).config, [at2.join(".")]).config);
|
|
6587
7029
|
return null;
|
|
6588
7030
|
}
|
|
6589
7031
|
if (!known)
|
|
@@ -6597,20 +7039,41 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6597
7039
|
if (kind2 !== "bot" && botOnlyKeys.includes(setting2)) {
|
|
6598
7040
|
throw new CliError("validation_error", `${setting2} is a bot's setting \u2014 add --bot`);
|
|
6599
7041
|
}
|
|
6600
|
-
const changed = structuredClone(raw);
|
|
6601
|
-
setAt(changed, at2, level2 === void 0 ? parseValue(value) : value.trim());
|
|
6602
7042
|
const had = new Set(before.map((issue) => issue.at.join(".")));
|
|
6603
|
-
const
|
|
7043
|
+
const tried = /* @__PURE__ */ __name((typed2) => {
|
|
7044
|
+
const changed2 = structuredClone(raw);
|
|
7045
|
+
setAt(changed2, at2, typed2);
|
|
7046
|
+
const added2 = schemaIssues(changed2, readSchema, context2(path2)).find((issue) => !had.has(issue.at.join(".")) || issue.at.join(".") === at2.join("."));
|
|
7047
|
+
return { changed: changed2, added: added2 };
|
|
7048
|
+
}, "tried");
|
|
7049
|
+
const parsed = level2 === void 0 ? parseValue(value) : value.trim();
|
|
7050
|
+
let { changed, added } = tried(parsed);
|
|
7051
|
+
if (added && typeof parsed !== "string") {
|
|
7052
|
+
const asText = tried(value.trim());
|
|
7053
|
+
if (!asText.added)
|
|
7054
|
+
({ changed, added } = asText);
|
|
7055
|
+
}
|
|
6604
7056
|
if (added)
|
|
6605
7057
|
throw new CliError("validation_error", `${setting2} cannot be "${value}": ${added.what}`);
|
|
6606
7058
|
const checked = safeParse(readSchema, changed);
|
|
6607
|
-
saveConfigFile(path2, checked.success ? checked.output : changed);
|
|
7059
|
+
saveConfigFile(path2, withDefaults(checked.success ? checked.output : changed).config);
|
|
6608
7060
|
return valueAt(checked.success ? checked.output : changed, at2) ?? null;
|
|
6609
7061
|
}, "changeSetting");
|
|
7062
|
+
const migrate = /* @__PURE__ */ __name((path2) => {
|
|
7063
|
+
const read = readConfigFile(path2);
|
|
7064
|
+
if ("issue" in read)
|
|
7065
|
+
throw new CliError("configuration_error", issueMessage([read.issue]));
|
|
7066
|
+
const { config, added } = withDefaults(read.raw);
|
|
7067
|
+
if (added.length > 0)
|
|
7068
|
+
saveConfigFile(path2, config);
|
|
7069
|
+
return added;
|
|
7070
|
+
}, "migrate");
|
|
6610
7071
|
return {
|
|
6611
7072
|
resolveSettings,
|
|
6612
7073
|
configuredProfiles,
|
|
6613
7074
|
changeSetting,
|
|
7075
|
+
migrate,
|
|
7076
|
+
declaredSettings,
|
|
6614
7077
|
allSettings,
|
|
6615
7078
|
defaultsOnlyKeys,
|
|
6616
7079
|
schema: schema2,
|
|
@@ -6651,7 +7114,7 @@ var given = /* @__PURE__ */ __name((value) => {
|
|
|
6651
7114
|
return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
|
|
6652
7115
|
}, "given");
|
|
6653
7116
|
|
|
6654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/context.js
|
|
6655
7118
|
var setExitCode = /* @__PURE__ */ __name((command, code) => {
|
|
6656
7119
|
const slot = environmentOf(command).exit;
|
|
6657
7120
|
if (slot)
|
|
@@ -6764,7 +7227,7 @@ var commandPath = /* @__PURE__ */ __name((command) => {
|
|
|
6764
7227
|
return words.join(" ");
|
|
6765
7228
|
}, "commandPath");
|
|
6766
7229
|
|
|
6767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/effects.js
|
|
6768
7231
|
var REMOTE_READ = { remote: "read", local: "read" };
|
|
6769
7232
|
var FETCH = { remote: "read", local: "write" };
|
|
6770
7233
|
var REMOTE_WRITE = { remote: "write", local: "write" };
|
|
@@ -6800,6 +7263,22 @@ var destroysNothing = /* @__PURE__ */ __name((command) => {
|
|
|
6800
7263
|
KEPT_UNDER_LOCK.add(command);
|
|
6801
7264
|
return command;
|
|
6802
7265
|
}, "destroysNothing");
|
|
7266
|
+
var PROPOSE_COMMANDS = ["messages acknowledge", "mail findings add"];
|
|
7267
|
+
var PROPOSES = /* @__PURE__ */ new WeakSet();
|
|
7268
|
+
var isProposal = /* @__PURE__ */ __name((command) => {
|
|
7269
|
+
if (!PROPOSES.has(command))
|
|
7270
|
+
return false;
|
|
7271
|
+
const path2 = pathOf2(command).join(" ");
|
|
7272
|
+
return PROPOSE_COMMANDS.some((listed) => path2 === listed || path2.endsWith(` ${listed}`));
|
|
7273
|
+
}, "isProposal");
|
|
7274
|
+
var LOCKED_AUTHORITY_COMMANDS = ["rules add"];
|
|
7275
|
+
var NARROWS = /* @__PURE__ */ new WeakSet();
|
|
7276
|
+
var admittedUnderLock = /* @__PURE__ */ __name((command) => {
|
|
7277
|
+
if (!NARROWS.has(command))
|
|
7278
|
+
return false;
|
|
7279
|
+
const path2 = pathOf2(command).join(" ");
|
|
7280
|
+
return LOCKED_AUTHORITY_COMMANDS.some((listed) => path2 === listed || path2.endsWith(` ${listed}`));
|
|
7281
|
+
}, "admittedUnderLock");
|
|
6803
7282
|
var STORE_WRITES = /* @__PURE__ */ new WeakSet();
|
|
6804
7283
|
var changesStore = /* @__PURE__ */ __name((command) => {
|
|
6805
7284
|
STORE_WRITES.add(command);
|
|
@@ -6824,7 +7303,7 @@ var readsOverMcpAt = /* @__PURE__ */ __name((root) => (path2) => {
|
|
|
6824
7303
|
}, "readsOverMcpAt");
|
|
6825
7304
|
var isStoreChange = /* @__PURE__ */ __name((command) => {
|
|
6826
7305
|
const effects = metaOf(command).effects;
|
|
6827
|
-
return (effects?.remote === "none" || STORE_WRITES.has(command)) && effects?.local === "write" && !KEPT_UNDER_LOCK.has(command) && !changesAuthority(command) && writesFileNow(command);
|
|
7306
|
+
return (effects?.remote === "none" || STORE_WRITES.has(command)) && effects?.local === "write" && !KEPT_UNDER_LOCK.has(command) && !isProposal(command) && !changesAuthority(command) && writesFileNow(command);
|
|
6828
7307
|
}, "isStoreChange");
|
|
6829
7308
|
var STORE_CHANGE_REFUSAL = "change the message store";
|
|
6830
7309
|
var previewFlag = /* @__PURE__ */ __name((program2) => program2.options.some((option) => option.long === "--dry-run") ? " --dry-run" : "", "previewFlag");
|
|
@@ -6872,7 +7351,7 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
|
|
|
6872
7351
|
throw readOnlyRefusal(lock, what);
|
|
6873
7352
|
}, "refuseUnderReadOnly");
|
|
6874
7353
|
|
|
6875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7354
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/account.js
|
|
6876
7355
|
var account = strictObject({
|
|
6877
7356
|
provider: text,
|
|
6878
7357
|
id,
|
|
@@ -6882,7 +7361,7 @@ var account = strictObject({
|
|
|
6882
7361
|
scope: optional(picklist(["personal", "work"]))
|
|
6883
7362
|
});
|
|
6884
7363
|
|
|
6885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/account-session.js
|
|
6886
7365
|
var accountSession = strictObject({
|
|
6887
7366
|
current: boolean(),
|
|
6888
7367
|
client: nullable(text),
|
|
@@ -6892,7 +7371,7 @@ var accountSession = strictObject({
|
|
|
6892
7371
|
created_at: optional(nullable(time))
|
|
6893
7372
|
});
|
|
6894
7373
|
|
|
6895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/account-change.js
|
|
6896
7375
|
var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
|
|
6897
7376
|
var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
|
|
6898
7377
|
var audience = picklist(["everyone", "contacts", "nobody"]);
|
|
@@ -6910,17 +7389,19 @@ var accountPrivacy = strictObject({
|
|
|
6910
7389
|
});
|
|
6911
7390
|
var accountPrivacyChange = strictObject({ operation_id: id, privacy: accountPrivacy });
|
|
6912
7391
|
|
|
6913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
|
|
6914
7393
|
var accountProfile = strictObject({
|
|
6915
7394
|
profile: id,
|
|
6916
7395
|
current: boolean(),
|
|
6917
7396
|
account: nullable(id),
|
|
6918
7397
|
name: nullable(text),
|
|
6919
7398
|
/** False for a profile with no session on this computer; absent when the messenger does not say. */
|
|
6920
|
-
signed_in: optional(boolean())
|
|
7399
|
+
signed_in: optional(boolean()),
|
|
7400
|
+
/** True when the same name is a bot profile too (`<tool> <profile> bot …`); absent otherwise. */
|
|
7401
|
+
bot: optional(literal(true))
|
|
6921
7402
|
});
|
|
6922
7403
|
|
|
6923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7404
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
|
|
6924
7405
|
var milliseconds = pipe(number(), minValue(0));
|
|
6925
7406
|
var counterReading = strictObject({
|
|
6926
7407
|
counter: picklist(["views", "reactions", "comments"]),
|
|
@@ -6932,7 +7413,7 @@ var counterReading = strictObject({
|
|
|
6932
7413
|
});
|
|
6933
7414
|
var selection = record(string(), unknown());
|
|
6934
7415
|
|
|
6935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7416
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
|
|
6936
7417
|
var adminRow = strictObject({
|
|
6937
7418
|
ref: reference,
|
|
6938
7419
|
/** What `stats * evidence` takes: a person id, a stay or a message locator. */
|
|
@@ -6985,7 +7466,7 @@ var adminReport = strictObject({
|
|
|
6985
7466
|
rows: array(adminRow)
|
|
6986
7467
|
});
|
|
6987
7468
|
|
|
6988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/task.js
|
|
6989
7470
|
var closeSuggestion = strictObject({
|
|
6990
7471
|
as: picklist(["done", "dismissed"]),
|
|
6991
7472
|
/** The agent's name. */
|
|
@@ -7043,7 +7524,7 @@ var task = strictObject({
|
|
|
7043
7524
|
updated_at: optional(time)
|
|
7044
7525
|
});
|
|
7045
7526
|
|
|
7046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/agenda.js
|
|
7047
7528
|
var agendaChat = strictObject({
|
|
7048
7529
|
chat: reference,
|
|
7049
7530
|
title: nullable(text),
|
|
@@ -7113,11 +7594,11 @@ var agenda = strictObject({
|
|
|
7113
7594
|
unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
|
|
7114
7595
|
});
|
|
7115
7596
|
|
|
7116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
|
|
7117
7598
|
var analysisConsent = strictObject({ chat: id, provider: text, at: time });
|
|
7118
7599
|
var analysisConsentRevocation = strictObject({ revoked: boolean() });
|
|
7119
7600
|
|
|
7120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/attachment.js
|
|
7121
7602
|
var attachment = strictObject({
|
|
7122
7603
|
/** The message it came with, as a locator; absent inside that message. */
|
|
7123
7604
|
message: optional(reference),
|
|
@@ -7155,7 +7636,7 @@ var attachment = strictObject({
|
|
|
7155
7636
|
});
|
|
7156
7637
|
var hitFile = strictObject({ position: count, kind: text, name: optional(text), size: optional(count) });
|
|
7157
7638
|
|
|
7158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
|
|
7159
7640
|
var actionableError = objectWithRest({
|
|
7160
7641
|
code: text,
|
|
7161
7642
|
message: text,
|
|
@@ -7172,7 +7653,7 @@ var batchResult = strictObject({
|
|
|
7172
7653
|
max_error_percent: count
|
|
7173
7654
|
});
|
|
7174
7655
|
|
|
7175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
|
|
7176
7657
|
var extractionItem = strictObject({
|
|
7177
7658
|
ref: reference,
|
|
7178
7659
|
attachment: count,
|
|
@@ -7205,7 +7686,7 @@ var extractionReport = strictObject({
|
|
|
7205
7686
|
cursor: optional(text)
|
|
7206
7687
|
});
|
|
7207
7688
|
|
|
7208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
|
|
7209
7690
|
var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
|
|
7210
7691
|
var attachmentBytes = strictObject({
|
|
7211
7692
|
ref: reference,
|
|
@@ -7233,7 +7714,7 @@ var attachmentTextChange = strictObject({
|
|
|
7233
7714
|
replaced: nullable(picklist(["extracted", "agent"]))
|
|
7234
7715
|
});
|
|
7235
7716
|
|
|
7236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/chart.js
|
|
7237
7718
|
var chart = strictObject({
|
|
7238
7719
|
version: literal(1),
|
|
7239
7720
|
kind: picklist(["bar", "line", "grouped-bar"]),
|
|
@@ -7248,7 +7729,7 @@ var chart = strictObject({
|
|
|
7248
7729
|
file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
|
|
7249
7730
|
});
|
|
7250
7731
|
|
|
7251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/member.js
|
|
7252
7733
|
var member = strictObject({
|
|
7253
7734
|
id,
|
|
7254
7735
|
name: nullable(text),
|
|
@@ -7271,7 +7752,7 @@ var member = strictObject({
|
|
|
7271
7752
|
check: optional(record(string(), unknown()))
|
|
7272
7753
|
});
|
|
7273
7754
|
|
|
7274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/chat.js
|
|
7275
7756
|
var setting = optional(nullable(boolean()));
|
|
7276
7757
|
var chat = strictObject({
|
|
7277
7758
|
ref: reference,
|
|
@@ -7312,7 +7793,7 @@ var chat = strictObject({
|
|
|
7312
7793
|
members: optional(array(member))
|
|
7313
7794
|
});
|
|
7314
7795
|
|
|
7315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/folder.js
|
|
7316
7797
|
var named2 = strictObject({
|
|
7317
7798
|
id,
|
|
7318
7799
|
title: nullable(text),
|
|
@@ -7335,7 +7816,7 @@ var folder = strictObject({
|
|
|
7335
7816
|
excluded_chats: optional(array(named2))
|
|
7336
7817
|
});
|
|
7337
7818
|
|
|
7338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
|
|
7339
7820
|
var inviteLink = strictObject({
|
|
7340
7821
|
link: text,
|
|
7341
7822
|
/** Who joins by it asks first, and an admin lets them in. */
|
|
@@ -7351,7 +7832,7 @@ var inviteLink = strictObject({
|
|
|
7351
7832
|
joined_count: optional(count)
|
|
7352
7833
|
});
|
|
7353
7834
|
|
|
7354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
|
|
7355
7836
|
var operated = { operation_id: id, chat_id: id };
|
|
7356
7837
|
var group = strictObject({
|
|
7357
7838
|
...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
|
|
@@ -7431,7 +7912,7 @@ var chatFolderOrder = strictObject({
|
|
|
7431
7912
|
folders: array(strictObject({ id, title: text }))
|
|
7432
7913
|
});
|
|
7433
7914
|
|
|
7434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
|
|
7435
7916
|
var operated2 = { operation_id: id, chat_id: id };
|
|
7436
7917
|
var chatRemoval = strictObject(operated2);
|
|
7437
7918
|
var chatMuting = strictObject({
|
|
@@ -7442,7 +7923,7 @@ var chatArchive = strictObject({ ...operated2, archived: boolean() });
|
|
|
7442
7923
|
var chatPin = strictObject({ ...operated2, pinned: boolean() });
|
|
7443
7924
|
var chatUnread = strictObject({ ...operated2, unread: literal(true) });
|
|
7444
7925
|
|
|
7445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
|
|
7446
7927
|
var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
|
|
7447
7928
|
var chatEvent = strictObject({
|
|
7448
7929
|
chat_id: id,
|
|
@@ -7459,7 +7940,7 @@ var chatEvent = strictObject({
|
|
|
7459
7940
|
before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
|
|
7460
7941
|
});
|
|
7461
7942
|
|
|
7462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
|
|
7463
7944
|
var chatMetadata = strictObject({
|
|
7464
7945
|
chat_id: id,
|
|
7465
7946
|
title: nullable(text),
|
|
@@ -7474,7 +7955,7 @@ var chatMetadataRefresh = strictObject({
|
|
|
7474
7955
|
has_more: boolean()
|
|
7475
7956
|
});
|
|
7476
7957
|
|
|
7477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
|
|
7478
7959
|
var action = picklist(["report", "delete", "remove"]);
|
|
7479
7960
|
var level = picklist(["deny", "readonly", "ask", "allow"]);
|
|
7480
7961
|
var chatRules = strictObject({
|
|
@@ -7511,7 +7992,7 @@ var chatModeration = strictObject({
|
|
|
7511
7992
|
}))
|
|
7512
7993
|
});
|
|
7513
7994
|
|
|
7514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
|
|
7515
7996
|
var optionalCount = optional(count);
|
|
7516
7997
|
var minutes = nullable(number());
|
|
7517
7998
|
var chatStats = strictObject({
|
|
@@ -7562,18 +8043,30 @@ var chatStats = strictObject({
|
|
|
7562
8043
|
})),
|
|
7563
8044
|
series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
|
|
7564
8045
|
});
|
|
8046
|
+
var ms = nullable(pipe(number(), minValue(0)));
|
|
7565
8047
|
var taskStats = strictObject({
|
|
7566
8048
|
/** Open tasks across every row. */
|
|
7567
8049
|
open: count,
|
|
8050
|
+
created: count,
|
|
8051
|
+
closed: count,
|
|
8052
|
+
median_close_ms: ms,
|
|
8053
|
+
mean_open_age_ms: ms,
|
|
7568
8054
|
rows: array(strictObject({
|
|
7569
|
-
chat
|
|
8055
|
+
/** Rows of `--by chat` only. */
|
|
8056
|
+
chat: optional(reference),
|
|
8057
|
+
/** The chat reference, `meeting:<account>/<meeting>` or `project:<id>`. */
|
|
8058
|
+
key: text,
|
|
8059
|
+
name: nullable(text),
|
|
7570
8060
|
open: count,
|
|
8061
|
+
created: count,
|
|
8062
|
+
closed: count,
|
|
7571
8063
|
oldest_open_at: nullable(time),
|
|
7572
|
-
median_close_ms:
|
|
8064
|
+
median_close_ms: ms,
|
|
8065
|
+
mean_open_age_ms: ms
|
|
7573
8066
|
}))
|
|
7574
8067
|
});
|
|
7575
8068
|
|
|
7576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
|
|
7577
8070
|
var memberCount = strictObject({
|
|
7578
8071
|
day: pipe(text, isoDate()),
|
|
7579
8072
|
participants: nullable(count),
|
|
@@ -7596,7 +8089,7 @@ var chatTracking = strictObject({
|
|
|
7596
8089
|
tracked: boolean()
|
|
7597
8090
|
});
|
|
7598
8091
|
|
|
7599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
|
|
7600
8093
|
var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
7601
8094
|
var contactSync = strictObject({ added: count, changed: count, known: count });
|
|
7602
8095
|
var profileFields = {
|
|
@@ -7634,7 +8127,7 @@ var profileFields = {
|
|
|
7634
8127
|
}))
|
|
7635
8128
|
};
|
|
7636
8129
|
|
|
7637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/contact.js
|
|
7638
8131
|
var contact = strictObject({
|
|
7639
8132
|
ref: reference,
|
|
7640
8133
|
id,
|
|
@@ -7665,7 +8158,7 @@ var contact = strictObject({
|
|
|
7665
8158
|
notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
|
|
7666
8159
|
});
|
|
7667
8160
|
|
|
7668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
|
|
7669
8162
|
var WEIGHTS = {
|
|
7670
8163
|
bot: 3,
|
|
7671
8164
|
scam: 3,
|
|
@@ -7690,7 +8183,7 @@ var LINK = /https?:\/\/|t\.me\/|www\./i;
|
|
|
7690
8183
|
var DIGITS = /\d{5,}/;
|
|
7691
8184
|
var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
|
|
7692
8185
|
|
|
7693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
|
|
7694
8187
|
var linkedIdentity = strictObject({
|
|
7695
8188
|
provider: text,
|
|
7696
8189
|
id,
|
|
@@ -7731,7 +8224,7 @@ var contactCheck = strictObject({
|
|
|
7731
8224
|
checked_at: time
|
|
7732
8225
|
});
|
|
7733
8226
|
|
|
7734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/message.js
|
|
7735
8228
|
var quoted = strictObject({
|
|
7736
8229
|
id,
|
|
7737
8230
|
sender_id: nullable(id),
|
|
@@ -7833,12 +8326,24 @@ var message = strictObject({
|
|
|
7833
8326
|
read: nullable(boolean()),
|
|
7834
8327
|
flagged: nullable(boolean()),
|
|
7835
8328
|
/** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
|
|
7836
|
-
sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) }))
|
|
8329
|
+
sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) })),
|
|
8330
|
+
/** Mail `review`: filed in the mailbox of mail sent to many. */
|
|
8331
|
+
bulk: optional(boolean()),
|
|
8332
|
+
/** Mail `review`: its List-Id, `null` when it has none. */
|
|
8333
|
+
list_id: optional(nullable(text)),
|
|
8334
|
+
/** Mail `review`: the mail rule that decided how it is stored, by its id in `rules list`; `null` when none. */
|
|
8335
|
+
rule_id: optional(nullable(number())),
|
|
8336
|
+
/** Mail `review`: the evidence fingerprint a finding cites this email by. */
|
|
8337
|
+
fingerprint: optional(pipe(text, regex(/^[a-f0-9]{64}$/))),
|
|
8338
|
+
/** Mail `review`: no earlier stored email, in any account, came from this address. */
|
|
8339
|
+
new_sender: optional(boolean()),
|
|
8340
|
+
/** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
|
|
8341
|
+
sender_identities: optional(number())
|
|
7837
8342
|
})),
|
|
7838
8343
|
provider_metadata: providerMetadata
|
|
7839
8344
|
});
|
|
7840
8345
|
|
|
7841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
|
|
7842
8347
|
var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
|
|
7843
8348
|
var contextMessage = strictObject({
|
|
7844
8349
|
locator: reference,
|
|
@@ -8036,7 +8541,7 @@ var contactPreparation = strictObject({
|
|
|
8036
8541
|
})
|
|
8037
8542
|
});
|
|
8038
8543
|
|
|
8039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
|
|
8040
8545
|
var contactNote = strictObject({
|
|
8041
8546
|
id,
|
|
8042
8547
|
/** The contact, as a `contact:` reference. */
|
|
@@ -8048,13 +8553,13 @@ var contactNote = strictObject({
|
|
|
8048
8553
|
updated_at: time
|
|
8049
8554
|
});
|
|
8050
8555
|
|
|
8051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
|
|
8052
8557
|
var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
8053
8558
|
var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
|
|
8054
8559
|
var contactStateChange = strictObject({ operation_id: id, person_id: id });
|
|
8055
8560
|
var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
|
|
8056
8561
|
|
|
8057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/conversation.js
|
|
8058
8563
|
var conversation = strictObject({
|
|
8059
8564
|
id,
|
|
8060
8565
|
chat: reference,
|
|
@@ -8069,7 +8574,7 @@ var conversation = strictObject({
|
|
|
8069
8574
|
rules_version: count
|
|
8070
8575
|
});
|
|
8071
8576
|
|
|
8072
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
|
|
8073
8578
|
var conversationBuild = strictObject({
|
|
8074
8579
|
chat: id,
|
|
8075
8580
|
messages: count,
|
|
@@ -8094,7 +8599,7 @@ var catchUpPreparation = strictObject({
|
|
|
8094
8599
|
prepared: optional(conversationPreparation)
|
|
8095
8600
|
});
|
|
8096
8601
|
|
|
8097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
|
|
8098
8603
|
var conversationDetails = union([
|
|
8099
8604
|
strictObject({ ...conversation.entries, messages: array(message) }),
|
|
8100
8605
|
message
|
|
@@ -8184,7 +8689,7 @@ var conversationHit = strictObject({
|
|
|
8184
8689
|
stale: boolean()
|
|
8185
8690
|
});
|
|
8186
8691
|
|
|
8187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/counters.js
|
|
8188
8693
|
var counters = strictObject({
|
|
8189
8694
|
cutoff: time,
|
|
8190
8695
|
max_age_ms: milliseconds,
|
|
@@ -8214,7 +8719,7 @@ var counterRefresh = strictObject({
|
|
|
8214
8719
|
complete: optional(boolean())
|
|
8215
8720
|
});
|
|
8216
8721
|
|
|
8217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/document.js
|
|
8218
8723
|
var document = strictObject({
|
|
8219
8724
|
ref: reference,
|
|
8220
8725
|
id,
|
|
@@ -8229,7 +8734,7 @@ var document = strictObject({
|
|
|
8229
8734
|
owners: optional(array(text))
|
|
8230
8735
|
});
|
|
8231
8736
|
|
|
8232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/document-link.js
|
|
8233
8738
|
var documentLink = strictObject({
|
|
8234
8739
|
ref: reference,
|
|
8235
8740
|
url: text,
|
|
@@ -8240,7 +8745,7 @@ var documentLink = strictObject({
|
|
|
8240
8745
|
sender: strictObject({ id: nullable(id), name: nullable(text) })
|
|
8241
8746
|
});
|
|
8242
8747
|
|
|
8243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/evidence.js
|
|
8244
8749
|
var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
|
|
8245
8750
|
var contribution = strictObject({
|
|
8246
8751
|
message: evidenceMessage,
|
|
@@ -8270,17 +8775,7 @@ var retentionStay = strictObject({
|
|
|
8270
8775
|
});
|
|
8271
8776
|
var evidence = union([contribution, retentionStay]);
|
|
8272
8777
|
|
|
8273
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8274
|
-
var payment = strictObject({
|
|
8275
|
-
amount: text,
|
|
8276
|
-
currency: text,
|
|
8277
|
-
direction: picklist(PAYMENT_DIRECTIONS),
|
|
8278
|
-
counterparty: nullable(reference),
|
|
8279
|
-
counterparty_name: nullable(text),
|
|
8280
|
-
due_at: nullable(text),
|
|
8281
|
-
state: picklist(PAYMENT_STATES),
|
|
8282
|
-
item: nullable(text)
|
|
8283
|
-
});
|
|
8778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/fact.js
|
|
8284
8779
|
var fact = strictObject({
|
|
8285
8780
|
ref: reference,
|
|
8286
8781
|
id,
|
|
@@ -8304,15 +8799,13 @@ var fact = strictObject({
|
|
|
8304
8799
|
/** Who recorded it: the owner, or an agent whose fact waits as proposed. */
|
|
8305
8800
|
origin: picklist(["owner", "agent"]),
|
|
8306
8801
|
evidence: array(reference),
|
|
8307
|
-
/** A `payment` fact's fields. */
|
|
8308
|
-
payment: optional(nullable(payment)),
|
|
8309
8802
|
/** With `--sources`: each piece of evidence read back. */
|
|
8310
8803
|
sources: optional(array(evidenceSource)),
|
|
8311
8804
|
created_at: time,
|
|
8312
8805
|
updated_at: time
|
|
8313
8806
|
});
|
|
8314
8807
|
|
|
8315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/hit.js
|
|
8316
8809
|
var hit = strictObject({
|
|
8317
8810
|
kind: picklist(["message", "mail", "note", "document", "event", "meeting"]),
|
|
8318
8811
|
ref: reference,
|
|
@@ -8350,7 +8843,7 @@ var hit = strictObject({
|
|
|
8350
8843
|
untrusted
|
|
8351
8844
|
});
|
|
8352
8845
|
|
|
8353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8846
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/identity.js
|
|
8354
8847
|
var identity = strictObject({
|
|
8355
8848
|
ref: reference,
|
|
8356
8849
|
provider: text,
|
|
@@ -8363,7 +8856,7 @@ var identity = strictObject({
|
|
|
8363
8856
|
person: optional(nullable(reference))
|
|
8364
8857
|
});
|
|
8365
8858
|
|
|
8366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
|
|
8367
8860
|
var imageEmbedding = strictObject({
|
|
8368
8861
|
model: text,
|
|
8369
8862
|
embedded: count,
|
|
@@ -8372,13 +8865,13 @@ var imageEmbedding = strictObject({
|
|
|
8372
8865
|
more: boolean()
|
|
8373
8866
|
});
|
|
8374
8867
|
|
|
8375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
|
|
8376
8869
|
import { spawn } from "node:child_process";
|
|
8377
8870
|
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
8378
|
-
import { closeSync, existsSync as
|
|
8379
|
-
import { dirname as dirname2, join as
|
|
8871
|
+
import { closeSync, existsSync as existsSync5, mkdirSync as mkdirSync3, openSync, readdirSync as readdirSync4, readFileSync as readFileSync5, realpathSync, rmSync as rmSync3 } from "node:fs";
|
|
8872
|
+
import { dirname as dirname2, join as join5 } from "node:path";
|
|
8380
8873
|
|
|
8381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/background/checkpoints.js
|
|
8382
8875
|
var progressOf = /* @__PURE__ */ __name((input) => {
|
|
8383
8876
|
const total = input.total ?? null;
|
|
8384
8877
|
const updated = input.updatedAt ?? null;
|
|
@@ -8394,7 +8887,7 @@ var progressOf = /* @__PURE__ */ __name((input) => {
|
|
|
8394
8887
|
};
|
|
8395
8888
|
}, "progressOf");
|
|
8396
8889
|
|
|
8397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/runs/record-log.js
|
|
8398
8891
|
var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
|
|
8399
8892
|
const run = currentRun();
|
|
8400
8893
|
const trace = traceId ?? run.traceId;
|
|
@@ -8408,7 +8901,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
|
|
|
8408
8901
|
}));
|
|
8409
8902
|
}, "recordLogFor");
|
|
8410
8903
|
|
|
8411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
|
|
8412
8905
|
var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
|
|
8413
8906
|
var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
8414
8907
|
const out = openSync(log, "a", 384);
|
|
@@ -8424,23 +8917,23 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
|
8424
8917
|
closeSync(out);
|
|
8425
8918
|
}
|
|
8426
8919
|
}, "spawnDetached");
|
|
8427
|
-
var jobsDir = /* @__PURE__ */ __name((app, env) =>
|
|
8428
|
-
var jobPath = /* @__PURE__ */ __name((dir, id6) =>
|
|
8920
|
+
var jobsDir = /* @__PURE__ */ __name((app, env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
|
|
8921
|
+
var jobPath = /* @__PURE__ */ __name((dir, id6) => join5(dir, `${id6}.json`), "jobPath");
|
|
8429
8922
|
var saveJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
8430
8923
|
mkdirSync3(dir, { recursive: true, mode: 448 });
|
|
8431
8924
|
writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
|
|
8432
8925
|
`, 384);
|
|
8433
8926
|
}, "saveJob");
|
|
8434
8927
|
var readJob = /* @__PURE__ */ __name((dir, id6) => {
|
|
8435
|
-
if (!/^[\w-]+$/.test(id6) || !
|
|
8928
|
+
if (!/^[\w-]+$/.test(id6) || !existsSync5(jobPath(dir, id6)))
|
|
8436
8929
|
return void 0;
|
|
8437
8930
|
try {
|
|
8438
|
-
return JSON.parse(
|
|
8931
|
+
return JSON.parse(readFileSync5(jobPath(dir, id6), "utf8"));
|
|
8439
8932
|
} catch {
|
|
8440
8933
|
return void 0;
|
|
8441
8934
|
}
|
|
8442
8935
|
}, "readJob");
|
|
8443
|
-
var recordsPath = /* @__PURE__ */ __name((dir, id6) =>
|
|
8936
|
+
var recordsPath = /* @__PURE__ */ __name((dir, id6) => join5(dir, `${id6}.jsonl`), "recordsPath");
|
|
8444
8937
|
var tracedJob = /* @__PURE__ */ __name((env) => {
|
|
8445
8938
|
const trace = childTrace();
|
|
8446
8939
|
return { env: { ...env, TRACEPARENT: trace.traceparent }, traceId: trace.traceId };
|
|
@@ -8458,11 +8951,11 @@ var finishJob = /* @__PURE__ */ __name((app, dir, id6, change) => {
|
|
|
8458
8951
|
const job2 = readJob(dir, id6);
|
|
8459
8952
|
if (!job2)
|
|
8460
8953
|
return;
|
|
8461
|
-
const
|
|
8954
|
+
const outcome3 = stateOf(job2);
|
|
8462
8955
|
recordLogFor(recordsPath(dir, id6), app, job2.traceId ? { traceId: job2.traceId } : {})[job2.error ? "error" : "info"]({
|
|
8463
8956
|
event: "job.exit",
|
|
8464
8957
|
job: id6,
|
|
8465
|
-
outcome:
|
|
8958
|
+
outcome: outcome3,
|
|
8466
8959
|
...job2.error ? { errorCode: job2.error.code } : {}
|
|
8467
8960
|
});
|
|
8468
8961
|
}, "finishJob");
|
|
@@ -8477,7 +8970,7 @@ var removeJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
|
8477
8970
|
if (dirname2(job2.log) === dir)
|
|
8478
8971
|
rmSync3(job2.log, { force: true });
|
|
8479
8972
|
}, "removeJob");
|
|
8480
|
-
var listJobs = /* @__PURE__ */ __name((dir) =>
|
|
8973
|
+
var listJobs = /* @__PURE__ */ __name((dir) => existsSync5(dir) ? readdirSync4(dir).filter((name) => name.endsWith(".json")).flatMap((name) => readJob(dir, name.slice(0, -".json".length)) ?? []).sort((a, b) => b.startedAt.localeCompare(a.startedAt)) : [], "listJobs");
|
|
8481
8974
|
var jobDetails = /* @__PURE__ */ __name((job2) => ({
|
|
8482
8975
|
job: job2.id,
|
|
8483
8976
|
profile: job2.profile,
|
|
@@ -8543,7 +9036,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
8543
9036
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
8544
9037
|
const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes2(3).toString("hex")}`;
|
|
8545
9038
|
mkdirSync3(dir, { recursive: true, mode: 448 });
|
|
8546
|
-
const log =
|
|
9039
|
+
const log = join5(dir, `${id6}.log`);
|
|
8547
9040
|
const job2 = {
|
|
8548
9041
|
id: id6,
|
|
8549
9042
|
chat: input.chat,
|
|
@@ -8563,7 +9056,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
8563
9056
|
return { job: id6, pid, chat: input.chat, log };
|
|
8564
9057
|
}, "startArchiveJob");
|
|
8565
9058
|
|
|
8566
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/job.js
|
|
8567
9060
|
var problem = strictObject({ code: text, message: text });
|
|
8568
9061
|
var job = strictObject({
|
|
8569
9062
|
id,
|
|
@@ -8586,7 +9079,7 @@ var job = strictObject({
|
|
|
8586
9079
|
error: optional(problem)
|
|
8587
9080
|
});
|
|
8588
9081
|
|
|
8589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/join-request.js
|
|
8590
9083
|
var joinRequest = strictObject({
|
|
8591
9084
|
person_id: id,
|
|
8592
9085
|
name: nullable(text),
|
|
@@ -8597,7 +9090,7 @@ var joinRequest = strictObject({
|
|
|
8597
9090
|
about: optional(text)
|
|
8598
9091
|
});
|
|
8599
9092
|
|
|
8600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/list-results.js
|
|
8601
9094
|
var botProfile = strictObject({
|
|
8602
9095
|
name: text,
|
|
8603
9096
|
token: text,
|
|
@@ -8665,7 +9158,7 @@ var stickerInventory = strictObject({
|
|
|
8665
9158
|
url: optional(nullable(text))
|
|
8666
9159
|
});
|
|
8667
9160
|
|
|
8668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
|
|
8669
9162
|
var pollVote = strictObject({
|
|
8670
9163
|
person_id: id,
|
|
8671
9164
|
name: nullable(text),
|
|
@@ -8675,7 +9168,7 @@ var pollVote = strictObject({
|
|
|
8675
9168
|
voted_at: time
|
|
8676
9169
|
});
|
|
8677
9170
|
|
|
8678
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/listener.js
|
|
8679
9172
|
var reactions = unwrap(unwrap(message.entries.reactions));
|
|
8680
9173
|
var observation = strictObject({
|
|
8681
9174
|
value: pipe(number(), minValue(0)),
|
|
@@ -8717,7 +9210,88 @@ var serveSummary = strictObject({
|
|
|
8717
9210
|
tasks: optional(strictObject({ added: count, closed: count, review: count }))
|
|
8718
9211
|
});
|
|
8719
9212
|
|
|
8720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
|
|
9214
|
+
var mailCounts = strictObject({
|
|
9215
|
+
by: picklist(["day", "week", "sender"]),
|
|
9216
|
+
received: count,
|
|
9217
|
+
sent: count,
|
|
9218
|
+
rows: array(strictObject({
|
|
9219
|
+
/** `YYYY-MM-DD`, or the sender's address. */
|
|
9220
|
+
key: text,
|
|
9221
|
+
name: nullable(text),
|
|
9222
|
+
received: count,
|
|
9223
|
+
/** Always 0 by sender: the owner sends that mail. */
|
|
9224
|
+
sent: count
|
|
9225
|
+
}))
|
|
9226
|
+
});
|
|
9227
|
+
|
|
9228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
|
|
9229
|
+
var evidence2 = strictObject({ reference, fingerprint: text });
|
|
9230
|
+
var base = { id, evidence: array(evidence2) };
|
|
9231
|
+
var finding = variant("kind", [
|
|
9232
|
+
strictObject({
|
|
9233
|
+
...base,
|
|
9234
|
+
kind: literal("task"),
|
|
9235
|
+
project: optional(reference),
|
|
9236
|
+
type: picklist(WORK_TASK_TYPES),
|
|
9237
|
+
title: text,
|
|
9238
|
+
reason: text,
|
|
9239
|
+
commitment: picklist(["explicit", "inferred"]),
|
|
9240
|
+
due_at: optional(time),
|
|
9241
|
+
due_evidence: optional(array(reference)),
|
|
9242
|
+
assignee: optional(reference),
|
|
9243
|
+
assignee_evidence: optional(array(reference))
|
|
9244
|
+
}),
|
|
9245
|
+
strictObject({
|
|
9246
|
+
...base,
|
|
9247
|
+
kind: literal("fact"),
|
|
9248
|
+
project: optional(reference),
|
|
9249
|
+
subject: optional(reference),
|
|
9250
|
+
type: picklist(FACT_TYPES),
|
|
9251
|
+
statement: text
|
|
9252
|
+
}),
|
|
9253
|
+
strictObject({
|
|
9254
|
+
...base,
|
|
9255
|
+
kind: literal("task_update"),
|
|
9256
|
+
task: reference,
|
|
9257
|
+
change: picklist(["close", "due", "detail"]),
|
|
9258
|
+
due_at: optional(time),
|
|
9259
|
+
detail: optional(text),
|
|
9260
|
+
reason: text
|
|
9261
|
+
}),
|
|
9262
|
+
strictObject({
|
|
9263
|
+
...base,
|
|
9264
|
+
kind: literal("memory"),
|
|
9265
|
+
memory_kind: picklist(MEMORY_KINDS),
|
|
9266
|
+
scope: picklist(MEMORY_SCOPES),
|
|
9267
|
+
body: text,
|
|
9268
|
+
subject: optional(reference),
|
|
9269
|
+
project: optional(reference)
|
|
9270
|
+
}),
|
|
9271
|
+
strictObject({ ...base, kind: literal("link"), from: reference, to: reference, reason: text }),
|
|
9272
|
+
strictObject({ ...base, kind: literal("new_contact"), address: text, name: text, reason: optional(text) })
|
|
9273
|
+
]);
|
|
9274
|
+
var outcome = strictObject({
|
|
9275
|
+
id,
|
|
9276
|
+
fingerprint: text,
|
|
9277
|
+
status: picklist(["accepted", "rejected"]),
|
|
9278
|
+
reference: nullable(reference),
|
|
9279
|
+
reused: boolean()
|
|
9280
|
+
});
|
|
9281
|
+
var mailFindings = strictObject({
|
|
9282
|
+
id,
|
|
9283
|
+
account: strictObject({ provider: text, account: text }),
|
|
9284
|
+
input: strictObject({ schema_version: literal(1), key: text, extractor: text, findings: array(finding) }),
|
|
9285
|
+
fingerprint: text,
|
|
9286
|
+
status: picklist(["proposed", "reviewed"]),
|
|
9287
|
+
author,
|
|
9288
|
+
decided_by: nullable(strictObject({ type: picklist(["person", "bot"]), id })),
|
|
9289
|
+
decided_at: nullable(time),
|
|
9290
|
+
previous: array(outcome),
|
|
9291
|
+
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome) }))
|
|
9292
|
+
});
|
|
9293
|
+
|
|
9294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
|
|
8721
9295
|
var mediaArchive = strictObject({
|
|
8722
9296
|
directory: text,
|
|
8723
9297
|
chats: count,
|
|
@@ -8749,7 +9323,7 @@ var mediaArchiveTimer = union([
|
|
|
8749
9323
|
strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
|
|
8750
9324
|
]);
|
|
8751
9325
|
|
|
8752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
|
|
8753
9327
|
var preparationId = pipe(string(), minLength(1));
|
|
8754
9328
|
var preparationCount = pipe(number(), integer(), minValue(0));
|
|
8755
9329
|
var preparationTime = nullable(isoTime);
|
|
@@ -8841,7 +9415,7 @@ var preparationMeeting = strictObject({
|
|
|
8841
9415
|
updated_at: isoTime
|
|
8842
9416
|
});
|
|
8843
9417
|
|
|
8844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
|
|
8845
9419
|
var meetingEvidence = preparationEvidence;
|
|
8846
9420
|
var meetingPersonContext = strictObject({
|
|
8847
9421
|
person: strictObject({ uid: string(), name: nullable(string()) }),
|
|
@@ -8863,13 +9437,13 @@ var meetingPersonContext = strictObject({
|
|
|
8863
9437
|
})
|
|
8864
9438
|
});
|
|
8865
9439
|
|
|
8866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8867
|
-
var
|
|
8868
|
-
var
|
|
8869
|
-
var
|
|
8870
|
-
strictObject({ ...
|
|
9440
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
|
|
9441
|
+
var evidence3 = strictObject({ reference, fingerprint: text });
|
|
9442
|
+
var base2 = { id, project: reference, evidence: array(evidence3) };
|
|
9443
|
+
var finding2 = variant("kind", [
|
|
9444
|
+
strictObject({ ...base2, kind: literal("fact"), type: picklist(FACT_TYPES), statement: text }),
|
|
8871
9445
|
strictObject({
|
|
8872
|
-
...
|
|
9446
|
+
...base2,
|
|
8873
9447
|
kind: literal("task"),
|
|
8874
9448
|
type: picklist(WORK_TASK_TYPES),
|
|
8875
9449
|
title: text,
|
|
@@ -8881,7 +9455,7 @@ var finding = variant("kind", [
|
|
|
8881
9455
|
assignee_evidence: optional(array(reference))
|
|
8882
9456
|
})
|
|
8883
9457
|
]);
|
|
8884
|
-
var
|
|
9458
|
+
var outcome2 = strictObject({
|
|
8885
9459
|
id,
|
|
8886
9460
|
fingerprint: text,
|
|
8887
9461
|
status: picklist(["accepted", "rejected"]),
|
|
@@ -8891,17 +9465,17 @@ var outcome = strictObject({
|
|
|
8891
9465
|
var meetingFindings = strictObject({
|
|
8892
9466
|
id,
|
|
8893
9467
|
account: strictObject({ provider: text, account: text }),
|
|
8894
|
-
input: strictObject({ schema_version: literal(1), key: text, extractor: text, findings: array(
|
|
9468
|
+
input: strictObject({ schema_version: literal(1), key: text, extractor: text, findings: array(finding2) }),
|
|
8895
9469
|
fingerprint: text,
|
|
8896
9470
|
status: picklist(["proposed", "reviewed"]),
|
|
8897
9471
|
author,
|
|
8898
9472
|
decided_by: nullable(strictObject({ type: picklist(["person", "bot"]), id })),
|
|
8899
9473
|
decided_at: nullable(time),
|
|
8900
|
-
previous: array(
|
|
8901
|
-
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(
|
|
9474
|
+
previous: array(outcome2),
|
|
9475
|
+
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
|
|
8902
9476
|
});
|
|
8903
9477
|
|
|
8904
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
|
|
8905
9479
|
var communicationCoverage = strictObject({
|
|
8906
9480
|
read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
|
|
8907
9481
|
query: string(),
|
|
@@ -8946,7 +9520,7 @@ var preparationCommunications = strictObject({
|
|
|
8946
9520
|
}))
|
|
8947
9521
|
});
|
|
8948
9522
|
|
|
8949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
|
|
8950
9524
|
var meetingPreparation = strictObject({
|
|
8951
9525
|
communications: optional(preparationCommunications),
|
|
8952
9526
|
schema_version: literal(1),
|
|
@@ -9059,7 +9633,7 @@ var meetingPreparation = strictObject({
|
|
|
9059
9633
|
})
|
|
9060
9634
|
});
|
|
9061
9635
|
|
|
9062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
|
|
9063
9637
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
9064
9638
|
var id3 = pipe(string(), minLength(1));
|
|
9065
9639
|
var text3 = string();
|
|
@@ -9123,7 +9697,7 @@ var meetingProjectCandidates = strictObject({
|
|
|
9123
9697
|
})
|
|
9124
9698
|
});
|
|
9125
9699
|
|
|
9126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9700
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
|
|
9127
9701
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
9128
9702
|
var id4 = pipe(string(), minLength(1), maxLength(1e3));
|
|
9129
9703
|
var meetingSeriesInventory = strictObject({
|
|
@@ -9153,7 +9727,7 @@ var meetingSeriesInventory = strictObject({
|
|
|
9153
9727
|
})
|
|
9154
9728
|
});
|
|
9155
9729
|
|
|
9156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9730
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
|
|
9157
9731
|
var text4 = string();
|
|
9158
9732
|
var id5 = pipe(number(), integer(), minValue(1));
|
|
9159
9733
|
var revision = picklist(["current", "superseded"]);
|
|
@@ -9170,7 +9744,7 @@ var meetingTaskProposal = strictObject({
|
|
|
9170
9744
|
persistence: literal("proposal-only")
|
|
9171
9745
|
});
|
|
9172
9746
|
|
|
9173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/memory.js
|
|
9174
9748
|
var memory = strictObject({
|
|
9175
9749
|
ref: reference,
|
|
9176
9750
|
id,
|
|
@@ -9197,7 +9771,7 @@ var memory = strictObject({
|
|
|
9197
9771
|
updated_at: time
|
|
9198
9772
|
});
|
|
9199
9773
|
|
|
9200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/mention.js
|
|
9201
9775
|
var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
|
|
9202
9776
|
var status = picklist(["found", "linked", "dismissed"]);
|
|
9203
9777
|
var mention = strictObject({
|
|
@@ -9240,13 +9814,13 @@ var mentionRebuild = strictObject({
|
|
|
9240
9814
|
mentions: count
|
|
9241
9815
|
});
|
|
9242
9816
|
|
|
9243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/message-change.js
|
|
9244
9818
|
var operated3 = { operation_id: id, chat_id: id };
|
|
9245
9819
|
var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
|
|
9246
9820
|
var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
|
|
9247
9821
|
var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
|
|
9248
9822
|
|
|
9249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/message-read.js
|
|
9250
9824
|
var messageTranscript = strictObject({
|
|
9251
9825
|
message_id: id,
|
|
9252
9826
|
text,
|
|
@@ -9304,7 +9878,7 @@ var evidencePacket = strictObject({
|
|
|
9304
9878
|
}))
|
|
9305
9879
|
});
|
|
9306
9880
|
|
|
9307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9881
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/message-context.js
|
|
9308
9882
|
var messageThread = strictObject({
|
|
9309
9883
|
ref: reference,
|
|
9310
9884
|
chat: id,
|
|
@@ -9321,7 +9895,7 @@ var messageThread = strictObject({
|
|
|
9321
9895
|
});
|
|
9322
9896
|
var messageContext = union([message, messageThread]);
|
|
9323
9897
|
|
|
9324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
|
|
9325
9899
|
var messageCounts = strictObject({
|
|
9326
9900
|
by: picklist(["chat", "sender", "day", "hour"]),
|
|
9327
9901
|
total: count,
|
|
@@ -9334,7 +9908,7 @@ var messageCounts = strictObject({
|
|
|
9334
9908
|
}))
|
|
9335
9909
|
});
|
|
9336
9910
|
|
|
9337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/message-link.js
|
|
9338
9912
|
var messageLink = strictObject({
|
|
9339
9913
|
ref: reference,
|
|
9340
9914
|
url: nullable(text),
|
|
@@ -9351,7 +9925,7 @@ var messageLink = strictObject({
|
|
|
9351
9925
|
})))
|
|
9352
9926
|
});
|
|
9353
9927
|
|
|
9354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
|
|
9355
9929
|
var savedMessageFile = strictObject({
|
|
9356
9930
|
kind: text,
|
|
9357
9931
|
path: text,
|
|
@@ -9438,7 +10012,7 @@ var messageSyncAll = strictObject({
|
|
|
9438
10012
|
var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
|
|
9439
10013
|
var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
|
|
9440
10014
|
|
|
9441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/message-write.js
|
|
9442
10016
|
var messageWrite = strictObject({
|
|
9443
10017
|
operation_id: id,
|
|
9444
10018
|
message,
|
|
@@ -9453,7 +10027,7 @@ var draftWrite = strictObject({
|
|
|
9453
10027
|
});
|
|
9454
10028
|
var messageSend = union([messageWrite, draftWrite]);
|
|
9455
10029
|
|
|
9456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/model.js
|
|
9457
10031
|
var model2 = strictObject({
|
|
9458
10032
|
id,
|
|
9459
10033
|
kind: picklist(["audio", "text", "image", "reranker"]),
|
|
@@ -9470,7 +10044,7 @@ var model2 = strictObject({
|
|
|
9470
10044
|
path: text
|
|
9471
10045
|
});
|
|
9472
10046
|
|
|
9473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/model-key.js
|
|
9474
10048
|
var source = picklist(["environment", "keyring", "file"]);
|
|
9475
10049
|
var modelKey = strictObject({
|
|
9476
10050
|
provider: text,
|
|
@@ -9480,7 +10054,7 @@ var modelKey = strictObject({
|
|
|
9480
10054
|
var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
|
|
9481
10055
|
var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
|
|
9482
10056
|
|
|
9483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
|
|
9484
10058
|
var versus = strictObject({ current: number(), previous: number() });
|
|
9485
10059
|
var person = { person_ref: reference, name: nullable(text) };
|
|
9486
10060
|
var graph = strictObject({
|
|
@@ -9514,14 +10088,14 @@ var officialStats = strictObject({
|
|
|
9514
10088
|
graphs: record(string(), union([graph, strictObject({ error: text })]))
|
|
9515
10089
|
});
|
|
9516
10090
|
|
|
9517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/person.js
|
|
9518
10092
|
var person2 = strictObject({
|
|
9519
10093
|
ref: reference,
|
|
9520
10094
|
name: nullable(text),
|
|
9521
10095
|
identities: optional(array(identity))
|
|
9522
10096
|
});
|
|
9523
10097
|
|
|
9524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/poll.js
|
|
9525
10099
|
var poll = strictObject({
|
|
9526
10100
|
chat_id: id,
|
|
9527
10101
|
message_id: id,
|
|
@@ -9537,11 +10111,11 @@ var poll = strictObject({
|
|
|
9537
10111
|
});
|
|
9538
10112
|
var pollChange = strictObject({ operation_id: id, poll });
|
|
9539
10113
|
|
|
9540
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
|
|
9541
10115
|
var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
|
|
9542
10116
|
var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
|
|
9543
10117
|
|
|
9544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/ranking.js
|
|
9545
10119
|
var figures = record(string(), number());
|
|
9546
10120
|
var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
|
|
9547
10121
|
var rankingRow = strictObject({
|
|
@@ -9588,7 +10162,7 @@ var ranking = strictObject({
|
|
|
9588
10162
|
rows: array(rankingRow)
|
|
9589
10163
|
});
|
|
9590
10164
|
|
|
9591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/reaction.js
|
|
9592
10166
|
var reaction = strictObject({
|
|
9593
10167
|
person: strictObject({ id, name: nullable(text), username: nullable(text) }),
|
|
9594
10168
|
/** The emoji, or `custom:<id>` for a custom one. */
|
|
@@ -9596,7 +10170,7 @@ var reaction = strictObject({
|
|
|
9596
10170
|
reacted_at: time
|
|
9597
10171
|
});
|
|
9598
10172
|
|
|
9599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
|
|
9600
10174
|
var reactionChange = strictObject({
|
|
9601
10175
|
operation_id: id,
|
|
9602
10176
|
chat_id: id,
|
|
@@ -9604,7 +10178,7 @@ var reactionChange = strictObject({
|
|
|
9604
10178
|
reaction: nullable(text)
|
|
9605
10179
|
});
|
|
9606
10180
|
|
|
9607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/recipient.js
|
|
9608
10182
|
var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
|
|
9609
10183
|
var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
|
|
9610
10184
|
var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
|
|
@@ -9615,7 +10189,7 @@ var recipientChange = strictObject({
|
|
|
9615
10189
|
...partial(recipientOff).entries
|
|
9616
10190
|
});
|
|
9617
10191
|
|
|
9618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
|
|
9619
10193
|
var events = array(record(string(), unknown()));
|
|
9620
10194
|
var recordedRun = strictObject({
|
|
9621
10195
|
run_id: id,
|
|
@@ -9687,7 +10261,7 @@ var runHit = strictObject({
|
|
|
9687
10261
|
});
|
|
9688
10262
|
var runLocation = strictObject({ path: text });
|
|
9689
10263
|
|
|
9690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/relationship.js
|
|
9691
10265
|
var relationship = strictObject({
|
|
9692
10266
|
id,
|
|
9693
10267
|
from: reference,
|
|
@@ -9704,7 +10278,24 @@ var relationship = strictObject({
|
|
|
9704
10278
|
created_at: time
|
|
9705
10279
|
});
|
|
9706
10280
|
|
|
9707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
|
|
10282
|
+
var milliseconds2 = nullable(pipe(number(), minValue(0)));
|
|
10283
|
+
var figures2 = { replies: count, median_ms: milliseconds2, p90_ms: milliseconds2, mean_ms: milliseconds2 };
|
|
10284
|
+
var responseTimes = strictObject({
|
|
10285
|
+
who: picklist(["me", "others"]),
|
|
10286
|
+
...figures2,
|
|
10287
|
+
buckets: strictObject({ under_5m: count, under_1h: count, under_1d: count, over_1d: count }),
|
|
10288
|
+
/** One row per calendar day of the reply; empty with `--by total`. */
|
|
10289
|
+
rows: array(strictObject({ key: text, ...figures2 }))
|
|
10290
|
+
});
|
|
10291
|
+
var waitingChats = strictObject({
|
|
10292
|
+
chats: count,
|
|
10293
|
+
messages: count,
|
|
10294
|
+
oldest_at: nullable(time),
|
|
10295
|
+
by_kind: strictObject({ private: count, group: count })
|
|
10296
|
+
});
|
|
10297
|
+
|
|
10298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/retention.js
|
|
9708
10299
|
var retentionCohort = strictObject({
|
|
9709
10300
|
/** The first day of the joining day or week. */
|
|
9710
10301
|
cohort: text,
|
|
@@ -9752,7 +10343,7 @@ var retention = strictObject({
|
|
|
9752
10343
|
rows: array(retentionCohort)
|
|
9753
10344
|
});
|
|
9754
10345
|
|
|
9755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
|
|
9756
10347
|
var savedSearch = strictObject({
|
|
9757
10348
|
id,
|
|
9758
10349
|
/** `null` for a run in the history. */
|
|
@@ -9769,7 +10360,7 @@ var savedSearch = strictObject({
|
|
|
9769
10360
|
});
|
|
9770
10361
|
var searchHistoryClear = strictObject({ cleared: count });
|
|
9771
10362
|
|
|
9772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
|
|
9773
10364
|
var sendAttempt = strictObject({
|
|
9774
10365
|
at: time,
|
|
9775
10366
|
profile: text,
|
|
@@ -9797,7 +10388,7 @@ var sendAttempt = strictObject({
|
|
|
9797
10388
|
error_code: optional(text)
|
|
9798
10389
|
});
|
|
9799
10390
|
|
|
9800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
|
|
9801
10392
|
var absent = strictObject({ path: text, exists: literal(false) });
|
|
9802
10393
|
var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
|
|
9803
10394
|
var infoSchema = strictObject({
|
|
@@ -10005,7 +10596,7 @@ var storeRepair = union([
|
|
|
10005
10596
|
]);
|
|
10006
10597
|
var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
|
|
10007
10598
|
|
|
10008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10599
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/store-records.js
|
|
10009
10600
|
var range = strictObject({ from: number(), to: number() });
|
|
10010
10601
|
var storeChatStatus = strictObject({
|
|
10011
10602
|
chat_id: id,
|
|
@@ -10017,6 +10608,13 @@ var storeChatStatus = strictObject({
|
|
|
10017
10608
|
last_stored_at: nullable(time),
|
|
10018
10609
|
held: array(range)
|
|
10019
10610
|
});
|
|
10611
|
+
var chatCoverage = strictObject({
|
|
10612
|
+
chats: count,
|
|
10613
|
+
fetched: count,
|
|
10614
|
+
partial: count,
|
|
10615
|
+
never: count,
|
|
10616
|
+
oldest_message_at: nullable(time)
|
|
10617
|
+
});
|
|
10020
10618
|
var storeClear = strictObject({
|
|
10021
10619
|
cleared: boolean(),
|
|
10022
10620
|
dry_run: optional(literal(true)),
|
|
@@ -10096,7 +10694,7 @@ var storeJobRetry = union([
|
|
|
10096
10694
|
]);
|
|
10097
10695
|
var storeJobClear = strictObject({ cleared: array(id) });
|
|
10098
10696
|
|
|
10099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/store-table.js
|
|
10100
10698
|
var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
|
|
10101
10699
|
var storeTable = strictObject({
|
|
10102
10700
|
name: text,
|
|
@@ -10105,7 +10703,7 @@ var storeTable = strictObject({
|
|
|
10105
10703
|
bytes: optional(nullable(count))
|
|
10106
10704
|
});
|
|
10107
10705
|
|
|
10108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
|
|
10109
10707
|
var tagTarget = variant("type", [
|
|
10110
10708
|
strictObject({ type: literal("chat"), chat_id: id }),
|
|
10111
10709
|
strictObject({ type: literal("contact"), person_id: id }),
|
|
@@ -10136,7 +10734,7 @@ var automaticTags = strictObject({
|
|
|
10136
10734
|
dry_run: boolean()
|
|
10137
10735
|
});
|
|
10138
10736
|
|
|
10139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/tagging.js
|
|
10140
10738
|
var tagging = strictObject({
|
|
10141
10739
|
tag: text,
|
|
10142
10740
|
type: picklist(TAG_TYPES),
|
|
@@ -10149,7 +10747,7 @@ var tagging = strictObject({
|
|
|
10149
10747
|
created_at: time
|
|
10150
10748
|
});
|
|
10151
10749
|
|
|
10152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
|
|
10153
10751
|
var side = strictObject({ ref: reference, key: text, title: text, status: text });
|
|
10154
10752
|
var taskPair = strictObject({
|
|
10155
10753
|
task: nullable(side),
|
|
@@ -10172,7 +10770,7 @@ var taskPair = strictObject({
|
|
|
10172
10770
|
created_at: time
|
|
10173
10771
|
});
|
|
10174
10772
|
|
|
10175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/task-results.js
|
|
10176
10774
|
var nullableTime = nullable(time);
|
|
10177
10775
|
var link = strictObject({
|
|
10178
10776
|
id,
|
|
@@ -10302,8 +10900,47 @@ var taskScan = strictObject({
|
|
|
10302
10900
|
held_chats: optional(count),
|
|
10303
10901
|
tasks: array(strictObject({ source: text, kind: picklist(TASK_KINDS), category: nullable(text) }))
|
|
10304
10902
|
});
|
|
10903
|
+
var taskAnalysisMark = strictObject({
|
|
10904
|
+
chat: text,
|
|
10905
|
+
from: time,
|
|
10906
|
+
through: time,
|
|
10907
|
+
through_id: text,
|
|
10908
|
+
by: text,
|
|
10909
|
+
checked_at: time,
|
|
10910
|
+
checked_through: time,
|
|
10911
|
+
at: time
|
|
10912
|
+
});
|
|
10913
|
+
var taskAnalysisMarkMoved = strictObject({ ...taskAnalysisMark.entries, moved: boolean() });
|
|
10914
|
+
var taskAnalysis = strictObject({
|
|
10915
|
+
chat: text,
|
|
10916
|
+
title: nullable(text),
|
|
10917
|
+
kind: text,
|
|
10918
|
+
newest_at: nullableTime,
|
|
10919
|
+
mark: nullable(taskAnalysisMark),
|
|
10920
|
+
waiting: count,
|
|
10921
|
+
late: count,
|
|
10922
|
+
untrusted
|
|
10923
|
+
});
|
|
10924
|
+
var taskReview = strictObject({
|
|
10925
|
+
chat: text,
|
|
10926
|
+
from: time,
|
|
10927
|
+
mark: nullable(taskAnalysisMark),
|
|
10928
|
+
late: count,
|
|
10929
|
+
has_more: boolean(),
|
|
10930
|
+
through: nullable(reference),
|
|
10931
|
+
messages: array(strictObject({
|
|
10932
|
+
ref: reference,
|
|
10933
|
+
at: time,
|
|
10934
|
+
sender: nullable(text),
|
|
10935
|
+
outgoing: boolean(),
|
|
10936
|
+
reply_to: nullable(text),
|
|
10937
|
+
text
|
|
10938
|
+
})),
|
|
10939
|
+
open_tasks: array(strictObject({ key: nullable(text), kind: text, title: nullable(text), source: nullable(text) })),
|
|
10940
|
+
untrusted
|
|
10941
|
+
});
|
|
10305
10942
|
|
|
10306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/topic.js
|
|
10307
10944
|
var topic = strictObject({
|
|
10308
10945
|
id,
|
|
10309
10946
|
title: text,
|
|
@@ -10317,7 +10954,7 @@ var topic = strictObject({
|
|
|
10317
10954
|
untrusted
|
|
10318
10955
|
});
|
|
10319
10956
|
|
|
10320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/entities/index.js
|
|
10321
10958
|
var ENTITIES = {
|
|
10322
10959
|
sync_progress: progress,
|
|
10323
10960
|
...MEETING_RESULT_ENTITIES,
|
|
@@ -10347,18 +10984,22 @@ var ENTITIES = {
|
|
|
10347
10984
|
attachments: optional(array(hitFile)),
|
|
10348
10985
|
untrusted
|
|
10349
10986
|
}),
|
|
10350
|
-
"message.summary":
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10987
|
+
"message.summary": strictObject({
|
|
10988
|
+
...pick(message, [
|
|
10989
|
+
"ref",
|
|
10990
|
+
"chat_id",
|
|
10991
|
+
"chat_title",
|
|
10992
|
+
"timestamp",
|
|
10993
|
+
"sender_name",
|
|
10994
|
+
"sender_is_me",
|
|
10995
|
+
"outgoing",
|
|
10996
|
+
"text",
|
|
10997
|
+
"transcript",
|
|
10998
|
+
"attachments",
|
|
10999
|
+
"email"
|
|
11000
|
+
]).entries,
|
|
11001
|
+
untrusted
|
|
11002
|
+
}),
|
|
10362
11003
|
message_link: messageLink,
|
|
10363
11004
|
message_write: messageWrite,
|
|
10364
11005
|
message_send: messageSend,
|
|
@@ -10455,6 +11096,9 @@ var ENTITIES = {
|
|
|
10455
11096
|
task_unmerge: taskUnmerge,
|
|
10456
11097
|
task_categories: taskCategories,
|
|
10457
11098
|
task_scan: taskScan,
|
|
11099
|
+
task_analysis: taskAnalysis,
|
|
11100
|
+
task_analysis_mark: taskAnalysisMarkMoved,
|
|
11101
|
+
task_review: taskReview,
|
|
10458
11102
|
fact,
|
|
10459
11103
|
memory,
|
|
10460
11104
|
meeting,
|
|
@@ -10465,6 +11109,7 @@ var ENTITIES = {
|
|
|
10465
11109
|
meeting_project_evidence: meetingProjectEvidence,
|
|
10466
11110
|
meeting_preparation: meetingPreparation,
|
|
10467
11111
|
meeting_findings: meetingFindings,
|
|
11112
|
+
mail_findings: mailFindings,
|
|
10468
11113
|
meeting_transcript: meetingTranscript,
|
|
10469
11114
|
meeting_summary: meetingSummary,
|
|
10470
11115
|
meeting_evidence: meetingEvidence,
|
|
@@ -10473,6 +11118,7 @@ var ENTITIES = {
|
|
|
10473
11118
|
meeting_review: meetingReview,
|
|
10474
11119
|
meeting_link: meetingLink,
|
|
10475
11120
|
meeting_stats: meetingStats,
|
|
11121
|
+
meeting_counts: meetingCounts,
|
|
10476
11122
|
meeting_speaker: meetingSpeaker,
|
|
10477
11123
|
meeting_participants: meetingParticipants,
|
|
10478
11124
|
meeting_passage: meetingPassage,
|
|
@@ -10510,6 +11156,7 @@ var ENTITIES = {
|
|
|
10510
11156
|
job,
|
|
10511
11157
|
store_chat_status: storeChatStatus,
|
|
10512
11158
|
store_clear: storeClear,
|
|
11159
|
+
chat_coverage: chatCoverage,
|
|
10513
11160
|
store_export: storeExport,
|
|
10514
11161
|
store_gap_plan: storeGapPlan,
|
|
10515
11162
|
store_gap_repair: storeGapRepair,
|
|
@@ -10565,6 +11212,9 @@ var ENTITIES = {
|
|
|
10565
11212
|
topic,
|
|
10566
11213
|
folder,
|
|
10567
11214
|
message_counts: messageCounts,
|
|
11215
|
+
response_times: responseTimes,
|
|
11216
|
+
waiting_chats: waitingChats,
|
|
11217
|
+
mail_counts: mailCounts,
|
|
10568
11218
|
ranking,
|
|
10569
11219
|
admin_report: adminReport,
|
|
10570
11220
|
analysis_consent: analysisConsent,
|
|
@@ -10586,7 +11236,7 @@ var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.e
|
|
|
10586
11236
|
return [name, definition];
|
|
10587
11237
|
})), "entityDefinitions");
|
|
10588
11238
|
|
|
10589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
|
|
10590
11240
|
var schemas = /* @__PURE__ */ new WeakMap();
|
|
10591
11241
|
var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
|
|
10592
11242
|
if (Object.hasOwn(ENTITIES, name))
|
|
@@ -10620,8 +11270,8 @@ var answerRow = /* @__PURE__ */ __name((command) => {
|
|
|
10620
11270
|
return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
|
|
10621
11271
|
}, "answerRow");
|
|
10622
11272
|
|
|
10623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10624
|
-
import { join as
|
|
11273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/images/picture/models.js
|
|
11274
|
+
import { join as join6 } from "node:path";
|
|
10625
11275
|
var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
|
|
10626
11276
|
var IMAGE_MODELS = [
|
|
10627
11277
|
{
|
|
@@ -10671,10 +11321,10 @@ var imageModel = /* @__PURE__ */ __name((id6) => {
|
|
|
10671
11321
|
return found;
|
|
10672
11322
|
}, "imageModel");
|
|
10673
11323
|
var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
|
|
10674
|
-
var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file,
|
|
11324
|
+
var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file, join6(directory, model3.id, file.name)]), "placedImage");
|
|
10675
11325
|
var isImageModelInstalled = /* @__PURE__ */ __name((model3, directory) => filesPresent(placedImage(model3, directory)), "isImageModelInstalled");
|
|
10676
11326
|
|
|
10677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/steps.js
|
|
10678
11328
|
var STEPS2 = defineSteps([
|
|
10679
11329
|
...STEPS,
|
|
10680
11330
|
{
|
|
@@ -10878,6 +11528,16 @@ var STEPS2 = defineSteps([
|
|
|
10878
11528
|
args: [],
|
|
10879
11529
|
why: "serve still runs an older version; a restart runs the one installed now"
|
|
10880
11530
|
},
|
|
11531
|
+
{
|
|
11532
|
+
id: "tasks.acknowledge",
|
|
11533
|
+
command: "tasks acknowledge",
|
|
11534
|
+
args: [
|
|
11535
|
+
{ name: "chat", required: true },
|
|
11536
|
+
{ name: "message", required: true },
|
|
11537
|
+
{ name: "since_time", required: false }
|
|
11538
|
+
],
|
|
11539
|
+
why: "once the tasks these {shown} messages hold are opened, updated or closed, so the next review starts after them"
|
|
11540
|
+
},
|
|
10881
11541
|
{
|
|
10882
11542
|
id: "search.meetings",
|
|
10883
11543
|
command: "*",
|
|
@@ -10886,7 +11546,7 @@ var STEPS2 = defineSteps([
|
|
|
10886
11546
|
}
|
|
10887
11547
|
]);
|
|
10888
11548
|
var nextStep = /* @__PURE__ */ __name((id6, input) => {
|
|
10889
|
-
const definition = STEPS2.find((
|
|
11549
|
+
const definition = STEPS2.find((step2) => step2.id === id6);
|
|
10890
11550
|
if (!definition)
|
|
10891
11551
|
throw new Error(`no step "${id6}"`);
|
|
10892
11552
|
const args = Object.fromEntries(Object.entries(input.args ?? {}).filter(([, value]) => value !== void 0));
|
|
@@ -10909,7 +11569,7 @@ var commandAt = /* @__PURE__ */ __name((root, path2) => {
|
|
|
10909
11569
|
at2 = at2?.commands.find((one) => one.name() === word || one.aliases().includes(word));
|
|
10910
11570
|
return at2 === root ? void 0 : at2;
|
|
10911
11571
|
}, "commandAt");
|
|
10912
|
-
var runnable = /* @__PURE__ */ __name((root, steps) => withSafety((steps ?? []).filter((
|
|
11572
|
+
var runnable = /* @__PURE__ */ __name((root, steps) => withSafety((steps ?? []).filter((step2) => step2.kind === "user_action" || commandAt(root, step2.command) !== void 0).slice(0, MAX_NEXT_STEPS), judgedTargets(root)), "runnable");
|
|
10913
11573
|
var failureSteps = /* @__PURE__ */ __name((root, error) => {
|
|
10914
11574
|
const model3 = error.details?.model;
|
|
10915
11575
|
const own = error.reason === "model.not-downloaded" && typeof model3 === "string" ? [
|
|
@@ -10919,33 +11579,33 @@ var failureSteps = /* @__PURE__ */ __name((root, error) => {
|
|
|
10919
11579
|
] : [];
|
|
10920
11580
|
return runnable(root, [...error.next ?? [], ...own]);
|
|
10921
11581
|
}, "failureSteps");
|
|
10922
|
-
var withSafety = /* @__PURE__ */ __name((steps, targets) => steps.map((
|
|
10923
|
-
if (
|
|
10924
|
-
return
|
|
10925
|
-
const effects = targets(
|
|
10926
|
-
return { ...
|
|
11582
|
+
var withSafety = /* @__PURE__ */ __name((steps, targets) => steps.map((step2) => {
|
|
11583
|
+
if (step2.kind === "user_action")
|
|
11584
|
+
return step2;
|
|
11585
|
+
const effects = targets(step2.command)?.effects;
|
|
11586
|
+
return { ...step2, safe_to_auto_execute: effects !== void 0 && !writes(effects) };
|
|
10927
11587
|
}), "withSafety");
|
|
10928
|
-
var withLines = /* @__PURE__ */ __name((root, steps) => steps.map((
|
|
11588
|
+
var withLines = /* @__PURE__ */ __name((root, steps) => steps.map((step2) => step2.kind === "command" ? { ...step2, line: stepLine(root, step2) } : step2), "withLines");
|
|
10929
11589
|
var kebab = /* @__PURE__ */ __name((name) => name.replaceAll("_", "-"), "kebab");
|
|
10930
11590
|
var quoted2 = /* @__PURE__ */ __name((value) => {
|
|
10931
11591
|
const text5 = String(value);
|
|
10932
11592
|
return /^[\w@:./+-]+$/.test(text5) ? text5 : JSON.stringify(text5);
|
|
10933
11593
|
}, "quoted");
|
|
10934
|
-
var stepLine = /* @__PURE__ */ __name((root,
|
|
10935
|
-
const command = commandAt(root,
|
|
11594
|
+
var stepLine = /* @__PURE__ */ __name((root, step2) => {
|
|
11595
|
+
const command = commandAt(root, step2.command);
|
|
10936
11596
|
const positional = new Set(command?.registeredArguments.map((argument) => argument.name()) ?? []);
|
|
10937
|
-
const args = Object.entries(
|
|
11597
|
+
const args = Object.entries(step2.args).filter(([, value]) => value !== void 0 && value !== false);
|
|
10938
11598
|
const profile = root.getOptionValue("profile");
|
|
10939
11599
|
return [
|
|
10940
11600
|
root.name(),
|
|
10941
11601
|
...typeof profile === "string" && profile !== "" ? [quoted2(profile)] : [],
|
|
10942
|
-
|
|
10943
|
-
...(command?.registeredArguments ?? []).flatMap((argument) =>
|
|
11602
|
+
step2.command,
|
|
11603
|
+
...(command?.registeredArguments ?? []).flatMap((argument) => step2.args[argument.name()] === void 0 ? [] : [quoted2(step2.args[argument.name()])]),
|
|
10944
11604
|
...args.filter(([name]) => !positional.has(name)).map(([name, value]) => value === true ? `--${kebab(name)}` : `--${kebab(name)} ${quoted2(value)}`)
|
|
10945
11605
|
].join(" ");
|
|
10946
11606
|
}, "stepLine");
|
|
10947
11607
|
|
|
10948
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
|
|
10949
11609
|
var where = [{ field: "ref" }, { field: ["chat_title", "chat"] }];
|
|
10950
11610
|
var who2 = { field: ["who.owner", "who.name"], tag: "you" };
|
|
10951
11611
|
var STATUS_SIGNAL_ROWS = {
|
|
@@ -11054,7 +11714,7 @@ var STATUS_ROWS = {
|
|
|
11054
11714
|
"status.failed": { columns: [{ field: "signal" }], text: ["why"] }
|
|
11055
11715
|
};
|
|
11056
11716
|
|
|
11057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/compact.js
|
|
11058
11718
|
var TEXT_CHARS = 400;
|
|
11059
11719
|
var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
|
|
11060
11720
|
var messageRow = {
|
|
@@ -11207,10 +11867,10 @@ var clockFor = /* @__PURE__ */ __name((zone) => {
|
|
|
11207
11867
|
return {
|
|
11208
11868
|
zone,
|
|
11209
11869
|
parts: /* @__PURE__ */ __name((iso) => {
|
|
11210
|
-
const
|
|
11211
|
-
if (Number.isNaN(
|
|
11870
|
+
const ms2 = Date.parse(iso);
|
|
11871
|
+
if (Number.isNaN(ms2))
|
|
11212
11872
|
return void 0;
|
|
11213
|
-
const part = Object.fromEntries(format.formatToParts(
|
|
11873
|
+
const part = Object.fromEntries(format.formatToParts(ms2).map(({ type, value }) => [type, value]));
|
|
11214
11874
|
return { date: `${part.year}-${part.month}-${part.day}`, time: `${part.hour}:${part.minute}` };
|
|
11215
11875
|
}, "parts")
|
|
11216
11876
|
};
|
|
@@ -11334,20 +11994,20 @@ var blockOf = /* @__PURE__ */ __name((fields, chars, indent = "", whole = []) =>
|
|
|
11334
11994
|
var footerOf = /* @__PURE__ */ __name((body) => {
|
|
11335
11995
|
const lines = [];
|
|
11336
11996
|
const steps = body.next ?? [];
|
|
11337
|
-
const lineOf2 = /* @__PURE__ */ __name((
|
|
11997
|
+
const lineOf2 = /* @__PURE__ */ __name((step2) => step2.kind === "command" ? step2.line ?? step2.command : void 0, "lineOf");
|
|
11338
11998
|
if ("items" in body && body.page.has_more) {
|
|
11339
|
-
const more = steps.find((
|
|
11999
|
+
const more = steps.find((step2) => step2.step === "page.next");
|
|
11340
12000
|
const line = more?.kind === "command" ? more.line : void 0;
|
|
11341
12001
|
const page2 = body.page;
|
|
11342
12002
|
lines.push(`# more: ${clean(line ?? (page2.mode === "cursor" && page2.next_cursor ? `--cursor ${page2.next_cursor}` : page2.mode === "page" && page2.next_page ? `--page ${page2.next_page}` : "raise --limit"))}`);
|
|
11343
12003
|
}
|
|
11344
12004
|
for (const missing of body.missing ?? [])
|
|
11345
12005
|
lines.push(`# missing: ${clean(missing.field)}: ${clean(missing.why)}`);
|
|
11346
|
-
for (const
|
|
11347
|
-
if (
|
|
12006
|
+
for (const step2 of steps) {
|
|
12007
|
+
if (step2.step === "page.next" && "items" in body)
|
|
11348
12008
|
continue;
|
|
11349
|
-
const line = lineOf2(
|
|
11350
|
-
lines.push(`# next: ${clean(
|
|
12009
|
+
const line = lineOf2(step2);
|
|
12010
|
+
lines.push(`# next: ${clean(step2.why)}${line ? `: ${clean(line)}` : ""}`);
|
|
11351
12011
|
}
|
|
11352
12012
|
if (body.meta?.complete === false) {
|
|
11353
12013
|
const issues = (body.meta.issues ?? []).map((issue) => `${clean(issue.source)}: ${clean(String(issue.code))}`);
|
|
@@ -11390,7 +12050,65 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
|
|
|
11390
12050
|
return lines.concat(footerOf(body)).join("\n");
|
|
11391
12051
|
}, "compactText");
|
|
11392
12052
|
|
|
11393
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
|
|
12054
|
+
var SOFT_OUTPUT_BYTES = 256 * 1024;
|
|
12055
|
+
var CARRIED = ["json", "compact", "offline", "timeout", "full", "brief", "maxOutputBytes"];
|
|
12056
|
+
var NOT_WITH_COMPACT = /* @__PURE__ */ new Set(["json", "brief"]);
|
|
12057
|
+
var snake3 = /* @__PURE__ */ __name((name) => name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
12058
|
+
var typed = /* @__PURE__ */ __name((command, key) => command.getOptionValueSource(key) === "cli", "typed");
|
|
12059
|
+
var typedArgs = /* @__PURE__ */ __name((command) => {
|
|
12060
|
+
const root = rootOf2(command);
|
|
12061
|
+
if (root.getOptionValue("fields") !== void 0)
|
|
12062
|
+
return void 0;
|
|
12063
|
+
if (command.options.some((option) => option.negate && typed(command, option.attributeName())))
|
|
12064
|
+
return void 0;
|
|
12065
|
+
const positional = command.registeredArguments.flatMap((argument, index) => {
|
|
12066
|
+
const value = command.processedArgs[index];
|
|
12067
|
+
const word = Array.isArray(value) ? value.join(" ") : value;
|
|
12068
|
+
return word === void 0 || word === "" ? [] : [[argument.name(), word]];
|
|
12069
|
+
});
|
|
12070
|
+
const own = command.options.map((option) => option.attributeName()).filter((key) => typed(command, key)).map((key) => [snake3(key), command.getOptionValue(key)]);
|
|
12071
|
+
const global = CARRIED.filter((key) => typed(root, key)).map((key) => [snake3(key), root.getOptionValue(key)]);
|
|
12072
|
+
return Object.fromEntries([...positional, ...own, ...global]);
|
|
12073
|
+
}, "typedArgs");
|
|
12074
|
+
var declaresRow = /* @__PURE__ */ __name((command) => {
|
|
12075
|
+
const { rows: rows2 } = environmentOf(command);
|
|
12076
|
+
return rowShapeOf(command, rows2 && entityRows(rows2)) !== GENERIC_ROW;
|
|
12077
|
+
}, "declaresRow");
|
|
12078
|
+
var pathOf3 = /* @__PURE__ */ __name((command) => {
|
|
12079
|
+
const words = [];
|
|
12080
|
+
for (let at2 = command; at2.parent; at2 = at2.parent)
|
|
12081
|
+
words.unshift(at2.name());
|
|
12082
|
+
return words.join(" ");
|
|
12083
|
+
}, "pathOf");
|
|
12084
|
+
var step = /* @__PURE__ */ __name((command, id6, args, why) => ({
|
|
12085
|
+
kind: "command",
|
|
12086
|
+
step: id6,
|
|
12087
|
+
command: pathOf3(command),
|
|
12088
|
+
args,
|
|
12089
|
+
why,
|
|
12090
|
+
safe_to_auto_execute: true
|
|
12091
|
+
}), "step");
|
|
12092
|
+
var compactStep = /* @__PURE__ */ __name((command, args, why) => rootOf2(command).getOptionValue("compact") === true || !declaresRow(command) ? [] : [
|
|
12093
|
+
step(command, "output.compact", { ...Object.fromEntries(Object.entries(args).filter(([key]) => !NOT_WITH_COMPACT.has(key))), compact: true }, why)
|
|
12094
|
+
], "compactStep");
|
|
12095
|
+
var tooLargeSteps = /* @__PURE__ */ __name((command, { maxBytes, neededBytes }) => {
|
|
12096
|
+
const args = typedArgs(command);
|
|
12097
|
+
if (!args)
|
|
12098
|
+
return [];
|
|
12099
|
+
const limit = Number(command.getOptionValue("limit"));
|
|
12100
|
+
const fits = Math.floor(limit * maxBytes / neededBytes * 0.9);
|
|
12101
|
+
return [
|
|
12102
|
+
...compactStep(command, args, "the answer is over the output cap as JSON; one line per item keeps every ref"),
|
|
12103
|
+
...Number.isSafeInteger(limit) && fits >= 1 && fits < limit ? [step(command, "output.limit", { ...args, limit: fits }, `about ${fits} items fit under the output cap`)] : []
|
|
12104
|
+
];
|
|
12105
|
+
}, "tooLargeSteps");
|
|
12106
|
+
var largeAnswerSteps = /* @__PURE__ */ __name((command) => {
|
|
12107
|
+
const args = typedArgs(command);
|
|
12108
|
+
return args ? compactStep(command, args, "the answer is large as JSON; one line per item keeps every ref") : [];
|
|
12109
|
+
}, "largeAnswerSteps");
|
|
12110
|
+
|
|
12111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
|
|
11394
12112
|
var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
|
|
11395
12113
|
var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
|
|
11396
12114
|
var strip = /* @__PURE__ */ __name((value) => {
|
|
@@ -11404,7 +12122,7 @@ var strip = /* @__PURE__ */ __name((value) => {
|
|
|
11404
12122
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
|
|
11405
12123
|
}, "strip");
|
|
11406
12124
|
|
|
11407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/envelope.js
|
|
11408
12126
|
var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
|
|
11409
12127
|
var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
|
|
11410
12128
|
var listOf = /* @__PURE__ */ __name((command, input) => {
|
|
@@ -11447,7 +12165,7 @@ var itemOf = /* @__PURE__ */ __name((item, { next = [], missing, meta } = {}) =>
|
|
|
11447
12165
|
};
|
|
11448
12166
|
return body;
|
|
11449
12167
|
}, "itemOf");
|
|
11450
|
-
var
|
|
12168
|
+
var snake4 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
11451
12169
|
var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
11452
12170
|
const kept = new Set(verbatim);
|
|
11453
12171
|
const convert = /* @__PURE__ */ __name((value) => {
|
|
@@ -11458,7 +12176,7 @@ var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
|
11458
12176
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => {
|
|
11459
12177
|
if (inner === void 0)
|
|
11460
12178
|
return [];
|
|
11461
|
-
const name =
|
|
12179
|
+
const name = snake4(key);
|
|
11462
12180
|
return [[name, kept.has(key) || kept.has(name) ? inner : convert(inner)]];
|
|
11463
12181
|
}));
|
|
11464
12182
|
}, "convert");
|
|
@@ -11498,7 +12216,16 @@ var sealed = /* @__PURE__ */ __name((value) => {
|
|
|
11498
12216
|
const { meta, ...rest } = withoutProviderRefs(value);
|
|
11499
12217
|
return { ...rest, meta: metaNow(meta) };
|
|
11500
12218
|
}, "sealed");
|
|
11501
|
-
var compactSteps = /* @__PURE__ */ __name((root, steps) => steps.map((
|
|
12219
|
+
var compactSteps = /* @__PURE__ */ __name((root, steps) => steps.map((step2) => step2.kind === "command" ? { ...step2, line: `${step2.line ?? stepLine(root, step2)} ${COMPACT_FLAG}` } : step2), "compactSteps");
|
|
12220
|
+
var withLargeAnswerStep = /* @__PURE__ */ __name((command, body) => {
|
|
12221
|
+
if ((body.next?.length ?? 0) >= MAX_NEXT_STEPS)
|
|
12222
|
+
return body;
|
|
12223
|
+
const added = largeAnswerSteps(command);
|
|
12224
|
+
if (added.length === 0 || Buffer.byteLength(JSON.stringify(body)) <= SOFT_OUTPUT_BYTES)
|
|
12225
|
+
return body;
|
|
12226
|
+
const root = rootOf2(command);
|
|
12227
|
+
return { ...body, next: [...body.next ?? [], ...withLines(root, runnable(root, added))] };
|
|
12228
|
+
}, "withLargeAnswerStep");
|
|
11502
12229
|
var linesOf = /* @__PURE__ */ __name((body) => jsonlOf("items" in body ? body : { items: [body.item], page: { mode: "page", limit: 1, has_more: false }, meta: body.meta }), "linesOf");
|
|
11503
12230
|
var jsonlRecords = /* @__PURE__ */ __name((body) => linesOf(sealed(body)).split("\n").map((line) => JSON.parse(line)), "jsonlRecords");
|
|
11504
12231
|
var renderAnswer = /* @__PURE__ */ __name((command, { renderer, format, streams, compact, full }, body, view) => {
|
|
@@ -11510,9 +12237,10 @@ var renderAnswer = /* @__PURE__ */ __name((command, { renderer, format, streams,
|
|
|
11510
12237
|
const kept = withoutProviderRefs({ ...body, ...next.length > 0 ? { next } : {} });
|
|
11511
12238
|
if (next.length === 0)
|
|
11512
12239
|
delete kept.next;
|
|
11513
|
-
const
|
|
12240
|
+
const sealedBody = sealed(kept);
|
|
11514
12241
|
const environment = environmentOf(command);
|
|
11515
12242
|
const drawn = compact && !environment.agent;
|
|
12243
|
+
const whole = format === "json" && !drawn && !environment.agent ? withLargeAnswerStep(command, sealedBody) : sealedBody;
|
|
11516
12244
|
if (drawn) {
|
|
11517
12245
|
const lined = whole.next ? { ...whole, next: compactSteps(root, whole.next) } : whole;
|
|
11518
12246
|
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
@@ -11532,8 +12260,8 @@ var renderAnswer = /* @__PURE__ */ __name((command, { renderer, format, streams,
|
|
|
11532
12260
|
setExitCode(command, code);
|
|
11533
12261
|
if (drawn || format === "json")
|
|
11534
12262
|
return;
|
|
11535
|
-
for (const
|
|
11536
|
-
renderer.note(
|
|
12263
|
+
for (const step2 of next)
|
|
12264
|
+
renderer.note(step2.kind === "command" ? `\u2192 ${step2.why}: ${stepLine(root, step2)}` : `\u2192 ${step2.why}`);
|
|
11537
12265
|
}, "renderAnswer");
|
|
11538
12266
|
var renderDocument = /* @__PURE__ */ __name(({ renderer }, document2) => renderer.result(document2), "renderDocument");
|
|
11539
12267
|
var itemAnswer = /* @__PURE__ */ __name((item) => sealed(itemOf(item)), "itemAnswer");
|
|
@@ -11641,8 +12369,14 @@ export {
|
|
|
11641
12369
|
assertRetentionEvidenceRead,
|
|
11642
12370
|
historyWindow,
|
|
11643
12371
|
limitBatch,
|
|
12372
|
+
botFiles,
|
|
12373
|
+
ChatRegistry,
|
|
12374
|
+
registryProfiles,
|
|
12375
|
+
REPAIR_WORDS,
|
|
12376
|
+
repairConfigText,
|
|
11644
12377
|
permissionIssues,
|
|
11645
12378
|
publicIssue,
|
|
12379
|
+
fixVerb,
|
|
11646
12380
|
issueMessage,
|
|
11647
12381
|
rememberAccount,
|
|
11648
12382
|
recalledAccount,
|
|
@@ -11670,6 +12404,7 @@ export {
|
|
|
11670
12404
|
logsInOrOut,
|
|
11671
12405
|
isLogin,
|
|
11672
12406
|
destroysNothing,
|
|
12407
|
+
admittedUnderLock,
|
|
11673
12408
|
changesStore,
|
|
11674
12409
|
readsOverMcpAt,
|
|
11675
12410
|
isStoreChange,
|
|
@@ -11748,7 +12483,6 @@ export {
|
|
|
11748
12483
|
answerProjectionSchema,
|
|
11749
12484
|
STATUS_SIGNAL_ROWS,
|
|
11750
12485
|
entityRows,
|
|
11751
|
-
withoutProviderRefs,
|
|
11752
12486
|
IMAGE_MODELS,
|
|
11753
12487
|
DEFAULT_IMAGE_MODEL,
|
|
11754
12488
|
imageModel,
|
|
@@ -11763,6 +12497,8 @@ export {
|
|
|
11763
12497
|
failureSteps,
|
|
11764
12498
|
withLines,
|
|
11765
12499
|
stepLine,
|
|
12500
|
+
tooLargeSteps,
|
|
12501
|
+
withoutProviderRefs,
|
|
11766
12502
|
answerSchema,
|
|
11767
12503
|
listOf,
|
|
11768
12504
|
itemOf,
|