@wirecat/tg-cli 0.115.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/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-ODK7R4LY.js → adapter-6CLMTQOV.js} +76 -50
- package/dist/bundle/{all-profiles-AQYM65BS.js → all-profiles-R2UZMH24.js} +10 -9
- package/dist/bundle/{anthropic-VBDSVNIM.js → anthropic-QKIPHV2Z.js} +6 -6
- package/dist/bundle/{app-server-YOIHLBNS.js → app-server-AZB2MFK6.js} +43 -42
- package/dist/bundle/{bot-api-TRYLGQKK.js → bot-api-2IM243J4.js} +50 -49
- package/dist/bundle/{bot-history-7DTJLBBJ.js → bot-history-G6CRVCL2.js} +18 -17
- package/dist/bundle/{bun-XIMM6EHD.js → bun-JDKPISPX.js} +2 -2
- package/dist/bundle/{bun-sqlite-6B3BL5IV.js → bun-sqlite-X5PY5IQT.js} +5 -5
- package/dist/bundle/{chunk-XY7IGVVS.js → chunk-42GK3XRS.js} +2 -2
- package/dist/bundle/{chunk-PEKTB3FQ.js → chunk-4D5AUWAY.js} +25 -14
- package/dist/bundle/{chunk-XIYRHIBK.js → chunk-4IQZRW4O.js} +13 -13
- package/dist/bundle/{chunk-DIABP7ZP.js → chunk-577MFPCP.js} +3 -3
- package/dist/bundle/{chunk-O7CBGHI7.js → chunk-5FCONCJO.js} +1 -1
- package/dist/bundle/{chunk-GX4DMI4H.js → chunk-5VFPUOJO.js} +15 -12
- package/dist/bundle/{chunk-5ROWSRK7.js → chunk-5ZIBAYIZ.js} +2 -2
- package/dist/bundle/{chunk-77M3IAVU.js → chunk-76CX2YPT.js} +27 -8
- package/dist/bundle/{chunk-MUZ4KYGY.js → chunk-B4UOCWM4.js} +2 -2
- package/dist/bundle/{chunk-Y3AQHPAJ.js → chunk-BGMV66FC.js} +1 -1
- package/dist/bundle/{chunk-WOQGUIXE.js → chunk-DP5LRU7K.js} +1 -1
- package/dist/bundle/{chunk-CCHHEMPM.js → chunk-EB2IULWB.js} +3 -2
- package/dist/bundle/{chunk-IUDIRZVU.js → chunk-FDI4GOIP.js} +890 -473
- package/dist/bundle/{chunk-AICS3TSF.js → chunk-GV7ZJ33M.js} +4 -4
- package/dist/bundle/{chunk-WMG4IGEB.js → chunk-H72UEHNG.js} +66 -33
- package/dist/bundle/{chunk-HZKWB6WS.js → chunk-HBUJNNZD.js} +28 -28
- package/dist/bundle/{chunk-GCFU6WBE.js → chunk-HK6SIIGG.js} +3 -3
- package/dist/bundle/{chunk-BIEBJLYO.js → chunk-HLNYJPAB.js} +2 -2
- package/dist/bundle/{chunk-PZAEI4NM.js → chunk-HUOXUI2M.js} +22 -22
- package/dist/bundle/{chunk-TQYMLXDS.js → chunk-I6JF43YP.js} +3 -3
- package/dist/bundle/{chunk-OSP335AJ.js → chunk-IR4S7POE.js} +8 -8
- package/dist/bundle/{chunk-KDOBY524.js → chunk-JFTCOV37.js} +74 -20
- package/dist/bundle/{chunk-POKTQZOM.js → chunk-JJMQA272.js} +12 -89
- package/dist/bundle/{chunk-GWDMKEDY.js → chunk-K2RYCCTP.js} +4 -4
- package/dist/bundle/{chunk-RHUNMU4Q.js → chunk-K62YATVD.js} +4 -4
- package/dist/bundle/{chunk-UBQ3LOF6.js → chunk-KA6EGOJY.js} +2 -2
- package/dist/bundle/{chunk-ILHTNOIV.js → chunk-KV4267S4.js} +1 -1
- package/dist/bundle/{chunk-M7B5IMH3.js → chunk-LFKEKSI5.js} +1032 -298
- package/dist/bundle/{chunk-BPPRR7TV.js → chunk-LSKGCJWD.js} +3403 -1275
- package/dist/bundle/{chunk-CNO3R4O4.js → chunk-LXH3SKY3.js} +8 -8
- package/dist/bundle/{chunk-JZXQZW2D.js → chunk-MQ7MCVZV.js} +2 -2
- package/dist/bundle/{chunk-2TC76TLJ.js → chunk-N42VUNTO.js} +2 -2
- package/dist/bundle/{chunk-KIZT2MI6.js → chunk-N6TIFJHW.js} +1 -1
- package/dist/bundle/{chunk-WDNNN3J4.js → chunk-NL3PAFAE.js} +6 -6
- package/dist/bundle/{chunk-AVWPMJ6E.js → chunk-NUYRMU56.js} +2 -2
- package/dist/bundle/{chunk-NTW5ZE47.js → chunk-OX6EWGSG.js} +39 -33
- package/dist/bundle/{chunk-WINKEV4F.js → chunk-PPLFOIYX.js} +4 -4
- package/dist/bundle/{chunk-OMP6ALBT.js → chunk-PPSUA3IZ.js} +3 -3
- package/dist/bundle/{chunk-UY7GJRGY.js → chunk-PXMHBTK3.js} +4 -4
- package/dist/bundle/{chunk-VVKEWWSO.js → chunk-QAKL3GXB.js} +1 -1
- package/dist/bundle/{chunk-QK6VLKG5.js → chunk-QGL2UGML.js} +301 -185
- package/dist/bundle/{chunk-OUX3QMYI.js → chunk-QHBVGKC3.js} +45 -26
- package/dist/bundle/{chunk-BEQPZA3S.js → chunk-R52RMHWF.js} +2 -2
- package/dist/bundle/chunk-RSDIPQXP.js +35 -0
- package/dist/bundle/{chunk-VQCWVZWG.js → chunk-RSNGMNU5.js} +6 -6
- package/dist/bundle/{chunk-TMATSEP5.js → chunk-SD5PUYKF.js} +12 -12
- package/dist/bundle/chunk-SKZ2E3WC.js +91 -0
- package/dist/bundle/{chunk-PEJHI7QO.js → chunk-T7CDLV33.js} +4 -4
- package/dist/bundle/{chunk-D4E345BC.js → chunk-TZVL4U7U.js} +2 -2
- package/dist/bundle/{chunk-YCUQKFGD.js → chunk-UCSFO5GW.js} +3 -3
- package/dist/bundle/{chunk-A4BQGSKI.js → chunk-VQPLHOVQ.js} +6 -6
- package/dist/bundle/{chunk-EW3XTUPB.js → chunk-XBIPSSKI.js} +4 -4
- package/dist/bundle/{chunk-LUIPXRKN.js → chunk-XQUTJITP.js} +46 -46
- 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-PQLBPYJR.js → chunk-YPF6OS37.js} +1 -1
- package/dist/bundle/{chunk-U67TSAAO.js → chunk-YYKJN6H5.js} +908 -555
- package/dist/bundle/{chunk-WMRFAK5B.js → chunk-ZDIAPICE.js} +4 -4
- package/dist/bundle/command-contract-DPXM4SZT.js +33 -0
- package/dist/bundle/{decode-2GATBZGH.js → decode-W6YPTGJA.js} +5 -5
- package/dist/bundle/{dispatch-MJMW7WDH.js → dispatch-H7EFNBEH.js} +8 -8
- package/dist/bundle/{echarts-GKEZEAL7.js → echarts-YAWDIC5D.js} +2 -2
- package/dist/bundle/{embed-TBQPLA4Y.js → embed-EN4UTLV5.js} +6 -6
- package/dist/bundle/{embedder-B5DTNCRO.js → embedder-HEKHRL7E.js} +9 -9
- package/dist/bundle/{entry-A6DEW2TD.js → entry-2KB6MTCG.js} +7 -7
- package/dist/bundle/{failure-TLF3SISS.js → failure-3DU3HLBQ.js} +2 -2
- package/dist/bundle/{first-run-3N5AABEY.js → first-run-LBG26WWO.js} +11 -11
- package/dist/bundle/first-screen-TGTSLUI6.js +31 -0
- package/dist/bundle/{instructions-P5E34PQR.js → instructions-HA62QNPR.js} +1 -1
- package/dist/bundle/{mcp-MNI62HHE.js → mcp-PPVOM4SE.js} +2 -2
- package/dist/bundle/{node-GKPRXS5Y.js → node-MZ2VWSQQ.js} +2 -2
- package/dist/bundle/{node-sqlite-GIDPALK3.js → node-sqlite-KNNS6DCM.js} +6 -6
- package/dist/bundle/{oauth-C57W4IMD.js → oauth-KWUABBSQ.js} +7 -7
- package/dist/bundle/{open-E6Q4WRPU.js → open-JXMCYCIV.js} +5 -5
- package/dist/bundle/{openai-5WMXY2KP.js → openai-HL3IR4VT.js} +14 -14
- package/dist/bundle/{process-U2P5Z6UF.js → process-K2FICLWY.js} +1 -1
- package/dist/bundle/{program-FEUDU6GF.js → program-IFOMT4JS.js} +58 -50
- package/dist/bundle/{prompt-4NGAZGHE.js → prompt-HVD3Q77P.js} +5 -5
- package/dist/bundle/{proxy-transport-MGCJ7JAW.js → proxy-transport-PA5SGMRY.js} +5 -5
- package/dist/bundle/{recognize-EUHRBA7V.js → recognize-HHLVETKI.js} +4 -4
- package/dist/bundle/{remote-3JHLB2FV.js → remote-HUAKXJCS.js} +7 -7
- package/dist/bundle/{rerank-ZZ45SZPC.js → rerank-NWFIV7OF.js} +7 -7
- package/dist/bundle/{serve-XOGX5FC5.js → serve-ANUKAJJN.js} +9 -9
- package/dist/bundle/{server-I6O72XP5.js → server-7Q7WAOHO.js} +35 -34
- package/dist/bundle/server-HCQS4YDQ.js +60 -0
- package/dist/bundle/{state-BIUYTGH6.js → state-Y2AJ5XTP.js} +6 -6
- package/dist/bundle/{store-FOJFYOMR.js → store-S3IG5KWL.js} +15 -12
- package/dist/bundle/store-maintenance-command-V2WC4G6J.js +50 -0
- package/dist/bundle/tg.js +13 -13
- 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 +3 -3
- package/dist/bundle/chunk-63YKD7YA.js +0 -18
- package/dist/bundle/command-contract-YF4KGFXC.js +0 -32
- package/dist/bundle/first-screen-HANARM67.js +0 -30
- package/dist/bundle/server-DRE5MJ76.js +0 -59
- package/dist/bundle/store-maintenance-command-YKV2C34N.js +0 -49
- /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,18 +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-
|
|
38
|
+
} from "./chunk-N6TIFJHW.js";
|
|
39
39
|
import {
|
|
40
40
|
FACT_STATUSES,
|
|
41
41
|
FACT_TYPES,
|
|
@@ -46,8 +46,6 @@ import {
|
|
|
46
46
|
MEMORY_KINDS,
|
|
47
47
|
MEMORY_SCOPES,
|
|
48
48
|
MEMORY_STATUSES,
|
|
49
|
-
PAYMENT_DIRECTIONS,
|
|
50
|
-
PAYMENT_STATES,
|
|
51
49
|
PRIORITY_LABELS,
|
|
52
50
|
QUERY_BACKENDS,
|
|
53
51
|
RELATION_KINDS,
|
|
@@ -61,6 +59,7 @@ import {
|
|
|
61
59
|
describeQuery,
|
|
62
60
|
event,
|
|
63
61
|
meeting,
|
|
62
|
+
meetingCounts,
|
|
64
63
|
meetingDetails,
|
|
65
64
|
meetingHit,
|
|
66
65
|
meetingLink,
|
|
@@ -72,17 +71,17 @@ import {
|
|
|
72
71
|
meetingStats,
|
|
73
72
|
meetingSummary,
|
|
74
73
|
meetingTranscript
|
|
75
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-QGL2UGML.js";
|
|
76
75
|
import {
|
|
77
76
|
sharedConfigPath
|
|
78
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-VQPLHOVQ.js";
|
|
79
78
|
import {
|
|
80
79
|
filesPresent,
|
|
81
80
|
sharedModelsDirectory
|
|
82
|
-
} from "./chunk-
|
|
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,
|
|
@@ -95,7 +94,7 @@ import {
|
|
|
95
94
|
saveConfigFile,
|
|
96
95
|
traceIdOf,
|
|
97
96
|
writeSecurely
|
|
98
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-OX6EWGSG.js";
|
|
99
98
|
import {
|
|
100
99
|
COMPACT_FLAG,
|
|
101
100
|
MAX_NEXT_STEPS,
|
|
@@ -147,18 +146,18 @@ import {
|
|
|
147
146
|
unwrap,
|
|
148
147
|
variant,
|
|
149
148
|
writes
|
|
150
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-76CX2YPT.js";
|
|
151
150
|
import {
|
|
152
151
|
CliError,
|
|
153
152
|
isCliError,
|
|
154
153
|
singleLine,
|
|
155
154
|
visibleControls
|
|
156
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-EB2IULWB.js";
|
|
157
156
|
import {
|
|
158
157
|
__name
|
|
159
158
|
} from "./chunk-ZVVMGPBJ.js";
|
|
160
159
|
|
|
161
|
-
// 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
|
|
162
161
|
var labels = /* @__PURE__ */ new WeakMap();
|
|
163
162
|
var annotate = /* @__PURE__ */ __name((command, meta) => {
|
|
164
163
|
labels.set(command, { ...labels.get(command), ...meta });
|
|
@@ -3659,7 +3658,7 @@ __name(useColor, "useColor");
|
|
|
3659
3658
|
// node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
|
|
3660
3659
|
var program = new Command();
|
|
3661
3660
|
|
|
3662
|
-
// 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
|
|
3663
3662
|
import { isDeepStrictEqual } from "node:util";
|
|
3664
3663
|
var protectedCommands = /* @__PURE__ */ new WeakMap();
|
|
3665
3664
|
var hasSharedContract = /* @__PURE__ */ __name((command) => protectedCommands.has(command), "hasSharedContract");
|
|
@@ -3861,7 +3860,7 @@ var customizeSharedCommand = /* @__PURE__ */ __name((reference2, reason, build,
|
|
|
3861
3860
|
return command;
|
|
3862
3861
|
}, "customizeSharedCommand");
|
|
3863
3862
|
|
|
3864
|
-
// 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
|
|
3865
3864
|
var argumentInfoSchema = object({
|
|
3866
3865
|
name: string(),
|
|
3867
3866
|
required: boolean(),
|
|
@@ -3935,7 +3934,7 @@ var commandsDocumentSchema = strictObject({
|
|
|
3935
3934
|
exit_codes: record(string(), pipe(number(), integer()))
|
|
3936
3935
|
});
|
|
3937
3936
|
|
|
3938
|
-
// 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
|
|
3939
3938
|
var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
3940
3939
|
let command = root;
|
|
3941
3940
|
const path2 = [];
|
|
@@ -3953,11 +3952,11 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
|
3953
3952
|
}
|
|
3954
3953
|
}, "refuseJoinedPath");
|
|
3955
3954
|
|
|
3956
|
-
// 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
|
|
3957
3956
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3958
|
-
var sentIds = /* @__PURE__ */ __name((
|
|
3957
|
+
var sentIds = /* @__PURE__ */ __name((typed2, message2) => ({
|
|
3959
3958
|
messageId: message2.id,
|
|
3960
|
-
...message2.chatId && message2.chatId !==
|
|
3959
|
+
...message2.chatId && message2.chatId !== typed2 ? { resultChatId: message2.chatId } : {}
|
|
3961
3960
|
}), "sentIds");
|
|
3962
3961
|
var current = new AsyncLocalStorage();
|
|
3963
3962
|
var writesInFlight = new AsyncLocalStorage();
|
|
@@ -4059,7 +4058,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
4059
4058
|
}, "guardedWrite");
|
|
4060
4059
|
var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
|
|
4061
4060
|
|
|
4062
|
-
// 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
|
|
4063
4062
|
var named = /* @__PURE__ */ __name((work) => {
|
|
4064
4063
|
try {
|
|
4065
4064
|
return work();
|
|
@@ -4086,7 +4085,7 @@ var projectFields2 = /* @__PURE__ */ __name((value, fields) => named(() => {
|
|
|
4086
4085
|
return projectFields(value, fields);
|
|
4087
4086
|
}), "projectFields");
|
|
4088
4087
|
|
|
4089
|
-
// 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
|
|
4090
4089
|
var DEFAULT_COMMAND_MS = 3e4;
|
|
4091
4090
|
var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
|
|
4092
4091
|
var DEFAULT_SYNC_MS = 15 * 6e4;
|
|
@@ -4192,6 +4191,7 @@ var execution = /* @__PURE__ */ __name((streams, { timeoutMs, fields, maxOutputB
|
|
|
4192
4191
|
reason: "output.too-large",
|
|
4193
4192
|
max_bytes: maxOutputBytes,
|
|
4194
4193
|
emitted_bytes: bytes,
|
|
4194
|
+
needed_bytes: bytes + size,
|
|
4195
4195
|
partial_output: bytes > 0
|
|
4196
4196
|
});
|
|
4197
4197
|
bytes += size;
|
|
@@ -4268,7 +4268,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
|
|
|
4268
4268
|
}
|
|
4269
4269
|
}, "withAbort");
|
|
4270
4270
|
|
|
4271
|
-
// 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
|
|
4272
4272
|
var LEVELS = ["deny", "readonly", "ask", "allow"];
|
|
4273
4273
|
var DANGEROUS = /* @__PURE__ */ new Set(["messages.delete", "bot.messages.delete", "topics.delete", "chats.delete", "chats.clear"]);
|
|
4274
4274
|
var skipFlagFor = /* @__PURE__ */ __name((key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes", "skipFlagFor");
|
|
@@ -4514,6 +4514,7 @@ var NAMED_WRITE_KEYS = [
|
|
|
4514
4514
|
"mentions.reject",
|
|
4515
4515
|
"tags.add",
|
|
4516
4516
|
"tags.remove",
|
|
4517
|
+
"tasks.acknowledge",
|
|
4517
4518
|
"tasks.add",
|
|
4518
4519
|
"tasks.claim",
|
|
4519
4520
|
"tasks.close",
|
|
@@ -4663,29 +4664,118 @@ var assertRetentionEvidenceRead = /* @__PURE__ */ __name((permissions) => {
|
|
|
4663
4664
|
}
|
|
4664
4665
|
}, "assertRetentionEvidenceRead");
|
|
4665
4666
|
|
|
4666
|
-
// 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
|
|
4667
4668
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
4668
4669
|
import { join } from "node:path";
|
|
4669
|
-
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");
|
|
4670
4760
|
var rememberAccount = /* @__PURE__ */ __name((app, profile, id6, env) => writeSecurely(accountFileFor(app, profile, env), `${JSON.stringify({ account: id6 })}
|
|
4671
4761
|
`, 384), "rememberAccount");
|
|
4672
4762
|
var recalledAccount = /* @__PURE__ */ __name((app, provider, profile, env) => {
|
|
4673
4763
|
try {
|
|
4674
|
-
const { account: account2 } = JSON.parse(
|
|
4764
|
+
const { account: account2 } = JSON.parse(readFileSync2(accountFileFor(app, profile, env), "utf8"));
|
|
4675
4765
|
return typeof account2 === "string" ? { provider, account: account2 } : void 0;
|
|
4676
4766
|
} catch {
|
|
4677
4767
|
return void 0;
|
|
4678
4768
|
}
|
|
4679
4769
|
}, "recalledAccount");
|
|
4680
4770
|
var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
|
|
4681
|
-
const dir =
|
|
4682
|
-
if (!
|
|
4771
|
+
const dir = join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts");
|
|
4772
|
+
if (!existsSync2(dir))
|
|
4683
4773
|
return [];
|
|
4684
|
-
return
|
|
4774
|
+
return readdirSync2(dir).filter((name) => name.endsWith(".json")).map((name) => name.slice(0, -".json".length));
|
|
4685
4775
|
}, "profilesWithAccounts");
|
|
4686
4776
|
var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
|
|
4687
4777
|
|
|
4688
|
-
// 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
|
|
4689
4779
|
var RARELY_SET = ["editedAt", "replyTo", "forwardedFrom", "reactions"];
|
|
4690
4780
|
var BRIEF = ["locator", "chatTitle", "timestamp", "senderName", "excerpt", "score"];
|
|
4691
4781
|
var SNAKE_BRIEF = ["ref", "chat_title", "timestamp", "sender_name", "excerpt", "score"];
|
|
@@ -4721,7 +4811,7 @@ var atDetail = /* @__PURE__ */ __name((value, detail = "default") => {
|
|
|
4721
4811
|
return value;
|
|
4722
4812
|
}, "atDetail");
|
|
4723
4813
|
|
|
4724
|
-
// 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
|
|
4725
4815
|
var refuseCompact = /* @__PURE__ */ __name(({ json, jsonl, fields, hitDetail }) => {
|
|
4726
4816
|
const other = jsonl ? "--jsonl" : fields !== void 0 ? "--json=\u2026" : json ? "--json" : hitDetail === "brief" ? "--brief" : "";
|
|
4727
4817
|
if (other)
|
|
@@ -4785,7 +4875,7 @@ var silence = /* @__PURE__ */ __name((renderer) => ({
|
|
|
4785
4875
|
}, "warn")
|
|
4786
4876
|
}), "silence");
|
|
4787
4877
|
|
|
4788
|
-
// 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
|
|
4789
4879
|
var CORE_LOG_EVENTS = defineLogEvents([
|
|
4790
4880
|
{ id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
|
|
4791
4881
|
{ id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
|
|
@@ -4819,7 +4909,7 @@ var DIAGNOSTIC_LOG_EVENTS = {
|
|
|
4819
4909
|
cache: "cache.answered"
|
|
4820
4910
|
};
|
|
4821
4911
|
|
|
4822
|
-
// 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
|
|
4823
4913
|
var snake2 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
4824
4914
|
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
4825
4915
|
var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
|
|
@@ -4832,13 +4922,13 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
|
4832
4922
|
error: /* @__PURE__ */ __name((event2, message2) => logger.error(logAttributes(event2), message2), "error")
|
|
4833
4923
|
}), "snakeLogger");
|
|
4834
4924
|
|
|
4835
|
-
// 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
|
|
4836
4926
|
import { randomUUID } from "node:crypto";
|
|
4837
|
-
import { appendFileSync, mkdirSync, readdirSync as
|
|
4927
|
+
import { appendFileSync, mkdirSync, readdirSync as readdirSync3, readFileSync as readFileSync3, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4838
4928
|
import { userInfo } from "node:os";
|
|
4839
|
-
import { join as
|
|
4929
|
+
import { join as join3, sep } from "node:path";
|
|
4840
4930
|
|
|
4841
|
-
// 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
|
|
4842
4932
|
var diagnostic = {
|
|
4843
4933
|
event: true,
|
|
4844
4934
|
operation: true,
|
|
@@ -4908,16 +4998,16 @@ var LOG_ATTRIBUTES = [
|
|
|
4908
4998
|
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
4909
4999
|
].sort();
|
|
4910
5000
|
|
|
4911
|
-
// 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
|
|
4912
5002
|
var KEEP_RUNS_FOR_DAYS = 30;
|
|
4913
5003
|
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
4914
5004
|
var RUNS_SIZE_LIMIT_MB = 200;
|
|
4915
|
-
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");
|
|
4916
5006
|
var startRun = /* @__PURE__ */ __name((options) => {
|
|
4917
5007
|
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
4918
5008
|
const startedAt = options.startedAt ?? now();
|
|
4919
5009
|
const id6 = options.runId ?? newRunId(startedAt, options.command);
|
|
4920
|
-
const dir =
|
|
5010
|
+
const dir = join3(options.runsDir, day(startedAt), id6);
|
|
4921
5011
|
pruneRuns(options.runsDir, {
|
|
4922
5012
|
keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
|
|
4923
5013
|
keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
@@ -4943,7 +5033,7 @@ var startRun = /* @__PURE__ */ __name((options) => {
|
|
|
4943
5033
|
if (file)
|
|
4944
5034
|
return file;
|
|
4945
5035
|
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
4946
|
-
const events2 =
|
|
5036
|
+
const events2 = join3(dir, "events.jsonl");
|
|
4947
5037
|
writeFileSync(events2, "", { flag: "a", mode: 384 });
|
|
4948
5038
|
file = snakeLogger(createRecordLog({
|
|
4949
5039
|
to: events2,
|
|
@@ -4998,8 +5088,8 @@ var startRun = /* @__PURE__ */ __name((options) => {
|
|
|
4998
5088
|
return;
|
|
4999
5089
|
}
|
|
5000
5090
|
try {
|
|
5001
|
-
mkdirSync(
|
|
5002
|
-
appendIndex(
|
|
5091
|
+
mkdirSync(join3(dir, ".."), { recursive: true, mode: 448 });
|
|
5092
|
+
appendIndex(join3(dir, ".."), runFileOf(final));
|
|
5003
5093
|
} catch (error) {
|
|
5004
5094
|
options.onError?.(error);
|
|
5005
5095
|
}
|
|
@@ -5015,7 +5105,7 @@ var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) =>
|
|
|
5015
5105
|
} catch {
|
|
5016
5106
|
return;
|
|
5017
5107
|
}
|
|
5018
|
-
if (dir.startsWith(
|
|
5108
|
+
if (dir.startsWith(join3(home, ".local", "share") + sep))
|
|
5019
5109
|
throw new Error(`a test opened a run in the real data folder: ${dir}`);
|
|
5020
5110
|
}, "refuseRealStateInTests");
|
|
5021
5111
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -5029,15 +5119,15 @@ var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
|
|
|
5029
5119
|
}, "newRunId");
|
|
5030
5120
|
var INDEX = "index.jsonl";
|
|
5031
5121
|
var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
|
|
5032
|
-
appendFileSync(
|
|
5122
|
+
appendFileSync(join3(dayDir, INDEX), `${JSON.stringify(written)}
|
|
5033
5123
|
`, { mode: 384 });
|
|
5034
5124
|
}, "appendIndex");
|
|
5035
5125
|
var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
|
|
5036
5126
|
const written = runFileOf(metadata);
|
|
5037
|
-
writeSecurely(
|
|
5127
|
+
writeSecurely(join3(dir, "run.json"), `${JSON.stringify(written, null, 2)}
|
|
5038
5128
|
`, 384);
|
|
5039
5129
|
try {
|
|
5040
|
-
appendIndex(
|
|
5130
|
+
appendIndex(join3(dir, ".."), written);
|
|
5041
5131
|
} catch {
|
|
5042
5132
|
}
|
|
5043
5133
|
}, "writeRunFile");
|
|
@@ -5048,7 +5138,7 @@ var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITI
|
|
|
5048
5138
|
for (const date of days(runsDir).sort().reverse()) {
|
|
5049
5139
|
if (first2 !== void 0 && date < first2 || runs.length >= atLeast)
|
|
5050
5140
|
break;
|
|
5051
|
-
for (const metadata of runsOfDay(
|
|
5141
|
+
for (const metadata of runsOfDay(join3(runsDir, date))) {
|
|
5052
5142
|
if (matchesListFilter(metadata, filter))
|
|
5053
5143
|
runs.push(metadata);
|
|
5054
5144
|
}
|
|
@@ -5059,7 +5149,7 @@ var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5059
5149
|
const latest = /* @__PURE__ */ new Map();
|
|
5060
5150
|
let raw = "";
|
|
5061
5151
|
try {
|
|
5062
|
-
raw =
|
|
5152
|
+
raw = readFileSync3(join3(dayDir, INDEX), "utf8");
|
|
5063
5153
|
} catch {
|
|
5064
5154
|
}
|
|
5065
5155
|
for (const line of raw.split("\n")) {
|
|
@@ -5079,7 +5169,7 @@ var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5079
5169
|
for (const entry of safeReaddir(dayDir)) {
|
|
5080
5170
|
if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
|
|
5081
5171
|
continue;
|
|
5082
|
-
const metadata = readRun(
|
|
5172
|
+
const metadata = readRun(join3(dayDir, entry));
|
|
5083
5173
|
if (metadata)
|
|
5084
5174
|
latest.set(metadata.runId, metadata);
|
|
5085
5175
|
}
|
|
@@ -5090,22 +5180,22 @@ var findRun = /* @__PURE__ */ __name((runsDir, id6) => {
|
|
|
5090
5180
|
const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
|
|
5091
5181
|
const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
|
|
5092
5182
|
for (const date of dates) {
|
|
5093
|
-
const dir =
|
|
5183
|
+
const dir = join3(runsDir, date, id6);
|
|
5094
5184
|
const metadata = readRun(dir);
|
|
5095
5185
|
if (metadata)
|
|
5096
5186
|
return { dir, metadata };
|
|
5097
5187
|
}
|
|
5098
5188
|
for (const date of dates) {
|
|
5099
|
-
const metadata = indexedRuns(
|
|
5189
|
+
const metadata = indexedRuns(join3(runsDir, date)).get(id6);
|
|
5100
5190
|
if (metadata)
|
|
5101
|
-
return { dir:
|
|
5191
|
+
return { dir: join3(runsDir, date, id6), metadata };
|
|
5102
5192
|
}
|
|
5103
5193
|
return void 0;
|
|
5104
5194
|
}, "findRun");
|
|
5105
5195
|
var readEvents = /* @__PURE__ */ __name((dir) => {
|
|
5106
5196
|
let raw;
|
|
5107
5197
|
try {
|
|
5108
|
-
raw =
|
|
5198
|
+
raw = readFileSync3(join3(dir, "events.jsonl"), "utf8");
|
|
5109
5199
|
} catch {
|
|
5110
5200
|
return [];
|
|
5111
5201
|
}
|
|
@@ -5135,11 +5225,11 @@ var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = k
|
|
|
5135
5225
|
for (const date of days(runsDir)) {
|
|
5136
5226
|
if (date >= cutoff) {
|
|
5137
5227
|
if (date < successCutoff)
|
|
5138
|
-
dropSuccesses(
|
|
5228
|
+
dropSuccesses(join3(runsDir, date));
|
|
5139
5229
|
continue;
|
|
5140
5230
|
}
|
|
5141
5231
|
try {
|
|
5142
|
-
rmSync(
|
|
5232
|
+
rmSync(join3(runsDir, date), { recursive: true, force: true });
|
|
5143
5233
|
removed += 1;
|
|
5144
5234
|
} catch {
|
|
5145
5235
|
}
|
|
@@ -5152,7 +5242,7 @@ var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
|
5152
5242
|
var SUCCESSES_DROPPED = ".successes-dropped";
|
|
5153
5243
|
var SIZE_CHECKED = ".size-checked";
|
|
5154
5244
|
var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
5155
|
-
const marker =
|
|
5245
|
+
const marker = join3(dayDir, SUCCESSES_DROPPED);
|
|
5156
5246
|
try {
|
|
5157
5247
|
statSync(marker);
|
|
5158
5248
|
return;
|
|
@@ -5162,17 +5252,17 @@ var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5162
5252
|
const kept = [];
|
|
5163
5253
|
for (const [id6, metadata] of indexedRuns(dayDir)) {
|
|
5164
5254
|
if (metadata.status === "success")
|
|
5165
|
-
rmSync(
|
|
5255
|
+
rmSync(join3(dayDir, id6), { recursive: true, force: true });
|
|
5166
5256
|
else
|
|
5167
5257
|
kept.push(JSON.stringify(runFileOf(metadata)));
|
|
5168
5258
|
}
|
|
5169
5259
|
for (const entry of safeReaddir(dayDir)) {
|
|
5170
5260
|
if (entry === INDEX || entry.startsWith("."))
|
|
5171
5261
|
continue;
|
|
5172
|
-
if (readRun(
|
|
5173
|
-
rmSync(
|
|
5262
|
+
if (readRun(join3(dayDir, entry))?.status === "success")
|
|
5263
|
+
rmSync(join3(dayDir, entry), { recursive: true, force: true });
|
|
5174
5264
|
}
|
|
5175
|
-
writeSecurely(
|
|
5265
|
+
writeSecurely(join3(dayDir, INDEX), kept.map((line) => `${line}
|
|
5176
5266
|
`).join(""), 384);
|
|
5177
5267
|
writeFileSync(marker, "", { mode: 384 });
|
|
5178
5268
|
} catch {
|
|
@@ -5181,7 +5271,7 @@ var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5181
5271
|
var sizeOf = /* @__PURE__ */ __name((path2) => {
|
|
5182
5272
|
let total = 0;
|
|
5183
5273
|
for (const entry of safeReaddir(path2)) {
|
|
5184
|
-
const full =
|
|
5274
|
+
const full = join3(path2, entry);
|
|
5185
5275
|
try {
|
|
5186
5276
|
const stat = statSync(full);
|
|
5187
5277
|
total += stat.isDirectory() ? sizeOf(full) : stat.size;
|
|
@@ -5191,22 +5281,22 @@ var sizeOf = /* @__PURE__ */ __name((path2) => {
|
|
|
5191
5281
|
return total;
|
|
5192
5282
|
}, "sizeOf");
|
|
5193
5283
|
var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
5194
|
-
const stamp =
|
|
5284
|
+
const stamp = join3(runsDir, SIZE_CHECKED);
|
|
5195
5285
|
const today = day(now);
|
|
5196
5286
|
try {
|
|
5197
|
-
if (
|
|
5287
|
+
if (readFileSync3(stamp, "utf8").trim() === today)
|
|
5198
5288
|
return 0;
|
|
5199
5289
|
} catch {
|
|
5200
5290
|
}
|
|
5201
5291
|
const dates = days(runsDir).sort();
|
|
5202
|
-
const sizes = new Map(dates.map((date) => [date, sizeOf(
|
|
5292
|
+
const sizes = new Map(dates.map((date) => [date, sizeOf(join3(runsDir, date))]));
|
|
5203
5293
|
let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
|
|
5204
5294
|
let removed = 0;
|
|
5205
5295
|
for (const date of dates) {
|
|
5206
5296
|
if (total <= maxBytes || date === today)
|
|
5207
5297
|
break;
|
|
5208
|
-
dropSuccesses(
|
|
5209
|
-
const after = sizeOf(
|
|
5298
|
+
dropSuccesses(join3(runsDir, date));
|
|
5299
|
+
const after = sizeOf(join3(runsDir, date));
|
|
5210
5300
|
total -= (sizes.get(date) ?? 0) - after;
|
|
5211
5301
|
sizes.set(date, after);
|
|
5212
5302
|
}
|
|
@@ -5214,7 +5304,7 @@ var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
|
5214
5304
|
if (total <= maxBytes || date === today)
|
|
5215
5305
|
break;
|
|
5216
5306
|
try {
|
|
5217
|
-
rmSync(
|
|
5307
|
+
rmSync(join3(runsDir, date), { recursive: true, force: true });
|
|
5218
5308
|
total -= sizes.get(date) ?? 0;
|
|
5219
5309
|
removed += 1;
|
|
5220
5310
|
} catch {
|
|
@@ -5231,14 +5321,14 @@ var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day
|
|
|
5231
5321
|
var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
|
|
5232
5322
|
var readRun = /* @__PURE__ */ __name((dir) => {
|
|
5233
5323
|
try {
|
|
5234
|
-
return metadataOf(JSON.parse(
|
|
5324
|
+
return metadataOf(JSON.parse(readFileSync3(join3(dir, "run.json"), "utf8")));
|
|
5235
5325
|
} catch {
|
|
5236
5326
|
return void 0;
|
|
5237
5327
|
}
|
|
5238
5328
|
}, "readRun");
|
|
5239
5329
|
var safeReaddir = /* @__PURE__ */ __name((dir) => {
|
|
5240
5330
|
try {
|
|
5241
|
-
return
|
|
5331
|
+
return readdirSync3(dir);
|
|
5242
5332
|
} catch {
|
|
5243
5333
|
return [];
|
|
5244
5334
|
}
|
|
@@ -5261,7 +5351,7 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
|
5261
5351
|
};
|
|
5262
5352
|
}, "metadataOf");
|
|
5263
5353
|
|
|
5264
|
-
// 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
|
|
5265
5355
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
5266
5356
|
import { randomBytes } from "node:crypto";
|
|
5267
5357
|
var scopes = new AsyncLocalStorage2();
|
|
@@ -5299,7 +5389,7 @@ var attempts = new AsyncLocalStorage2();
|
|
|
5299
5389
|
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
5300
5390
|
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
5301
5391
|
|
|
5302
|
-
// 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
|
|
5303
5393
|
var recorded = /* @__PURE__ */ __name(async (options, body) => {
|
|
5304
5394
|
const recording = startRecording(options);
|
|
5305
5395
|
try {
|
|
@@ -5484,9 +5574,9 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
|
|
|
5484
5574
|
return void 0;
|
|
5485
5575
|
}, "partialOutcome");
|
|
5486
5576
|
|
|
5487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5488
|
-
var withDeadline = /* @__PURE__ */ __name(async (
|
|
5489
|
-
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)
|
|
5490
5580
|
return body();
|
|
5491
5581
|
let timer2;
|
|
5492
5582
|
let timedOut;
|
|
@@ -5495,10 +5585,10 @@ var withDeadline = /* @__PURE__ */ __name(async (ms, closeables, body) => {
|
|
|
5495
5585
|
timer2 = setTimeout(() => {
|
|
5496
5586
|
const pending = [...writes2];
|
|
5497
5587
|
const cut2 = pending.filter((write) => !write.preparing);
|
|
5498
|
-
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`);
|
|
5499
5589
|
stopWrites(writes2, timedOut);
|
|
5500
5590
|
void Promise.allSettled(closeables.map((closeable) => closeable.close())).then(() => reject(timedOut));
|
|
5501
|
-
},
|
|
5591
|
+
}, ms2);
|
|
5502
5592
|
});
|
|
5503
5593
|
try {
|
|
5504
5594
|
return await Promise.race([withWriteScope(writes2, body), expired]);
|
|
@@ -5510,7 +5600,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms, closeables, body) => {
|
|
|
5510
5600
|
}
|
|
5511
5601
|
}, "withDeadline");
|
|
5512
5602
|
|
|
5513
|
-
// 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
|
|
5514
5604
|
var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
|
|
5515
5605
|
var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
5516
5606
|
var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
|
|
@@ -5579,10 +5669,10 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
|
|
|
5579
5669
|
return void 0;
|
|
5580
5670
|
}, "sampleCommand");
|
|
5581
5671
|
|
|
5582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5583
|
-
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";
|
|
5584
5674
|
|
|
5585
|
-
// 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
|
|
5586
5676
|
var endpoint = /* @__PURE__ */ __name((value) => {
|
|
5587
5677
|
try {
|
|
5588
5678
|
const url2 = new URL(value);
|
|
@@ -5592,7 +5682,7 @@ var endpoint = /* @__PURE__ */ __name((value) => {
|
|
|
5592
5682
|
}
|
|
5593
5683
|
}, "endpoint");
|
|
5594
5684
|
|
|
5595
|
-
// 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
|
|
5596
5686
|
var MODEL_FIELDS = ["provider", "model", "base_url"];
|
|
5597
5687
|
var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
|
|
5598
5688
|
provider: optional(picklist(["off", "openai", "anthropic"])),
|
|
@@ -5661,7 +5751,7 @@ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
|
|
|
5661
5751
|
};
|
|
5662
5752
|
}, "modelTarget");
|
|
5663
5753
|
|
|
5664
|
-
// 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
|
|
5665
5755
|
var model = pipe(string(), trim(), minLength(1), maxLength(200));
|
|
5666
5756
|
var url = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
|
|
5667
5757
|
var AI_FIELDS = {
|
|
@@ -5705,7 +5795,7 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
|
|
|
5705
5795
|
};
|
|
5706
5796
|
}, "resolveAISettings");
|
|
5707
5797
|
|
|
5708
|
-
// 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
|
|
5709
5799
|
var DURATION = /^(\d+)(ms|s|m|h|d)$/;
|
|
5710
5800
|
var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
|
|
5711
5801
|
var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
@@ -5713,13 +5803,13 @@ var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
|
5713
5803
|
if (!match?.[1] || !match[2]) {
|
|
5714
5804
|
throw new CliError("validation_error", `${source2} takes a duration with a unit \u2014 500ms, 30s, 2m, 4h or 1d \u2014 not "${value}"`);
|
|
5715
5805
|
}
|
|
5716
|
-
const
|
|
5717
|
-
if (
|
|
5806
|
+
const ms2 = Number(match[1]) * (UNIT_MS[match[2]] ?? 0);
|
|
5807
|
+
if (ms2 <= 0)
|
|
5718
5808
|
throw new CliError("validation_error", `${source2} has to be more than zero, and "${value}" is not`);
|
|
5719
|
-
return
|
|
5809
|
+
return ms2;
|
|
5720
5810
|
}, "parseDuration");
|
|
5721
5811
|
|
|
5722
|
-
// 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
|
|
5723
5813
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
5724
5814
|
var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
|
|
5725
5815
|
var gemma = huggingFace("onnx-community/embeddinggemma-300m-ONNX", "5090578d9565bb06545b4552f76e6bc2c93e4a66");
|
|
@@ -5878,7 +5968,7 @@ var rerankModel = /* @__PURE__ */ __name((id6) => {
|
|
|
5878
5968
|
var vectorModelKey = /* @__PURE__ */ __name((model3) => `local:${model3.id}:${model3.dims}`, "vectorModelKey");
|
|
5879
5969
|
var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
|
|
5880
5970
|
|
|
5881
|
-
// 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
|
|
5882
5972
|
var HISTORY_MAX_DAYS = 1095;
|
|
5883
5973
|
var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
|
|
5884
5974
|
var DAY_MS2 = 24 * 60 * 60 * 1e3;
|
|
@@ -5925,8 +6015,251 @@ var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now =
|
|
|
5925
6015
|
return { batch: { ...batch, messages }, skipped };
|
|
5926
6016
|
}, "limitBatch");
|
|
5927
6017
|
|
|
5928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5929
|
-
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
|
|
5930
6263
|
var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
5931
6264
|
var SECTIONS = ["personal", "bot"];
|
|
5932
6265
|
var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
|
|
@@ -6172,17 +6505,22 @@ var withoutPath = /* @__PURE__ */ __name((raw, at2) => {
|
|
|
6172
6505
|
return { config: prune(raw, [gone]).pruned, removed: true };
|
|
6173
6506
|
}, "withoutPath");
|
|
6174
6507
|
var publicIssue = /* @__PURE__ */ __name(({ at: _, ...issue }) => issue, "publicIssue");
|
|
6508
|
+
var fixVerb = /* @__PURE__ */ __name((issue) => issue.kind === "invalid_json" ? "repair" : "remove", "fixVerb");
|
|
6175
6509
|
var issueMessage = /* @__PURE__ */ __name((issues, doctor = "doctor") => {
|
|
6176
6510
|
const [first2] = issues;
|
|
6177
6511
|
if (!first2)
|
|
6178
6512
|
return "";
|
|
6179
6513
|
const more = issues.length - 1;
|
|
6180
|
-
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)`);
|
|
6181
6515
|
}, "issueMessage");
|
|
6182
|
-
var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schema2, knownPermissions }) => {
|
|
6516
|
+
var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schema2, knownPermissions, repair = true }) => {
|
|
6183
6517
|
const parsed = parseConfigText(text5, file);
|
|
6184
|
-
if ("issue" in parsed)
|
|
6185
|
-
|
|
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
|
+
}
|
|
6186
6524
|
if (!isNode(parsed.raw))
|
|
6187
6525
|
return { issues: [wholeFile(file, "the file must hold a JSON object")], config: void 0 };
|
|
6188
6526
|
const context2 = { file, tool };
|
|
@@ -6195,7 +6533,7 @@ var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schem
|
|
|
6195
6533
|
var wholeFile = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what }), "wholeFile");
|
|
6196
6534
|
var readConfigText = /* @__PURE__ */ __name((path2) => {
|
|
6197
6535
|
try {
|
|
6198
|
-
return { text:
|
|
6536
|
+
return { text: readFileSync4(path2, "utf8") };
|
|
6199
6537
|
} catch (error) {
|
|
6200
6538
|
const code = error.code;
|
|
6201
6539
|
if (code === "ENOENT")
|
|
@@ -6215,20 +6553,20 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
|
|
|
6215
6553
|
return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
|
|
6216
6554
|
}, "readConfigFile");
|
|
6217
6555
|
|
|
6218
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6219
|
-
import { existsSync as
|
|
6220
|
-
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";
|
|
6221
6559
|
var DEFAULT_CONFIG = {
|
|
6222
6560
|
defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
|
|
6223
6561
|
profiles: {}
|
|
6224
6562
|
};
|
|
6225
6563
|
function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
6226
|
-
if (
|
|
6564
|
+
if (existsSync3(path2))
|
|
6227
6565
|
return;
|
|
6228
6566
|
const directory = dirname(path2);
|
|
6229
6567
|
mkdirSync2(directory, { recursive: true, mode: 448 });
|
|
6230
|
-
const temporary = mkdtempSync(
|
|
6231
|
-
const candidate =
|
|
6568
|
+
const temporary = mkdtempSync(join4(directory, ".config-"));
|
|
6569
|
+
const candidate = join4(temporary, "config.json");
|
|
6232
6570
|
try {
|
|
6233
6571
|
writeFileSync2(candidate, `${JSON.stringify(config, null, 2)}
|
|
6234
6572
|
`, { flag: "wx", mode: 384 });
|
|
@@ -6244,7 +6582,29 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
|
6244
6582
|
}
|
|
6245
6583
|
__name(ensureDefaultConfig, "ensureDefaultConfig");
|
|
6246
6584
|
|
|
6247
|
-
// 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
|
|
6248
6608
|
var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
|
|
6249
6609
|
var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
|
|
6250
6610
|
var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
|
|
@@ -6308,12 +6668,73 @@ var MESSENGER_ONLY_SETTINGS = [
|
|
|
6308
6668
|
"history_dialog_days",
|
|
6309
6669
|
"history_group_days",
|
|
6310
6670
|
"history_group_members_max",
|
|
6311
|
-
"read_other_bots"
|
|
6671
|
+
"read_other_bots",
|
|
6672
|
+
"speech_model",
|
|
6673
|
+
"picture_search"
|
|
6312
6674
|
];
|
|
6313
6675
|
var SHARED_DEFAULTS_ONLY = {
|
|
6314
6676
|
update_check: optional(flag),
|
|
6315
6677
|
skill_hint: optional(flag)
|
|
6316
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
|
+
];
|
|
6317
6738
|
var NONE_NAMED = "none named";
|
|
6318
6739
|
var NO_PROFILE = "default";
|
|
6319
6740
|
var namedProfile = /* @__PURE__ */ __name((settings) => settings.sources?.profile === NONE_NAMED ? void 0 : settings.profile, "namedProfile");
|
|
@@ -6366,12 +6787,14 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6366
6787
|
const defaultsOnlyKeys = Object.keys(defaultsOnly);
|
|
6367
6788
|
const botOnlyKeys = Object.keys(BOT_ONLY_ENTRIES);
|
|
6368
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");
|
|
6369
6793
|
const PROFILE = envName(app, "PROFILE");
|
|
6370
6794
|
const PROFILE_LOCK = envName(app, "PROFILE_LOCK");
|
|
6371
6795
|
const TIMEOUT = envName(app, "TIMEOUT");
|
|
6372
6796
|
const REQUESTS_PER_MINUTE = envName(app, "REQUESTS_PER_MINUTE");
|
|
6373
6797
|
const configPathFor = /* @__PURE__ */ __name(({ env = process.env, configDir }) => configFilePath(configDir ?? resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config), "configPathFor");
|
|
6374
|
-
const readSchema = extension.schema ?? schema2;
|
|
6375
6798
|
const context2 = /* @__PURE__ */ __name((file) => ({ file, tool: app.command }), "context");
|
|
6376
6799
|
const loadConfig = /* @__PURE__ */ __name((path2) => {
|
|
6377
6800
|
const read = readConfigText(path2);
|
|
@@ -6379,7 +6802,12 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6379
6802
|
return { config: { profiles: {} }, issues: [read.issue] };
|
|
6380
6803
|
if (read.text === void 0)
|
|
6381
6804
|
return { config: { profiles: {} }, issues: [] };
|
|
6382
|
-
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
|
+
});
|
|
6383
6811
|
return { config: config ?? { profiles: {} }, issues };
|
|
6384
6812
|
}, "loadConfig");
|
|
6385
6813
|
const locked = /* @__PURE__ */ __name((profile, lock) => {
|
|
@@ -6402,12 +6830,21 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6402
6830
|
throw new CliError("validation_error", `name a profile: \`${app.command} <profile> \u2026\` \u2014 profiles here: ${here.join(", ")} (or set ${PROFILE})`, { profiles: here });
|
|
6403
6831
|
}, "unnamed");
|
|
6404
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");
|
|
6405
6842
|
const resolveSettings = /* @__PURE__ */ __name((flags = {}, options = {}) => {
|
|
6406
6843
|
const env = options.env ?? process.env;
|
|
6407
6844
|
const configPath = configPathFor(options);
|
|
6408
6845
|
try {
|
|
6409
6846
|
if (!options.readOnly)
|
|
6410
|
-
ensureDefaultConfig(configPath);
|
|
6847
|
+
ensureDefaultConfig(configPath, withDefaults(DEFAULT_CONFIG).config);
|
|
6411
6848
|
} catch (error) {
|
|
6412
6849
|
throw new CliError("configuration_error", error instanceof Error ? error.message : String(error));
|
|
6413
6850
|
}
|
|
@@ -6423,6 +6860,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6423
6860
|
], void 0);
|
|
6424
6861
|
const profile = locked(named3.value === void 0 ? unnamed(config, env, options.needsProfile !== false) : { value: named3.value, from: named3.from }, lock);
|
|
6425
6862
|
const kind2 = options.kind ?? "personal";
|
|
6863
|
+
const bots = botsOf(config, env);
|
|
6426
6864
|
const name = usableProfileName(profile.value);
|
|
6427
6865
|
const configured = config.profiles[name] ?? {};
|
|
6428
6866
|
const shared = config.defaults ?? {};
|
|
@@ -6514,9 +6952,11 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6514
6952
|
updateCheck: updateCheck.value,
|
|
6515
6953
|
skillHint: skillHint.value,
|
|
6516
6954
|
configPath,
|
|
6517
|
-
configFound:
|
|
6955
|
+
configFound: existsSync4(configPath),
|
|
6518
6956
|
configuredProfiles: namedProfiles(config),
|
|
6519
6957
|
profilesHere: profilesOf(config, env),
|
|
6958
|
+
accountProfiles: accountsOf(config, env, bots),
|
|
6959
|
+
botProfiles: bots,
|
|
6520
6960
|
sources: {
|
|
6521
6961
|
...ai.sources,
|
|
6522
6962
|
profile: profile.from,
|
|
@@ -6585,7 +7025,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6585
7025
|
throw new CliError("validation_error", `${setting2} has no problem to remove \u2014 name the profile, or add --defaults, to unset a setting`);
|
|
6586
7026
|
if (!known && valueAt(raw, at2) === void 0)
|
|
6587
7027
|
throw new CliError("validation_error", `no setting called "${setting2}" \u2014 one of: ${allSettings.join(", ")}`);
|
|
6588
|
-
saveConfigFile(path2, withoutPath(raw, at2).config);
|
|
7028
|
+
saveConfigFile(path2, withDefaults(withoutPath(raw, at2).config, [at2.join(".")]).config);
|
|
6589
7029
|
return null;
|
|
6590
7030
|
}
|
|
6591
7031
|
if (!known)
|
|
@@ -6599,20 +7039,41 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6599
7039
|
if (kind2 !== "bot" && botOnlyKeys.includes(setting2)) {
|
|
6600
7040
|
throw new CliError("validation_error", `${setting2} is a bot's setting \u2014 add --bot`);
|
|
6601
7041
|
}
|
|
6602
|
-
const changed = structuredClone(raw);
|
|
6603
|
-
setAt(changed, at2, level2 === void 0 ? parseValue(value) : value.trim());
|
|
6604
7042
|
const had = new Set(before.map((issue) => issue.at.join(".")));
|
|
6605
|
-
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
|
+
}
|
|
6606
7056
|
if (added)
|
|
6607
7057
|
throw new CliError("validation_error", `${setting2} cannot be "${value}": ${added.what}`);
|
|
6608
7058
|
const checked = safeParse(readSchema, changed);
|
|
6609
|
-
saveConfigFile(path2, checked.success ? checked.output : changed);
|
|
7059
|
+
saveConfigFile(path2, withDefaults(checked.success ? checked.output : changed).config);
|
|
6610
7060
|
return valueAt(checked.success ? checked.output : changed, at2) ?? null;
|
|
6611
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");
|
|
6612
7071
|
return {
|
|
6613
7072
|
resolveSettings,
|
|
6614
7073
|
configuredProfiles,
|
|
6615
7074
|
changeSetting,
|
|
7075
|
+
migrate,
|
|
7076
|
+
declaredSettings,
|
|
6616
7077
|
allSettings,
|
|
6617
7078
|
defaultsOnlyKeys,
|
|
6618
7079
|
schema: schema2,
|
|
@@ -6653,7 +7114,7 @@ var given = /* @__PURE__ */ __name((value) => {
|
|
|
6653
7114
|
return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
|
|
6654
7115
|
}, "given");
|
|
6655
7116
|
|
|
6656
|
-
// 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
|
|
6657
7118
|
var setExitCode = /* @__PURE__ */ __name((command, code) => {
|
|
6658
7119
|
const slot = environmentOf(command).exit;
|
|
6659
7120
|
if (slot)
|
|
@@ -6766,7 +7227,7 @@ var commandPath = /* @__PURE__ */ __name((command) => {
|
|
|
6766
7227
|
return words.join(" ");
|
|
6767
7228
|
}, "commandPath");
|
|
6768
7229
|
|
|
6769
|
-
// 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
|
|
6770
7231
|
var REMOTE_READ = { remote: "read", local: "read" };
|
|
6771
7232
|
var FETCH = { remote: "read", local: "write" };
|
|
6772
7233
|
var REMOTE_WRITE = { remote: "write", local: "write" };
|
|
@@ -6802,6 +7263,22 @@ var destroysNothing = /* @__PURE__ */ __name((command) => {
|
|
|
6802
7263
|
KEPT_UNDER_LOCK.add(command);
|
|
6803
7264
|
return command;
|
|
6804
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");
|
|
6805
7282
|
var STORE_WRITES = /* @__PURE__ */ new WeakSet();
|
|
6806
7283
|
var changesStore = /* @__PURE__ */ __name((command) => {
|
|
6807
7284
|
STORE_WRITES.add(command);
|
|
@@ -6826,7 +7303,7 @@ var readsOverMcpAt = /* @__PURE__ */ __name((root) => (path2) => {
|
|
|
6826
7303
|
}, "readsOverMcpAt");
|
|
6827
7304
|
var isStoreChange = /* @__PURE__ */ __name((command) => {
|
|
6828
7305
|
const effects = metaOf(command).effects;
|
|
6829
|
-
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);
|
|
6830
7307
|
}, "isStoreChange");
|
|
6831
7308
|
var STORE_CHANGE_REFUSAL = "change the message store";
|
|
6832
7309
|
var previewFlag = /* @__PURE__ */ __name((program2) => program2.options.some((option) => option.long === "--dry-run") ? " --dry-run" : "", "previewFlag");
|
|
@@ -6874,7 +7351,7 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
|
|
|
6874
7351
|
throw readOnlyRefusal(lock, what);
|
|
6875
7352
|
}, "refuseUnderReadOnly");
|
|
6876
7353
|
|
|
6877
|
-
// 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
|
|
6878
7355
|
var account = strictObject({
|
|
6879
7356
|
provider: text,
|
|
6880
7357
|
id,
|
|
@@ -6884,7 +7361,7 @@ var account = strictObject({
|
|
|
6884
7361
|
scope: optional(picklist(["personal", "work"]))
|
|
6885
7362
|
});
|
|
6886
7363
|
|
|
6887
|
-
// 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
|
|
6888
7365
|
var accountSession = strictObject({
|
|
6889
7366
|
current: boolean(),
|
|
6890
7367
|
client: nullable(text),
|
|
@@ -6894,7 +7371,7 @@ var accountSession = strictObject({
|
|
|
6894
7371
|
created_at: optional(nullable(time))
|
|
6895
7372
|
});
|
|
6896
7373
|
|
|
6897
|
-
// 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
|
|
6898
7375
|
var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
|
|
6899
7376
|
var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
|
|
6900
7377
|
var audience = picklist(["everyone", "contacts", "nobody"]);
|
|
@@ -6912,17 +7389,19 @@ var accountPrivacy = strictObject({
|
|
|
6912
7389
|
});
|
|
6913
7390
|
var accountPrivacyChange = strictObject({ operation_id: id, privacy: accountPrivacy });
|
|
6914
7391
|
|
|
6915
|
-
// 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
|
|
6916
7393
|
var accountProfile = strictObject({
|
|
6917
7394
|
profile: id,
|
|
6918
7395
|
current: boolean(),
|
|
6919
7396
|
account: nullable(id),
|
|
6920
7397
|
name: nullable(text),
|
|
6921
7398
|
/** False for a profile with no session on this computer; absent when the messenger does not say. */
|
|
6922
|
-
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))
|
|
6923
7402
|
});
|
|
6924
7403
|
|
|
6925
|
-
// 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
|
|
6926
7405
|
var milliseconds = pipe(number(), minValue(0));
|
|
6927
7406
|
var counterReading = strictObject({
|
|
6928
7407
|
counter: picklist(["views", "reactions", "comments"]),
|
|
@@ -6934,7 +7413,7 @@ var counterReading = strictObject({
|
|
|
6934
7413
|
});
|
|
6935
7414
|
var selection = record(string(), unknown());
|
|
6936
7415
|
|
|
6937
|
-
// 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
|
|
6938
7417
|
var adminRow = strictObject({
|
|
6939
7418
|
ref: reference,
|
|
6940
7419
|
/** What `stats * evidence` takes: a person id, a stay or a message locator. */
|
|
@@ -6987,7 +7466,7 @@ var adminReport = strictObject({
|
|
|
6987
7466
|
rows: array(adminRow)
|
|
6988
7467
|
});
|
|
6989
7468
|
|
|
6990
|
-
// 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
|
|
6991
7470
|
var closeSuggestion = strictObject({
|
|
6992
7471
|
as: picklist(["done", "dismissed"]),
|
|
6993
7472
|
/** The agent's name. */
|
|
@@ -7045,7 +7524,7 @@ var task = strictObject({
|
|
|
7045
7524
|
updated_at: optional(time)
|
|
7046
7525
|
});
|
|
7047
7526
|
|
|
7048
|
-
// 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
|
|
7049
7528
|
var agendaChat = strictObject({
|
|
7050
7529
|
chat: reference,
|
|
7051
7530
|
title: nullable(text),
|
|
@@ -7115,11 +7594,11 @@ var agenda = strictObject({
|
|
|
7115
7594
|
unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
|
|
7116
7595
|
});
|
|
7117
7596
|
|
|
7118
|
-
// 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
|
|
7119
7598
|
var analysisConsent = strictObject({ chat: id, provider: text, at: time });
|
|
7120
7599
|
var analysisConsentRevocation = strictObject({ revoked: boolean() });
|
|
7121
7600
|
|
|
7122
|
-
// 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
|
|
7123
7602
|
var attachment = strictObject({
|
|
7124
7603
|
/** The message it came with, as a locator; absent inside that message. */
|
|
7125
7604
|
message: optional(reference),
|
|
@@ -7157,7 +7636,7 @@ var attachment = strictObject({
|
|
|
7157
7636
|
});
|
|
7158
7637
|
var hitFile = strictObject({ position: count, kind: text, name: optional(text), size: optional(count) });
|
|
7159
7638
|
|
|
7160
|
-
// 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
|
|
7161
7640
|
var actionableError = objectWithRest({
|
|
7162
7641
|
code: text,
|
|
7163
7642
|
message: text,
|
|
@@ -7174,7 +7653,7 @@ var batchResult = strictObject({
|
|
|
7174
7653
|
max_error_percent: count
|
|
7175
7654
|
});
|
|
7176
7655
|
|
|
7177
|
-
// 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
|
|
7178
7657
|
var extractionItem = strictObject({
|
|
7179
7658
|
ref: reference,
|
|
7180
7659
|
attachment: count,
|
|
@@ -7207,7 +7686,7 @@ var extractionReport = strictObject({
|
|
|
7207
7686
|
cursor: optional(text)
|
|
7208
7687
|
});
|
|
7209
7688
|
|
|
7210
|
-
// 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
|
|
7211
7690
|
var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
|
|
7212
7691
|
var attachmentBytes = strictObject({
|
|
7213
7692
|
ref: reference,
|
|
@@ -7235,7 +7714,7 @@ var attachmentTextChange = strictObject({
|
|
|
7235
7714
|
replaced: nullable(picklist(["extracted", "agent"]))
|
|
7236
7715
|
});
|
|
7237
7716
|
|
|
7238
|
-
// 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
|
|
7239
7718
|
var chart = strictObject({
|
|
7240
7719
|
version: literal(1),
|
|
7241
7720
|
kind: picklist(["bar", "line", "grouped-bar"]),
|
|
@@ -7250,7 +7729,7 @@ var chart = strictObject({
|
|
|
7250
7729
|
file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
|
|
7251
7730
|
});
|
|
7252
7731
|
|
|
7253
|
-
// 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
|
|
7254
7733
|
var member = strictObject({
|
|
7255
7734
|
id,
|
|
7256
7735
|
name: nullable(text),
|
|
@@ -7273,7 +7752,7 @@ var member = strictObject({
|
|
|
7273
7752
|
check: optional(record(string(), unknown()))
|
|
7274
7753
|
});
|
|
7275
7754
|
|
|
7276
|
-
// 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
|
|
7277
7756
|
var setting = optional(nullable(boolean()));
|
|
7278
7757
|
var chat = strictObject({
|
|
7279
7758
|
ref: reference,
|
|
@@ -7314,7 +7793,7 @@ var chat = strictObject({
|
|
|
7314
7793
|
members: optional(array(member))
|
|
7315
7794
|
});
|
|
7316
7795
|
|
|
7317
|
-
// 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
|
|
7318
7797
|
var named2 = strictObject({
|
|
7319
7798
|
id,
|
|
7320
7799
|
title: nullable(text),
|
|
@@ -7337,7 +7816,7 @@ var folder = strictObject({
|
|
|
7337
7816
|
excluded_chats: optional(array(named2))
|
|
7338
7817
|
});
|
|
7339
7818
|
|
|
7340
|
-
// 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
|
|
7341
7820
|
var inviteLink = strictObject({
|
|
7342
7821
|
link: text,
|
|
7343
7822
|
/** Who joins by it asks first, and an admin lets them in. */
|
|
@@ -7353,7 +7832,7 @@ var inviteLink = strictObject({
|
|
|
7353
7832
|
joined_count: optional(count)
|
|
7354
7833
|
});
|
|
7355
7834
|
|
|
7356
|
-
// 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
|
|
7357
7836
|
var operated = { operation_id: id, chat_id: id };
|
|
7358
7837
|
var group = strictObject({
|
|
7359
7838
|
...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
|
|
@@ -7433,7 +7912,7 @@ var chatFolderOrder = strictObject({
|
|
|
7433
7912
|
folders: array(strictObject({ id, title: text }))
|
|
7434
7913
|
});
|
|
7435
7914
|
|
|
7436
|
-
// 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
|
|
7437
7916
|
var operated2 = { operation_id: id, chat_id: id };
|
|
7438
7917
|
var chatRemoval = strictObject(operated2);
|
|
7439
7918
|
var chatMuting = strictObject({
|
|
@@ -7444,7 +7923,7 @@ var chatArchive = strictObject({ ...operated2, archived: boolean() });
|
|
|
7444
7923
|
var chatPin = strictObject({ ...operated2, pinned: boolean() });
|
|
7445
7924
|
var chatUnread = strictObject({ ...operated2, unread: literal(true) });
|
|
7446
7925
|
|
|
7447
|
-
// 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
|
|
7448
7927
|
var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
|
|
7449
7928
|
var chatEvent = strictObject({
|
|
7450
7929
|
chat_id: id,
|
|
@@ -7461,7 +7940,7 @@ var chatEvent = strictObject({
|
|
|
7461
7940
|
before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
|
|
7462
7941
|
});
|
|
7463
7942
|
|
|
7464
|
-
// 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
|
|
7465
7944
|
var chatMetadata = strictObject({
|
|
7466
7945
|
chat_id: id,
|
|
7467
7946
|
title: nullable(text),
|
|
@@ -7476,7 +7955,7 @@ var chatMetadataRefresh = strictObject({
|
|
|
7476
7955
|
has_more: boolean()
|
|
7477
7956
|
});
|
|
7478
7957
|
|
|
7479
|
-
// 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
|
|
7480
7959
|
var action = picklist(["report", "delete", "remove"]);
|
|
7481
7960
|
var level = picklist(["deny", "readonly", "ask", "allow"]);
|
|
7482
7961
|
var chatRules = strictObject({
|
|
@@ -7513,7 +7992,7 @@ var chatModeration = strictObject({
|
|
|
7513
7992
|
}))
|
|
7514
7993
|
});
|
|
7515
7994
|
|
|
7516
|
-
// 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
|
|
7517
7996
|
var optionalCount = optional(count);
|
|
7518
7997
|
var minutes = nullable(number());
|
|
7519
7998
|
var chatStats = strictObject({
|
|
@@ -7564,18 +8043,30 @@ var chatStats = strictObject({
|
|
|
7564
8043
|
})),
|
|
7565
8044
|
series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
|
|
7566
8045
|
});
|
|
8046
|
+
var ms = nullable(pipe(number(), minValue(0)));
|
|
7567
8047
|
var taskStats = strictObject({
|
|
7568
8048
|
/** Open tasks across every row. */
|
|
7569
8049
|
open: count,
|
|
8050
|
+
created: count,
|
|
8051
|
+
closed: count,
|
|
8052
|
+
median_close_ms: ms,
|
|
8053
|
+
mean_open_age_ms: ms,
|
|
7570
8054
|
rows: array(strictObject({
|
|
7571
|
-
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),
|
|
7572
8060
|
open: count,
|
|
8061
|
+
created: count,
|
|
8062
|
+
closed: count,
|
|
7573
8063
|
oldest_open_at: nullable(time),
|
|
7574
|
-
median_close_ms:
|
|
8064
|
+
median_close_ms: ms,
|
|
8065
|
+
mean_open_age_ms: ms
|
|
7575
8066
|
}))
|
|
7576
8067
|
});
|
|
7577
8068
|
|
|
7578
|
-
// 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
|
|
7579
8070
|
var memberCount = strictObject({
|
|
7580
8071
|
day: pipe(text, isoDate()),
|
|
7581
8072
|
participants: nullable(count),
|
|
@@ -7598,7 +8089,7 @@ var chatTracking = strictObject({
|
|
|
7598
8089
|
tracked: boolean()
|
|
7599
8090
|
});
|
|
7600
8091
|
|
|
7601
|
-
// 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
|
|
7602
8093
|
var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
7603
8094
|
var contactSync = strictObject({ added: count, changed: count, known: count });
|
|
7604
8095
|
var profileFields = {
|
|
@@ -7636,7 +8127,7 @@ var profileFields = {
|
|
|
7636
8127
|
}))
|
|
7637
8128
|
};
|
|
7638
8129
|
|
|
7639
|
-
// 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
|
|
7640
8131
|
var contact = strictObject({
|
|
7641
8132
|
ref: reference,
|
|
7642
8133
|
id,
|
|
@@ -7667,7 +8158,7 @@ var contact = strictObject({
|
|
|
7667
8158
|
notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
|
|
7668
8159
|
});
|
|
7669
8160
|
|
|
7670
|
-
// 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
|
|
7671
8162
|
var WEIGHTS = {
|
|
7672
8163
|
bot: 3,
|
|
7673
8164
|
scam: 3,
|
|
@@ -7692,7 +8183,7 @@ var LINK = /https?:\/\/|t\.me\/|www\./i;
|
|
|
7692
8183
|
var DIGITS = /\d{5,}/;
|
|
7693
8184
|
var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
|
|
7694
8185
|
|
|
7695
|
-
// 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
|
|
7696
8187
|
var linkedIdentity = strictObject({
|
|
7697
8188
|
provider: text,
|
|
7698
8189
|
id,
|
|
@@ -7733,7 +8224,7 @@ var contactCheck = strictObject({
|
|
|
7733
8224
|
checked_at: time
|
|
7734
8225
|
});
|
|
7735
8226
|
|
|
7736
|
-
// 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
|
|
7737
8228
|
var quoted = strictObject({
|
|
7738
8229
|
id,
|
|
7739
8230
|
sender_id: nullable(id),
|
|
@@ -7835,12 +8326,24 @@ var message = strictObject({
|
|
|
7835
8326
|
read: nullable(boolean()),
|
|
7836
8327
|
flagged: nullable(boolean()),
|
|
7837
8328
|
/** How much the sender's mail looks like spam, a scam or a robot (memo's score), and why; absent when unscored. */
|
|
7838
|
-
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())
|
|
7839
8342
|
})),
|
|
7840
8343
|
provider_metadata: providerMetadata
|
|
7841
8344
|
});
|
|
7842
8345
|
|
|
7843
|
-
// 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
|
|
7844
8347
|
var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
|
|
7845
8348
|
var contextMessage = strictObject({
|
|
7846
8349
|
locator: reference,
|
|
@@ -8038,7 +8541,7 @@ var contactPreparation = strictObject({
|
|
|
8038
8541
|
})
|
|
8039
8542
|
});
|
|
8040
8543
|
|
|
8041
|
-
// 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
|
|
8042
8545
|
var contactNote = strictObject({
|
|
8043
8546
|
id,
|
|
8044
8547
|
/** The contact, as a `contact:` reference. */
|
|
@@ -8050,13 +8553,13 @@ var contactNote = strictObject({
|
|
|
8050
8553
|
updated_at: time
|
|
8051
8554
|
});
|
|
8052
8555
|
|
|
8053
|
-
// 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
|
|
8054
8557
|
var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
8055
8558
|
var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
|
|
8056
8559
|
var contactStateChange = strictObject({ operation_id: id, person_id: id });
|
|
8057
8560
|
var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
|
|
8058
8561
|
|
|
8059
|
-
// 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
|
|
8060
8563
|
var conversation = strictObject({
|
|
8061
8564
|
id,
|
|
8062
8565
|
chat: reference,
|
|
@@ -8071,7 +8574,7 @@ var conversation = strictObject({
|
|
|
8071
8574
|
rules_version: count
|
|
8072
8575
|
});
|
|
8073
8576
|
|
|
8074
|
-
// 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
|
|
8075
8578
|
var conversationBuild = strictObject({
|
|
8076
8579
|
chat: id,
|
|
8077
8580
|
messages: count,
|
|
@@ -8096,7 +8599,7 @@ var catchUpPreparation = strictObject({
|
|
|
8096
8599
|
prepared: optional(conversationPreparation)
|
|
8097
8600
|
});
|
|
8098
8601
|
|
|
8099
|
-
// 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
|
|
8100
8603
|
var conversationDetails = union([
|
|
8101
8604
|
strictObject({ ...conversation.entries, messages: array(message) }),
|
|
8102
8605
|
message
|
|
@@ -8186,7 +8689,7 @@ var conversationHit = strictObject({
|
|
|
8186
8689
|
stale: boolean()
|
|
8187
8690
|
});
|
|
8188
8691
|
|
|
8189
|
-
// 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
|
|
8190
8693
|
var counters = strictObject({
|
|
8191
8694
|
cutoff: time,
|
|
8192
8695
|
max_age_ms: milliseconds,
|
|
@@ -8216,7 +8719,7 @@ var counterRefresh = strictObject({
|
|
|
8216
8719
|
complete: optional(boolean())
|
|
8217
8720
|
});
|
|
8218
8721
|
|
|
8219
|
-
// 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
|
|
8220
8723
|
var document = strictObject({
|
|
8221
8724
|
ref: reference,
|
|
8222
8725
|
id,
|
|
@@ -8231,7 +8734,7 @@ var document = strictObject({
|
|
|
8231
8734
|
owners: optional(array(text))
|
|
8232
8735
|
});
|
|
8233
8736
|
|
|
8234
|
-
// 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
|
|
8235
8738
|
var documentLink = strictObject({
|
|
8236
8739
|
ref: reference,
|
|
8237
8740
|
url: text,
|
|
@@ -8242,7 +8745,7 @@ var documentLink = strictObject({
|
|
|
8242
8745
|
sender: strictObject({ id: nullable(id), name: nullable(text) })
|
|
8243
8746
|
});
|
|
8244
8747
|
|
|
8245
|
-
// 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
|
|
8246
8749
|
var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
|
|
8247
8750
|
var contribution = strictObject({
|
|
8248
8751
|
message: evidenceMessage,
|
|
@@ -8272,17 +8775,7 @@ var retentionStay = strictObject({
|
|
|
8272
8775
|
});
|
|
8273
8776
|
var evidence = union([contribution, retentionStay]);
|
|
8274
8777
|
|
|
8275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8276
|
-
var payment = strictObject({
|
|
8277
|
-
amount: text,
|
|
8278
|
-
currency: text,
|
|
8279
|
-
direction: picklist(PAYMENT_DIRECTIONS),
|
|
8280
|
-
counterparty: nullable(reference),
|
|
8281
|
-
counterparty_name: nullable(text),
|
|
8282
|
-
due_at: nullable(text),
|
|
8283
|
-
state: picklist(PAYMENT_STATES),
|
|
8284
|
-
item: nullable(text)
|
|
8285
|
-
});
|
|
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
|
|
8286
8779
|
var fact = strictObject({
|
|
8287
8780
|
ref: reference,
|
|
8288
8781
|
id,
|
|
@@ -8306,15 +8799,13 @@ var fact = strictObject({
|
|
|
8306
8799
|
/** Who recorded it: the owner, or an agent whose fact waits as proposed. */
|
|
8307
8800
|
origin: picklist(["owner", "agent"]),
|
|
8308
8801
|
evidence: array(reference),
|
|
8309
|
-
/** A `payment` fact's fields. */
|
|
8310
|
-
payment: optional(nullable(payment)),
|
|
8311
8802
|
/** With `--sources`: each piece of evidence read back. */
|
|
8312
8803
|
sources: optional(array(evidenceSource)),
|
|
8313
8804
|
created_at: time,
|
|
8314
8805
|
updated_at: time
|
|
8315
8806
|
});
|
|
8316
8807
|
|
|
8317
|
-
// 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
|
|
8318
8809
|
var hit = strictObject({
|
|
8319
8810
|
kind: picklist(["message", "mail", "note", "document", "event", "meeting"]),
|
|
8320
8811
|
ref: reference,
|
|
@@ -8352,7 +8843,7 @@ var hit = strictObject({
|
|
|
8352
8843
|
untrusted
|
|
8353
8844
|
});
|
|
8354
8845
|
|
|
8355
|
-
// 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
|
|
8356
8847
|
var identity = strictObject({
|
|
8357
8848
|
ref: reference,
|
|
8358
8849
|
provider: text,
|
|
@@ -8365,7 +8856,7 @@ var identity = strictObject({
|
|
|
8365
8856
|
person: optional(nullable(reference))
|
|
8366
8857
|
});
|
|
8367
8858
|
|
|
8368
|
-
// 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
|
|
8369
8860
|
var imageEmbedding = strictObject({
|
|
8370
8861
|
model: text,
|
|
8371
8862
|
embedded: count,
|
|
@@ -8374,13 +8865,13 @@ var imageEmbedding = strictObject({
|
|
|
8374
8865
|
more: boolean()
|
|
8375
8866
|
});
|
|
8376
8867
|
|
|
8377
|
-
// 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
|
|
8378
8869
|
import { spawn } from "node:child_process";
|
|
8379
8870
|
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
8380
|
-
import { closeSync, existsSync as
|
|
8381
|
-
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";
|
|
8382
8873
|
|
|
8383
|
-
// 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
|
|
8384
8875
|
var progressOf = /* @__PURE__ */ __name((input) => {
|
|
8385
8876
|
const total = input.total ?? null;
|
|
8386
8877
|
const updated = input.updatedAt ?? null;
|
|
@@ -8396,7 +8887,7 @@ var progressOf = /* @__PURE__ */ __name((input) => {
|
|
|
8396
8887
|
};
|
|
8397
8888
|
}, "progressOf");
|
|
8398
8889
|
|
|
8399
|
-
// 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
|
|
8400
8891
|
var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
|
|
8401
8892
|
const run = currentRun();
|
|
8402
8893
|
const trace = traceId ?? run.traceId;
|
|
@@ -8410,7 +8901,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
|
|
|
8410
8901
|
}));
|
|
8411
8902
|
}, "recordLogFor");
|
|
8412
8903
|
|
|
8413
|
-
// 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
|
|
8414
8905
|
var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
|
|
8415
8906
|
var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
8416
8907
|
const out = openSync(log, "a", 384);
|
|
@@ -8426,23 +8917,23 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
|
8426
8917
|
closeSync(out);
|
|
8427
8918
|
}
|
|
8428
8919
|
}, "spawnDetached");
|
|
8429
|
-
var jobsDir = /* @__PURE__ */ __name((app, env) =>
|
|
8430
|
-
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");
|
|
8431
8922
|
var saveJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
8432
8923
|
mkdirSync3(dir, { recursive: true, mode: 448 });
|
|
8433
8924
|
writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
|
|
8434
8925
|
`, 384);
|
|
8435
8926
|
}, "saveJob");
|
|
8436
8927
|
var readJob = /* @__PURE__ */ __name((dir, id6) => {
|
|
8437
|
-
if (!/^[\w-]+$/.test(id6) || !
|
|
8928
|
+
if (!/^[\w-]+$/.test(id6) || !existsSync5(jobPath(dir, id6)))
|
|
8438
8929
|
return void 0;
|
|
8439
8930
|
try {
|
|
8440
|
-
return JSON.parse(
|
|
8931
|
+
return JSON.parse(readFileSync5(jobPath(dir, id6), "utf8"));
|
|
8441
8932
|
} catch {
|
|
8442
8933
|
return void 0;
|
|
8443
8934
|
}
|
|
8444
8935
|
}, "readJob");
|
|
8445
|
-
var recordsPath = /* @__PURE__ */ __name((dir, id6) =>
|
|
8936
|
+
var recordsPath = /* @__PURE__ */ __name((dir, id6) => join5(dir, `${id6}.jsonl`), "recordsPath");
|
|
8446
8937
|
var tracedJob = /* @__PURE__ */ __name((env) => {
|
|
8447
8938
|
const trace = childTrace();
|
|
8448
8939
|
return { env: { ...env, TRACEPARENT: trace.traceparent }, traceId: trace.traceId };
|
|
@@ -8460,11 +8951,11 @@ var finishJob = /* @__PURE__ */ __name((app, dir, id6, change) => {
|
|
|
8460
8951
|
const job2 = readJob(dir, id6);
|
|
8461
8952
|
if (!job2)
|
|
8462
8953
|
return;
|
|
8463
|
-
const
|
|
8954
|
+
const outcome3 = stateOf(job2);
|
|
8464
8955
|
recordLogFor(recordsPath(dir, id6), app, job2.traceId ? { traceId: job2.traceId } : {})[job2.error ? "error" : "info"]({
|
|
8465
8956
|
event: "job.exit",
|
|
8466
8957
|
job: id6,
|
|
8467
|
-
outcome:
|
|
8958
|
+
outcome: outcome3,
|
|
8468
8959
|
...job2.error ? { errorCode: job2.error.code } : {}
|
|
8469
8960
|
});
|
|
8470
8961
|
}, "finishJob");
|
|
@@ -8479,7 +8970,7 @@ var removeJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
|
8479
8970
|
if (dirname2(job2.log) === dir)
|
|
8480
8971
|
rmSync3(job2.log, { force: true });
|
|
8481
8972
|
}, "removeJob");
|
|
8482
|
-
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");
|
|
8483
8974
|
var jobDetails = /* @__PURE__ */ __name((job2) => ({
|
|
8484
8975
|
job: job2.id,
|
|
8485
8976
|
profile: job2.profile,
|
|
@@ -8545,7 +9036,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
8545
9036
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
8546
9037
|
const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes2(3).toString("hex")}`;
|
|
8547
9038
|
mkdirSync3(dir, { recursive: true, mode: 448 });
|
|
8548
|
-
const log =
|
|
9039
|
+
const log = join5(dir, `${id6}.log`);
|
|
8549
9040
|
const job2 = {
|
|
8550
9041
|
id: id6,
|
|
8551
9042
|
chat: input.chat,
|
|
@@ -8565,7 +9056,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
8565
9056
|
return { job: id6, pid, chat: input.chat, log };
|
|
8566
9057
|
}, "startArchiveJob");
|
|
8567
9058
|
|
|
8568
|
-
// 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
|
|
8569
9060
|
var problem = strictObject({ code: text, message: text });
|
|
8570
9061
|
var job = strictObject({
|
|
8571
9062
|
id,
|
|
@@ -8588,7 +9079,7 @@ var job = strictObject({
|
|
|
8588
9079
|
error: optional(problem)
|
|
8589
9080
|
});
|
|
8590
9081
|
|
|
8591
|
-
// 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
|
|
8592
9083
|
var joinRequest = strictObject({
|
|
8593
9084
|
person_id: id,
|
|
8594
9085
|
name: nullable(text),
|
|
@@ -8599,7 +9090,7 @@ var joinRequest = strictObject({
|
|
|
8599
9090
|
about: optional(text)
|
|
8600
9091
|
});
|
|
8601
9092
|
|
|
8602
|
-
// 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
|
|
8603
9094
|
var botProfile = strictObject({
|
|
8604
9095
|
name: text,
|
|
8605
9096
|
token: text,
|
|
@@ -8667,7 +9158,7 @@ var stickerInventory = strictObject({
|
|
|
8667
9158
|
url: optional(nullable(text))
|
|
8668
9159
|
});
|
|
8669
9160
|
|
|
8670
|
-
// 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
|
|
8671
9162
|
var pollVote = strictObject({
|
|
8672
9163
|
person_id: id,
|
|
8673
9164
|
name: nullable(text),
|
|
@@ -8677,7 +9168,7 @@ var pollVote = strictObject({
|
|
|
8677
9168
|
voted_at: time
|
|
8678
9169
|
});
|
|
8679
9170
|
|
|
8680
|
-
// 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
|
|
8681
9172
|
var reactions = unwrap(unwrap(message.entries.reactions));
|
|
8682
9173
|
var observation = strictObject({
|
|
8683
9174
|
value: pipe(number(), minValue(0)),
|
|
@@ -8719,7 +9210,88 @@ var serveSummary = strictObject({
|
|
|
8719
9210
|
tasks: optional(strictObject({ added: count, closed: count, review: count }))
|
|
8720
9211
|
});
|
|
8721
9212
|
|
|
8722
|
-
// 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
|
|
8723
9295
|
var mediaArchive = strictObject({
|
|
8724
9296
|
directory: text,
|
|
8725
9297
|
chats: count,
|
|
@@ -8751,7 +9323,7 @@ var mediaArchiveTimer = union([
|
|
|
8751
9323
|
strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
|
|
8752
9324
|
]);
|
|
8753
9325
|
|
|
8754
|
-
// 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
|
|
8755
9327
|
var preparationId = pipe(string(), minLength(1));
|
|
8756
9328
|
var preparationCount = pipe(number(), integer(), minValue(0));
|
|
8757
9329
|
var preparationTime = nullable(isoTime);
|
|
@@ -8843,7 +9415,7 @@ var preparationMeeting = strictObject({
|
|
|
8843
9415
|
updated_at: isoTime
|
|
8844
9416
|
});
|
|
8845
9417
|
|
|
8846
|
-
// 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
|
|
8847
9419
|
var meetingEvidence = preparationEvidence;
|
|
8848
9420
|
var meetingPersonContext = strictObject({
|
|
8849
9421
|
person: strictObject({ uid: string(), name: nullable(string()) }),
|
|
@@ -8865,13 +9437,13 @@ var meetingPersonContext = strictObject({
|
|
|
8865
9437
|
})
|
|
8866
9438
|
});
|
|
8867
9439
|
|
|
8868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8869
|
-
var
|
|
8870
|
-
var
|
|
8871
|
-
var
|
|
8872
|
-
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 }),
|
|
8873
9445
|
strictObject({
|
|
8874
|
-
...
|
|
9446
|
+
...base2,
|
|
8875
9447
|
kind: literal("task"),
|
|
8876
9448
|
type: picklist(WORK_TASK_TYPES),
|
|
8877
9449
|
title: text,
|
|
@@ -8883,7 +9455,7 @@ var finding = variant("kind", [
|
|
|
8883
9455
|
assignee_evidence: optional(array(reference))
|
|
8884
9456
|
})
|
|
8885
9457
|
]);
|
|
8886
|
-
var
|
|
9458
|
+
var outcome2 = strictObject({
|
|
8887
9459
|
id,
|
|
8888
9460
|
fingerprint: text,
|
|
8889
9461
|
status: picklist(["accepted", "rejected"]),
|
|
@@ -8893,17 +9465,17 @@ var outcome = strictObject({
|
|
|
8893
9465
|
var meetingFindings = strictObject({
|
|
8894
9466
|
id,
|
|
8895
9467
|
account: strictObject({ provider: text, account: text }),
|
|
8896
|
-
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) }),
|
|
8897
9469
|
fingerprint: text,
|
|
8898
9470
|
status: picklist(["proposed", "reviewed"]),
|
|
8899
9471
|
author,
|
|
8900
9472
|
decided_by: nullable(strictObject({ type: picklist(["person", "bot"]), id })),
|
|
8901
9473
|
decided_at: nullable(time),
|
|
8902
|
-
previous: array(
|
|
8903
|
-
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) }))
|
|
8904
9476
|
});
|
|
8905
9477
|
|
|
8906
|
-
// 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
|
|
8907
9479
|
var communicationCoverage = strictObject({
|
|
8908
9480
|
read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
|
|
8909
9481
|
query: string(),
|
|
@@ -8948,7 +9520,7 @@ var preparationCommunications = strictObject({
|
|
|
8948
9520
|
}))
|
|
8949
9521
|
});
|
|
8950
9522
|
|
|
8951
|
-
// 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
|
|
8952
9524
|
var meetingPreparation = strictObject({
|
|
8953
9525
|
communications: optional(preparationCommunications),
|
|
8954
9526
|
schema_version: literal(1),
|
|
@@ -9061,7 +9633,7 @@ var meetingPreparation = strictObject({
|
|
|
9061
9633
|
})
|
|
9062
9634
|
});
|
|
9063
9635
|
|
|
9064
|
-
// 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
|
|
9065
9637
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
9066
9638
|
var id3 = pipe(string(), minLength(1));
|
|
9067
9639
|
var text3 = string();
|
|
@@ -9125,7 +9697,7 @@ var meetingProjectCandidates = strictObject({
|
|
|
9125
9697
|
})
|
|
9126
9698
|
});
|
|
9127
9699
|
|
|
9128
|
-
// 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
|
|
9129
9701
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
9130
9702
|
var id4 = pipe(string(), minLength(1), maxLength(1e3));
|
|
9131
9703
|
var meetingSeriesInventory = strictObject({
|
|
@@ -9155,7 +9727,7 @@ var meetingSeriesInventory = strictObject({
|
|
|
9155
9727
|
})
|
|
9156
9728
|
});
|
|
9157
9729
|
|
|
9158
|
-
// 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
|
|
9159
9731
|
var text4 = string();
|
|
9160
9732
|
var id5 = pipe(number(), integer(), minValue(1));
|
|
9161
9733
|
var revision = picklist(["current", "superseded"]);
|
|
@@ -9172,7 +9744,7 @@ var meetingTaskProposal = strictObject({
|
|
|
9172
9744
|
persistence: literal("proposal-only")
|
|
9173
9745
|
});
|
|
9174
9746
|
|
|
9175
|
-
// 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
|
|
9176
9748
|
var memory = strictObject({
|
|
9177
9749
|
ref: reference,
|
|
9178
9750
|
id,
|
|
@@ -9199,7 +9771,7 @@ var memory = strictObject({
|
|
|
9199
9771
|
updated_at: time
|
|
9200
9772
|
});
|
|
9201
9773
|
|
|
9202
|
-
// 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
|
|
9203
9775
|
var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
|
|
9204
9776
|
var status = picklist(["found", "linked", "dismissed"]);
|
|
9205
9777
|
var mention = strictObject({
|
|
@@ -9242,13 +9814,13 @@ var mentionRebuild = strictObject({
|
|
|
9242
9814
|
mentions: count
|
|
9243
9815
|
});
|
|
9244
9816
|
|
|
9245
|
-
// 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
|
|
9246
9818
|
var operated3 = { operation_id: id, chat_id: id };
|
|
9247
9819
|
var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
|
|
9248
9820
|
var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
|
|
9249
9821
|
var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
|
|
9250
9822
|
|
|
9251
|
-
// 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
|
|
9252
9824
|
var messageTranscript = strictObject({
|
|
9253
9825
|
message_id: id,
|
|
9254
9826
|
text,
|
|
@@ -9306,7 +9878,7 @@ var evidencePacket = strictObject({
|
|
|
9306
9878
|
}))
|
|
9307
9879
|
});
|
|
9308
9880
|
|
|
9309
|
-
// 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
|
|
9310
9882
|
var messageThread = strictObject({
|
|
9311
9883
|
ref: reference,
|
|
9312
9884
|
chat: id,
|
|
@@ -9323,7 +9895,7 @@ var messageThread = strictObject({
|
|
|
9323
9895
|
});
|
|
9324
9896
|
var messageContext = union([message, messageThread]);
|
|
9325
9897
|
|
|
9326
|
-
// 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
|
|
9327
9899
|
var messageCounts = strictObject({
|
|
9328
9900
|
by: picklist(["chat", "sender", "day", "hour"]),
|
|
9329
9901
|
total: count,
|
|
@@ -9336,7 +9908,7 @@ var messageCounts = strictObject({
|
|
|
9336
9908
|
}))
|
|
9337
9909
|
});
|
|
9338
9910
|
|
|
9339
|
-
// 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
|
|
9340
9912
|
var messageLink = strictObject({
|
|
9341
9913
|
ref: reference,
|
|
9342
9914
|
url: nullable(text),
|
|
@@ -9353,7 +9925,7 @@ var messageLink = strictObject({
|
|
|
9353
9925
|
})))
|
|
9354
9926
|
});
|
|
9355
9927
|
|
|
9356
|
-
// 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
|
|
9357
9929
|
var savedMessageFile = strictObject({
|
|
9358
9930
|
kind: text,
|
|
9359
9931
|
path: text,
|
|
@@ -9440,7 +10012,7 @@ var messageSyncAll = strictObject({
|
|
|
9440
10012
|
var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
|
|
9441
10013
|
var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
|
|
9442
10014
|
|
|
9443
|
-
// 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
|
|
9444
10016
|
var messageWrite = strictObject({
|
|
9445
10017
|
operation_id: id,
|
|
9446
10018
|
message,
|
|
@@ -9455,7 +10027,7 @@ var draftWrite = strictObject({
|
|
|
9455
10027
|
});
|
|
9456
10028
|
var messageSend = union([messageWrite, draftWrite]);
|
|
9457
10029
|
|
|
9458
|
-
// 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
|
|
9459
10031
|
var model2 = strictObject({
|
|
9460
10032
|
id,
|
|
9461
10033
|
kind: picklist(["audio", "text", "image", "reranker"]),
|
|
@@ -9472,7 +10044,7 @@ var model2 = strictObject({
|
|
|
9472
10044
|
path: text
|
|
9473
10045
|
});
|
|
9474
10046
|
|
|
9475
|
-
// 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
|
|
9476
10048
|
var source = picklist(["environment", "keyring", "file"]);
|
|
9477
10049
|
var modelKey = strictObject({
|
|
9478
10050
|
provider: text,
|
|
@@ -9482,7 +10054,7 @@ var modelKey = strictObject({
|
|
|
9482
10054
|
var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
|
|
9483
10055
|
var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
|
|
9484
10056
|
|
|
9485
|
-
// 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
|
|
9486
10058
|
var versus = strictObject({ current: number(), previous: number() });
|
|
9487
10059
|
var person = { person_ref: reference, name: nullable(text) };
|
|
9488
10060
|
var graph = strictObject({
|
|
@@ -9516,14 +10088,14 @@ var officialStats = strictObject({
|
|
|
9516
10088
|
graphs: record(string(), union([graph, strictObject({ error: text })]))
|
|
9517
10089
|
});
|
|
9518
10090
|
|
|
9519
|
-
// 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
|
|
9520
10092
|
var person2 = strictObject({
|
|
9521
10093
|
ref: reference,
|
|
9522
10094
|
name: nullable(text),
|
|
9523
10095
|
identities: optional(array(identity))
|
|
9524
10096
|
});
|
|
9525
10097
|
|
|
9526
|
-
// 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
|
|
9527
10099
|
var poll = strictObject({
|
|
9528
10100
|
chat_id: id,
|
|
9529
10101
|
message_id: id,
|
|
@@ -9539,11 +10111,11 @@ var poll = strictObject({
|
|
|
9539
10111
|
});
|
|
9540
10112
|
var pollChange = strictObject({ operation_id: id, poll });
|
|
9541
10113
|
|
|
9542
|
-
// 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
|
|
9543
10115
|
var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
|
|
9544
10116
|
var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
|
|
9545
10117
|
|
|
9546
|
-
// 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
|
|
9547
10119
|
var figures = record(string(), number());
|
|
9548
10120
|
var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
|
|
9549
10121
|
var rankingRow = strictObject({
|
|
@@ -9590,7 +10162,7 @@ var ranking = strictObject({
|
|
|
9590
10162
|
rows: array(rankingRow)
|
|
9591
10163
|
});
|
|
9592
10164
|
|
|
9593
|
-
// 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
|
|
9594
10166
|
var reaction = strictObject({
|
|
9595
10167
|
person: strictObject({ id, name: nullable(text), username: nullable(text) }),
|
|
9596
10168
|
/** The emoji, or `custom:<id>` for a custom one. */
|
|
@@ -9598,7 +10170,7 @@ var reaction = strictObject({
|
|
|
9598
10170
|
reacted_at: time
|
|
9599
10171
|
});
|
|
9600
10172
|
|
|
9601
|
-
// 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
|
|
9602
10174
|
var reactionChange = strictObject({
|
|
9603
10175
|
operation_id: id,
|
|
9604
10176
|
chat_id: id,
|
|
@@ -9606,7 +10178,7 @@ var reactionChange = strictObject({
|
|
|
9606
10178
|
reaction: nullable(text)
|
|
9607
10179
|
});
|
|
9608
10180
|
|
|
9609
|
-
// 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
|
|
9610
10182
|
var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
|
|
9611
10183
|
var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
|
|
9612
10184
|
var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
|
|
@@ -9617,7 +10189,7 @@ var recipientChange = strictObject({
|
|
|
9617
10189
|
...partial(recipientOff).entries
|
|
9618
10190
|
});
|
|
9619
10191
|
|
|
9620
|
-
// 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
|
|
9621
10193
|
var events = array(record(string(), unknown()));
|
|
9622
10194
|
var recordedRun = strictObject({
|
|
9623
10195
|
run_id: id,
|
|
@@ -9689,7 +10261,7 @@ var runHit = strictObject({
|
|
|
9689
10261
|
});
|
|
9690
10262
|
var runLocation = strictObject({ path: text });
|
|
9691
10263
|
|
|
9692
|
-
// 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
|
|
9693
10265
|
var relationship = strictObject({
|
|
9694
10266
|
id,
|
|
9695
10267
|
from: reference,
|
|
@@ -9706,7 +10278,24 @@ var relationship = strictObject({
|
|
|
9706
10278
|
created_at: time
|
|
9707
10279
|
});
|
|
9708
10280
|
|
|
9709
|
-
// 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
|
|
9710
10299
|
var retentionCohort = strictObject({
|
|
9711
10300
|
/** The first day of the joining day or week. */
|
|
9712
10301
|
cohort: text,
|
|
@@ -9754,7 +10343,7 @@ var retention = strictObject({
|
|
|
9754
10343
|
rows: array(retentionCohort)
|
|
9755
10344
|
});
|
|
9756
10345
|
|
|
9757
|
-
// 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
|
|
9758
10347
|
var savedSearch = strictObject({
|
|
9759
10348
|
id,
|
|
9760
10349
|
/** `null` for a run in the history. */
|
|
@@ -9771,7 +10360,7 @@ var savedSearch = strictObject({
|
|
|
9771
10360
|
});
|
|
9772
10361
|
var searchHistoryClear = strictObject({ cleared: count });
|
|
9773
10362
|
|
|
9774
|
-
// 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
|
|
9775
10364
|
var sendAttempt = strictObject({
|
|
9776
10365
|
at: time,
|
|
9777
10366
|
profile: text,
|
|
@@ -9799,7 +10388,7 @@ var sendAttempt = strictObject({
|
|
|
9799
10388
|
error_code: optional(text)
|
|
9800
10389
|
});
|
|
9801
10390
|
|
|
9802
|
-
// 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
|
|
9803
10392
|
var absent = strictObject({ path: text, exists: literal(false) });
|
|
9804
10393
|
var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
|
|
9805
10394
|
var infoSchema = strictObject({
|
|
@@ -10007,7 +10596,7 @@ var storeRepair = union([
|
|
|
10007
10596
|
]);
|
|
10008
10597
|
var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
|
|
10009
10598
|
|
|
10010
|
-
// 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
|
|
10011
10600
|
var range = strictObject({ from: number(), to: number() });
|
|
10012
10601
|
var storeChatStatus = strictObject({
|
|
10013
10602
|
chat_id: id,
|
|
@@ -10019,6 +10608,13 @@ var storeChatStatus = strictObject({
|
|
|
10019
10608
|
last_stored_at: nullable(time),
|
|
10020
10609
|
held: array(range)
|
|
10021
10610
|
});
|
|
10611
|
+
var chatCoverage = strictObject({
|
|
10612
|
+
chats: count,
|
|
10613
|
+
fetched: count,
|
|
10614
|
+
partial: count,
|
|
10615
|
+
never: count,
|
|
10616
|
+
oldest_message_at: nullable(time)
|
|
10617
|
+
});
|
|
10022
10618
|
var storeClear = strictObject({
|
|
10023
10619
|
cleared: boolean(),
|
|
10024
10620
|
dry_run: optional(literal(true)),
|
|
@@ -10098,7 +10694,7 @@ var storeJobRetry = union([
|
|
|
10098
10694
|
]);
|
|
10099
10695
|
var storeJobClear = strictObject({ cleared: array(id) });
|
|
10100
10696
|
|
|
10101
|
-
// 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
|
|
10102
10698
|
var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
|
|
10103
10699
|
var storeTable = strictObject({
|
|
10104
10700
|
name: text,
|
|
@@ -10107,7 +10703,7 @@ var storeTable = strictObject({
|
|
|
10107
10703
|
bytes: optional(nullable(count))
|
|
10108
10704
|
});
|
|
10109
10705
|
|
|
10110
|
-
// 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
|
|
10111
10707
|
var tagTarget = variant("type", [
|
|
10112
10708
|
strictObject({ type: literal("chat"), chat_id: id }),
|
|
10113
10709
|
strictObject({ type: literal("contact"), person_id: id }),
|
|
@@ -10138,7 +10734,7 @@ var automaticTags = strictObject({
|
|
|
10138
10734
|
dry_run: boolean()
|
|
10139
10735
|
});
|
|
10140
10736
|
|
|
10141
|
-
// 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
|
|
10142
10738
|
var tagging = strictObject({
|
|
10143
10739
|
tag: text,
|
|
10144
10740
|
type: picklist(TAG_TYPES),
|
|
@@ -10151,7 +10747,7 @@ var tagging = strictObject({
|
|
|
10151
10747
|
created_at: time
|
|
10152
10748
|
});
|
|
10153
10749
|
|
|
10154
|
-
// 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
|
|
10155
10751
|
var side = strictObject({ ref: reference, key: text, title: text, status: text });
|
|
10156
10752
|
var taskPair = strictObject({
|
|
10157
10753
|
task: nullable(side),
|
|
@@ -10174,7 +10770,7 @@ var taskPair = strictObject({
|
|
|
10174
10770
|
created_at: time
|
|
10175
10771
|
});
|
|
10176
10772
|
|
|
10177
|
-
// 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
|
|
10178
10774
|
var nullableTime = nullable(time);
|
|
10179
10775
|
var link = strictObject({
|
|
10180
10776
|
id,
|
|
@@ -10304,8 +10900,47 @@ var taskScan = strictObject({
|
|
|
10304
10900
|
held_chats: optional(count),
|
|
10305
10901
|
tasks: array(strictObject({ source: text, kind: picklist(TASK_KINDS), category: nullable(text) }))
|
|
10306
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
|
+
});
|
|
10307
10942
|
|
|
10308
|
-
// 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
|
|
10309
10944
|
var topic = strictObject({
|
|
10310
10945
|
id,
|
|
10311
10946
|
title: text,
|
|
@@ -10319,7 +10954,7 @@ var topic = strictObject({
|
|
|
10319
10954
|
untrusted
|
|
10320
10955
|
});
|
|
10321
10956
|
|
|
10322
|
-
// 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
|
|
10323
10958
|
var ENTITIES = {
|
|
10324
10959
|
sync_progress: progress,
|
|
10325
10960
|
...MEETING_RESULT_ENTITIES,
|
|
@@ -10349,18 +10984,22 @@ var ENTITIES = {
|
|
|
10349
10984
|
attachments: optional(array(hitFile)),
|
|
10350
10985
|
untrusted
|
|
10351
10986
|
}),
|
|
10352
|
-
"message.summary":
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
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
|
+
}),
|
|
10364
11003
|
message_link: messageLink,
|
|
10365
11004
|
message_write: messageWrite,
|
|
10366
11005
|
message_send: messageSend,
|
|
@@ -10457,6 +11096,9 @@ var ENTITIES = {
|
|
|
10457
11096
|
task_unmerge: taskUnmerge,
|
|
10458
11097
|
task_categories: taskCategories,
|
|
10459
11098
|
task_scan: taskScan,
|
|
11099
|
+
task_analysis: taskAnalysis,
|
|
11100
|
+
task_analysis_mark: taskAnalysisMarkMoved,
|
|
11101
|
+
task_review: taskReview,
|
|
10460
11102
|
fact,
|
|
10461
11103
|
memory,
|
|
10462
11104
|
meeting,
|
|
@@ -10467,6 +11109,7 @@ var ENTITIES = {
|
|
|
10467
11109
|
meeting_project_evidence: meetingProjectEvidence,
|
|
10468
11110
|
meeting_preparation: meetingPreparation,
|
|
10469
11111
|
meeting_findings: meetingFindings,
|
|
11112
|
+
mail_findings: mailFindings,
|
|
10470
11113
|
meeting_transcript: meetingTranscript,
|
|
10471
11114
|
meeting_summary: meetingSummary,
|
|
10472
11115
|
meeting_evidence: meetingEvidence,
|
|
@@ -10475,6 +11118,7 @@ var ENTITIES = {
|
|
|
10475
11118
|
meeting_review: meetingReview,
|
|
10476
11119
|
meeting_link: meetingLink,
|
|
10477
11120
|
meeting_stats: meetingStats,
|
|
11121
|
+
meeting_counts: meetingCounts,
|
|
10478
11122
|
meeting_speaker: meetingSpeaker,
|
|
10479
11123
|
meeting_participants: meetingParticipants,
|
|
10480
11124
|
meeting_passage: meetingPassage,
|
|
@@ -10512,6 +11156,7 @@ var ENTITIES = {
|
|
|
10512
11156
|
job,
|
|
10513
11157
|
store_chat_status: storeChatStatus,
|
|
10514
11158
|
store_clear: storeClear,
|
|
11159
|
+
chat_coverage: chatCoverage,
|
|
10515
11160
|
store_export: storeExport,
|
|
10516
11161
|
store_gap_plan: storeGapPlan,
|
|
10517
11162
|
store_gap_repair: storeGapRepair,
|
|
@@ -10567,6 +11212,9 @@ var ENTITIES = {
|
|
|
10567
11212
|
topic,
|
|
10568
11213
|
folder,
|
|
10569
11214
|
message_counts: messageCounts,
|
|
11215
|
+
response_times: responseTimes,
|
|
11216
|
+
waiting_chats: waitingChats,
|
|
11217
|
+
mail_counts: mailCounts,
|
|
10570
11218
|
ranking,
|
|
10571
11219
|
admin_report: adminReport,
|
|
10572
11220
|
analysis_consent: analysisConsent,
|
|
@@ -10588,7 +11236,7 @@ var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.e
|
|
|
10588
11236
|
return [name, definition];
|
|
10589
11237
|
})), "entityDefinitions");
|
|
10590
11238
|
|
|
10591
|
-
// 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
|
|
10592
11240
|
var schemas = /* @__PURE__ */ new WeakMap();
|
|
10593
11241
|
var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
|
|
10594
11242
|
if (Object.hasOwn(ENTITIES, name))
|
|
@@ -10622,8 +11270,8 @@ var answerRow = /* @__PURE__ */ __name((command) => {
|
|
|
10622
11270
|
return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
|
|
10623
11271
|
}, "answerRow");
|
|
10624
11272
|
|
|
10625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10626
|
-
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";
|
|
10627
11275
|
var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
|
|
10628
11276
|
var IMAGE_MODELS = [
|
|
10629
11277
|
{
|
|
@@ -10673,10 +11321,10 @@ var imageModel = /* @__PURE__ */ __name((id6) => {
|
|
|
10673
11321
|
return found;
|
|
10674
11322
|
}, "imageModel");
|
|
10675
11323
|
var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
|
|
10676
|
-
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");
|
|
10677
11325
|
var isImageModelInstalled = /* @__PURE__ */ __name((model3, directory) => filesPresent(placedImage(model3, directory)), "isImageModelInstalled");
|
|
10678
11326
|
|
|
10679
|
-
// 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
|
|
10680
11328
|
var STEPS2 = defineSteps([
|
|
10681
11329
|
...STEPS,
|
|
10682
11330
|
{
|
|
@@ -10880,6 +11528,16 @@ var STEPS2 = defineSteps([
|
|
|
10880
11528
|
args: [],
|
|
10881
11529
|
why: "serve still runs an older version; a restart runs the one installed now"
|
|
10882
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
|
+
},
|
|
10883
11541
|
{
|
|
10884
11542
|
id: "search.meetings",
|
|
10885
11543
|
command: "*",
|
|
@@ -10888,7 +11546,7 @@ var STEPS2 = defineSteps([
|
|
|
10888
11546
|
}
|
|
10889
11547
|
]);
|
|
10890
11548
|
var nextStep = /* @__PURE__ */ __name((id6, input) => {
|
|
10891
|
-
const definition = STEPS2.find((
|
|
11549
|
+
const definition = STEPS2.find((step2) => step2.id === id6);
|
|
10892
11550
|
if (!definition)
|
|
10893
11551
|
throw new Error(`no step "${id6}"`);
|
|
10894
11552
|
const args = Object.fromEntries(Object.entries(input.args ?? {}).filter(([, value]) => value !== void 0));
|
|
@@ -10911,7 +11569,7 @@ var commandAt = /* @__PURE__ */ __name((root, path2) => {
|
|
|
10911
11569
|
at2 = at2?.commands.find((one) => one.name() === word || one.aliases().includes(word));
|
|
10912
11570
|
return at2 === root ? void 0 : at2;
|
|
10913
11571
|
}, "commandAt");
|
|
10914
|
-
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");
|
|
10915
11573
|
var failureSteps = /* @__PURE__ */ __name((root, error) => {
|
|
10916
11574
|
const model3 = error.details?.model;
|
|
10917
11575
|
const own = error.reason === "model.not-downloaded" && typeof model3 === "string" ? [
|
|
@@ -10921,33 +11579,33 @@ var failureSteps = /* @__PURE__ */ __name((root, error) => {
|
|
|
10921
11579
|
] : [];
|
|
10922
11580
|
return runnable(root, [...error.next ?? [], ...own]);
|
|
10923
11581
|
}, "failureSteps");
|
|
10924
|
-
var withSafety = /* @__PURE__ */ __name((steps, targets) => steps.map((
|
|
10925
|
-
if (
|
|
10926
|
-
return
|
|
10927
|
-
const effects = targets(
|
|
10928
|
-
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) };
|
|
10929
11587
|
}), "withSafety");
|
|
10930
|
-
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");
|
|
10931
11589
|
var kebab = /* @__PURE__ */ __name((name) => name.replaceAll("_", "-"), "kebab");
|
|
10932
11590
|
var quoted2 = /* @__PURE__ */ __name((value) => {
|
|
10933
11591
|
const text5 = String(value);
|
|
10934
11592
|
return /^[\w@:./+-]+$/.test(text5) ? text5 : JSON.stringify(text5);
|
|
10935
11593
|
}, "quoted");
|
|
10936
|
-
var stepLine = /* @__PURE__ */ __name((root,
|
|
10937
|
-
const command = commandAt(root,
|
|
11594
|
+
var stepLine = /* @__PURE__ */ __name((root, step2) => {
|
|
11595
|
+
const command = commandAt(root, step2.command);
|
|
10938
11596
|
const positional = new Set(command?.registeredArguments.map((argument) => argument.name()) ?? []);
|
|
10939
|
-
const args = Object.entries(
|
|
11597
|
+
const args = Object.entries(step2.args).filter(([, value]) => value !== void 0 && value !== false);
|
|
10940
11598
|
const profile = root.getOptionValue("profile");
|
|
10941
11599
|
return [
|
|
10942
11600
|
root.name(),
|
|
10943
11601
|
...typeof profile === "string" && profile !== "" ? [quoted2(profile)] : [],
|
|
10944
|
-
|
|
10945
|
-
...(command?.registeredArguments ?? []).flatMap((argument) =>
|
|
11602
|
+
step2.command,
|
|
11603
|
+
...(command?.registeredArguments ?? []).flatMap((argument) => step2.args[argument.name()] === void 0 ? [] : [quoted2(step2.args[argument.name()])]),
|
|
10946
11604
|
...args.filter(([name]) => !positional.has(name)).map(([name, value]) => value === true ? `--${kebab(name)}` : `--${kebab(name)} ${quoted2(value)}`)
|
|
10947
11605
|
].join(" ");
|
|
10948
11606
|
}, "stepLine");
|
|
10949
11607
|
|
|
10950
|
-
// 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
|
|
10951
11609
|
var where = [{ field: "ref" }, { field: ["chat_title", "chat"] }];
|
|
10952
11610
|
var who2 = { field: ["who.owner", "who.name"], tag: "you" };
|
|
10953
11611
|
var STATUS_SIGNAL_ROWS = {
|
|
@@ -11056,7 +11714,7 @@ var STATUS_ROWS = {
|
|
|
11056
11714
|
"status.failed": { columns: [{ field: "signal" }], text: ["why"] }
|
|
11057
11715
|
};
|
|
11058
11716
|
|
|
11059
|
-
// 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
|
|
11060
11718
|
var TEXT_CHARS = 400;
|
|
11061
11719
|
var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
|
|
11062
11720
|
var messageRow = {
|
|
@@ -11209,10 +11867,10 @@ var clockFor = /* @__PURE__ */ __name((zone) => {
|
|
|
11209
11867
|
return {
|
|
11210
11868
|
zone,
|
|
11211
11869
|
parts: /* @__PURE__ */ __name((iso) => {
|
|
11212
|
-
const
|
|
11213
|
-
if (Number.isNaN(
|
|
11870
|
+
const ms2 = Date.parse(iso);
|
|
11871
|
+
if (Number.isNaN(ms2))
|
|
11214
11872
|
return void 0;
|
|
11215
|
-
const part = Object.fromEntries(format.formatToParts(
|
|
11873
|
+
const part = Object.fromEntries(format.formatToParts(ms2).map(({ type, value }) => [type, value]));
|
|
11216
11874
|
return { date: `${part.year}-${part.month}-${part.day}`, time: `${part.hour}:${part.minute}` };
|
|
11217
11875
|
}, "parts")
|
|
11218
11876
|
};
|
|
@@ -11336,20 +11994,20 @@ var blockOf = /* @__PURE__ */ __name((fields, chars, indent = "", whole = []) =>
|
|
|
11336
11994
|
var footerOf = /* @__PURE__ */ __name((body) => {
|
|
11337
11995
|
const lines = [];
|
|
11338
11996
|
const steps = body.next ?? [];
|
|
11339
|
-
const lineOf2 = /* @__PURE__ */ __name((
|
|
11997
|
+
const lineOf2 = /* @__PURE__ */ __name((step2) => step2.kind === "command" ? step2.line ?? step2.command : void 0, "lineOf");
|
|
11340
11998
|
if ("items" in body && body.page.has_more) {
|
|
11341
|
-
const more = steps.find((
|
|
11999
|
+
const more = steps.find((step2) => step2.step === "page.next");
|
|
11342
12000
|
const line = more?.kind === "command" ? more.line : void 0;
|
|
11343
12001
|
const page2 = body.page;
|
|
11344
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"))}`);
|
|
11345
12003
|
}
|
|
11346
12004
|
for (const missing of body.missing ?? [])
|
|
11347
12005
|
lines.push(`# missing: ${clean(missing.field)}: ${clean(missing.why)}`);
|
|
11348
|
-
for (const
|
|
11349
|
-
if (
|
|
12006
|
+
for (const step2 of steps) {
|
|
12007
|
+
if (step2.step === "page.next" && "items" in body)
|
|
11350
12008
|
continue;
|
|
11351
|
-
const line = lineOf2(
|
|
11352
|
-
lines.push(`# next: ${clean(
|
|
12009
|
+
const line = lineOf2(step2);
|
|
12010
|
+
lines.push(`# next: ${clean(step2.why)}${line ? `: ${clean(line)}` : ""}`);
|
|
11353
12011
|
}
|
|
11354
12012
|
if (body.meta?.complete === false) {
|
|
11355
12013
|
const issues = (body.meta.issues ?? []).map((issue) => `${clean(issue.source)}: ${clean(String(issue.code))}`);
|
|
@@ -11392,7 +12050,65 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
|
|
|
11392
12050
|
return lines.concat(footerOf(body)).join("\n");
|
|
11393
12051
|
}, "compactText");
|
|
11394
12052
|
|
|
11395
|
-
// 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
|
|
11396
12112
|
var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
|
|
11397
12113
|
var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
|
|
11398
12114
|
var strip = /* @__PURE__ */ __name((value) => {
|
|
@@ -11406,7 +12122,7 @@ var strip = /* @__PURE__ */ __name((value) => {
|
|
|
11406
12122
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
|
|
11407
12123
|
}, "strip");
|
|
11408
12124
|
|
|
11409
|
-
// 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
|
|
11410
12126
|
var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
|
|
11411
12127
|
var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
|
|
11412
12128
|
var listOf = /* @__PURE__ */ __name((command, input) => {
|
|
@@ -11449,7 +12165,7 @@ var itemOf = /* @__PURE__ */ __name((item, { next = [], missing, meta } = {}) =>
|
|
|
11449
12165
|
};
|
|
11450
12166
|
return body;
|
|
11451
12167
|
}, "itemOf");
|
|
11452
|
-
var
|
|
12168
|
+
var snake4 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
11453
12169
|
var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
11454
12170
|
const kept = new Set(verbatim);
|
|
11455
12171
|
const convert = /* @__PURE__ */ __name((value) => {
|
|
@@ -11460,7 +12176,7 @@ var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
|
11460
12176
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => {
|
|
11461
12177
|
if (inner === void 0)
|
|
11462
12178
|
return [];
|
|
11463
|
-
const name =
|
|
12179
|
+
const name = snake4(key);
|
|
11464
12180
|
return [[name, kept.has(key) || kept.has(name) ? inner : convert(inner)]];
|
|
11465
12181
|
}));
|
|
11466
12182
|
}, "convert");
|
|
@@ -11500,7 +12216,16 @@ var sealed = /* @__PURE__ */ __name((value) => {
|
|
|
11500
12216
|
const { meta, ...rest } = withoutProviderRefs(value);
|
|
11501
12217
|
return { ...rest, meta: metaNow(meta) };
|
|
11502
12218
|
}, "sealed");
|
|
11503
|
-
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");
|
|
11504
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");
|
|
11505
12230
|
var jsonlRecords = /* @__PURE__ */ __name((body) => linesOf(sealed(body)).split("\n").map((line) => JSON.parse(line)), "jsonlRecords");
|
|
11506
12231
|
var renderAnswer = /* @__PURE__ */ __name((command, { renderer, format, streams, compact, full }, body, view) => {
|
|
@@ -11512,9 +12237,10 @@ var renderAnswer = /* @__PURE__ */ __name((command, { renderer, format, streams,
|
|
|
11512
12237
|
const kept = withoutProviderRefs({ ...body, ...next.length > 0 ? { next } : {} });
|
|
11513
12238
|
if (next.length === 0)
|
|
11514
12239
|
delete kept.next;
|
|
11515
|
-
const
|
|
12240
|
+
const sealedBody = sealed(kept);
|
|
11516
12241
|
const environment = environmentOf(command);
|
|
11517
12242
|
const drawn = compact && !environment.agent;
|
|
12243
|
+
const whole = format === "json" && !drawn && !environment.agent ? withLargeAnswerStep(command, sealedBody) : sealedBody;
|
|
11518
12244
|
if (drawn) {
|
|
11519
12245
|
const lined = whole.next ? { ...whole, next: compactSteps(root, whole.next) } : whole;
|
|
11520
12246
|
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
@@ -11534,8 +12260,8 @@ var renderAnswer = /* @__PURE__ */ __name((command, { renderer, format, streams,
|
|
|
11534
12260
|
setExitCode(command, code);
|
|
11535
12261
|
if (drawn || format === "json")
|
|
11536
12262
|
return;
|
|
11537
|
-
for (const
|
|
11538
|
-
renderer.note(
|
|
12263
|
+
for (const step2 of next)
|
|
12264
|
+
renderer.note(step2.kind === "command" ? `\u2192 ${step2.why}: ${stepLine(root, step2)}` : `\u2192 ${step2.why}`);
|
|
11539
12265
|
}, "renderAnswer");
|
|
11540
12266
|
var renderDocument = /* @__PURE__ */ __name(({ renderer }, document2) => renderer.result(document2), "renderDocument");
|
|
11541
12267
|
var itemAnswer = /* @__PURE__ */ __name((item) => sealed(itemOf(item)), "itemAnswer");
|
|
@@ -11643,8 +12369,14 @@ export {
|
|
|
11643
12369
|
assertRetentionEvidenceRead,
|
|
11644
12370
|
historyWindow,
|
|
11645
12371
|
limitBatch,
|
|
12372
|
+
botFiles,
|
|
12373
|
+
ChatRegistry,
|
|
12374
|
+
registryProfiles,
|
|
12375
|
+
REPAIR_WORDS,
|
|
12376
|
+
repairConfigText,
|
|
11646
12377
|
permissionIssues,
|
|
11647
12378
|
publicIssue,
|
|
12379
|
+
fixVerb,
|
|
11648
12380
|
issueMessage,
|
|
11649
12381
|
rememberAccount,
|
|
11650
12382
|
recalledAccount,
|
|
@@ -11672,6 +12404,7 @@ export {
|
|
|
11672
12404
|
logsInOrOut,
|
|
11673
12405
|
isLogin,
|
|
11674
12406
|
destroysNothing,
|
|
12407
|
+
admittedUnderLock,
|
|
11675
12408
|
changesStore,
|
|
11676
12409
|
readsOverMcpAt,
|
|
11677
12410
|
isStoreChange,
|
|
@@ -11750,7 +12483,6 @@ export {
|
|
|
11750
12483
|
answerProjectionSchema,
|
|
11751
12484
|
STATUS_SIGNAL_ROWS,
|
|
11752
12485
|
entityRows,
|
|
11753
|
-
withoutProviderRefs,
|
|
11754
12486
|
IMAGE_MODELS,
|
|
11755
12487
|
DEFAULT_IMAGE_MODEL,
|
|
11756
12488
|
imageModel,
|
|
@@ -11765,6 +12497,8 @@ export {
|
|
|
11765
12497
|
failureSteps,
|
|
11766
12498
|
withLines,
|
|
11767
12499
|
stepLine,
|
|
12500
|
+
tooLargeSteps,
|
|
12501
|
+
withoutProviderRefs,
|
|
11768
12502
|
answerSchema,
|
|
11769
12503
|
listOf,
|
|
11770
12504
|
itemOf,
|