@wirecat/tg-cli 0.115.0 → 0.117.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 +11 -9
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +58 -32
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-ODK7R4LY.js → adapter-VNQ72MBK.js} +98 -63
- package/dist/bundle/{all-profiles-AQYM65BS.js → all-profiles-3W2UQTCK.js} +10 -9
- package/dist/bundle/{anthropic-VBDSVNIM.js → anthropic-DFUW2KTG.js} +6 -6
- package/dist/bundle/{app-server-YOIHLBNS.js → app-server-5XJIMLHB.js} +49 -45
- package/dist/bundle/{bot-api-TRYLGQKK.js → bot-api-HRRBF3W6.js} +50 -49
- package/dist/bundle/{bot-history-7DTJLBBJ.js → bot-history-GBH5XE4N.js} +18 -17
- package/dist/bundle/{bun-XIMM6EHD.js → bun-ZMOYGG6F.js} +2 -2
- package/dist/bundle/{bun-sqlite-6B3BL5IV.js → bun-sqlite-6FZFMA7K.js} +5 -5
- package/dist/bundle/{chunk-DIABP7ZP.js → chunk-2452HCIV.js} +3 -3
- package/dist/bundle/{chunk-WMG4IGEB.js → chunk-2XLKZL6K.js} +77 -38
- package/dist/bundle/chunk-3GRX7WP6.js +35 -0
- package/dist/bundle/{chunk-WINKEV4F.js → chunk-3MQOLYAN.js} +4 -4
- package/dist/bundle/{chunk-KDOBY524.js → chunk-3RJYLN5V.js} +133 -27
- package/dist/bundle/{chunk-Y3AQHPAJ.js → chunk-4JDGN6OD.js} +1 -1
- package/dist/bundle/{chunk-JZXQZW2D.js → chunk-56Q5JV3Z.js} +2 -2
- package/dist/bundle/{chunk-XIYRHIBK.js → chunk-66FZBLRJ.js} +13 -13
- package/dist/bundle/{chunk-OUX3QMYI.js → chunk-6GFUL4OU.js} +228 -84
- package/dist/bundle/{chunk-O7CBGHI7.js → chunk-6HRN7BW6.js} +1 -1
- package/dist/bundle/{chunk-TQYMLXDS.js → chunk-7NBUT62O.js} +3 -3
- package/dist/bundle/{chunk-A4BQGSKI.js → chunk-7Y3RUEVY.js} +6 -6
- package/dist/bundle/chunk-AG6HWPQP.js +64 -0
- package/dist/bundle/{chunk-GCFU6WBE.js → chunk-AUBRELCM.js} +3 -3
- package/dist/bundle/{chunk-PEKTB3FQ.js → chunk-B2YPB5AE.js} +56 -27
- package/dist/bundle/{chunk-CCHHEMPM.js → chunk-BXTDAGM4.js} +3 -2
- package/dist/bundle/{chunk-QK6VLKG5.js → chunk-C6TUVV7E.js} +674 -316
- package/dist/bundle/{chunk-XY7IGVVS.js → chunk-EA2PGDER.js} +2 -2
- package/dist/bundle/{chunk-KIZT2MI6.js → chunk-EL6I4WTB.js} +1 -1
- package/dist/bundle/{chunk-77M3IAVU.js → chunk-EPCFXKTX.js} +27 -8
- package/dist/bundle/{chunk-L4CMCC3V.js → chunk-EZTYJ43A.js} +4 -2
- package/dist/bundle/{chunk-PEJHI7QO.js → chunk-F6KBVIJP.js} +4 -4
- package/dist/bundle/{chunk-UY7GJRGY.js → chunk-FAHHERJ7.js} +4 -4
- package/dist/bundle/{chunk-WOQGUIXE.js → chunk-FEKXHILZ.js} +1 -1
- package/dist/bundle/chunk-G7B5UIE7.js +182 -0
- package/dist/bundle/{chunk-RFRI2HFT.js → chunk-GFHNQBD2.js} +1 -1
- package/dist/bundle/{chunk-TMATSEP5.js → chunk-HORGORHK.js} +12 -12
- package/dist/bundle/{chunk-2TC76TLJ.js → chunk-HWYSRB64.js} +2 -2
- package/dist/bundle/{chunk-GX4DMI4H.js → chunk-HZZGOLGP.js} +15 -12
- package/dist/bundle/{chunk-MUZ4KYGY.js → chunk-JWIUK3SK.js} +2 -2
- package/dist/bundle/{chunk-WDNNN3J4.js → chunk-KVTLT4V7.js} +6 -6
- package/dist/bundle/{chunk-UBQ3LOF6.js → chunk-L5WNE4WS.js} +2 -2
- package/dist/bundle/{chunk-OMP6ALBT.js → chunk-M7V5XRM6.js} +3 -3
- package/dist/bundle/{chunk-LUIPXRKN.js → chunk-MLHKQDUN.js} +647 -129
- package/dist/bundle/{chunk-VQCWVZWG.js → chunk-MP7M6FFU.js} +6 -6
- package/dist/bundle/{chunk-5ROWSRK7.js → chunk-NUCDEOFC.js} +2 -2
- package/dist/bundle/{chunk-ILHTNOIV.js → chunk-P3ASN72F.js} +1 -1
- package/dist/bundle/{chunk-VVKEWWSO.js → chunk-PTIB7NEE.js} +1 -1
- package/dist/bundle/{chunk-D4E345BC.js → chunk-Q7O4CQDO.js} +4 -2
- package/dist/bundle/{chunk-EW3XTUPB.js → chunk-QOGYHU3Q.js} +4 -4
- package/dist/bundle/{chunk-BEQPZA3S.js → chunk-RDH2QBUE.js} +3 -3
- package/dist/bundle/{chunk-AVWPMJ6E.js → chunk-RDSLSV4M.js} +2 -2
- package/dist/bundle/{chunk-YCUQKFGD.js → chunk-SQXB5ZUZ.js} +3 -3
- package/dist/bundle/{chunk-RHUNMU4Q.js → chunk-TFBHDIGY.js} +4 -4
- package/dist/bundle/{chunk-OSP335AJ.js → chunk-TG6ZYL4B.js} +8 -8
- package/dist/bundle/{chunk-IUDIRZVU.js → chunk-UGPZCNYC.js} +991 -536
- package/dist/bundle/{chunk-AICS3TSF.js → chunk-UYK5AXSW.js} +4 -4
- package/dist/bundle/{chunk-PZAEI4NM.js → chunk-V2T7NYNU.js} +55 -46
- package/dist/bundle/{chunk-HZKWB6WS.js → chunk-V47NPSSV.js} +28 -28
- package/dist/bundle/{chunk-U67TSAAO.js → chunk-VMCQGZIA.js} +1893 -840
- package/dist/bundle/{chunk-CNO3R4O4.js → chunk-VRDVXXXD.js} +8 -8
- package/dist/bundle/{chunk-PQLBPYJR.js → chunk-VW6BF6M7.js} +1 -1
- package/dist/bundle/{chunk-M7B5IMH3.js → chunk-X3CD475M.js} +1336 -366
- package/dist/bundle/chunk-XW5C4TI7.js +91 -0
- package/dist/bundle/{chunk-NTW5ZE47.js → chunk-YHZFGUAP.js} +39 -33
- package/dist/bundle/{chunk-BIEBJLYO.js → chunk-YIXXH74F.js} +2 -2
- package/dist/bundle/{chunk-BPPRR7TV.js → chunk-Z4QKLHJW.js} +15587 -1637
- package/dist/bundle/{chunk-POKTQZOM.js → chunk-ZPILMEFY.js} +12 -89
- package/dist/bundle/command-contract-KMMHARMR.js +33 -0
- package/dist/bundle/{decode-2GATBZGH.js → decode-YMSOY2AY.js} +5 -5
- package/dist/bundle/{dispatch-MJMW7WDH.js → dispatch-OP27MWX5.js} +8 -8
- package/dist/bundle/{echarts-GKEZEAL7.js → echarts-7XS55TQY.js} +2 -2
- package/dist/bundle/{embed-TBQPLA4Y.js → embed-QTOE7NN3.js} +6 -6
- package/dist/bundle/{embedder-B5DTNCRO.js → embedder-KBBRYSNH.js} +9 -9
- package/dist/bundle/{entry-A6DEW2TD.js → entry-HGEUYYMX.js} +7 -7
- package/dist/bundle/{failure-TLF3SISS.js → failure-4JUQFXJT.js} +2 -2
- package/dist/bundle/{first-run-3N5AABEY.js → first-run-CSGMEJXY.js} +11 -11
- package/dist/bundle/first-screen-K2PBNJNE.js +31 -0
- package/dist/bundle/{instructions-P5E34PQR.js → instructions-S6ZXCTFH.js} +1 -1
- package/dist/bundle/{mcp-MNI62HHE.js → mcp-M4QN2E7R.js} +2 -2
- package/dist/bundle/{node-GKPRXS5Y.js → node-LCIUWXXG.js} +2 -2
- package/dist/bundle/{node-sqlite-GIDPALK3.js → node-sqlite-HL4WY4N2.js} +6 -6
- package/dist/bundle/{oauth-C57W4IMD.js → oauth-U4KIMDKG.js} +7 -7
- package/dist/bundle/{open-E6Q4WRPU.js → open-EH7OS7M7.js} +5 -5
- package/dist/bundle/{openai-5WMXY2KP.js → openai-W5TB3NA5.js} +14 -14
- package/dist/bundle/{process-U2P5Z6UF.js → process-3CVLTCTA.js} +1 -1
- package/dist/bundle/{program-FEUDU6GF.js → program-LOIZTK2P.js} +58 -50
- package/dist/bundle/{prompt-4NGAZGHE.js → prompt-IDNH7N3W.js} +5 -5
- package/dist/bundle/{proxy-transport-MGCJ7JAW.js → proxy-transport-4DPZB2W2.js} +5 -5
- package/dist/bundle/{recognize-EUHRBA7V.js → recognize-G5EWYXIF.js} +4 -4
- package/dist/bundle/{remote-3JHLB2FV.js → remote-4XTBZVZD.js} +7 -7
- package/dist/bundle/{rerank-ZZ45SZPC.js → rerank-OWSTDLZN.js} +7 -7
- package/dist/bundle/{serve-XOGX5FC5.js → serve-YCPSEWP3.js} +9 -9
- package/dist/bundle/server-KELKX6S3.js +60 -0
- package/dist/bundle/{server-I6O72XP5.js → server-ODG4A2KK.js} +35 -34
- package/dist/bundle/{state-BIUYTGH6.js → state-OL2235G5.js} +6 -6
- package/dist/bundle/{store-FOJFYOMR.js → store-5AACYNDM.js} +17 -12
- package/dist/bundle/store-maintenance-command-3J7WZYVN.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/account.d.ts.map +1 -1
- package/dist/telegram/account.js +4 -1
- package/dist/telegram/account.js.map +1 -1
- package/dist/telegram/errors.d.ts.map +1 -1
- package/dist/telegram/errors.js +2 -1
- package/dist/telegram/errors.js.map +1 -1
- package/dist/telegram/feature.d.ts +4 -1
- package/dist/telegram/feature.d.ts.map +1 -1
- package/dist/telegram/feature.js +5 -2
- package/dist/telegram/feature.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/telegram/sending.d.ts.map +1 -1
- package/dist/telegram/sending.js +24 -10
- package/dist/telegram/sending.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/chunk-GWDMKEDY.js +0 -48
- package/dist/bundle/chunk-WMRFAK5B.js +0 -132
- 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-VOXIGICJ.js} +0 -0
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
evidenceSource,
|
|
7
|
-
id,
|
|
8
|
-
note,
|
|
9
|
-
organization,
|
|
10
|
-
project,
|
|
11
|
-
providerMetadata,
|
|
12
|
-
reminder,
|
|
13
|
-
text,
|
|
14
|
-
time,
|
|
15
|
-
untrusted
|
|
16
|
-
} from "./chunk-WMRFAK5B.js";
|
|
4
|
+
note
|
|
5
|
+
} from "./chunk-AG6HWPQP.js";
|
|
17
6
|
import {
|
|
18
7
|
currentCaller,
|
|
19
8
|
endpointTemplate,
|
|
@@ -24,30 +13,32 @@ import {
|
|
|
24
13
|
providerErrorKey,
|
|
25
14
|
renderEvent,
|
|
26
15
|
runContextOf
|
|
27
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZPILMEFY.js";
|
|
28
17
|
import {
|
|
29
18
|
permissionCeiling
|
|
30
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-M7V5XRM6.js";
|
|
31
20
|
import {
|
|
32
21
|
envName,
|
|
33
22
|
readOnlyLockOf,
|
|
34
23
|
readOnlyRefusal
|
|
35
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-Q7O4CQDO.js";
|
|
36
25
|
import {
|
|
37
26
|
carries
|
|
38
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-EL6I4WTB.js";
|
|
39
28
|
import {
|
|
40
29
|
FACT_STATUSES,
|
|
41
30
|
FACT_TYPES,
|
|
42
31
|
FIELD_TYPES,
|
|
32
|
+
INVOICE_DIRECTIONS,
|
|
43
33
|
LINK_KINDS,
|
|
44
34
|
LINK_SOURCES,
|
|
45
35
|
MEETING_RESULT_ENTITIES,
|
|
46
36
|
MEMORY_KINDS,
|
|
47
37
|
MEMORY_SCOPES,
|
|
48
38
|
MEMORY_STATUSES,
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
MONEY_DIRECTIONS,
|
|
40
|
+
ORDER_PURPOSES,
|
|
41
|
+
ORDER_STATUSES,
|
|
51
42
|
PRIORITY_LABELS,
|
|
52
43
|
QUERY_BACKENDS,
|
|
53
44
|
RELATION_KINDS,
|
|
@@ -58,9 +49,14 @@ import {
|
|
|
58
49
|
TASK_TYPES,
|
|
59
50
|
TASK_VERDICTS,
|
|
60
51
|
WORK_TASK_TYPES,
|
|
52
|
+
author,
|
|
53
|
+
count,
|
|
61
54
|
describeQuery,
|
|
62
55
|
event,
|
|
56
|
+
evidenceSource,
|
|
57
|
+
id,
|
|
63
58
|
meeting,
|
|
59
|
+
meetingCounts,
|
|
64
60
|
meetingDetails,
|
|
65
61
|
meetingHit,
|
|
66
62
|
meetingLink,
|
|
@@ -71,18 +67,25 @@ import {
|
|
|
71
67
|
meetingSpeaker,
|
|
72
68
|
meetingStats,
|
|
73
69
|
meetingSummary,
|
|
74
|
-
meetingTranscript
|
|
75
|
-
|
|
70
|
+
meetingTranscript,
|
|
71
|
+
organization,
|
|
72
|
+
project,
|
|
73
|
+
providerMetadata,
|
|
74
|
+
reminder,
|
|
75
|
+
text,
|
|
76
|
+
time,
|
|
77
|
+
untrusted
|
|
78
|
+
} from "./chunk-C6TUVV7E.js";
|
|
76
79
|
import {
|
|
77
80
|
sharedConfigPath
|
|
78
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-7Y3RUEVY.js";
|
|
79
82
|
import {
|
|
80
83
|
filesPresent,
|
|
81
84
|
sharedModelsDirectory
|
|
82
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-F6KBVIJP.js";
|
|
83
86
|
import {
|
|
84
87
|
storePath
|
|
85
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-3GRX7WP6.js";
|
|
86
89
|
import {
|
|
87
90
|
configFilePath,
|
|
88
91
|
createRecordLog,
|
|
@@ -95,7 +98,7 @@ import {
|
|
|
95
98
|
saveConfigFile,
|
|
96
99
|
traceIdOf,
|
|
97
100
|
writeSecurely
|
|
98
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-YHZFGUAP.js";
|
|
99
102
|
import {
|
|
100
103
|
COMPACT_FLAG,
|
|
101
104
|
MAX_NEXT_STEPS,
|
|
@@ -147,18 +150,18 @@ import {
|
|
|
147
150
|
unwrap,
|
|
148
151
|
variant,
|
|
149
152
|
writes
|
|
150
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-EPCFXKTX.js";
|
|
151
154
|
import {
|
|
152
155
|
CliError,
|
|
153
156
|
isCliError,
|
|
154
157
|
singleLine,
|
|
155
158
|
visibleControls
|
|
156
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-BXTDAGM4.js";
|
|
157
160
|
import {
|
|
158
161
|
__name
|
|
159
162
|
} from "./chunk-ZVVMGPBJ.js";
|
|
160
163
|
|
|
161
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
164
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_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
165
|
var labels = /* @__PURE__ */ new WeakMap();
|
|
163
166
|
var annotate = /* @__PURE__ */ __name((command, meta) => {
|
|
164
167
|
labels.set(command, { ...labels.get(command), ...meta });
|
|
@@ -3659,7 +3662,7 @@ __name(useColor, "useColor");
|
|
|
3659
3662
|
// node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
|
|
3660
3663
|
var program = new Command();
|
|
3661
3664
|
|
|
3662
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3665
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_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
3666
|
import { isDeepStrictEqual } from "node:util";
|
|
3664
3667
|
var protectedCommands = /* @__PURE__ */ new WeakMap();
|
|
3665
3668
|
var hasSharedContract = /* @__PURE__ */ __name((command) => protectedCommands.has(command), "hasSharedContract");
|
|
@@ -3845,8 +3848,8 @@ var customizeSharedCommand = /* @__PURE__ */ __name((reference2, reason, build,
|
|
|
3845
3848
|
}
|
|
3846
3849
|
}, "adopt");
|
|
3847
3850
|
adopt(reference2, command);
|
|
3848
|
-
const
|
|
3849
|
-
if (!Array.isArray(expectedOverrides) || !same(
|
|
3851
|
+
const ordered2 = /* @__PURE__ */ __name((records) => [...records].sort((a, b) => JSON.stringify([a.command, a.field]).localeCompare(JSON.stringify([b.command, b.field]))), "ordered");
|
|
3852
|
+
if (!Array.isArray(expectedOverrides) || !same(ordered2(edits), ordered2(expectedOverrides)))
|
|
3850
3853
|
throw new CliError("configuration_error", `provider shell ${command.name()} differs from its reviewed shared contract overrides; review Core and provider definitions before updating the explicit declarations`, { reason: "contract.unacknowledged-override", expected: expectedOverrides ?? null, actual: edits });
|
|
3851
3854
|
for (const { command: own, record: record2 } of pending) {
|
|
3852
3855
|
protectedCommands.set(own, record2);
|
|
@@ -3861,7 +3864,7 @@ var customizeSharedCommand = /* @__PURE__ */ __name((reference2, reason, build,
|
|
|
3861
3864
|
return command;
|
|
3862
3865
|
}, "customizeSharedCommand");
|
|
3863
3866
|
|
|
3864
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3867
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_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
3868
|
var argumentInfoSchema = object({
|
|
3866
3869
|
name: string(),
|
|
3867
3870
|
required: boolean(),
|
|
@@ -3935,7 +3938,7 @@ var commandsDocumentSchema = strictObject({
|
|
|
3935
3938
|
exit_codes: record(string(), pipe(number(), integer()))
|
|
3936
3939
|
});
|
|
3937
3940
|
|
|
3938
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
3941
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.8_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
3942
|
var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
3940
3943
|
let command = root;
|
|
3941
3944
|
const path2 = [];
|
|
@@ -3953,11 +3956,11 @@ var refuseJoinedPath = /* @__PURE__ */ __name((root, args, prefix = []) => {
|
|
|
3953
3956
|
}
|
|
3954
3957
|
}, "refuseJoinedPath");
|
|
3955
3958
|
|
|
3956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/sends/guarded.js
|
|
3957
3960
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
3958
|
-
var sentIds = /* @__PURE__ */ __name((
|
|
3961
|
+
var sentIds = /* @__PURE__ */ __name((typed2, message2) => ({
|
|
3959
3962
|
messageId: message2.id,
|
|
3960
|
-
...message2.chatId && message2.chatId !==
|
|
3963
|
+
...message2.chatId && message2.chatId !== typed2 ? { resultChatId: message2.chatId } : {}
|
|
3961
3964
|
}), "sentIds");
|
|
3962
3965
|
var current = new AsyncLocalStorage();
|
|
3963
3966
|
var writesInFlight = new AsyncLocalStorage();
|
|
@@ -4059,7 +4062,7 @@ var guardedWrite = /* @__PURE__ */ __name(async (guard, attempt, act, settled2 =
|
|
|
4059
4062
|
}, "guardedWrite");
|
|
4060
4063
|
var codeOf = /* @__PURE__ */ __name((error) => typeof error?.code === "string" ? error.code : "unknown", "codeOf");
|
|
4061
4064
|
|
|
4062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/result-fields.js
|
|
4063
4066
|
var named = /* @__PURE__ */ __name((work) => {
|
|
4064
4067
|
try {
|
|
4065
4068
|
return work();
|
|
@@ -4086,7 +4089,7 @@ var projectFields2 = /* @__PURE__ */ __name((value, fields) => named(() => {
|
|
|
4086
4089
|
return projectFields(value, fields);
|
|
4087
4090
|
}), "projectFields");
|
|
4088
4091
|
|
|
4089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/execution.js
|
|
4090
4093
|
var DEFAULT_COMMAND_MS = 3e4;
|
|
4091
4094
|
var DEFAULT_COOPERATIVE_MS = 5 * 6e4;
|
|
4092
4095
|
var DEFAULT_SYNC_MS = 15 * 6e4;
|
|
@@ -4192,6 +4195,7 @@ var execution = /* @__PURE__ */ __name((streams, { timeoutMs, fields, maxOutputB
|
|
|
4192
4195
|
reason: "output.too-large",
|
|
4193
4196
|
max_bytes: maxOutputBytes,
|
|
4194
4197
|
emitted_bytes: bytes,
|
|
4198
|
+
needed_bytes: bytes + size,
|
|
4195
4199
|
partial_output: bytes > 0
|
|
4196
4200
|
});
|
|
4197
4201
|
bytes += size;
|
|
@@ -4268,7 +4272,7 @@ var withAbort = /* @__PURE__ */ __name(async (signal, body) => {
|
|
|
4268
4272
|
}
|
|
4269
4273
|
}, "withAbort");
|
|
4270
4274
|
|
|
4271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/sends/permissions.js
|
|
4272
4276
|
var LEVELS = ["deny", "readonly", "ask", "allow"];
|
|
4273
4277
|
var DANGEROUS = /* @__PURE__ */ new Set(["messages.delete", "bot.messages.delete", "topics.delete", "chats.delete", "chats.clear"]);
|
|
4274
4278
|
var skipFlagFor = /* @__PURE__ */ __name((key) => DANGEROUS.has(key) ? "--allow-dangerous" : "--yes", "skipFlagFor");
|
|
@@ -4514,6 +4518,7 @@ var NAMED_WRITE_KEYS = [
|
|
|
4514
4518
|
"mentions.reject",
|
|
4515
4519
|
"tags.add",
|
|
4516
4520
|
"tags.remove",
|
|
4521
|
+
"tasks.acknowledge",
|
|
4517
4522
|
"tasks.add",
|
|
4518
4523
|
"tasks.claim",
|
|
4519
4524
|
"tasks.close",
|
|
@@ -4663,29 +4668,118 @@ var assertRetentionEvidenceRead = /* @__PURE__ */ __name((permissions) => {
|
|
|
4663
4668
|
}
|
|
4664
4669
|
}, "assertRetentionEvidenceRead");
|
|
4665
4670
|
|
|
4666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/bot/registry.js
|
|
4667
4672
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
4668
4673
|
import { join } from "node:path";
|
|
4669
|
-
var
|
|
4674
|
+
var botsDirectory = /* @__PURE__ */ __name((app, env = process.env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "bots"), "botsDirectory");
|
|
4675
|
+
var botFiles = /* @__PURE__ */ __name((app, profile, env = process.env) => {
|
|
4676
|
+
const directory = botsDirectory(app, env);
|
|
4677
|
+
return {
|
|
4678
|
+
registry: join(directory, `${profile}.json`),
|
|
4679
|
+
recipients: join(directory, "recipients", `${profile}.json`),
|
|
4680
|
+
journal: join(directory, "sends", `${profile}.jsonl`),
|
|
4681
|
+
updates: join(directory, "updates", `${profile}.json`),
|
|
4682
|
+
presses: join(directory, "presses", `${profile}.json`),
|
|
4683
|
+
checks: join(directory, "checks", `${profile}.json`)
|
|
4684
|
+
};
|
|
4685
|
+
}, "botFiles");
|
|
4686
|
+
var ChatRegistry = class {
|
|
4687
|
+
static {
|
|
4688
|
+
__name(this, "ChatRegistry");
|
|
4689
|
+
}
|
|
4690
|
+
#path;
|
|
4691
|
+
constructor(app, profile, env = process.env) {
|
|
4692
|
+
this.#path = botFiles(app, profile, env).registry;
|
|
4693
|
+
}
|
|
4694
|
+
list(filter = {}) {
|
|
4695
|
+
const { chats } = this.#read();
|
|
4696
|
+
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()));
|
|
4697
|
+
}
|
|
4698
|
+
/** The bot's own user id, once any command has learned it — the key its messages are stored under. */
|
|
4699
|
+
botId() {
|
|
4700
|
+
const { botId } = this.#read();
|
|
4701
|
+
return typeof botId === "string" ? botId : void 0;
|
|
4702
|
+
}
|
|
4703
|
+
rememberBot(id6) {
|
|
4704
|
+
const file = this.#read();
|
|
4705
|
+
if (file.botId !== id6)
|
|
4706
|
+
this.#write({ ...file, botId: id6 });
|
|
4707
|
+
}
|
|
4708
|
+
/** Makes this bot known to `bot list` before it has seen any chat. */
|
|
4709
|
+
touch() {
|
|
4710
|
+
if (!existsSync(this.#path))
|
|
4711
|
+
writeSecurely(this.#path, `${JSON.stringify({ chats: [] }, null, 2)}
|
|
4712
|
+
`, 384);
|
|
4713
|
+
}
|
|
4714
|
+
/** Newer facts win; a chat seen only as an id keeps the title it had. */
|
|
4715
|
+
observe(chats, now = /* @__PURE__ */ new Date()) {
|
|
4716
|
+
if (chats.length === 0)
|
|
4717
|
+
return;
|
|
4718
|
+
const byId = new Map(this.list().map((chat2) => [chat2.id, chat2]));
|
|
4719
|
+
const at2 = now.toISOString();
|
|
4720
|
+
for (const chat2 of chats) {
|
|
4721
|
+
const known = byId.get(chat2.id);
|
|
4722
|
+
const defined = Object.fromEntries(Object.entries(chat2).filter(([, value]) => value !== void 0 && value !== null));
|
|
4723
|
+
byId.set(chat2.id, {
|
|
4724
|
+
title: null,
|
|
4725
|
+
kind: "unknown",
|
|
4726
|
+
unreadCount: null,
|
|
4727
|
+
lastMessageAt: null,
|
|
4728
|
+
participantsCount: null,
|
|
4729
|
+
...known,
|
|
4730
|
+
...defined,
|
|
4731
|
+
id: chat2.id,
|
|
4732
|
+
firstSeenAt: known?.firstSeenAt ?? at2,
|
|
4733
|
+
lastSeenAt: at2
|
|
4734
|
+
});
|
|
4735
|
+
}
|
|
4736
|
+
this.#write({ ...this.#read(), chats: [...byId.values()] });
|
|
4737
|
+
}
|
|
4738
|
+
#read() {
|
|
4739
|
+
if (!existsSync(this.#path))
|
|
4740
|
+
return {};
|
|
4741
|
+
try {
|
|
4742
|
+
const parsed = JSON.parse(readFileSync(this.#path, "utf8"));
|
|
4743
|
+
return parsed && typeof parsed === "object" ? parsed : {};
|
|
4744
|
+
} catch {
|
|
4745
|
+
return {};
|
|
4746
|
+
}
|
|
4747
|
+
}
|
|
4748
|
+
#write(file) {
|
|
4749
|
+
writeSecurely(this.#path, `${JSON.stringify(file, null, 2)}
|
|
4750
|
+
`, 384);
|
|
4751
|
+
}
|
|
4752
|
+
};
|
|
4753
|
+
var registryProfiles = /* @__PURE__ */ __name((app, env = process.env) => {
|
|
4754
|
+
const directory = botsDirectory(app, env);
|
|
4755
|
+
if (!existsSync(directory))
|
|
4756
|
+
return [];
|
|
4757
|
+
return readdirSync(directory, { withFileTypes: true }).filter((entry) => entry.isFile() && entry.name.endsWith(".json")).map((entry) => entry.name).map((name) => name.slice(0, -".json".length));
|
|
4758
|
+
}, "registryProfiles");
|
|
4759
|
+
|
|
4760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/messenger/accounts.js
|
|
4761
|
+
import { existsSync as existsSync2, readdirSync as readdirSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
4762
|
+
import { join as join2 } from "node:path";
|
|
4763
|
+
var accountFileFor = /* @__PURE__ */ __name((app, profile, env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts", `${profile}.json`), "accountFileFor");
|
|
4670
4764
|
var rememberAccount = /* @__PURE__ */ __name((app, profile, id6, env) => writeSecurely(accountFileFor(app, profile, env), `${JSON.stringify({ account: id6 })}
|
|
4671
4765
|
`, 384), "rememberAccount");
|
|
4672
4766
|
var recalledAccount = /* @__PURE__ */ __name((app, provider, profile, env) => {
|
|
4673
4767
|
try {
|
|
4674
|
-
const { account: account2 } = JSON.parse(
|
|
4768
|
+
const { account: account2 } = JSON.parse(readFileSync2(accountFileFor(app, profile, env), "utf8"));
|
|
4675
4769
|
return typeof account2 === "string" ? { provider, account: account2 } : void 0;
|
|
4676
4770
|
} catch {
|
|
4677
4771
|
return void 0;
|
|
4678
4772
|
}
|
|
4679
4773
|
}, "recalledAccount");
|
|
4680
4774
|
var profilesWithAccounts = /* @__PURE__ */ __name((app, env) => {
|
|
4681
|
-
const dir =
|
|
4682
|
-
if (!
|
|
4775
|
+
const dir = join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "accounts");
|
|
4776
|
+
if (!existsSync2(dir))
|
|
4683
4777
|
return [];
|
|
4684
|
-
return
|
|
4778
|
+
return readdirSync2(dir).filter((name) => name.endsWith(".json")).map((name) => name.slice(0, -".json".length));
|
|
4685
4779
|
}, "profilesWithAccounts");
|
|
4686
4780
|
var profilesHere = /* @__PURE__ */ __name((app, configured, env) => [.../* @__PURE__ */ new Set([...configured, ...profilesWithAccounts(app, env)])].sort(), "profilesHere");
|
|
4687
4781
|
|
|
4688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/output-detail.js
|
|
4689
4783
|
var RARELY_SET = ["editedAt", "replyTo", "forwardedFrom", "reactions"];
|
|
4690
4784
|
var BRIEF = ["locator", "chatTitle", "timestamp", "senderName", "excerpt", "score"];
|
|
4691
4785
|
var SNAKE_BRIEF = ["ref", "chat_title", "timestamp", "sender_name", "excerpt", "score"];
|
|
@@ -4721,7 +4815,7 @@ var atDetail = /* @__PURE__ */ __name((value, detail = "default") => {
|
|
|
4721
4815
|
return value;
|
|
4722
4816
|
}, "atDetail");
|
|
4723
4817
|
|
|
4724
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/output.js
|
|
4725
4819
|
var refuseCompact = /* @__PURE__ */ __name(({ json, jsonl, fields, hitDetail }) => {
|
|
4726
4820
|
const other = jsonl ? "--jsonl" : fields !== void 0 ? "--json=\u2026" : json ? "--json" : hitDetail === "brief" ? "--brief" : "";
|
|
4727
4821
|
if (other)
|
|
@@ -4785,7 +4879,7 @@ var silence = /* @__PURE__ */ __name((renderer) => ({
|
|
|
4785
4879
|
}, "warn")
|
|
4786
4880
|
}), "silence");
|
|
4787
4881
|
|
|
4788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/runs/log-events.js
|
|
4789
4883
|
var CORE_LOG_EVENTS = defineLogEvents([
|
|
4790
4884
|
{ id: "provider.request", meaning: "a request went to the messenger", keys: ["operation"] },
|
|
4791
4885
|
{ id: "provider.response", meaning: "the messenger answered the request, or it failed", keys: ["operation"] },
|
|
@@ -4819,7 +4913,7 @@ var DIAGNOSTIC_LOG_EVENTS = {
|
|
|
4819
4913
|
cache: "cache.answered"
|
|
4820
4914
|
};
|
|
4821
4915
|
|
|
4822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/runs/log-keys.js
|
|
4823
4917
|
var snake2 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
4824
4918
|
var camel = /* @__PURE__ */ __name((key) => key.replace(/_([a-z0-9])/g, (_, letter) => letter.toUpperCase()), "camel");
|
|
4825
4919
|
var renamed = /* @__PURE__ */ __name((record2, name) => Object.fromEntries(Object.entries(record2).map(([key, value]) => [name(key), value])), "renamed");
|
|
@@ -4832,13 +4926,13 @@ var snakeLogger = /* @__PURE__ */ __name((logger) => ({
|
|
|
4832
4926
|
error: /* @__PURE__ */ __name((event2, message2) => logger.error(logAttributes(event2), message2), "error")
|
|
4833
4927
|
}), "snakeLogger");
|
|
4834
4928
|
|
|
4835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
4836
4930
|
import { randomUUID } from "node:crypto";
|
|
4837
|
-
import { appendFileSync, mkdirSync, readdirSync as
|
|
4931
|
+
import { appendFileSync, mkdirSync, readdirSync as readdirSync3, readFileSync as readFileSync3, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4838
4932
|
import { userInfo } from "node:os";
|
|
4839
|
-
import { join as
|
|
4933
|
+
import { join as join3, sep } from "node:path";
|
|
4840
4934
|
|
|
4841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/runs/log-attributes.js
|
|
4842
4936
|
var diagnostic = {
|
|
4843
4937
|
event: true,
|
|
4844
4938
|
operation: true,
|
|
@@ -4908,16 +5002,16 @@ var LOG_ATTRIBUTES = [
|
|
|
4908
5002
|
...new Set([...Object.keys(diagnostic), ...Object.keys(send), ...background, ...crash, ...dropped].map((key) => Object.keys(logAttributes({ [key]: true }))[0]))
|
|
4909
5003
|
].sort();
|
|
4910
5004
|
|
|
4911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5005
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/runs/run.js
|
|
4912
5006
|
var KEEP_RUNS_FOR_DAYS = 30;
|
|
4913
5007
|
var KEEP_SUCCESSFUL_RUNS_FOR_DAYS = 7;
|
|
4914
5008
|
var RUNS_SIZE_LIMIT_MB = 200;
|
|
4915
|
-
var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) =>
|
|
5009
|
+
var runsDirFor = /* @__PURE__ */ __name((app, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "runs"), "runsDirFor");
|
|
4916
5010
|
var startRun = /* @__PURE__ */ __name((options) => {
|
|
4917
5011
|
const now = options.now ?? (() => /* @__PURE__ */ new Date());
|
|
4918
5012
|
const startedAt = options.startedAt ?? now();
|
|
4919
5013
|
const id6 = options.runId ?? newRunId(startedAt, options.command);
|
|
4920
|
-
const dir =
|
|
5014
|
+
const dir = join3(options.runsDir, day(startedAt), id6);
|
|
4921
5015
|
pruneRuns(options.runsDir, {
|
|
4922
5016
|
keepDays: options.keepDays ?? KEEP_RUNS_FOR_DAYS,
|
|
4923
5017
|
keepSuccessDays: options.keepSuccessDays ?? KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
@@ -4943,7 +5037,7 @@ var startRun = /* @__PURE__ */ __name((options) => {
|
|
|
4943
5037
|
if (file)
|
|
4944
5038
|
return file;
|
|
4945
5039
|
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
4946
|
-
const events2 =
|
|
5040
|
+
const events2 = join3(dir, "events.jsonl");
|
|
4947
5041
|
writeFileSync(events2, "", { flag: "a", mode: 384 });
|
|
4948
5042
|
file = snakeLogger(createRecordLog({
|
|
4949
5043
|
to: events2,
|
|
@@ -4998,8 +5092,8 @@ var startRun = /* @__PURE__ */ __name((options) => {
|
|
|
4998
5092
|
return;
|
|
4999
5093
|
}
|
|
5000
5094
|
try {
|
|
5001
|
-
mkdirSync(
|
|
5002
|
-
appendIndex(
|
|
5095
|
+
mkdirSync(join3(dir, ".."), { recursive: true, mode: 448 });
|
|
5096
|
+
appendIndex(join3(dir, ".."), runFileOf(final));
|
|
5003
5097
|
} catch (error) {
|
|
5004
5098
|
options.onError?.(error);
|
|
5005
5099
|
}
|
|
@@ -5015,7 +5109,7 @@ var refuseRealStateInTests = /* @__PURE__ */ __name((dir, env = process.env) =>
|
|
|
5015
5109
|
} catch {
|
|
5016
5110
|
return;
|
|
5017
5111
|
}
|
|
5018
|
-
if (dir.startsWith(
|
|
5112
|
+
if (dir.startsWith(join3(home, ".local", "share") + sep))
|
|
5019
5113
|
throw new Error(`a test opened a run in the real data folder: ${dir}`);
|
|
5020
5114
|
}, "refuseRealStateInTests");
|
|
5021
5115
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -5029,15 +5123,15 @@ var newRunId = /* @__PURE__ */ __name((startedAt, command) => {
|
|
|
5029
5123
|
}, "newRunId");
|
|
5030
5124
|
var INDEX = "index.jsonl";
|
|
5031
5125
|
var appendIndex = /* @__PURE__ */ __name((dayDir, written) => {
|
|
5032
|
-
appendFileSync(
|
|
5126
|
+
appendFileSync(join3(dayDir, INDEX), `${JSON.stringify(written)}
|
|
5033
5127
|
`, { mode: 384 });
|
|
5034
5128
|
}, "appendIndex");
|
|
5035
5129
|
var writeRunFile = /* @__PURE__ */ __name((dir, metadata) => {
|
|
5036
5130
|
const written = runFileOf(metadata);
|
|
5037
|
-
writeSecurely(
|
|
5131
|
+
writeSecurely(join3(dir, "run.json"), `${JSON.stringify(written, null, 2)}
|
|
5038
5132
|
`, 384);
|
|
5039
5133
|
try {
|
|
5040
|
-
appendIndex(
|
|
5134
|
+
appendIndex(join3(dir, ".."), written);
|
|
5041
5135
|
} catch {
|
|
5042
5136
|
}
|
|
5043
5137
|
}, "writeRunFile");
|
|
@@ -5048,7 +5142,7 @@ var listRuns = /* @__PURE__ */ __name((runsDir, { since, atLeast = Number.POSITI
|
|
|
5048
5142
|
for (const date of days(runsDir).sort().reverse()) {
|
|
5049
5143
|
if (first2 !== void 0 && date < first2 || runs.length >= atLeast)
|
|
5050
5144
|
break;
|
|
5051
|
-
for (const metadata of runsOfDay(
|
|
5145
|
+
for (const metadata of runsOfDay(join3(runsDir, date))) {
|
|
5052
5146
|
if (matchesListFilter(metadata, filter))
|
|
5053
5147
|
runs.push(metadata);
|
|
5054
5148
|
}
|
|
@@ -5059,7 +5153,7 @@ var indexedRuns = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5059
5153
|
const latest = /* @__PURE__ */ new Map();
|
|
5060
5154
|
let raw = "";
|
|
5061
5155
|
try {
|
|
5062
|
-
raw =
|
|
5156
|
+
raw = readFileSync3(join3(dayDir, INDEX), "utf8");
|
|
5063
5157
|
} catch {
|
|
5064
5158
|
}
|
|
5065
5159
|
for (const line of raw.split("\n")) {
|
|
@@ -5079,7 +5173,7 @@ var runsOfDay = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5079
5173
|
for (const entry of safeReaddir(dayDir)) {
|
|
5080
5174
|
if (entry === INDEX || entry.startsWith(".") || latest.has(entry))
|
|
5081
5175
|
continue;
|
|
5082
|
-
const metadata = readRun(
|
|
5176
|
+
const metadata = readRun(join3(dayDir, entry));
|
|
5083
5177
|
if (metadata)
|
|
5084
5178
|
latest.set(metadata.runId, metadata);
|
|
5085
5179
|
}
|
|
@@ -5090,22 +5184,22 @@ var findRun = /* @__PURE__ */ __name((runsDir, id6) => {
|
|
|
5090
5184
|
const likely = stamped ? [`${stamped[1]}-${stamped[2]}-${stamped[3]}`] : [];
|
|
5091
5185
|
const dates = [.../* @__PURE__ */ new Set([...likely, ...days(runsDir)])];
|
|
5092
5186
|
for (const date of dates) {
|
|
5093
|
-
const dir =
|
|
5187
|
+
const dir = join3(runsDir, date, id6);
|
|
5094
5188
|
const metadata = readRun(dir);
|
|
5095
5189
|
if (metadata)
|
|
5096
5190
|
return { dir, metadata };
|
|
5097
5191
|
}
|
|
5098
5192
|
for (const date of dates) {
|
|
5099
|
-
const metadata = indexedRuns(
|
|
5193
|
+
const metadata = indexedRuns(join3(runsDir, date)).get(id6);
|
|
5100
5194
|
if (metadata)
|
|
5101
|
-
return { dir:
|
|
5195
|
+
return { dir: join3(runsDir, date, id6), metadata };
|
|
5102
5196
|
}
|
|
5103
5197
|
return void 0;
|
|
5104
5198
|
}, "findRun");
|
|
5105
5199
|
var readEvents = /* @__PURE__ */ __name((dir) => {
|
|
5106
5200
|
let raw;
|
|
5107
5201
|
try {
|
|
5108
|
-
raw =
|
|
5202
|
+
raw = readFileSync3(join3(dir, "events.jsonl"), "utf8");
|
|
5109
5203
|
} catch {
|
|
5110
5204
|
return [];
|
|
5111
5205
|
}
|
|
@@ -5135,11 +5229,11 @@ var pruneRuns = /* @__PURE__ */ __name((runsDir, { keepDays, keepSuccessDays = k
|
|
|
5135
5229
|
for (const date of days(runsDir)) {
|
|
5136
5230
|
if (date >= cutoff) {
|
|
5137
5231
|
if (date < successCutoff)
|
|
5138
|
-
dropSuccesses(
|
|
5232
|
+
dropSuccesses(join3(runsDir, date));
|
|
5139
5233
|
continue;
|
|
5140
5234
|
}
|
|
5141
5235
|
try {
|
|
5142
|
-
rmSync(
|
|
5236
|
+
rmSync(join3(runsDir, date), { recursive: true, force: true });
|
|
5143
5237
|
removed += 1;
|
|
5144
5238
|
} catch {
|
|
5145
5239
|
}
|
|
@@ -5152,7 +5246,7 @@ var DAY_MS = 24 * 60 * 60 * 1e3;
|
|
|
5152
5246
|
var SUCCESSES_DROPPED = ".successes-dropped";
|
|
5153
5247
|
var SIZE_CHECKED = ".size-checked";
|
|
5154
5248
|
var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
5155
|
-
const marker =
|
|
5249
|
+
const marker = join3(dayDir, SUCCESSES_DROPPED);
|
|
5156
5250
|
try {
|
|
5157
5251
|
statSync(marker);
|
|
5158
5252
|
return;
|
|
@@ -5162,17 +5256,17 @@ var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5162
5256
|
const kept = [];
|
|
5163
5257
|
for (const [id6, metadata] of indexedRuns(dayDir)) {
|
|
5164
5258
|
if (metadata.status === "success")
|
|
5165
|
-
rmSync(
|
|
5259
|
+
rmSync(join3(dayDir, id6), { recursive: true, force: true });
|
|
5166
5260
|
else
|
|
5167
5261
|
kept.push(JSON.stringify(runFileOf(metadata)));
|
|
5168
5262
|
}
|
|
5169
5263
|
for (const entry of safeReaddir(dayDir)) {
|
|
5170
5264
|
if (entry === INDEX || entry.startsWith("."))
|
|
5171
5265
|
continue;
|
|
5172
|
-
if (readRun(
|
|
5173
|
-
rmSync(
|
|
5266
|
+
if (readRun(join3(dayDir, entry))?.status === "success")
|
|
5267
|
+
rmSync(join3(dayDir, entry), { recursive: true, force: true });
|
|
5174
5268
|
}
|
|
5175
|
-
writeSecurely(
|
|
5269
|
+
writeSecurely(join3(dayDir, INDEX), kept.map((line) => `${line}
|
|
5176
5270
|
`).join(""), 384);
|
|
5177
5271
|
writeFileSync(marker, "", { mode: 384 });
|
|
5178
5272
|
} catch {
|
|
@@ -5181,7 +5275,7 @@ var dropSuccesses = /* @__PURE__ */ __name((dayDir) => {
|
|
|
5181
5275
|
var sizeOf = /* @__PURE__ */ __name((path2) => {
|
|
5182
5276
|
let total = 0;
|
|
5183
5277
|
for (const entry of safeReaddir(path2)) {
|
|
5184
|
-
const full =
|
|
5278
|
+
const full = join3(path2, entry);
|
|
5185
5279
|
try {
|
|
5186
5280
|
const stat = statSync(full);
|
|
5187
5281
|
total += stat.isDirectory() ? sizeOf(full) : stat.size;
|
|
@@ -5191,22 +5285,22 @@ var sizeOf = /* @__PURE__ */ __name((path2) => {
|
|
|
5191
5285
|
return total;
|
|
5192
5286
|
}, "sizeOf");
|
|
5193
5287
|
var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
5194
|
-
const stamp =
|
|
5288
|
+
const stamp = join3(runsDir, SIZE_CHECKED);
|
|
5195
5289
|
const today = day(now);
|
|
5196
5290
|
try {
|
|
5197
|
-
if (
|
|
5291
|
+
if (readFileSync3(stamp, "utf8").trim() === today)
|
|
5198
5292
|
return 0;
|
|
5199
5293
|
} catch {
|
|
5200
5294
|
}
|
|
5201
5295
|
const dates = days(runsDir).sort();
|
|
5202
|
-
const sizes = new Map(dates.map((date) => [date, sizeOf(
|
|
5296
|
+
const sizes = new Map(dates.map((date) => [date, sizeOf(join3(runsDir, date))]));
|
|
5203
5297
|
let total = [...sizes.values()].reduce((sum, size) => sum + size, 0);
|
|
5204
5298
|
let removed = 0;
|
|
5205
5299
|
for (const date of dates) {
|
|
5206
5300
|
if (total <= maxBytes || date === today)
|
|
5207
5301
|
break;
|
|
5208
|
-
dropSuccesses(
|
|
5209
|
-
const after = sizeOf(
|
|
5302
|
+
dropSuccesses(join3(runsDir, date));
|
|
5303
|
+
const after = sizeOf(join3(runsDir, date));
|
|
5210
5304
|
total -= (sizes.get(date) ?? 0) - after;
|
|
5211
5305
|
sizes.set(date, after);
|
|
5212
5306
|
}
|
|
@@ -5214,7 +5308,7 @@ var fitSize = /* @__PURE__ */ __name((runsDir, maxBytes, now) => {
|
|
|
5214
5308
|
if (total <= maxBytes || date === today)
|
|
5215
5309
|
break;
|
|
5216
5310
|
try {
|
|
5217
|
-
rmSync(
|
|
5311
|
+
rmSync(join3(runsDir, date), { recursive: true, force: true });
|
|
5218
5312
|
total -= sizes.get(date) ?? 0;
|
|
5219
5313
|
removed += 1;
|
|
5220
5314
|
} catch {
|
|
@@ -5231,14 +5325,14 @@ var day = /* @__PURE__ */ __name((date) => date.toISOString().slice(0, 10), "day
|
|
|
5231
5325
|
var days = /* @__PURE__ */ __name((runsDir) => safeReaddir(runsDir).filter((entry) => /^\d{4}-\d{2}-\d{2}$/.test(entry)), "days");
|
|
5232
5326
|
var readRun = /* @__PURE__ */ __name((dir) => {
|
|
5233
5327
|
try {
|
|
5234
|
-
return metadataOf(JSON.parse(
|
|
5328
|
+
return metadataOf(JSON.parse(readFileSync3(join3(dir, "run.json"), "utf8")));
|
|
5235
5329
|
} catch {
|
|
5236
5330
|
return void 0;
|
|
5237
5331
|
}
|
|
5238
5332
|
}, "readRun");
|
|
5239
5333
|
var safeReaddir = /* @__PURE__ */ __name((dir) => {
|
|
5240
5334
|
try {
|
|
5241
|
-
return
|
|
5335
|
+
return readdirSync3(dir);
|
|
5242
5336
|
} catch {
|
|
5243
5337
|
return [];
|
|
5244
5338
|
}
|
|
@@ -5261,7 +5355,7 @@ var metadataOf = /* @__PURE__ */ __name((parsed) => {
|
|
|
5261
5355
|
};
|
|
5262
5356
|
}, "metadataOf");
|
|
5263
5357
|
|
|
5264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/runs/scope.js
|
|
5265
5359
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
5266
5360
|
import { randomBytes } from "node:crypto";
|
|
5267
5361
|
var scopes = new AsyncLocalStorage2();
|
|
@@ -5299,7 +5393,7 @@ var attempts = new AsyncLocalStorage2();
|
|
|
5299
5393
|
var withAttempt = /* @__PURE__ */ __name((attempt, work) => attempts.run(attempt, work), "withAttempt");
|
|
5300
5394
|
var currentAttempt = /* @__PURE__ */ __name(() => attempts.getStore(), "currentAttempt");
|
|
5301
5395
|
|
|
5302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/runs/recording.js
|
|
5303
5397
|
var recorded = /* @__PURE__ */ __name(async (options, body) => {
|
|
5304
5398
|
const recording = startRecording(options);
|
|
5305
5399
|
try {
|
|
@@ -5484,9 +5578,9 @@ var partialOutcome = /* @__PURE__ */ __name((answer) => {
|
|
|
5484
5578
|
return void 0;
|
|
5485
5579
|
}, "partialOutcome");
|
|
5486
5580
|
|
|
5487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5488
|
-
var withDeadline = /* @__PURE__ */ __name(async (
|
|
5489
|
-
if (
|
|
5581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/deadline.js
|
|
5582
|
+
var withDeadline = /* @__PURE__ */ __name(async (ms2, closeables, body) => {
|
|
5583
|
+
if (ms2 === void 0)
|
|
5490
5584
|
return body();
|
|
5491
5585
|
let timer2;
|
|
5492
5586
|
let timedOut;
|
|
@@ -5495,10 +5589,10 @@ var withDeadline = /* @__PURE__ */ __name(async (ms, closeables, body) => {
|
|
|
5495
5589
|
timer2 = setTimeout(() => {
|
|
5496
5590
|
const pending = [...writes2];
|
|
5497
5591
|
const cut2 = pending.filter((write) => !write.preparing);
|
|
5498
|
-
timedOut = cut2.length > 0 ? new CliError("outcome_unknown", `\`--timeout\` ended the command after ${
|
|
5592
|
+
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
5593
|
stopWrites(writes2, timedOut);
|
|
5500
5594
|
void Promise.allSettled(closeables.map((closeable) => closeable.close())).then(() => reject(timedOut));
|
|
5501
|
-
},
|
|
5595
|
+
}, ms2);
|
|
5502
5596
|
});
|
|
5503
5597
|
try {
|
|
5504
5598
|
return await Promise.race([withWriteScope(writes2, body), expired]);
|
|
@@ -5510,7 +5604,7 @@ var withDeadline = /* @__PURE__ */ __name(async (ms, closeables, body) => {
|
|
|
5510
5604
|
}
|
|
5511
5605
|
}, "withDeadline");
|
|
5512
5606
|
|
|
5513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/profile.js
|
|
5514
5608
|
var asFirstWord = /* @__PURE__ */ __name((profile) => `${profile} `, "asFirstWord");
|
|
5515
5609
|
var PLAIN_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/;
|
|
5516
5610
|
var isProfileName = /* @__PURE__ */ __name((word) => PLAIN_NAME.test(word), "isProfileName");
|
|
@@ -5579,10 +5673,10 @@ var sampleCommand = /* @__PURE__ */ __name((commands) => {
|
|
|
5579
5673
|
return void 0;
|
|
5580
5674
|
}, "sampleCommand");
|
|
5581
5675
|
|
|
5582
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5583
|
-
import { existsSync as
|
|
5676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/settings.js
|
|
5677
|
+
import { existsSync as existsSync4 } from "node:fs";
|
|
5584
5678
|
|
|
5585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/models/endpoint.js
|
|
5586
5680
|
var endpoint = /* @__PURE__ */ __name((value) => {
|
|
5587
5681
|
try {
|
|
5588
5682
|
const url2 = new URL(value);
|
|
@@ -5592,7 +5686,7 @@ var endpoint = /* @__PURE__ */ __name((value) => {
|
|
|
5592
5686
|
}
|
|
5593
5687
|
}, "endpoint");
|
|
5594
5688
|
|
|
5595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/models/settings.js
|
|
5596
5690
|
var MODEL_FIELDS = ["provider", "model", "base_url"];
|
|
5597
5691
|
var modelSettingsShape = record(pipe(string(), regex(/^[a-z][a-z0-9-]*$/)), strictObject({
|
|
5598
5692
|
provider: optional(picklist(["off", "openai", "anthropic"])),
|
|
@@ -5661,7 +5755,7 @@ var modelTarget = /* @__PURE__ */ __name((settings, purpose) => {
|
|
|
5661
5755
|
};
|
|
5662
5756
|
}, "modelTarget");
|
|
5663
5757
|
|
|
5664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/analysis/settings.js
|
|
5665
5759
|
var model = pipe(string(), trim(), minLength(1), maxLength(200));
|
|
5666
5760
|
var url = pipe(string(), check(endpoint, "use an HTTP/S endpoint without credentials, query or fragment"));
|
|
5667
5761
|
var AI_FIELDS = {
|
|
@@ -5705,7 +5799,7 @@ var resolveAISettings = /* @__PURE__ */ __name((prefix, layers, env) => {
|
|
|
5705
5799
|
};
|
|
5706
5800
|
}, "resolveAISettings");
|
|
5707
5801
|
|
|
5708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/duration.js
|
|
5709
5803
|
var DURATION = /^(\d+)(ms|s|m|h|d)$/;
|
|
5710
5804
|
var UNIT_MS = { ms: 1, s: 1e3, m: 6e4, h: 36e5, d: 864e5 };
|
|
5711
5805
|
var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
@@ -5713,13 +5807,13 @@ var parseDuration = /* @__PURE__ */ __name((value, source2) => {
|
|
|
5713
5807
|
if (!match?.[1] || !match[2]) {
|
|
5714
5808
|
throw new CliError("validation_error", `${source2} takes a duration with a unit \u2014 500ms, 30s, 2m, 4h or 1d \u2014 not "${value}"`);
|
|
5715
5809
|
}
|
|
5716
|
-
const
|
|
5717
|
-
if (
|
|
5810
|
+
const ms2 = Number(match[1]) * (UNIT_MS[match[2]] ?? 0);
|
|
5811
|
+
if (ms2 <= 0)
|
|
5718
5812
|
throw new CliError("validation_error", `${source2} has to be more than zero, and "${value}" is not`);
|
|
5719
|
-
return
|
|
5813
|
+
return ms2;
|
|
5720
5814
|
}, "parseDuration");
|
|
5721
5815
|
|
|
5722
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/embeddings/models.js
|
|
5723
5817
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
5724
5818
|
var e5 = huggingFace("Xenova/multilingual-e5-small", "761b726dd34fb83930e26aab4e9ac3899aa1fa78");
|
|
5725
5819
|
var gemma = huggingFace("onnx-community/embeddinggemma-300m-ONNX", "5090578d9565bb06545b4552f76e6bc2c93e4a66");
|
|
@@ -5878,7 +5972,7 @@ var rerankModel = /* @__PURE__ */ __name((id6) => {
|
|
|
5878
5972
|
var vectorModelKey = /* @__PURE__ */ __name((model3) => `local:${model3.id}:${model3.dims}`, "vectorModelKey");
|
|
5879
5973
|
var meaningFloor = /* @__PURE__ */ __name((key) => key === "local:e5-small:384" ? 0.8 : 0, "meaningFloor");
|
|
5880
5974
|
|
|
5881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/history-limits.js
|
|
5882
5976
|
var HISTORY_MAX_DAYS = 1095;
|
|
5883
5977
|
var DEFAULT_HISTORY_LIMITS = { dialogDays: 1095, groupDays: 365, groupMembersMax: 50 };
|
|
5884
5978
|
var DAY_MS2 = 24 * 60 * 60 * 1e3;
|
|
@@ -5925,8 +6019,251 @@ var limitBatch = /* @__PURE__ */ __name((batch, shapes, included, limits, now =
|
|
|
5925
6019
|
return { batch: { ...batch, messages }, skipped };
|
|
5926
6020
|
}, "limitBatch");
|
|
5927
6021
|
|
|
5928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5929
|
-
import { readFileSync as
|
|
6022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
|
|
6023
|
+
import { readFileSync as readFileSync4 } from "node:fs";
|
|
6024
|
+
|
|
6025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/config-repair.js
|
|
6026
|
+
var REPAIR_WORDS = {
|
|
6027
|
+
byte_order_mark: "an invisible byte-order mark at the start",
|
|
6028
|
+
comment: "a comment, which JSON does not allow",
|
|
6029
|
+
trailing_comma: "a comma before a closing bracket",
|
|
6030
|
+
missing_comma: "a missing comma",
|
|
6031
|
+
unquoted_key: "a key without double quotes",
|
|
6032
|
+
single_quotes: "text in single quotes",
|
|
6033
|
+
missing_closer: "the file stops before its closing brackets \u2014 whatever followed this line was already lost"
|
|
6034
|
+
};
|
|
6035
|
+
var GiveUp = class {
|
|
6036
|
+
static {
|
|
6037
|
+
__name(this, "GiveUp");
|
|
6038
|
+
}
|
|
6039
|
+
at;
|
|
6040
|
+
why;
|
|
6041
|
+
constructor(at2, why) {
|
|
6042
|
+
this.at = at2;
|
|
6043
|
+
this.why = why;
|
|
6044
|
+
}
|
|
6045
|
+
};
|
|
6046
|
+
var NUMBER = /^-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/;
|
|
6047
|
+
var LITERAL = /^(true|false|null)/;
|
|
6048
|
+
var KEY = /^[A-Za-z_$][\w$.-]*/;
|
|
6049
|
+
var ENDS_VALUE = /^[\s,\]}/]?$/;
|
|
6050
|
+
var repairConfigText = /* @__PURE__ */ __name((text5) => {
|
|
6051
|
+
try {
|
|
6052
|
+
JSON.parse(text5);
|
|
6053
|
+
return { state: "valid" };
|
|
6054
|
+
} catch {
|
|
6055
|
+
}
|
|
6056
|
+
const fixes = [];
|
|
6057
|
+
const lineAt = /* @__PURE__ */ __name((offset) => text5.slice(0, offset).split("\n").length, "lineAt");
|
|
6058
|
+
const fix = /* @__PURE__ */ __name((kind2, offset) => fixes.push({ kind: kind2, line: lineAt(offset) }), "fix");
|
|
6059
|
+
const giveUp = /* @__PURE__ */ __name((why, offset = at2) => {
|
|
6060
|
+
throw new GiveUp(offset, why);
|
|
6061
|
+
}, "giveUp");
|
|
6062
|
+
let at2 = 0;
|
|
6063
|
+
let truncated = false;
|
|
6064
|
+
let last = "open";
|
|
6065
|
+
let lastEnd = 0;
|
|
6066
|
+
const previous = /* @__PURE__ */ __name(() => last, "previous");
|
|
6067
|
+
const skip = /* @__PURE__ */ __name(() => {
|
|
6068
|
+
for (; ; ) {
|
|
6069
|
+
while (/\s/.test(text5[at2] ?? ""))
|
|
6070
|
+
at2++;
|
|
6071
|
+
if (text5.startsWith("//", at2)) {
|
|
6072
|
+
fix("comment", at2);
|
|
6073
|
+
while (at2 < text5.length && text5[at2] !== "\n")
|
|
6074
|
+
at2++;
|
|
6075
|
+
} else if (text5.startsWith("/*", at2)) {
|
|
6076
|
+
const end = text5.indexOf("*/", at2 + 2);
|
|
6077
|
+
if (end < 0)
|
|
6078
|
+
giveUp("a /* comment is never closed");
|
|
6079
|
+
fix("comment", at2);
|
|
6080
|
+
at2 = end + 2;
|
|
6081
|
+
} else
|
|
6082
|
+
return;
|
|
6083
|
+
}
|
|
6084
|
+
}, "skip");
|
|
6085
|
+
const string2 = /* @__PURE__ */ __name(() => {
|
|
6086
|
+
const quote = text5[at2];
|
|
6087
|
+
const start = at2;
|
|
6088
|
+
if (quote === "'")
|
|
6089
|
+
fix("single_quotes", at2);
|
|
6090
|
+
at2++;
|
|
6091
|
+
let body = "";
|
|
6092
|
+
for (; ; ) {
|
|
6093
|
+
if (at2 >= text5.length)
|
|
6094
|
+
giveUp("the file stops inside a quoted text", start);
|
|
6095
|
+
const char = text5[at2];
|
|
6096
|
+
if (char === quote)
|
|
6097
|
+
break;
|
|
6098
|
+
if (text5.charCodeAt(at2) < 32)
|
|
6099
|
+
giveUp("a line break inside a quoted text");
|
|
6100
|
+
if (char === "\\") {
|
|
6101
|
+
const next = text5[at2 + 1] ?? "";
|
|
6102
|
+
if (quote === "'" && next === "'")
|
|
6103
|
+
body += "'";
|
|
6104
|
+
else if (/^["\\/bfnrt]$/.test(next))
|
|
6105
|
+
body += `\\${next}`;
|
|
6106
|
+
else if (next === "u" && /^[0-9a-fA-F]{4}$/.test(text5.slice(at2 + 2, at2 + 6))) {
|
|
6107
|
+
body += text5.slice(at2, at2 + 6);
|
|
6108
|
+
at2 += 4;
|
|
6109
|
+
} else
|
|
6110
|
+
giveUp("an escape JSON has no meaning for");
|
|
6111
|
+
at2 += 2;
|
|
6112
|
+
continue;
|
|
6113
|
+
}
|
|
6114
|
+
body += char === '"' ? '\\"' : char;
|
|
6115
|
+
at2++;
|
|
6116
|
+
}
|
|
6117
|
+
at2++;
|
|
6118
|
+
return JSON.parse(`"${body}"`);
|
|
6119
|
+
}, "string");
|
|
6120
|
+
const key = /* @__PURE__ */ __name(() => {
|
|
6121
|
+
const char = text5[at2] ?? "";
|
|
6122
|
+
if (char === '"' || char === "'")
|
|
6123
|
+
return string2();
|
|
6124
|
+
const word = KEY.exec(text5.slice(at2))?.[0];
|
|
6125
|
+
if (!word)
|
|
6126
|
+
return giveUp("something other than a key where a key should be");
|
|
6127
|
+
fix("unquoted_key", at2);
|
|
6128
|
+
at2 += word.length;
|
|
6129
|
+
return word;
|
|
6130
|
+
}, "key");
|
|
6131
|
+
const scalar = /* @__PURE__ */ __name(() => {
|
|
6132
|
+
const char = text5[at2] ?? "";
|
|
6133
|
+
if (char === '"' || char === "'")
|
|
6134
|
+
return { json: JSON.stringify(string2()) };
|
|
6135
|
+
const word = (NUMBER.exec(text5.slice(at2)) ?? LITERAL.exec(text5.slice(at2)))?.[0];
|
|
6136
|
+
if (!word || !ENDS_VALUE.test(text5[at2 + word.length] ?? ""))
|
|
6137
|
+
return giveUp("a value that is not JSON \u2014 text needs quotes, and only true, false and null go without");
|
|
6138
|
+
if (at2 + word.length === text5.length && NUMBER.test(word))
|
|
6139
|
+
giveUp("the file stops inside a number");
|
|
6140
|
+
at2 += word.length;
|
|
6141
|
+
return { json: word };
|
|
6142
|
+
}, "scalar");
|
|
6143
|
+
const members = /* @__PURE__ */ __name((close, one) => {
|
|
6144
|
+
const out = [];
|
|
6145
|
+
at2++;
|
|
6146
|
+
last = "open";
|
|
6147
|
+
let comma = -1;
|
|
6148
|
+
for (; ; ) {
|
|
6149
|
+
skip();
|
|
6150
|
+
if (truncated)
|
|
6151
|
+
return out;
|
|
6152
|
+
if (at2 >= text5.length) {
|
|
6153
|
+
if (previous() === "close")
|
|
6154
|
+
giveUp("the file stops after a closing bracket, so which brackets are missing has two readings");
|
|
6155
|
+
if (previous() === "comma")
|
|
6156
|
+
fix("trailing_comma", comma);
|
|
6157
|
+
fix("missing_closer", text5.length);
|
|
6158
|
+
truncated = true;
|
|
6159
|
+
return out;
|
|
6160
|
+
}
|
|
6161
|
+
const char = text5[at2];
|
|
6162
|
+
if (char === close) {
|
|
6163
|
+
if (previous() === "comma")
|
|
6164
|
+
fix("trailing_comma", comma);
|
|
6165
|
+
at2++;
|
|
6166
|
+
last = "close";
|
|
6167
|
+
return out;
|
|
6168
|
+
}
|
|
6169
|
+
if (char === "}" || char === "]")
|
|
6170
|
+
giveUp(`a ${char} where ${close} should close`);
|
|
6171
|
+
if (char === ",") {
|
|
6172
|
+
if (previous() !== "value" && previous() !== "close")
|
|
6173
|
+
giveUp("a comma with nothing before it");
|
|
6174
|
+
comma = at2;
|
|
6175
|
+
at2++;
|
|
6176
|
+
last = "comma";
|
|
6177
|
+
continue;
|
|
6178
|
+
}
|
|
6179
|
+
if (previous() === "value" || previous() === "close") {
|
|
6180
|
+
if (lineAt(at2) === lineAt(lastEnd))
|
|
6181
|
+
giveUp("two entries on one line with no comma between them");
|
|
6182
|
+
fix("missing_comma", lastEnd);
|
|
6183
|
+
}
|
|
6184
|
+
out.push(one());
|
|
6185
|
+
}
|
|
6186
|
+
}, "members");
|
|
6187
|
+
const value = /* @__PURE__ */ __name(() => {
|
|
6188
|
+
const char = text5[at2] ?? "";
|
|
6189
|
+
let node;
|
|
6190
|
+
if (char === "{") {
|
|
6191
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6192
|
+
node = {
|
|
6193
|
+
object: members("}", () => {
|
|
6194
|
+
const start = at2;
|
|
6195
|
+
const name = key();
|
|
6196
|
+
if (seen.has(name))
|
|
6197
|
+
giveUp("a key appears twice in one object", start);
|
|
6198
|
+
seen.add(name);
|
|
6199
|
+
skip();
|
|
6200
|
+
if (at2 >= text5.length)
|
|
6201
|
+
giveUp("the file stops after a key, before its value");
|
|
6202
|
+
if (text5[at2] !== ":")
|
|
6203
|
+
giveUp("a key with no colon after it");
|
|
6204
|
+
at2++;
|
|
6205
|
+
skip();
|
|
6206
|
+
if (at2 >= text5.length)
|
|
6207
|
+
giveUp("the file stops after a key, before its value");
|
|
6208
|
+
return [name, value()];
|
|
6209
|
+
})
|
|
6210
|
+
};
|
|
6211
|
+
} else if (char === "[") {
|
|
6212
|
+
node = {
|
|
6213
|
+
array: members("]", () => {
|
|
6214
|
+
return value();
|
|
6215
|
+
})
|
|
6216
|
+
};
|
|
6217
|
+
} else
|
|
6218
|
+
node = scalar();
|
|
6219
|
+
if (!truncated) {
|
|
6220
|
+
last = "json" in node ? "value" : "close";
|
|
6221
|
+
lastEnd = at2;
|
|
6222
|
+
}
|
|
6223
|
+
return node;
|
|
6224
|
+
}, "value");
|
|
6225
|
+
try {
|
|
6226
|
+
if (text5.includes("\0") || text5.includes(String.fromCharCode(65533)))
|
|
6227
|
+
giveUp("the file is not text", 0);
|
|
6228
|
+
if (text5.charCodeAt(0) === 65279) {
|
|
6229
|
+
fix("byte_order_mark", 0);
|
|
6230
|
+
at2 = 1;
|
|
6231
|
+
}
|
|
6232
|
+
skip();
|
|
6233
|
+
if (text5[at2] !== "{")
|
|
6234
|
+
giveUp(at2 >= text5.length ? "the file is empty" : "the file does not start with {");
|
|
6235
|
+
const root = value();
|
|
6236
|
+
skip();
|
|
6237
|
+
if (at2 < text5.length)
|
|
6238
|
+
giveUp("more text after the closing }");
|
|
6239
|
+
const repaired = `${serialise(root, "")}
|
|
6240
|
+
`;
|
|
6241
|
+
JSON.parse(repaired);
|
|
6242
|
+
return { state: "repaired", text: repaired, fixes };
|
|
6243
|
+
} catch (error) {
|
|
6244
|
+
if (!(error instanceof GiveUp))
|
|
6245
|
+
throw error;
|
|
6246
|
+
const before = text5.slice(0, error.at).split("\n");
|
|
6247
|
+
return {
|
|
6248
|
+
state: "refused",
|
|
6249
|
+
line: before.length,
|
|
6250
|
+
column: (before.at(-1)?.length ?? 0) + 1,
|
|
6251
|
+
why: error.why
|
|
6252
|
+
};
|
|
6253
|
+
}
|
|
6254
|
+
}, "repairConfigText");
|
|
6255
|
+
var serialise = /* @__PURE__ */ __name((node, indent) => {
|
|
6256
|
+
if ("json" in node)
|
|
6257
|
+
return node.json;
|
|
6258
|
+
const inner = `${indent} `;
|
|
6259
|
+
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)}`);
|
|
6260
|
+
const [open, close] = "object" in node ? ["{", "}"] : ["[", "]"];
|
|
6261
|
+
return parts.length === 0 ? `${open}${close}` : `${open}
|
|
6262
|
+
${parts.join(",\n")}
|
|
6263
|
+
${indent}${close}`;
|
|
6264
|
+
}, "serialise");
|
|
6265
|
+
|
|
6266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/config-issues.js
|
|
5930
6267
|
var isNode = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
5931
6268
|
var SECTIONS = ["personal", "bot"];
|
|
5932
6269
|
var SHELL_SAFE = /^[A-Za-z0-9_.:@-]*$/;
|
|
@@ -6172,17 +6509,22 @@ var withoutPath = /* @__PURE__ */ __name((raw, at2) => {
|
|
|
6172
6509
|
return { config: prune(raw, [gone]).pruned, removed: true };
|
|
6173
6510
|
}, "withoutPath");
|
|
6174
6511
|
var publicIssue = /* @__PURE__ */ __name(({ at: _, ...issue }) => issue, "publicIssue");
|
|
6512
|
+
var fixVerb = /* @__PURE__ */ __name((issue) => issue.kind === "invalid_json" ? "repair" : "remove", "fixVerb");
|
|
6175
6513
|
var issueMessage = /* @__PURE__ */ __name((issues, doctor = "doctor") => {
|
|
6176
6514
|
const [first2] = issues;
|
|
6177
6515
|
if (!first2)
|
|
6178
6516
|
return "";
|
|
6179
6517
|
const more = issues.length - 1;
|
|
6180
|
-
return `${first2.file}: ${first2.what}` + (first2.fix ? ` \u2014
|
|
6518
|
+
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
6519
|
}, "issueMessage");
|
|
6182
|
-
var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schema2, knownPermissions }) => {
|
|
6520
|
+
var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schema2, knownPermissions, repair = true }) => {
|
|
6183
6521
|
const parsed = parseConfigText(text5, file);
|
|
6184
|
-
if ("issue" in parsed)
|
|
6185
|
-
|
|
6522
|
+
if ("issue" in parsed) {
|
|
6523
|
+
const issue = publicIssue(parsed.issue);
|
|
6524
|
+
if (repair && repairConfigText(text5).state === "repaired")
|
|
6525
|
+
issue.fix = `${tool} config repair`;
|
|
6526
|
+
return { issues: [issue], config: void 0 };
|
|
6527
|
+
}
|
|
6186
6528
|
if (!isNode(parsed.raw))
|
|
6187
6529
|
return { issues: [wholeFile(file, "the file must hold a JSON object")], config: void 0 };
|
|
6188
6530
|
const context2 = { file, tool };
|
|
@@ -6195,7 +6537,7 @@ var checkConfigText = /* @__PURE__ */ __name((text5, { file, tool, schema: schem
|
|
|
6195
6537
|
var wholeFile = /* @__PURE__ */ __name((file, what) => ({ kind: "invalid_value", file, what }), "wholeFile");
|
|
6196
6538
|
var readConfigText = /* @__PURE__ */ __name((path2) => {
|
|
6197
6539
|
try {
|
|
6198
|
-
return { text:
|
|
6540
|
+
return { text: readFileSync4(path2, "utf8") };
|
|
6199
6541
|
} catch (error) {
|
|
6200
6542
|
const code = error.code;
|
|
6201
6543
|
if (code === "ENOENT")
|
|
@@ -6215,20 +6557,20 @@ var readConfigFile = /* @__PURE__ */ __name((path2) => {
|
|
|
6215
6557
|
return "issue" in parsed ? { issue: publicIssue(parsed.issue) } : parsed;
|
|
6216
6558
|
}, "readConfigFile");
|
|
6217
6559
|
|
|
6218
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6219
|
-
import { existsSync as
|
|
6220
|
-
import { dirname, join as
|
|
6560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/default-config.js
|
|
6561
|
+
import { existsSync as existsSync3, linkSync, mkdirSync as mkdirSync2, mkdtempSync, rmSync as rmSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
6562
|
+
import { dirname, join as join4 } from "node:path";
|
|
6221
6563
|
var DEFAULT_CONFIG = {
|
|
6222
6564
|
defaults: { limit: 20, keep_runs_for_days: 30, sends_per_hour: 30, update_check: true, skill_hint: true },
|
|
6223
6565
|
profiles: {}
|
|
6224
6566
|
};
|
|
6225
6567
|
function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
6226
|
-
if (
|
|
6568
|
+
if (existsSync3(path2))
|
|
6227
6569
|
return;
|
|
6228
6570
|
const directory = dirname(path2);
|
|
6229
6571
|
mkdirSync2(directory, { recursive: true, mode: 448 });
|
|
6230
|
-
const temporary = mkdtempSync(
|
|
6231
|
-
const candidate =
|
|
6572
|
+
const temporary = mkdtempSync(join4(directory, ".config-"));
|
|
6573
|
+
const candidate = join4(temporary, "config.json");
|
|
6232
6574
|
try {
|
|
6233
6575
|
writeFileSync2(candidate, `${JSON.stringify(config, null, 2)}
|
|
6234
6576
|
`, { flag: "wx", mode: 384 });
|
|
@@ -6244,7 +6586,29 @@ function ensureDefaultConfig(path2, config = DEFAULT_CONFIG) {
|
|
|
6244
6586
|
}
|
|
6245
6587
|
__name(ensureDefaultConfig, "ensureDefaultConfig");
|
|
6246
6588
|
|
|
6247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/setting-defaults.js
|
|
6590
|
+
var isNode2 = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && !Array.isArray(value), "isNode");
|
|
6591
|
+
var parentOf = /* @__PURE__ */ __name((config, key) => {
|
|
6592
|
+
const path2 = key.split(".");
|
|
6593
|
+
const leaf = path2.pop();
|
|
6594
|
+
return { node: path2.reduce((node, part) => isNode2(node) ? node[part] : void 0, config), leaf };
|
|
6595
|
+
}, "parentOf");
|
|
6596
|
+
var withSettingDefaults = /* @__PURE__ */ __name((raw, declared) => {
|
|
6597
|
+
if (raw !== void 0 && !isNode2(raw))
|
|
6598
|
+
return { config: raw, added: [] };
|
|
6599
|
+
const config = raw === void 0 ? {} : structuredClone(raw);
|
|
6600
|
+
const added = [];
|
|
6601
|
+
for (const setting2 of declared) {
|
|
6602
|
+
const { node, leaf } = parentOf(config, setting2.key);
|
|
6603
|
+
if (!isNode2(node) || Object.hasOwn(node, leaf))
|
|
6604
|
+
continue;
|
|
6605
|
+
node[leaf] = setting2.default;
|
|
6606
|
+
added.push(setting2.key);
|
|
6607
|
+
}
|
|
6608
|
+
return { config, added };
|
|
6609
|
+
}, "withSettingDefaults");
|
|
6610
|
+
|
|
6611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/settings.js
|
|
6248
6612
|
var DEFAULT_LIMIT = DEFAULT_CONFIG.defaults.limit;
|
|
6249
6613
|
var DEFAULT_KEEP_RUNS_FOR_DAYS = DEFAULT_CONFIG.defaults.keep_runs_for_days;
|
|
6250
6614
|
var DEFAULT_SENDS_PER_HOUR = DEFAULT_CONFIG.defaults.sends_per_hour;
|
|
@@ -6308,12 +6672,73 @@ var MESSENGER_ONLY_SETTINGS = [
|
|
|
6308
6672
|
"history_dialog_days",
|
|
6309
6673
|
"history_group_days",
|
|
6310
6674
|
"history_group_members_max",
|
|
6311
|
-
"read_other_bots"
|
|
6675
|
+
"read_other_bots",
|
|
6676
|
+
"speech_model",
|
|
6677
|
+
"picture_search"
|
|
6312
6678
|
];
|
|
6313
6679
|
var SHARED_DEFAULTS_ONLY = {
|
|
6314
6680
|
update_check: optional(flag),
|
|
6315
6681
|
skill_hint: optional(flag)
|
|
6316
6682
|
};
|
|
6683
|
+
var SHARED_SETTINGS = [
|
|
6684
|
+
{ key: "limit", default: DEFAULT_LIMIT, description: "how many items a list shows at once" },
|
|
6685
|
+
{ key: "keep_runs_for_days", default: DEFAULT_KEEP_RUNS_FOR_DAYS, description: "days a run is kept" },
|
|
6686
|
+
{
|
|
6687
|
+
key: "sends_per_hour",
|
|
6688
|
+
default: DEFAULT_SENDS_PER_HOUR,
|
|
6689
|
+
description: "the most messages an account sends in an hour; a bot has none unless its section sets one"
|
|
6690
|
+
},
|
|
6691
|
+
{ key: "update_check", default: true, description: "check once a day for a newer version" },
|
|
6692
|
+
{
|
|
6693
|
+
key: "skill_hint",
|
|
6694
|
+
default: true,
|
|
6695
|
+
description: "tell an agent once a day that `skill install` would give it this tool's guide"
|
|
6696
|
+
},
|
|
6697
|
+
{ key: "record", default: true, description: "keep every run in runs list; false keeps failed runs only" },
|
|
6698
|
+
{
|
|
6699
|
+
key: "record_input",
|
|
6700
|
+
default: true,
|
|
6701
|
+
description: `keep what was typed in a run's command line: true, false, or "failed" for failed runs only`
|
|
6702
|
+
},
|
|
6703
|
+
{
|
|
6704
|
+
key: "keep_successful_runs_for_days",
|
|
6705
|
+
default: KEEP_SUCCESSFUL_RUNS_FOR_DAYS,
|
|
6706
|
+
description: "days a successful run is kept"
|
|
6707
|
+
},
|
|
6708
|
+
{ key: "runs_size_limit_mb", default: RUNS_SIZE_LIMIT_MB, description: "the most megabytes all runs may take" },
|
|
6709
|
+
{ key: "sender_colors", default: false, description: "color each sender's name in a conversation" },
|
|
6710
|
+
{ key: "search_catch_up", default: false, description: "prepare local search after a gaps repair" },
|
|
6711
|
+
{
|
|
6712
|
+
key: "history_dialog_days",
|
|
6713
|
+
default: DEFAULT_HISTORY_LIMITS.dialogDays,
|
|
6714
|
+
description: "days of a one-to-one chat's pushed history the store keeps"
|
|
6715
|
+
},
|
|
6716
|
+
{
|
|
6717
|
+
key: "history_group_days",
|
|
6718
|
+
default: DEFAULT_HISTORY_LIMITS.groupDays,
|
|
6719
|
+
description: "days of a group's pushed history the store keeps"
|
|
6720
|
+
},
|
|
6721
|
+
{
|
|
6722
|
+
key: "history_group_members_max",
|
|
6723
|
+
default: DEFAULT_HISTORY_LIMITS.groupMembersMax,
|
|
6724
|
+
description: "a group with more people than this keeps no pushed history"
|
|
6725
|
+
},
|
|
6726
|
+
{
|
|
6727
|
+
key: "picture_search",
|
|
6728
|
+
default: false,
|
|
6729
|
+
description: "search and images embed read the pictures themselves, with a model on this computer"
|
|
6730
|
+
},
|
|
6731
|
+
{
|
|
6732
|
+
key: "search_reranker",
|
|
6733
|
+
default: DEFAULT_RERANK_MODEL,
|
|
6734
|
+
description: "the reranker that orders search's first hits, or off"
|
|
6735
|
+
},
|
|
6736
|
+
{
|
|
6737
|
+
key: "embedding_provider",
|
|
6738
|
+
default: AI_DEFAULTS.embeddingProvider,
|
|
6739
|
+
description: "local or openai: what turns text into vectors for search by meaning"
|
|
6740
|
+
}
|
|
6741
|
+
];
|
|
6317
6742
|
var NONE_NAMED = "none named";
|
|
6318
6743
|
var NO_PROFILE = "default";
|
|
6319
6744
|
var namedProfile = /* @__PURE__ */ __name((settings) => settings.sources?.profile === NONE_NAMED ? void 0 : settings.profile, "namedProfile");
|
|
@@ -6366,12 +6791,14 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6366
6791
|
const defaultsOnlyKeys = Object.keys(defaultsOnly);
|
|
6367
6792
|
const botOnlyKeys = Object.keys(BOT_ONLY_ENTRIES);
|
|
6368
6793
|
const allSettings = [...Object.keys(profileEntries), ...botOnlyKeys, ...defaultsOnlyKeys].filter((setting2) => app.messenger !== false || !MESSENGER_ONLY_SETTINGS.includes(setting2) || app.sends === true && setting2 === "sends_per_hour");
|
|
6794
|
+
const readSchema = extension.schema ?? schema2;
|
|
6795
|
+
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}` }));
|
|
6796
|
+
const withDefaults = /* @__PURE__ */ __name((raw, except = []) => withSettingDefaults(isScope(raw) && !Object.hasOwn(raw, "defaults") ? { ...raw, defaults: {} } : raw, declaredSettings.filter(({ key }) => !except.includes(key))), "withDefaults");
|
|
6369
6797
|
const PROFILE = envName(app, "PROFILE");
|
|
6370
6798
|
const PROFILE_LOCK = envName(app, "PROFILE_LOCK");
|
|
6371
6799
|
const TIMEOUT = envName(app, "TIMEOUT");
|
|
6372
6800
|
const REQUESTS_PER_MINUTE = envName(app, "REQUESTS_PER_MINUTE");
|
|
6373
6801
|
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
6802
|
const context2 = /* @__PURE__ */ __name((file) => ({ file, tool: app.command }), "context");
|
|
6376
6803
|
const loadConfig = /* @__PURE__ */ __name((path2) => {
|
|
6377
6804
|
const read = readConfigText(path2);
|
|
@@ -6379,7 +6806,12 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6379
6806
|
return { config: { profiles: {} }, issues: [read.issue] };
|
|
6380
6807
|
if (read.text === void 0)
|
|
6381
6808
|
return { config: { profiles: {} }, issues: [] };
|
|
6382
|
-
const { config, issues } = checkConfigText(read.text, {
|
|
6809
|
+
const { config, issues } = checkConfigText(read.text, {
|
|
6810
|
+
file: path2,
|
|
6811
|
+
tool: app.command,
|
|
6812
|
+
schema: readSchema,
|
|
6813
|
+
repair: extension.configRepair !== false
|
|
6814
|
+
});
|
|
6383
6815
|
return { config: config ?? { profiles: {} }, issues };
|
|
6384
6816
|
}, "loadConfig");
|
|
6385
6817
|
const locked = /* @__PURE__ */ __name((profile, lock) => {
|
|
@@ -6402,12 +6834,21 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6402
6834
|
throw new CliError("validation_error", `name a profile: \`${app.command} <profile> \u2026\` \u2014 profiles here: ${here.join(", ")} (or set ${PROFILE})`, { profiles: here });
|
|
6403
6835
|
}, "unnamed");
|
|
6404
6836
|
const profilesOf = /* @__PURE__ */ __name((config, env) => profilesHere(app, [...namedProfiles(config), ...extension.profiles?.(env) ?? []], env), "profilesOf");
|
|
6837
|
+
const botsOf = /* @__PURE__ */ __name((config, env) => [.../* @__PURE__ */ new Set([...Object.keys(config.bot?.profiles ?? {}), ...registryProfiles(app, env)])].sort(), "botsOf");
|
|
6838
|
+
const accountsOf = /* @__PURE__ */ __name((config, env, bots) => {
|
|
6839
|
+
const personal = /* @__PURE__ */ new Set([
|
|
6840
|
+
...Object.keys(config.personal?.profiles ?? {}),
|
|
6841
|
+
...profilesWithAccounts(app, env),
|
|
6842
|
+
...extension.profiles?.(env) ?? []
|
|
6843
|
+
]);
|
|
6844
|
+
return profilesOf(config, env).filter((name) => !bots.includes(name) || personal.has(name));
|
|
6845
|
+
}, "accountsOf");
|
|
6405
6846
|
const resolveSettings = /* @__PURE__ */ __name((flags = {}, options = {}) => {
|
|
6406
6847
|
const env = options.env ?? process.env;
|
|
6407
6848
|
const configPath = configPathFor(options);
|
|
6408
6849
|
try {
|
|
6409
6850
|
if (!options.readOnly)
|
|
6410
|
-
ensureDefaultConfig(configPath);
|
|
6851
|
+
ensureDefaultConfig(configPath, withDefaults(DEFAULT_CONFIG).config);
|
|
6411
6852
|
} catch (error) {
|
|
6412
6853
|
throw new CliError("configuration_error", error instanceof Error ? error.message : String(error));
|
|
6413
6854
|
}
|
|
@@ -6423,6 +6864,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6423
6864
|
], void 0);
|
|
6424
6865
|
const profile = locked(named3.value === void 0 ? unnamed(config, env, options.needsProfile !== false) : { value: named3.value, from: named3.from }, lock);
|
|
6425
6866
|
const kind2 = options.kind ?? "personal";
|
|
6867
|
+
const bots = botsOf(config, env);
|
|
6426
6868
|
const name = usableProfileName(profile.value);
|
|
6427
6869
|
const configured = config.profiles[name] ?? {};
|
|
6428
6870
|
const shared = config.defaults ?? {};
|
|
@@ -6514,9 +6956,11 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6514
6956
|
updateCheck: updateCheck.value,
|
|
6515
6957
|
skillHint: skillHint.value,
|
|
6516
6958
|
configPath,
|
|
6517
|
-
configFound:
|
|
6959
|
+
configFound: existsSync4(configPath),
|
|
6518
6960
|
configuredProfiles: namedProfiles(config),
|
|
6519
6961
|
profilesHere: profilesOf(config, env),
|
|
6962
|
+
accountProfiles: accountsOf(config, env, bots),
|
|
6963
|
+
botProfiles: bots,
|
|
6520
6964
|
sources: {
|
|
6521
6965
|
...ai.sources,
|
|
6522
6966
|
profile: profile.from,
|
|
@@ -6585,7 +7029,7 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6585
7029
|
throw new CliError("validation_error", `${setting2} has no problem to remove \u2014 name the profile, or add --defaults, to unset a setting`);
|
|
6586
7030
|
if (!known && valueAt(raw, at2) === void 0)
|
|
6587
7031
|
throw new CliError("validation_error", `no setting called "${setting2}" \u2014 one of: ${allSettings.join(", ")}`);
|
|
6588
|
-
saveConfigFile(path2, withoutPath(raw, at2).config);
|
|
7032
|
+
saveConfigFile(path2, withDefaults(withoutPath(raw, at2).config, [at2.join(".")]).config);
|
|
6589
7033
|
return null;
|
|
6590
7034
|
}
|
|
6591
7035
|
if (!known)
|
|
@@ -6599,20 +7043,41 @@ var settingsFor = /* @__PURE__ */ __name((app, extension = {}) => {
|
|
|
6599
7043
|
if (kind2 !== "bot" && botOnlyKeys.includes(setting2)) {
|
|
6600
7044
|
throw new CliError("validation_error", `${setting2} is a bot's setting \u2014 add --bot`);
|
|
6601
7045
|
}
|
|
6602
|
-
const changed = structuredClone(raw);
|
|
6603
|
-
setAt(changed, at2, level2 === void 0 ? parseValue(value) : value.trim());
|
|
6604
7046
|
const had = new Set(before.map((issue) => issue.at.join(".")));
|
|
6605
|
-
const
|
|
7047
|
+
const tried = /* @__PURE__ */ __name((typed2) => {
|
|
7048
|
+
const changed2 = structuredClone(raw);
|
|
7049
|
+
setAt(changed2, at2, typed2);
|
|
7050
|
+
const added2 = schemaIssues(changed2, readSchema, context2(path2)).find((issue) => !had.has(issue.at.join(".")) || issue.at.join(".") === at2.join("."));
|
|
7051
|
+
return { changed: changed2, added: added2 };
|
|
7052
|
+
}, "tried");
|
|
7053
|
+
const parsed = level2 === void 0 ? parseValue(value) : value.trim();
|
|
7054
|
+
let { changed, added } = tried(parsed);
|
|
7055
|
+
if (added && typeof parsed !== "string") {
|
|
7056
|
+
const asText = tried(value.trim());
|
|
7057
|
+
if (!asText.added)
|
|
7058
|
+
({ changed, added } = asText);
|
|
7059
|
+
}
|
|
6606
7060
|
if (added)
|
|
6607
7061
|
throw new CliError("validation_error", `${setting2} cannot be "${value}": ${added.what}`);
|
|
6608
7062
|
const checked = safeParse(readSchema, changed);
|
|
6609
|
-
saveConfigFile(path2, checked.success ? checked.output : changed);
|
|
7063
|
+
saveConfigFile(path2, withDefaults(checked.success ? checked.output : changed).config);
|
|
6610
7064
|
return valueAt(checked.success ? checked.output : changed, at2) ?? null;
|
|
6611
7065
|
}, "changeSetting");
|
|
7066
|
+
const migrate = /* @__PURE__ */ __name((path2) => {
|
|
7067
|
+
const read = readConfigFile(path2);
|
|
7068
|
+
if ("issue" in read)
|
|
7069
|
+
throw new CliError("configuration_error", issueMessage([read.issue]));
|
|
7070
|
+
const { config, added } = withDefaults(read.raw);
|
|
7071
|
+
if (added.length > 0)
|
|
7072
|
+
saveConfigFile(path2, config);
|
|
7073
|
+
return added;
|
|
7074
|
+
}, "migrate");
|
|
6612
7075
|
return {
|
|
6613
7076
|
resolveSettings,
|
|
6614
7077
|
configuredProfiles,
|
|
6615
7078
|
changeSetting,
|
|
7079
|
+
migrate,
|
|
7080
|
+
declaredSettings,
|
|
6616
7081
|
allSettings,
|
|
6617
7082
|
defaultsOnlyKeys,
|
|
6618
7083
|
schema: schema2,
|
|
@@ -6653,7 +7118,7 @@ var given = /* @__PURE__ */ __name((value) => {
|
|
|
6653
7118
|
return trimmed === void 0 || trimmed === "" ? void 0 : trimmed;
|
|
6654
7119
|
}, "given");
|
|
6655
7120
|
|
|
6656
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/context.js
|
|
6657
7122
|
var setExitCode = /* @__PURE__ */ __name((command, code) => {
|
|
6658
7123
|
const slot = environmentOf(command).exit;
|
|
6659
7124
|
if (slot)
|
|
@@ -6666,6 +7131,10 @@ var provide = /* @__PURE__ */ __name((program2, environment) => {
|
|
|
6666
7131
|
environments.set(program2, environment);
|
|
6667
7132
|
}, "provide");
|
|
6668
7133
|
var environmentOf = /* @__PURE__ */ __name((command) => environments.get(rootOf(command)) ?? {}, "environmentOf");
|
|
7134
|
+
var withAgentLevels = /* @__PURE__ */ __name((command, flags) => {
|
|
7135
|
+
const overrides = environmentOf(command).agent?.overrides ?? [];
|
|
7136
|
+
return overrides.length > 0 ? { ...flags, permission: [...overrides, ...flags.permission ?? []] } : flags;
|
|
7137
|
+
}, "withAgentLevels");
|
|
6669
7138
|
var secretInputOf = /* @__PURE__ */ __name((command) => {
|
|
6670
7139
|
const { stdin, stderr } = environmentOf(command);
|
|
6671
7140
|
return { ...stdin ? { input: stdin } : {}, ...stderr ? { output: stderr } : {} };
|
|
@@ -6692,9 +7161,7 @@ var outputFor = /* @__PURE__ */ __name((command) => {
|
|
|
6692
7161
|
var baseContext = /* @__PURE__ */ __name((command, resolveSettings) => {
|
|
6693
7162
|
const environment = environmentOf(command);
|
|
6694
7163
|
const env = environment.env ?? process.env;
|
|
6695
|
-
const
|
|
6696
|
-
const overrides = environment.agent?.overrides ?? [];
|
|
6697
|
-
const settings = resolveSettings(overrides.length > 0 ? { ...flags, permission: [...overrides, ...flags.permission ?? []] } : flags, { env });
|
|
7164
|
+
const settings = resolveSettings(withAgentLevels(command, command.optsWithGlobals()), { env });
|
|
6698
7165
|
const { renderer, format, color, streams, compact, full } = resolveOutput({
|
|
6699
7166
|
...settings,
|
|
6700
7167
|
env,
|
|
@@ -6766,7 +7233,7 @@ var commandPath = /* @__PURE__ */ __name((command) => {
|
|
|
6766
7233
|
return words.join(" ");
|
|
6767
7234
|
}, "commandPath");
|
|
6768
7235
|
|
|
6769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/effects.js
|
|
6770
7237
|
var REMOTE_READ = { remote: "read", local: "read" };
|
|
6771
7238
|
var FETCH = { remote: "read", local: "write" };
|
|
6772
7239
|
var REMOTE_WRITE = { remote: "write", local: "write" };
|
|
@@ -6802,6 +7269,22 @@ var destroysNothing = /* @__PURE__ */ __name((command) => {
|
|
|
6802
7269
|
KEPT_UNDER_LOCK.add(command);
|
|
6803
7270
|
return command;
|
|
6804
7271
|
}, "destroysNothing");
|
|
7272
|
+
var PROPOSE_COMMANDS = ["messages acknowledge", "mail findings add"];
|
|
7273
|
+
var PROPOSES = /* @__PURE__ */ new WeakSet();
|
|
7274
|
+
var isProposal = /* @__PURE__ */ __name((command) => {
|
|
7275
|
+
if (!PROPOSES.has(command))
|
|
7276
|
+
return false;
|
|
7277
|
+
const path2 = pathOf2(command).join(" ");
|
|
7278
|
+
return PROPOSE_COMMANDS.some((listed) => path2 === listed || path2.endsWith(` ${listed}`));
|
|
7279
|
+
}, "isProposal");
|
|
7280
|
+
var LOCKED_AUTHORITY_COMMANDS = ["rules add"];
|
|
7281
|
+
var NARROWS = /* @__PURE__ */ new WeakSet();
|
|
7282
|
+
var admittedUnderLock = /* @__PURE__ */ __name((command) => {
|
|
7283
|
+
if (!NARROWS.has(command))
|
|
7284
|
+
return false;
|
|
7285
|
+
const path2 = pathOf2(command).join(" ");
|
|
7286
|
+
return LOCKED_AUTHORITY_COMMANDS.some((listed) => path2 === listed || path2.endsWith(` ${listed}`));
|
|
7287
|
+
}, "admittedUnderLock");
|
|
6805
7288
|
var STORE_WRITES = /* @__PURE__ */ new WeakSet();
|
|
6806
7289
|
var changesStore = /* @__PURE__ */ __name((command) => {
|
|
6807
7290
|
STORE_WRITES.add(command);
|
|
@@ -6826,7 +7309,7 @@ var readsOverMcpAt = /* @__PURE__ */ __name((root) => (path2) => {
|
|
|
6826
7309
|
}, "readsOverMcpAt");
|
|
6827
7310
|
var isStoreChange = /* @__PURE__ */ __name((command) => {
|
|
6828
7311
|
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);
|
|
7312
|
+
return (effects?.remote === "none" || STORE_WRITES.has(command)) && effects?.local === "write" && !KEPT_UNDER_LOCK.has(command) && !isProposal(command) && !changesAuthority(command) && writesFileNow(command);
|
|
6830
7313
|
}, "isStoreChange");
|
|
6831
7314
|
var STORE_CHANGE_REFUSAL = "change the message store";
|
|
6832
7315
|
var previewFlag = /* @__PURE__ */ __name((program2) => program2.options.some((option) => option.long === "--dry-run") ? " --dry-run" : "", "previewFlag");
|
|
@@ -6874,7 +7357,7 @@ var refuseUnderReadOnly = /* @__PURE__ */ __name((command, what) => {
|
|
|
6874
7357
|
throw readOnlyRefusal(lock, what);
|
|
6875
7358
|
}, "refuseUnderReadOnly");
|
|
6876
7359
|
|
|
6877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/account.js
|
|
6878
7361
|
var account = strictObject({
|
|
6879
7362
|
provider: text,
|
|
6880
7363
|
id,
|
|
@@ -6884,7 +7367,7 @@ var account = strictObject({
|
|
|
6884
7367
|
scope: optional(picklist(["personal", "work"]))
|
|
6885
7368
|
});
|
|
6886
7369
|
|
|
6887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/account-session.js
|
|
6888
7371
|
var accountSession = strictObject({
|
|
6889
7372
|
current: boolean(),
|
|
6890
7373
|
client: nullable(text),
|
|
@@ -6894,7 +7377,7 @@ var accountSession = strictObject({
|
|
|
6894
7377
|
created_at: optional(nullable(time))
|
|
6895
7378
|
});
|
|
6896
7379
|
|
|
6897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/account-change.js
|
|
6898
7381
|
var accountChange = strictObject({ operation_id: id, account: omit(account, ["provider", "scope"]) });
|
|
6899
7382
|
var endedAccountSessions = strictObject({ operation_id: id, sessions: array(accountSession) });
|
|
6900
7383
|
var audience = picklist(["everyone", "contacts", "nobody"]);
|
|
@@ -6912,17 +7395,19 @@ var accountPrivacy = strictObject({
|
|
|
6912
7395
|
});
|
|
6913
7396
|
var accountPrivacyChange = strictObject({ operation_id: id, privacy: accountPrivacy });
|
|
6914
7397
|
|
|
6915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/account-profile.js
|
|
6916
7399
|
var accountProfile = strictObject({
|
|
6917
7400
|
profile: id,
|
|
6918
7401
|
current: boolean(),
|
|
6919
7402
|
account: nullable(id),
|
|
6920
7403
|
name: nullable(text),
|
|
6921
7404
|
/** False for a profile with no session on this computer; absent when the messenger does not say. */
|
|
6922
|
-
signed_in: optional(boolean())
|
|
7405
|
+
signed_in: optional(boolean()),
|
|
7406
|
+
/** True when the same name is a bot profile too (`<tool> <profile> bot …`); absent otherwise. */
|
|
7407
|
+
bot: optional(literal(true))
|
|
6923
7408
|
});
|
|
6924
7409
|
|
|
6925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/counter-reading.js
|
|
6926
7411
|
var milliseconds = pipe(number(), minValue(0));
|
|
6927
7412
|
var counterReading = strictObject({
|
|
6928
7413
|
counter: picklist(["views", "reactions", "comments"]),
|
|
@@ -6934,7 +7419,7 @@ var counterReading = strictObject({
|
|
|
6934
7419
|
});
|
|
6935
7420
|
var selection = record(string(), unknown());
|
|
6936
7421
|
|
|
6937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7422
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/admin-report.js
|
|
6938
7423
|
var adminRow = strictObject({
|
|
6939
7424
|
ref: reference,
|
|
6940
7425
|
/** What `stats * evidence` takes: a person id, a stay or a message locator. */
|
|
@@ -6987,7 +7472,7 @@ var adminReport = strictObject({
|
|
|
6987
7472
|
rows: array(adminRow)
|
|
6988
7473
|
});
|
|
6989
7474
|
|
|
6990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/task.js
|
|
6991
7476
|
var closeSuggestion = strictObject({
|
|
6992
7477
|
as: picklist(["done", "dismissed"]),
|
|
6993
7478
|
/** The agent's name. */
|
|
@@ -7018,6 +7503,10 @@ var task = strictObject({
|
|
|
7018
7503
|
chat: optional(nullable(reference)),
|
|
7019
7504
|
/** The message it came from. */
|
|
7020
7505
|
source_message: optional(nullable(reference)),
|
|
7506
|
+
/** `<service>:<id>`, its id in an outside service, such as `avito:4512345678`. */
|
|
7507
|
+
external_id: optional(nullable(text)),
|
|
7508
|
+
/** The http or https page it is about, such as an Avito ad. */
|
|
7509
|
+
source_url: optional(nullable(text)),
|
|
7021
7510
|
/** 0 to 1, higher first; `priority_label` reads it as low, medium, high or critical. */
|
|
7022
7511
|
priority: optional(nullable(number())),
|
|
7023
7512
|
priority_label: optional(nullable(picklist(PRIORITY_LABELS))),
|
|
@@ -7045,7 +7534,7 @@ var task = strictObject({
|
|
|
7045
7534
|
updated_at: optional(time)
|
|
7046
7535
|
});
|
|
7047
7536
|
|
|
7048
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/agenda.js
|
|
7049
7538
|
var agendaChat = strictObject({
|
|
7050
7539
|
chat: reference,
|
|
7051
7540
|
title: nullable(text),
|
|
@@ -7115,11 +7604,11 @@ var agenda = strictObject({
|
|
|
7115
7604
|
unlisted_categories: array(strictObject({ name: text, open_tasks: number() }))
|
|
7116
7605
|
});
|
|
7117
7606
|
|
|
7118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/analysis-consent.js
|
|
7119
7608
|
var analysisConsent = strictObject({ chat: id, provider: text, at: time });
|
|
7120
7609
|
var analysisConsentRevocation = strictObject({ revoked: boolean() });
|
|
7121
7610
|
|
|
7122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/attachment.js
|
|
7123
7612
|
var attachment = strictObject({
|
|
7124
7613
|
/** The message it came with, as a locator; absent inside that message. */
|
|
7125
7614
|
message: optional(reference),
|
|
@@ -7157,7 +7646,7 @@ var attachment = strictObject({
|
|
|
7157
7646
|
});
|
|
7158
7647
|
var hitFile = strictObject({ position: count, kind: text, name: optional(text), size: optional(count) });
|
|
7159
7648
|
|
|
7160
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/batch-result.js
|
|
7161
7650
|
var actionableError = objectWithRest({
|
|
7162
7651
|
code: text,
|
|
7163
7652
|
message: text,
|
|
@@ -7174,7 +7663,7 @@ var batchResult = strictObject({
|
|
|
7174
7663
|
max_error_percent: count
|
|
7175
7664
|
});
|
|
7176
7665
|
|
|
7177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7666
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/extraction-report.js
|
|
7178
7667
|
var extractionItem = strictObject({
|
|
7179
7668
|
ref: reference,
|
|
7180
7669
|
attachment: count,
|
|
@@ -7207,7 +7696,7 @@ var extractionReport = strictObject({
|
|
|
7207
7696
|
cursor: optional(text)
|
|
7208
7697
|
});
|
|
7209
7698
|
|
|
7210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/attachment-results.js
|
|
7211
7700
|
var fingerprint = pipe(text, regex(/^[a-f0-9]{64}$/));
|
|
7212
7701
|
var attachmentBytes = strictObject({
|
|
7213
7702
|
ref: reference,
|
|
@@ -7235,7 +7724,7 @@ var attachmentTextChange = strictObject({
|
|
|
7235
7724
|
replaced: nullable(picklist(["extracted", "agent"]))
|
|
7236
7725
|
});
|
|
7237
7726
|
|
|
7238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/chart.js
|
|
7239
7728
|
var chart = strictObject({
|
|
7240
7729
|
version: literal(1),
|
|
7241
7730
|
kind: picklist(["bar", "line", "grouped-bar"]),
|
|
@@ -7250,7 +7739,7 @@ var chart = strictObject({
|
|
|
7250
7739
|
file: optional(strictObject({ path: text, format: picklist(["svg", "png"]), width: count, height: count }))
|
|
7251
7740
|
});
|
|
7252
7741
|
|
|
7253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/member.js
|
|
7254
7743
|
var member = strictObject({
|
|
7255
7744
|
id,
|
|
7256
7745
|
name: nullable(text),
|
|
@@ -7273,7 +7762,7 @@ var member = strictObject({
|
|
|
7273
7762
|
check: optional(record(string(), unknown()))
|
|
7274
7763
|
});
|
|
7275
7764
|
|
|
7276
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/chat.js
|
|
7277
7766
|
var setting = optional(nullable(boolean()));
|
|
7278
7767
|
var chat = strictObject({
|
|
7279
7768
|
ref: reference,
|
|
@@ -7314,7 +7803,7 @@ var chat = strictObject({
|
|
|
7314
7803
|
members: optional(array(member))
|
|
7315
7804
|
});
|
|
7316
7805
|
|
|
7317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/folder.js
|
|
7318
7807
|
var named2 = strictObject({
|
|
7319
7808
|
id,
|
|
7320
7809
|
title: nullable(text),
|
|
@@ -7337,7 +7826,7 @@ var folder = strictObject({
|
|
|
7337
7826
|
excluded_chats: optional(array(named2))
|
|
7338
7827
|
});
|
|
7339
7828
|
|
|
7340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7829
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/invite-link.js
|
|
7341
7830
|
var inviteLink = strictObject({
|
|
7342
7831
|
link: text,
|
|
7343
7832
|
/** Who joins by it asks first, and an admin lets them in. */
|
|
@@ -7353,7 +7842,7 @@ var inviteLink = strictObject({
|
|
|
7353
7842
|
joined_count: optional(count)
|
|
7354
7843
|
});
|
|
7355
7844
|
|
|
7356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/chat-admin.js
|
|
7357
7846
|
var operated = { operation_id: id, chat_id: id };
|
|
7358
7847
|
var group = strictObject({
|
|
7359
7848
|
...omit(chat, ["ref", "provider", "account", "invite_link", "members"]).entries,
|
|
@@ -7433,7 +7922,7 @@ var chatFolderOrder = strictObject({
|
|
|
7433
7922
|
folders: array(strictObject({ id, title: text }))
|
|
7434
7923
|
});
|
|
7435
7924
|
|
|
7436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/chat-change.js
|
|
7437
7926
|
var operated2 = { operation_id: id, chat_id: id };
|
|
7438
7927
|
var chatRemoval = strictObject(operated2);
|
|
7439
7928
|
var chatMuting = strictObject({
|
|
@@ -7444,7 +7933,7 @@ var chatArchive = strictObject({ ...operated2, archived: boolean() });
|
|
|
7444
7933
|
var chatPin = strictObject({ ...operated2, pinned: boolean() });
|
|
7445
7934
|
var chatUnread = strictObject({ ...operated2, unread: literal(true) });
|
|
7446
7935
|
|
|
7447
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/chat-event.js
|
|
7448
7937
|
var who = strictObject({ id: nullable(id), name: nullable(text), username: optional(nullable(text)) });
|
|
7449
7938
|
var chatEvent = strictObject({
|
|
7450
7939
|
chat_id: id,
|
|
@@ -7461,7 +7950,7 @@ var chatEvent = strictObject({
|
|
|
7461
7950
|
before: optional(strictObject({ name: nullable(text), username: nullable(text) }))
|
|
7462
7951
|
});
|
|
7463
7952
|
|
|
7464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7953
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/chat-metadata.js
|
|
7465
7954
|
var chatMetadata = strictObject({
|
|
7466
7955
|
chat_id: id,
|
|
7467
7956
|
title: nullable(text),
|
|
@@ -7476,7 +7965,7 @@ var chatMetadataRefresh = strictObject({
|
|
|
7476
7965
|
has_more: boolean()
|
|
7477
7966
|
});
|
|
7478
7967
|
|
|
7479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/chat-moderation.js
|
|
7480
7969
|
var action = picklist(["report", "delete", "remove"]);
|
|
7481
7970
|
var level = picklist(["deny", "readonly", "ask", "allow"]);
|
|
7482
7971
|
var chatRules = strictObject({
|
|
@@ -7513,7 +8002,7 @@ var chatModeration = strictObject({
|
|
|
7513
8002
|
}))
|
|
7514
8003
|
});
|
|
7515
8004
|
|
|
7516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8005
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/chat-stats.js
|
|
7517
8006
|
var optionalCount = optional(count);
|
|
7518
8007
|
var minutes = nullable(number());
|
|
7519
8008
|
var chatStats = strictObject({
|
|
@@ -7564,18 +8053,30 @@ var chatStats = strictObject({
|
|
|
7564
8053
|
})),
|
|
7565
8054
|
series: optional(array(strictObject({ key: text, messages: count, senders: count, joined: optionalCount, left: optionalCount })))
|
|
7566
8055
|
});
|
|
8056
|
+
var ms = nullable(pipe(number(), minValue(0)));
|
|
7567
8057
|
var taskStats = strictObject({
|
|
7568
8058
|
/** Open tasks across every row. */
|
|
7569
8059
|
open: count,
|
|
8060
|
+
created: count,
|
|
8061
|
+
closed: count,
|
|
8062
|
+
median_close_ms: ms,
|
|
8063
|
+
mean_open_age_ms: ms,
|
|
7570
8064
|
rows: array(strictObject({
|
|
7571
|
-
chat
|
|
8065
|
+
/** Rows of `--by chat` only. */
|
|
8066
|
+
chat: optional(reference),
|
|
8067
|
+
/** The chat reference, `meeting:<account>/<meeting>` or `project:<id>`. */
|
|
8068
|
+
key: text,
|
|
8069
|
+
name: nullable(text),
|
|
7572
8070
|
open: count,
|
|
8071
|
+
created: count,
|
|
8072
|
+
closed: count,
|
|
7573
8073
|
oldest_open_at: nullable(time),
|
|
7574
|
-
median_close_ms:
|
|
8074
|
+
median_close_ms: ms,
|
|
8075
|
+
mean_open_age_ms: ms
|
|
7575
8076
|
}))
|
|
7576
8077
|
});
|
|
7577
8078
|
|
|
7578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/chat-tracking.js
|
|
7579
8080
|
var memberCount = strictObject({
|
|
7580
8081
|
day: pipe(text, isoDate()),
|
|
7581
8082
|
participants: nullable(count),
|
|
@@ -7598,7 +8099,7 @@ var chatTracking = strictObject({
|
|
|
7598
8099
|
tracked: boolean()
|
|
7599
8100
|
});
|
|
7600
8101
|
|
|
7601
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/contact-read.js
|
|
7602
8103
|
var contactLookup = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
7603
8104
|
var contactSync = strictObject({ added: count, changed: count, known: count });
|
|
7604
8105
|
var profileFields = {
|
|
@@ -7636,7 +8137,7 @@ var profileFields = {
|
|
|
7636
8137
|
}))
|
|
7637
8138
|
};
|
|
7638
8139
|
|
|
7639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/contact.js
|
|
7640
8141
|
var contact = strictObject({
|
|
7641
8142
|
ref: reference,
|
|
7642
8143
|
id,
|
|
@@ -7667,7 +8168,7 @@ var contact = strictObject({
|
|
|
7667
8168
|
notes: optional(array(strictObject({ id, text, revision: count, created_at: time, updated_at: time })))
|
|
7668
8169
|
});
|
|
7669
8170
|
|
|
7670
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/botcheck/reasons.js
|
|
7671
8172
|
var WEIGHTS = {
|
|
7672
8173
|
bot: 3,
|
|
7673
8174
|
scam: 3,
|
|
@@ -7692,7 +8193,7 @@ var LINK = /https?:\/\/|t\.me\/|www\./i;
|
|
|
7692
8193
|
var DIGITS = /\d{5,}/;
|
|
7693
8194
|
var oddName = /* @__PURE__ */ __name((name) => !name?.trim() || DIGITS.test(name) || LINK.test(name), "oddName");
|
|
7694
8195
|
|
|
7695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/contact-activity.js
|
|
7696
8197
|
var linkedIdentity = strictObject({
|
|
7697
8198
|
provider: text,
|
|
7698
8199
|
id,
|
|
@@ -7733,7 +8234,7 @@ var contactCheck = strictObject({
|
|
|
7733
8234
|
checked_at: time
|
|
7734
8235
|
});
|
|
7735
8236
|
|
|
7736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/message.js
|
|
7737
8238
|
var quoted = strictObject({
|
|
7738
8239
|
id,
|
|
7739
8240
|
sender_id: nullable(id),
|
|
@@ -7835,12 +8336,24 @@ var message = strictObject({
|
|
|
7835
8336
|
read: nullable(boolean()),
|
|
7836
8337
|
flagged: nullable(boolean()),
|
|
7837
8338
|
/** 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)) }))
|
|
8339
|
+
sender_score: optional(strictObject({ score: number(), signals: array(text), demoted: optional(literal(true)) })),
|
|
8340
|
+
/** Mail `review`: filed in the mailbox of mail sent to many. */
|
|
8341
|
+
bulk: optional(boolean()),
|
|
8342
|
+
/** Mail `review`: its List-Id, `null` when it has none. */
|
|
8343
|
+
list_id: optional(nullable(text)),
|
|
8344
|
+
/** Mail `review`: the mail rule that decided how it is stored, by its id in `rules list`; `null` when none. */
|
|
8345
|
+
rule_id: optional(nullable(number())),
|
|
8346
|
+
/** Mail `review`: the evidence fingerprint a finding cites this email by. */
|
|
8347
|
+
fingerprint: optional(pipe(text, regex(/^[a-f0-9]{64}$/))),
|
|
8348
|
+
/** Mail `review`: no earlier stored email, in any account, came from this address. */
|
|
8349
|
+
new_sender: optional(boolean()),
|
|
8350
|
+
/** Mail `review`: how many identities the sender's person has; 1 is this address alone. */
|
|
8351
|
+
sender_identities: optional(number())
|
|
7839
8352
|
})),
|
|
7840
8353
|
provider_metadata: providerMetadata
|
|
7841
8354
|
});
|
|
7842
8355
|
|
|
7843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/contact-context.js
|
|
7844
8357
|
var contextPerson = strictObject({ ...linkedPerson.entries, provider: text, id });
|
|
7845
8358
|
var contextMessage = strictObject({
|
|
7846
8359
|
locator: reference,
|
|
@@ -8038,7 +8551,7 @@ var contactPreparation = strictObject({
|
|
|
8038
8551
|
})
|
|
8039
8552
|
});
|
|
8040
8553
|
|
|
8041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/contact-note.js
|
|
8042
8555
|
var contactNote = strictObject({
|
|
8043
8556
|
id,
|
|
8044
8557
|
/** The contact, as a `contact:` reference. */
|
|
@@ -8050,13 +8563,13 @@ var contactNote = strictObject({
|
|
|
8050
8563
|
updated_at: time
|
|
8051
8564
|
});
|
|
8052
8565
|
|
|
8053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/contact-write.js
|
|
8054
8567
|
var addressBookPerson = strictObject({ id, name: nullable(text), username: nullable(text) });
|
|
8055
8568
|
var contactUpdate = strictObject({ operation_id: id, person: addressBookPerson });
|
|
8056
8569
|
var contactStateChange = strictObject({ operation_id: id, person_id: id });
|
|
8057
8570
|
var contactImport = strictObject({ operation_id: id, sent: count, recognised: array(addressBookPerson) });
|
|
8058
8571
|
|
|
8059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/conversation.js
|
|
8060
8573
|
var conversation = strictObject({
|
|
8061
8574
|
id,
|
|
8062
8575
|
chat: reference,
|
|
@@ -8071,7 +8584,7 @@ var conversation = strictObject({
|
|
|
8071
8584
|
rules_version: count
|
|
8072
8585
|
});
|
|
8073
8586
|
|
|
8074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8587
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/conversation-preparation.js
|
|
8075
8588
|
var conversationBuild = strictObject({
|
|
8076
8589
|
chat: id,
|
|
8077
8590
|
messages: count,
|
|
@@ -8096,7 +8609,7 @@ var catchUpPreparation = strictObject({
|
|
|
8096
8609
|
prepared: optional(conversationPreparation)
|
|
8097
8610
|
});
|
|
8098
8611
|
|
|
8099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/conversation-results.js
|
|
8100
8613
|
var conversationDetails = union([
|
|
8101
8614
|
strictObject({ ...conversation.entries, messages: array(message) }),
|
|
8102
8615
|
message
|
|
@@ -8186,7 +8699,7 @@ var conversationHit = strictObject({
|
|
|
8186
8699
|
stale: boolean()
|
|
8187
8700
|
});
|
|
8188
8701
|
|
|
8189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/counters.js
|
|
8190
8703
|
var counters = strictObject({
|
|
8191
8704
|
cutoff: time,
|
|
8192
8705
|
max_age_ms: milliseconds,
|
|
@@ -8216,7 +8729,94 @@ var counterRefresh = strictObject({
|
|
|
8216
8729
|
complete: optional(boolean())
|
|
8217
8730
|
});
|
|
8218
8731
|
|
|
8219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/deal.js
|
|
8733
|
+
var nullableText = nullable(text);
|
|
8734
|
+
var party = strictObject({ ref: reference, name: nullableText, owner: boolean() });
|
|
8735
|
+
var outcome = picklist(["open", "won", "lost"]);
|
|
8736
|
+
var crmAccount = nullable(strictObject({ provider: text, account: text }));
|
|
8737
|
+
var day2 = nullable(pipe(string(), regex(/^\d{4}-\d{2}-\d{2}$/)));
|
|
8738
|
+
var deal = strictObject({
|
|
8739
|
+
id,
|
|
8740
|
+
ref: reference,
|
|
8741
|
+
kind: picklist(["deal", "lead"]),
|
|
8742
|
+
title: text,
|
|
8743
|
+
/** One line with the stage, amount and status. */
|
|
8744
|
+
summary: text,
|
|
8745
|
+
pipeline: reference,
|
|
8746
|
+
pipeline_name: text,
|
|
8747
|
+
stage: text,
|
|
8748
|
+
status: outcome,
|
|
8749
|
+
organization: nullable(party),
|
|
8750
|
+
currency: nullableText,
|
|
8751
|
+
amount: nullableText,
|
|
8752
|
+
close_date: day2,
|
|
8753
|
+
closed_date: day2,
|
|
8754
|
+
closed_reason: nullableText,
|
|
8755
|
+
rank: nullable(number()),
|
|
8756
|
+
/** A lead's deal, once it became one. */
|
|
8757
|
+
deal: nullable(reference),
|
|
8758
|
+
/** The CRM account it is a copy from; `null` for the owner's own. */
|
|
8759
|
+
account: crmAccount,
|
|
8760
|
+
external_id: nullableText,
|
|
8761
|
+
/** A CRM copy's assignee, the identity `<account>/user/<id>`. */
|
|
8762
|
+
assignee: nullableText,
|
|
8763
|
+
/** A CRM copy's own fields by code; a list field's value is its option's label, `option_id` its id. */
|
|
8764
|
+
provider_metadata: record(string(), strictObject({
|
|
8765
|
+
label: nullable(string()),
|
|
8766
|
+
value: unknown(),
|
|
8767
|
+
option_id: optional(union([string(), array(string())]))
|
|
8768
|
+
})),
|
|
8769
|
+
people: array(strictObject({ ...party.entries, role: picklist(["owner", "contact", "decision-maker"]) })),
|
|
8770
|
+
author: strictObject({
|
|
8771
|
+
type: picklist(["person", "bot"]),
|
|
8772
|
+
id,
|
|
8773
|
+
name: nullableText,
|
|
8774
|
+
kind: nullable(picklist(["agent", "rule"]))
|
|
8775
|
+
}),
|
|
8776
|
+
model: nullableText,
|
|
8777
|
+
source: text,
|
|
8778
|
+
reason: nullableText,
|
|
8779
|
+
evidence: array(reference),
|
|
8780
|
+
project: nullable(reference),
|
|
8781
|
+
project_name: nullableText,
|
|
8782
|
+
created_at: time,
|
|
8783
|
+
updated_at: time,
|
|
8784
|
+
untrusted
|
|
8785
|
+
});
|
|
8786
|
+
var lead = deal;
|
|
8787
|
+
var pipelineStage = strictObject({
|
|
8788
|
+
name: text,
|
|
8789
|
+
position: count,
|
|
8790
|
+
outcome,
|
|
8791
|
+
external_id: nullableText,
|
|
8792
|
+
/** Open deals or leads in it now. */
|
|
8793
|
+
open: count,
|
|
8794
|
+
/** With a funnel: rows that got this far, and the share of them that reached the next stage. */
|
|
8795
|
+
reached: optional(count),
|
|
8796
|
+
conversion: optional(nullable(number()))
|
|
8797
|
+
});
|
|
8798
|
+
var pipeline = strictObject({
|
|
8799
|
+
id,
|
|
8800
|
+
ref: reference,
|
|
8801
|
+
name: text,
|
|
8802
|
+
kind: picklist(["deal", "lead"]),
|
|
8803
|
+
account: crmAccount,
|
|
8804
|
+
external_id: nullableText,
|
|
8805
|
+
stages: array(pipelineStage),
|
|
8806
|
+
created_at: time,
|
|
8807
|
+
totals: optional(strictObject({ items: count, open: count, won: count, lost: count, win_rate: nullable(number()) })),
|
|
8808
|
+
since: optional(day2),
|
|
8809
|
+
untrusted
|
|
8810
|
+
});
|
|
8811
|
+
var stage = strictObject({
|
|
8812
|
+
...pipelineStage.entries,
|
|
8813
|
+
pipeline: reference,
|
|
8814
|
+
pipeline_name: text,
|
|
8815
|
+
kind: picklist(["deal", "lead"]),
|
|
8816
|
+
untrusted
|
|
8817
|
+
});
|
|
8818
|
+
|
|
8819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/document.js
|
|
8220
8820
|
var document = strictObject({
|
|
8221
8821
|
ref: reference,
|
|
8222
8822
|
id,
|
|
@@ -8231,7 +8831,7 @@ var document = strictObject({
|
|
|
8231
8831
|
owners: optional(array(text))
|
|
8232
8832
|
});
|
|
8233
8833
|
|
|
8234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/document-link.js
|
|
8235
8835
|
var documentLink = strictObject({
|
|
8236
8836
|
ref: reference,
|
|
8237
8837
|
url: text,
|
|
@@ -8242,7 +8842,7 @@ var documentLink = strictObject({
|
|
|
8242
8842
|
sender: strictObject({ id: nullable(id), name: nullable(text) })
|
|
8243
8843
|
});
|
|
8244
8844
|
|
|
8245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/evidence.js
|
|
8246
8846
|
var evidenceMessage = pick(message, ["ref", "chat_title", "timestamp", "sender_name", "text"]);
|
|
8247
8847
|
var contribution = strictObject({
|
|
8248
8848
|
message: evidenceMessage,
|
|
@@ -8272,17 +8872,7 @@ var retentionStay = strictObject({
|
|
|
8272
8872
|
});
|
|
8273
8873
|
var evidence = union([contribution, retentionStay]);
|
|
8274
8874
|
|
|
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
|
-
});
|
|
8875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/fact.js
|
|
8286
8876
|
var fact = strictObject({
|
|
8287
8877
|
ref: reference,
|
|
8288
8878
|
id,
|
|
@@ -8306,17 +8896,15 @@ var fact = strictObject({
|
|
|
8306
8896
|
/** Who recorded it: the owner, or an agent whose fact waits as proposed. */
|
|
8307
8897
|
origin: picklist(["owner", "agent"]),
|
|
8308
8898
|
evidence: array(reference),
|
|
8309
|
-
/** A `payment` fact's fields. */
|
|
8310
|
-
payment: optional(nullable(payment)),
|
|
8311
8899
|
/** With `--sources`: each piece of evidence read back. */
|
|
8312
8900
|
sources: optional(array(evidenceSource)),
|
|
8313
8901
|
created_at: time,
|
|
8314
8902
|
updated_at: time
|
|
8315
8903
|
});
|
|
8316
8904
|
|
|
8317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/hit.js
|
|
8318
8906
|
var hit = strictObject({
|
|
8319
|
-
kind: picklist(["message", "mail", "note", "document", "event", "meeting"]),
|
|
8907
|
+
kind: picklist(["message", "mail", "note", "document", "event", "meeting", "deal", "lead"]),
|
|
8320
8908
|
ref: reference,
|
|
8321
8909
|
provider: text,
|
|
8322
8910
|
url: optional(text),
|
|
@@ -8352,7 +8940,7 @@ var hit = strictObject({
|
|
|
8352
8940
|
untrusted
|
|
8353
8941
|
});
|
|
8354
8942
|
|
|
8355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/identity.js
|
|
8356
8944
|
var identity = strictObject({
|
|
8357
8945
|
ref: reference,
|
|
8358
8946
|
provider: text,
|
|
@@ -8365,7 +8953,7 @@ var identity = strictObject({
|
|
|
8365
8953
|
person: optional(nullable(reference))
|
|
8366
8954
|
});
|
|
8367
8955
|
|
|
8368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/image-embedding.js
|
|
8369
8957
|
var imageEmbedding = strictObject({
|
|
8370
8958
|
model: text,
|
|
8371
8959
|
embedded: count,
|
|
@@ -8374,13 +8962,13 @@ var imageEmbedding = strictObject({
|
|
|
8374
8962
|
more: boolean()
|
|
8375
8963
|
});
|
|
8376
8964
|
|
|
8377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
|
|
8378
8966
|
import { spawn } from "node:child_process";
|
|
8379
8967
|
import { randomBytes as randomBytes2 } from "node:crypto";
|
|
8380
|
-
import { closeSync, existsSync as
|
|
8381
|
-
import { dirname as dirname2, join as
|
|
8968
|
+
import { closeSync, existsSync as existsSync5, mkdirSync as mkdirSync3, openSync, readdirSync as readdirSync4, readFileSync as readFileSync5, realpathSync, rmSync as rmSync3 } from "node:fs";
|
|
8969
|
+
import { dirname as dirname2, join as join5 } from "node:path";
|
|
8382
8970
|
|
|
8383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8971
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/background/checkpoints.js
|
|
8384
8972
|
var progressOf = /* @__PURE__ */ __name((input) => {
|
|
8385
8973
|
const total = input.total ?? null;
|
|
8386
8974
|
const updated = input.updatedAt ?? null;
|
|
@@ -8396,7 +8984,7 @@ var progressOf = /* @__PURE__ */ __name((input) => {
|
|
|
8396
8984
|
};
|
|
8397
8985
|
}, "progressOf");
|
|
8398
8986
|
|
|
8399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/runs/record-log.js
|
|
8400
8988
|
var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) => {
|
|
8401
8989
|
const run = currentRun();
|
|
8402
8990
|
const trace = traceId ?? run.traceId;
|
|
@@ -8410,7 +8998,7 @@ var recordLogFor = /* @__PURE__ */ __name((to, app, { traceId, command } = {}) =
|
|
|
8410
8998
|
}));
|
|
8411
8999
|
}, "recordLogFor");
|
|
8412
9000
|
|
|
8413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9001
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/backfill-jobs.js
|
|
8414
9002
|
var JOB_STATES = ["running", "done", "partial", "failed", "cancelled", "died"];
|
|
8415
9003
|
var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
8416
9004
|
const out = openSync(log, "a", 384);
|
|
@@ -8426,23 +9014,23 @@ var spawnDetached = /* @__PURE__ */ __name((argv, env, log) => {
|
|
|
8426
9014
|
closeSync(out);
|
|
8427
9015
|
}
|
|
8428
9016
|
}, "spawnDetached");
|
|
8429
|
-
var jobsDir = /* @__PURE__ */ __name((app, env) =>
|
|
8430
|
-
var jobPath = /* @__PURE__ */ __name((dir, id6) =>
|
|
9017
|
+
var jobsDir = /* @__PURE__ */ __name((app, env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "backfill"), "jobsDir");
|
|
9018
|
+
var jobPath = /* @__PURE__ */ __name((dir, id6) => join5(dir, `${id6}.json`), "jobPath");
|
|
8431
9019
|
var saveJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
8432
9020
|
mkdirSync3(dir, { recursive: true, mode: 448 });
|
|
8433
9021
|
writeSecurely(jobPath(dir, job2.id), `${JSON.stringify(job2, null, 2)}
|
|
8434
9022
|
`, 384);
|
|
8435
9023
|
}, "saveJob");
|
|
8436
9024
|
var readJob = /* @__PURE__ */ __name((dir, id6) => {
|
|
8437
|
-
if (!/^[\w-]+$/.test(id6) || !
|
|
9025
|
+
if (!/^[\w-]+$/.test(id6) || !existsSync5(jobPath(dir, id6)))
|
|
8438
9026
|
return void 0;
|
|
8439
9027
|
try {
|
|
8440
|
-
return JSON.parse(
|
|
9028
|
+
return JSON.parse(readFileSync5(jobPath(dir, id6), "utf8"));
|
|
8441
9029
|
} catch {
|
|
8442
9030
|
return void 0;
|
|
8443
9031
|
}
|
|
8444
9032
|
}, "readJob");
|
|
8445
|
-
var recordsPath = /* @__PURE__ */ __name((dir, id6) =>
|
|
9033
|
+
var recordsPath = /* @__PURE__ */ __name((dir, id6) => join5(dir, `${id6}.jsonl`), "recordsPath");
|
|
8446
9034
|
var tracedJob = /* @__PURE__ */ __name((env) => {
|
|
8447
9035
|
const trace = childTrace();
|
|
8448
9036
|
return { env: { ...env, TRACEPARENT: trace.traceparent }, traceId: trace.traceId };
|
|
@@ -8460,11 +9048,11 @@ var finishJob = /* @__PURE__ */ __name((app, dir, id6, change) => {
|
|
|
8460
9048
|
const job2 = readJob(dir, id6);
|
|
8461
9049
|
if (!job2)
|
|
8462
9050
|
return;
|
|
8463
|
-
const
|
|
9051
|
+
const outcome4 = stateOf(job2);
|
|
8464
9052
|
recordLogFor(recordsPath(dir, id6), app, job2.traceId ? { traceId: job2.traceId } : {})[job2.error ? "error" : "info"]({
|
|
8465
9053
|
event: "job.exit",
|
|
8466
9054
|
job: id6,
|
|
8467
|
-
outcome:
|
|
9055
|
+
outcome: outcome4,
|
|
8468
9056
|
...job2.error ? { errorCode: job2.error.code } : {}
|
|
8469
9057
|
});
|
|
8470
9058
|
}, "finishJob");
|
|
@@ -8479,7 +9067,7 @@ var removeJob = /* @__PURE__ */ __name((dir, job2) => {
|
|
|
8479
9067
|
if (dirname2(job2.log) === dir)
|
|
8480
9068
|
rmSync3(job2.log, { force: true });
|
|
8481
9069
|
}, "removeJob");
|
|
8482
|
-
var listJobs = /* @__PURE__ */ __name((dir) =>
|
|
9070
|
+
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
9071
|
var jobDetails = /* @__PURE__ */ __name((job2) => ({
|
|
8484
9072
|
job: job2.id,
|
|
8485
9073
|
profile: job2.profile,
|
|
@@ -8545,7 +9133,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
8545
9133
|
const startedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
8546
9134
|
const id6 = `${startedAt.replace(/[-:]/g, "").slice(0, 15)}-${randomBytes2(3).toString("hex")}`;
|
|
8547
9135
|
mkdirSync3(dir, { recursive: true, mode: 448 });
|
|
8548
|
-
const log =
|
|
9136
|
+
const log = join5(dir, `${id6}.log`);
|
|
8549
9137
|
const job2 = {
|
|
8550
9138
|
id: id6,
|
|
8551
9139
|
chat: input.chat,
|
|
@@ -8565,7 +9153,7 @@ var startArchiveJob = /* @__PURE__ */ __name((app, env, profile, input, spawnJob
|
|
|
8565
9153
|
return { job: id6, pid, chat: input.chat, log };
|
|
8566
9154
|
}, "startArchiveJob");
|
|
8567
9155
|
|
|
8568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/job.js
|
|
8569
9157
|
var problem = strictObject({ code: text, message: text });
|
|
8570
9158
|
var job = strictObject({
|
|
8571
9159
|
id,
|
|
@@ -8588,7 +9176,7 @@ var job = strictObject({
|
|
|
8588
9176
|
error: optional(problem)
|
|
8589
9177
|
});
|
|
8590
9178
|
|
|
8591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/join-request.js
|
|
8592
9180
|
var joinRequest = strictObject({
|
|
8593
9181
|
person_id: id,
|
|
8594
9182
|
name: nullable(text),
|
|
@@ -8599,7 +9187,7 @@ var joinRequest = strictObject({
|
|
|
8599
9187
|
about: optional(text)
|
|
8600
9188
|
});
|
|
8601
9189
|
|
|
8602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/list-results.js
|
|
8603
9191
|
var botProfile = strictObject({
|
|
8604
9192
|
name: text,
|
|
8605
9193
|
token: text,
|
|
@@ -8630,6 +9218,10 @@ var scheduledJob = strictObject({
|
|
|
8630
9218
|
name: text,
|
|
8631
9219
|
kind: picklist(["command", "agent"]),
|
|
8632
9220
|
when: text,
|
|
9221
|
+
/** When a finished run shows a desktop notice: `always`, `failures` or `never`; the default is shown, not left out. */
|
|
9222
|
+
notify: optional(picklist(["always", "failures", "never"])),
|
|
9223
|
+
/** Where a run's result is sent after it: `telegram-bot:<profile>/<chat>` or `email:<profile>/<address>`. */
|
|
9224
|
+
deliver_to: optional(array(text)),
|
|
8633
9225
|
last: nullable(strictObject({
|
|
8634
9226
|
at: time,
|
|
8635
9227
|
exit_code: number(),
|
|
@@ -8638,8 +9230,29 @@ var scheduledJob = strictObject({
|
|
|
8638
9230
|
reason: optional(text),
|
|
8639
9231
|
error_code: optional(text),
|
|
8640
9232
|
failing_since: optional(time),
|
|
8641
|
-
failures: optional(number())
|
|
8642
|
-
|
|
9233
|
+
failures: optional(number()),
|
|
9234
|
+
cost_usd: optional(number()),
|
|
9235
|
+
/** The last time a run did not start, and why: the day's cost cap, or too little new mail. */
|
|
9236
|
+
skipped: optional(strictObject({
|
|
9237
|
+
at: time,
|
|
9238
|
+
why: text,
|
|
9239
|
+
/** A dotted id for `why`, so a client can translate it: `cost.day-cap`, `mail.none-new`, `mail.below-threshold`. */
|
|
9240
|
+
reason: optional(pipe(text, regex(/^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/)))
|
|
9241
|
+
})),
|
|
9242
|
+
/** How the run's result went along each route; `reason` a dotted id, `error` the sending CLI's code and reason id. */
|
|
9243
|
+
deliveries: optional(array(strictObject({
|
|
9244
|
+
to: text,
|
|
9245
|
+
ok: boolean(),
|
|
9246
|
+
reason: optional(pipe(text, regex(/^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/))),
|
|
9247
|
+
error: optional(text)
|
|
9248
|
+
})))
|
|
9249
|
+
})),
|
|
9250
|
+
/** Agent schedules: what today's runs cost, in US dollars. */
|
|
9251
|
+
spent_today_usd: optional(number()),
|
|
9252
|
+
/** Agent schedules: the cap on one run (`--max-cost`), null when none. */
|
|
9253
|
+
max_cost_usd: optional(nullable(number())),
|
|
9254
|
+
/** Agent schedules: the daily cap in force, the schedule's `--max-cost-per-day` or the config's; 0 for none. */
|
|
9255
|
+
max_cost_per_day_usd: optional(number())
|
|
8643
9256
|
});
|
|
8644
9257
|
var botTemplate = strictObject({
|
|
8645
9258
|
name: nullable(text),
|
|
@@ -8667,7 +9280,7 @@ var stickerInventory = strictObject({
|
|
|
8667
9280
|
url: optional(nullable(text))
|
|
8668
9281
|
});
|
|
8669
9282
|
|
|
8670
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/poll-vote.js
|
|
8671
9284
|
var pollVote = strictObject({
|
|
8672
9285
|
person_id: id,
|
|
8673
9286
|
name: nullable(text),
|
|
@@ -8677,7 +9290,7 @@ var pollVote = strictObject({
|
|
|
8677
9290
|
voted_at: time
|
|
8678
9291
|
});
|
|
8679
9292
|
|
|
8680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/listener.js
|
|
8681
9294
|
var reactions = unwrap(unwrap(message.entries.reactions));
|
|
8682
9295
|
var observation = strictObject({
|
|
8683
9296
|
value: pipe(number(), minValue(0)),
|
|
@@ -8719,7 +9332,166 @@ var serveSummary = strictObject({
|
|
|
8719
9332
|
tasks: optional(strictObject({ added: count, closed: count, review: count }))
|
|
8720
9333
|
});
|
|
8721
9334
|
|
|
8722
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/mail-counts.js
|
|
9336
|
+
var mailCounts = strictObject({
|
|
9337
|
+
by: picklist(["day", "week", "sender"]),
|
|
9338
|
+
received: count,
|
|
9339
|
+
sent: count,
|
|
9340
|
+
rows: array(strictObject({
|
|
9341
|
+
/** `YYYY-MM-DD`, or the sender's address. */
|
|
9342
|
+
key: text,
|
|
9343
|
+
name: nullable(text),
|
|
9344
|
+
received: count,
|
|
9345
|
+
/** Always 0 by sender: the owner sends that mail. */
|
|
9346
|
+
sent: count
|
|
9347
|
+
}))
|
|
9348
|
+
});
|
|
9349
|
+
|
|
9350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/mail-findings.js
|
|
9351
|
+
var evidence2 = strictObject({ reference, fingerprint: text });
|
|
9352
|
+
var base = { id, evidence: array(evidence2) };
|
|
9353
|
+
var finding = variant("kind", [
|
|
9354
|
+
strictObject({
|
|
9355
|
+
...base,
|
|
9356
|
+
kind: literal("task"),
|
|
9357
|
+
project: optional(reference),
|
|
9358
|
+
type: picklist(WORK_TASK_TYPES),
|
|
9359
|
+
title: text,
|
|
9360
|
+
reason: text,
|
|
9361
|
+
commitment: picklist(["explicit", "inferred"]),
|
|
9362
|
+
due_at: optional(time),
|
|
9363
|
+
due_evidence: optional(array(reference)),
|
|
9364
|
+
assignee: optional(reference),
|
|
9365
|
+
assignee_evidence: optional(array(reference)),
|
|
9366
|
+
/** `<service>:<id>` in the outside service the mail came from, such as `avito:4512345678`. */
|
|
9367
|
+
external_id: optional(text),
|
|
9368
|
+
/** The http or https page the task is about, such as the conversation the mail links to. */
|
|
9369
|
+
source_url: optional(text)
|
|
9370
|
+
}),
|
|
9371
|
+
strictObject({
|
|
9372
|
+
...base,
|
|
9373
|
+
kind: literal("fact"),
|
|
9374
|
+
project: optional(reference),
|
|
9375
|
+
subject: optional(reference),
|
|
9376
|
+
type: picklist(FACT_TYPES),
|
|
9377
|
+
statement: text,
|
|
9378
|
+
/** Every new finding gives one; a batch staged before reason was needed on every kind has none. */
|
|
9379
|
+
reason: optional(text)
|
|
9380
|
+
}),
|
|
9381
|
+
strictObject({
|
|
9382
|
+
...base,
|
|
9383
|
+
kind: literal("task_update"),
|
|
9384
|
+
task: reference,
|
|
9385
|
+
change: picklist(["close", "due", "detail"]),
|
|
9386
|
+
due_at: optional(time),
|
|
9387
|
+
detail: optional(text),
|
|
9388
|
+
reason: text
|
|
9389
|
+
}),
|
|
9390
|
+
strictObject({
|
|
9391
|
+
...base,
|
|
9392
|
+
kind: literal("memory"),
|
|
9393
|
+
memory_kind: picklist(MEMORY_KINDS),
|
|
9394
|
+
scope: picklist(MEMORY_SCOPES),
|
|
9395
|
+
body: text,
|
|
9396
|
+
subject: optional(reference),
|
|
9397
|
+
project: optional(reference),
|
|
9398
|
+
reason: optional(text)
|
|
9399
|
+
}),
|
|
9400
|
+
strictObject({ ...base, kind: literal("link"), from: reference, to: reference, reason: text }),
|
|
9401
|
+
strictObject({ ...base, kind: literal("new_contact"), address: text, name: text, reason: optional(text) }),
|
|
9402
|
+
strictObject({
|
|
9403
|
+
...base,
|
|
9404
|
+
kind: literal("invoice"),
|
|
9405
|
+
direction: picklist(INVOICE_DIRECTIONS),
|
|
9406
|
+
counterparty: optional(reference),
|
|
9407
|
+
/** A counterparty the store may not hold yet; the owner's accept finds its organization or makes one. */
|
|
9408
|
+
counterparty_name: optional(text),
|
|
9409
|
+
counterparty_email: optional(text),
|
|
9410
|
+
currency: text,
|
|
9411
|
+
lines: array(strictObject({
|
|
9412
|
+
description: text,
|
|
9413
|
+
quantity: optional(text),
|
|
9414
|
+
unit_price: optional(text),
|
|
9415
|
+
amount: optional(text)
|
|
9416
|
+
})),
|
|
9417
|
+
total: optional(text),
|
|
9418
|
+
number: optional(text),
|
|
9419
|
+
issue_date: optional(text),
|
|
9420
|
+
due_date: optional(text),
|
|
9421
|
+
project: optional(reference),
|
|
9422
|
+
reason: text
|
|
9423
|
+
}),
|
|
9424
|
+
strictObject({
|
|
9425
|
+
...base,
|
|
9426
|
+
kind: literal("payment"),
|
|
9427
|
+
direction: picklist(MONEY_DIRECTIONS),
|
|
9428
|
+
payer: optional(reference),
|
|
9429
|
+
payer_name: optional(text),
|
|
9430
|
+
payer_email: optional(text),
|
|
9431
|
+
payee: optional(reference),
|
|
9432
|
+
payee_name: optional(text),
|
|
9433
|
+
payee_email: optional(text),
|
|
9434
|
+
amount: text,
|
|
9435
|
+
currency: text,
|
|
9436
|
+
date: text,
|
|
9437
|
+
reference: optional(text),
|
|
9438
|
+
allocations: optional(array(strictObject({ invoice: reference, amount: text }))),
|
|
9439
|
+
project: optional(reference),
|
|
9440
|
+
reason: text
|
|
9441
|
+
}),
|
|
9442
|
+
strictObject({
|
|
9443
|
+
...base,
|
|
9444
|
+
kind: literal("order"),
|
|
9445
|
+
purpose: picklist(ORDER_PURPOSES),
|
|
9446
|
+
customer: optional(reference),
|
|
9447
|
+
customer_name: optional(text),
|
|
9448
|
+
customer_email: optional(text),
|
|
9449
|
+
supplier: optional(reference),
|
|
9450
|
+
supplier_name: text,
|
|
9451
|
+
number: optional(text),
|
|
9452
|
+
total: optional(text),
|
|
9453
|
+
currency: optional(text),
|
|
9454
|
+
status: optional(picklist(ORDER_STATUSES)),
|
|
9455
|
+
order_date: optional(text),
|
|
9456
|
+
fulfilled_date: optional(text),
|
|
9457
|
+
invoice: optional(reference),
|
|
9458
|
+
payment: optional(reference),
|
|
9459
|
+
project: optional(reference),
|
|
9460
|
+
/** The order's page at the shop, http or https. */
|
|
9461
|
+
source_url: optional(text),
|
|
9462
|
+
reason: text
|
|
9463
|
+
}),
|
|
9464
|
+
strictObject({
|
|
9465
|
+
...base,
|
|
9466
|
+
kind: literal("order_update"),
|
|
9467
|
+
supplier_name: text,
|
|
9468
|
+
number: text,
|
|
9469
|
+
status: picklist(ORDER_STATUSES),
|
|
9470
|
+
date: optional(text),
|
|
9471
|
+
reason: text
|
|
9472
|
+
})
|
|
9473
|
+
]);
|
|
9474
|
+
var outcome2 = strictObject({
|
|
9475
|
+
id,
|
|
9476
|
+
fingerprint: text,
|
|
9477
|
+
status: picklist(["accepted", "rejected"]),
|
|
9478
|
+
reference: nullable(reference),
|
|
9479
|
+
reused: boolean()
|
|
9480
|
+
});
|
|
9481
|
+
var mailFindings = strictObject({
|
|
9482
|
+
id,
|
|
9483
|
+
account: strictObject({ provider: text, account: text }),
|
|
9484
|
+
input: strictObject({ schema_version: literal(1), key: text, extractor: text, findings: array(finding) }),
|
|
9485
|
+
fingerprint: text,
|
|
9486
|
+
status: picklist(["proposed", "reviewed"]),
|
|
9487
|
+
author,
|
|
9488
|
+
decided_by: nullable(strictObject({ type: picklist(["person", "bot"]), id })),
|
|
9489
|
+
decided_at: nullable(time),
|
|
9490
|
+
previous: array(outcome2),
|
|
9491
|
+
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome2) }))
|
|
9492
|
+
});
|
|
9493
|
+
|
|
9494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/media-archive.js
|
|
8723
9495
|
var mediaArchive = strictObject({
|
|
8724
9496
|
directory: text,
|
|
8725
9497
|
chats: count,
|
|
@@ -8751,7 +9523,7 @@ var mediaArchiveTimer = union([
|
|
|
8751
9523
|
strictObject({ ...timer, action: picklist(["install", "start", "stop", "uninstall"]) })
|
|
8752
9524
|
]);
|
|
8753
9525
|
|
|
8754
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9526
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation-parts.js
|
|
8755
9527
|
var preparationId = pipe(string(), minLength(1));
|
|
8756
9528
|
var preparationCount = pipe(number(), integer(), minValue(0));
|
|
8757
9529
|
var preparationTime = nullable(isoTime);
|
|
@@ -8843,7 +9615,7 @@ var preparationMeeting = strictObject({
|
|
|
8843
9615
|
updated_at: isoTime
|
|
8844
9616
|
});
|
|
8845
9617
|
|
|
8846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9618
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/meeting-evidence.js
|
|
8847
9619
|
var meetingEvidence = preparationEvidence;
|
|
8848
9620
|
var meetingPersonContext = strictObject({
|
|
8849
9621
|
person: strictObject({ uid: string(), name: nullable(string()) }),
|
|
@@ -8865,13 +9637,13 @@ var meetingPersonContext = strictObject({
|
|
|
8865
9637
|
})
|
|
8866
9638
|
});
|
|
8867
9639
|
|
|
8868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8869
|
-
var
|
|
8870
|
-
var
|
|
8871
|
-
var
|
|
8872
|
-
strictObject({ ...
|
|
9640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/meeting-findings.js
|
|
9641
|
+
var evidence3 = strictObject({ reference, fingerprint: text });
|
|
9642
|
+
var base2 = { id, project: reference, evidence: array(evidence3) };
|
|
9643
|
+
var finding2 = variant("kind", [
|
|
9644
|
+
strictObject({ ...base2, kind: literal("fact"), type: picklist(FACT_TYPES), statement: text }),
|
|
8873
9645
|
strictObject({
|
|
8874
|
-
...
|
|
9646
|
+
...base2,
|
|
8875
9647
|
kind: literal("task"),
|
|
8876
9648
|
type: picklist(WORK_TASK_TYPES),
|
|
8877
9649
|
title: text,
|
|
@@ -8883,7 +9655,7 @@ var finding = variant("kind", [
|
|
|
8883
9655
|
assignee_evidence: optional(array(reference))
|
|
8884
9656
|
})
|
|
8885
9657
|
]);
|
|
8886
|
-
var
|
|
9658
|
+
var outcome3 = strictObject({
|
|
8887
9659
|
id,
|
|
8888
9660
|
fingerprint: text,
|
|
8889
9661
|
status: picklist(["accepted", "rejected"]),
|
|
@@ -8893,17 +9665,17 @@ var outcome = strictObject({
|
|
|
8893
9665
|
var meetingFindings = strictObject({
|
|
8894
9666
|
id,
|
|
8895
9667
|
account: strictObject({ provider: text, account: text }),
|
|
8896
|
-
input: strictObject({ schema_version: literal(1), key: text, extractor: text, findings: array(
|
|
9668
|
+
input: strictObject({ schema_version: literal(1), key: text, extractor: text, findings: array(finding2) }),
|
|
8897
9669
|
fingerprint: text,
|
|
8898
9670
|
status: picklist(["proposed", "reviewed"]),
|
|
8899
9671
|
author,
|
|
8900
9672
|
decided_by: nullable(strictObject({ type: picklist(["person", "bot"]), id })),
|
|
8901
9673
|
decided_at: nullable(time),
|
|
8902
|
-
previous: array(
|
|
8903
|
-
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(
|
|
9674
|
+
previous: array(outcome3),
|
|
9675
|
+
receipt: nullable(strictObject({ preview_fingerprint: text, accepted: array(id), items: array(outcome3) }))
|
|
8904
9676
|
});
|
|
8905
9677
|
|
|
8906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/meeting-communications.js
|
|
8907
9679
|
var communicationCoverage = strictObject({
|
|
8908
9680
|
read_usage: strictObject({ reads: preparationCount, charged_bytes: preparationCount, reserved_bytes: preparationCount, remaining_bytes: preparationCount }),
|
|
8909
9681
|
query: string(),
|
|
@@ -8948,7 +9720,7 @@ var preparationCommunications = strictObject({
|
|
|
8948
9720
|
}))
|
|
8949
9721
|
});
|
|
8950
9722
|
|
|
8951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9723
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/meeting-preparation.js
|
|
8952
9724
|
var meetingPreparation = strictObject({
|
|
8953
9725
|
communications: optional(preparationCommunications),
|
|
8954
9726
|
schema_version: literal(1),
|
|
@@ -9061,7 +9833,7 @@ var meetingPreparation = strictObject({
|
|
|
9061
9833
|
})
|
|
9062
9834
|
});
|
|
9063
9835
|
|
|
9064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/meeting-project-candidates.js
|
|
9065
9837
|
var count4 = pipe(number(), integer(), minValue(0));
|
|
9066
9838
|
var id3 = pipe(string(), minLength(1));
|
|
9067
9839
|
var text3 = string();
|
|
@@ -9125,7 +9897,7 @@ var meetingProjectCandidates = strictObject({
|
|
|
9125
9897
|
})
|
|
9126
9898
|
});
|
|
9127
9899
|
|
|
9128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/meeting-series-inventory.js
|
|
9129
9901
|
var count5 = pipe(number(), integer(), minValue(0));
|
|
9130
9902
|
var id4 = pipe(string(), minLength(1), maxLength(1e3));
|
|
9131
9903
|
var meetingSeriesInventory = strictObject({
|
|
@@ -9155,7 +9927,7 @@ var meetingSeriesInventory = strictObject({
|
|
|
9155
9927
|
})
|
|
9156
9928
|
});
|
|
9157
9929
|
|
|
9158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/meeting-task-proposal.js
|
|
9159
9931
|
var text4 = string();
|
|
9160
9932
|
var id5 = pipe(number(), integer(), minValue(1));
|
|
9161
9933
|
var revision = picklist(["current", "superseded"]);
|
|
@@ -9172,7 +9944,7 @@ var meetingTaskProposal = strictObject({
|
|
|
9172
9944
|
persistence: literal("proposal-only")
|
|
9173
9945
|
});
|
|
9174
9946
|
|
|
9175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/memory.js
|
|
9176
9948
|
var memory = strictObject({
|
|
9177
9949
|
ref: reference,
|
|
9178
9950
|
id,
|
|
@@ -9199,7 +9971,7 @@ var memory = strictObject({
|
|
|
9199
9971
|
updated_at: time
|
|
9200
9972
|
});
|
|
9201
9973
|
|
|
9202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/mention.js
|
|
9203
9975
|
var kind = picklist(["phone", "email", "url", "document", "person-name", "place"]);
|
|
9204
9976
|
var status = picklist(["found", "linked", "dismissed"]);
|
|
9205
9977
|
var mention = strictObject({
|
|
@@ -9242,13 +10014,13 @@ var mentionRebuild = strictObject({
|
|
|
9242
10014
|
mentions: count
|
|
9243
10015
|
});
|
|
9244
10016
|
|
|
9245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/message-change.js
|
|
9246
10018
|
var operated3 = { operation_id: id, chat_id: id };
|
|
9247
10019
|
var messagePin = strictObject({ ...operated3, message_id: id, pinned: boolean() });
|
|
9248
10020
|
var messageStar = strictObject({ ...operated3, message_id: id, starred: boolean() });
|
|
9249
10021
|
var messageDeletion = strictObject({ ...operated3, deleted: array(id), for_everyone: boolean() });
|
|
9250
10022
|
|
|
9251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/message-read.js
|
|
9252
10024
|
var messageTranscript = strictObject({
|
|
9253
10025
|
message_id: id,
|
|
9254
10026
|
text,
|
|
@@ -9306,7 +10078,7 @@ var evidencePacket = strictObject({
|
|
|
9306
10078
|
}))
|
|
9307
10079
|
});
|
|
9308
10080
|
|
|
9309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/message-context.js
|
|
9310
10082
|
var messageThread = strictObject({
|
|
9311
10083
|
ref: reference,
|
|
9312
10084
|
chat: id,
|
|
@@ -9323,7 +10095,7 @@ var messageThread = strictObject({
|
|
|
9323
10095
|
});
|
|
9324
10096
|
var messageContext = union([message, messageThread]);
|
|
9325
10097
|
|
|
9326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/message-counts.js
|
|
9327
10099
|
var messageCounts = strictObject({
|
|
9328
10100
|
by: picklist(["chat", "sender", "day", "hour"]),
|
|
9329
10101
|
total: count,
|
|
@@ -9336,7 +10108,7 @@ var messageCounts = strictObject({
|
|
|
9336
10108
|
}))
|
|
9337
10109
|
});
|
|
9338
10110
|
|
|
9339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/message-link.js
|
|
9340
10112
|
var messageLink = strictObject({
|
|
9341
10113
|
ref: reference,
|
|
9342
10114
|
url: nullable(text),
|
|
@@ -9353,7 +10125,7 @@ var messageLink = strictObject({
|
|
|
9353
10125
|
})))
|
|
9354
10126
|
});
|
|
9355
10127
|
|
|
9356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10128
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/message-transfer.js
|
|
9357
10129
|
var savedMessageFile = strictObject({
|
|
9358
10130
|
kind: text,
|
|
9359
10131
|
path: text,
|
|
@@ -9440,7 +10212,7 @@ var messageSyncAll = strictObject({
|
|
|
9440
10212
|
var messageSyncStarted = strictObject({ job: id, pid: count, chat: text, log: text });
|
|
9441
10213
|
var messageSync = union([messageSyncEstimate, messageSyncChat, messageSyncAll, messageSyncStarted]);
|
|
9442
10214
|
|
|
9443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/message-write.js
|
|
9444
10216
|
var messageWrite = strictObject({
|
|
9445
10217
|
operation_id: id,
|
|
9446
10218
|
message,
|
|
@@ -9455,7 +10227,7 @@ var draftWrite = strictObject({
|
|
|
9455
10227
|
});
|
|
9456
10228
|
var messageSend = union([messageWrite, draftWrite]);
|
|
9457
10229
|
|
|
9458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/model.js
|
|
9459
10231
|
var model2 = strictObject({
|
|
9460
10232
|
id,
|
|
9461
10233
|
kind: picklist(["audio", "text", "image", "reranker"]),
|
|
@@ -9472,7 +10244,7 @@ var model2 = strictObject({
|
|
|
9472
10244
|
path: text
|
|
9473
10245
|
});
|
|
9474
10246
|
|
|
9475
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/model-key.js
|
|
9476
10248
|
var source = picklist(["environment", "keyring", "file"]);
|
|
9477
10249
|
var modelKey = strictObject({
|
|
9478
10250
|
provider: text,
|
|
@@ -9482,7 +10254,7 @@ var modelKey = strictObject({
|
|
|
9482
10254
|
var storedModelKey = strictObject({ ...omit(modelKey, ["removed"]).entries, stored: source });
|
|
9483
10255
|
var removedModelKey = strictObject({ ...omit(modelKey, ["stored"]).entries, removed: array(source) });
|
|
9484
10256
|
|
|
9485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/official-stats.js
|
|
9486
10258
|
var versus = strictObject({ current: number(), previous: number() });
|
|
9487
10259
|
var person = { person_ref: reference, name: nullable(text) };
|
|
9488
10260
|
var graph = strictObject({
|
|
@@ -9516,14 +10288,14 @@ var officialStats = strictObject({
|
|
|
9516
10288
|
graphs: record(string(), union([graph, strictObject({ error: text })]))
|
|
9517
10289
|
});
|
|
9518
10290
|
|
|
9519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/person.js
|
|
9520
10292
|
var person2 = strictObject({
|
|
9521
10293
|
ref: reference,
|
|
9522
10294
|
name: nullable(text),
|
|
9523
10295
|
identities: optional(array(identity))
|
|
9524
10296
|
});
|
|
9525
10297
|
|
|
9526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/poll.js
|
|
9527
10299
|
var poll = strictObject({
|
|
9528
10300
|
chat_id: id,
|
|
9529
10301
|
message_id: id,
|
|
@@ -9539,11 +10311,11 @@ var poll = strictObject({
|
|
|
9539
10311
|
});
|
|
9540
10312
|
var pollChange = strictObject({ operation_id: id, poll });
|
|
9541
10313
|
|
|
9542
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/private-contact.js
|
|
9543
10315
|
var contactAlias = strictObject({ person_id: id, alias: nullable(text) });
|
|
9544
10316
|
var contactNoteRemoval = strictObject({ id, person_id: id, removed: boolean() });
|
|
9545
10317
|
|
|
9546
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10318
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/ranking.js
|
|
9547
10319
|
var figures = record(string(), number());
|
|
9548
10320
|
var freshness = picklist(["fresh", "stale", "partial", "unknown"]);
|
|
9549
10321
|
var rankingRow = strictObject({
|
|
@@ -9590,7 +10362,7 @@ var ranking = strictObject({
|
|
|
9590
10362
|
rows: array(rankingRow)
|
|
9591
10363
|
});
|
|
9592
10364
|
|
|
9593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/reaction.js
|
|
9594
10366
|
var reaction = strictObject({
|
|
9595
10367
|
person: strictObject({ id, name: nullable(text), username: nullable(text) }),
|
|
9596
10368
|
/** The emoji, or `custom:<id>` for a custom one. */
|
|
@@ -9598,7 +10370,7 @@ var reaction = strictObject({
|
|
|
9598
10370
|
reacted_at: time
|
|
9599
10371
|
});
|
|
9600
10372
|
|
|
9601
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/reaction-change.js
|
|
9602
10374
|
var reactionChange = strictObject({
|
|
9603
10375
|
operation_id: id,
|
|
9604
10376
|
chat_id: id,
|
|
@@ -9606,7 +10378,7 @@ var reactionChange = strictObject({
|
|
|
9606
10378
|
reaction: nullable(text)
|
|
9607
10379
|
});
|
|
9608
10380
|
|
|
9609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/recipient.js
|
|
9610
10382
|
var recipient = strictObject({ id, title: nullable(text), partner_id: optional(id), added_at: time });
|
|
9611
10383
|
var recipientAdded = strictObject({ id, title: nullable(text), added: boolean() });
|
|
9612
10384
|
var recipientRemoved = strictObject({ id, title: nullable(text), removed: boolean() });
|
|
@@ -9617,7 +10389,7 @@ var recipientChange = strictObject({
|
|
|
9617
10389
|
...partial(recipientOff).entries
|
|
9618
10390
|
});
|
|
9619
10391
|
|
|
9620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/recorded-run.js
|
|
9621
10393
|
var events = array(record(string(), unknown()));
|
|
9622
10394
|
var recordedRun = strictObject({
|
|
9623
10395
|
run_id: id,
|
|
@@ -9689,7 +10461,7 @@ var runHit = strictObject({
|
|
|
9689
10461
|
});
|
|
9690
10462
|
var runLocation = strictObject({ path: text });
|
|
9691
10463
|
|
|
9692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/relationship.js
|
|
9693
10465
|
var relationship = strictObject({
|
|
9694
10466
|
id,
|
|
9695
10467
|
from: reference,
|
|
@@ -9706,7 +10478,24 @@ var relationship = strictObject({
|
|
|
9706
10478
|
created_at: time
|
|
9707
10479
|
});
|
|
9708
10480
|
|
|
9709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/reply-stats.js
|
|
10482
|
+
var milliseconds2 = nullable(pipe(number(), minValue(0)));
|
|
10483
|
+
var figures2 = { replies: count, median_ms: milliseconds2, p90_ms: milliseconds2, mean_ms: milliseconds2 };
|
|
10484
|
+
var responseTimes = strictObject({
|
|
10485
|
+
who: picklist(["me", "others"]),
|
|
10486
|
+
...figures2,
|
|
10487
|
+
buckets: strictObject({ under_5m: count, under_1h: count, under_1d: count, over_1d: count }),
|
|
10488
|
+
/** One row per calendar day of the reply; empty with `--by total`. */
|
|
10489
|
+
rows: array(strictObject({ key: text, ...figures2 }))
|
|
10490
|
+
});
|
|
10491
|
+
var waitingChats = strictObject({
|
|
10492
|
+
chats: count,
|
|
10493
|
+
messages: count,
|
|
10494
|
+
oldest_at: nullable(time),
|
|
10495
|
+
by_kind: strictObject({ private: count, group: count })
|
|
10496
|
+
});
|
|
10497
|
+
|
|
10498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/retention.js
|
|
9710
10499
|
var retentionCohort = strictObject({
|
|
9711
10500
|
/** The first day of the joining day or week. */
|
|
9712
10501
|
cohort: text,
|
|
@@ -9754,7 +10543,7 @@ var retention = strictObject({
|
|
|
9754
10543
|
rows: array(retentionCohort)
|
|
9755
10544
|
});
|
|
9756
10545
|
|
|
9757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/saved-search.js
|
|
9758
10547
|
var savedSearch = strictObject({
|
|
9759
10548
|
id,
|
|
9760
10549
|
/** `null` for a run in the history. */
|
|
@@ -9771,7 +10560,7 @@ var savedSearch = strictObject({
|
|
|
9771
10560
|
});
|
|
9772
10561
|
var searchHistoryClear = strictObject({ cleared: count });
|
|
9773
10562
|
|
|
9774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/send-attempt.js
|
|
9775
10564
|
var sendAttempt = strictObject({
|
|
9776
10565
|
at: time,
|
|
9777
10566
|
profile: text,
|
|
@@ -9799,7 +10588,7 @@ var sendAttempt = strictObject({
|
|
|
9799
10588
|
error_code: optional(text)
|
|
9800
10589
|
});
|
|
9801
10590
|
|
|
9802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/store-maintenance.js
|
|
9803
10592
|
var absent = strictObject({ path: text, exists: literal(false) });
|
|
9804
10593
|
var schema = strictObject({ version: count, min_compatible: count, writable: boolean(), speaks: count });
|
|
9805
10594
|
var infoSchema = strictObject({
|
|
@@ -9954,12 +10743,25 @@ var storeBackup = strictObject({
|
|
|
9954
10743
|
encrypted: optional(literal(true))
|
|
9955
10744
|
});
|
|
9956
10745
|
var storeDecrypt = strictObject({ path: text, from: text, bytes: count });
|
|
9957
|
-
var storeRestore =
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
10746
|
+
var storeRestore = union([
|
|
10747
|
+
strictObject({
|
|
10748
|
+
path: text,
|
|
10749
|
+
restored_from: text,
|
|
10750
|
+
kept_at: nullable(text),
|
|
10751
|
+
schema: count
|
|
10752
|
+
}),
|
|
10753
|
+
/** From a rollback copy: its tables put back in place, the store returned to `schema` from `was`. */
|
|
10754
|
+
strictObject({
|
|
10755
|
+
path: text,
|
|
10756
|
+
restored_from: text,
|
|
10757
|
+
rolled_back: literal(true),
|
|
10758
|
+
schema: count,
|
|
10759
|
+
was: count,
|
|
10760
|
+
tables: array(strictObject({ table: text, rows: count })),
|
|
10761
|
+
rebuilt: array(text),
|
|
10762
|
+
foreign_key_violations: count
|
|
10763
|
+
})
|
|
10764
|
+
]);
|
|
9963
10765
|
var storeReset = union([
|
|
9964
10766
|
strictObject({ ...absent.entries, reset: literal(false) }),
|
|
9965
10767
|
strictObject({
|
|
@@ -10007,7 +10809,7 @@ var storeRepair = union([
|
|
|
10007
10809
|
]);
|
|
10008
10810
|
var storeCopyRemoval = strictObject({ path: text, deleted: strictObject({ name: text, rows: count }) });
|
|
10009
10811
|
|
|
10010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/store-records.js
|
|
10011
10813
|
var range = strictObject({ from: number(), to: number() });
|
|
10012
10814
|
var storeChatStatus = strictObject({
|
|
10013
10815
|
chat_id: id,
|
|
@@ -10019,6 +10821,13 @@ var storeChatStatus = strictObject({
|
|
|
10019
10821
|
last_stored_at: nullable(time),
|
|
10020
10822
|
held: array(range)
|
|
10021
10823
|
});
|
|
10824
|
+
var chatCoverage = strictObject({
|
|
10825
|
+
chats: count,
|
|
10826
|
+
fetched: count,
|
|
10827
|
+
partial: count,
|
|
10828
|
+
never: count,
|
|
10829
|
+
oldest_message_at: nullable(time)
|
|
10830
|
+
});
|
|
10022
10831
|
var storeClear = strictObject({
|
|
10023
10832
|
cleared: boolean(),
|
|
10024
10833
|
dry_run: optional(literal(true)),
|
|
@@ -10098,7 +10907,7 @@ var storeJobRetry = union([
|
|
|
10098
10907
|
]);
|
|
10099
10908
|
var storeJobClear = strictObject({ cleared: array(id) });
|
|
10100
10909
|
|
|
10101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/store-table.js
|
|
10102
10911
|
var TABLE_KINDS = ["data", "search_index", "search_index_part", "internal"];
|
|
10103
10912
|
var storeTable = strictObject({
|
|
10104
10913
|
name: text,
|
|
@@ -10107,7 +10916,7 @@ var storeTable = strictObject({
|
|
|
10107
10916
|
bytes: optional(nullable(count))
|
|
10108
10917
|
});
|
|
10109
10918
|
|
|
10110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/tag-change.js
|
|
10111
10920
|
var tagTarget = variant("type", [
|
|
10112
10921
|
strictObject({ type: literal("chat"), chat_id: id }),
|
|
10113
10922
|
strictObject({ type: literal("contact"), person_id: id }),
|
|
@@ -10138,7 +10947,7 @@ var automaticTags = strictObject({
|
|
|
10138
10947
|
dry_run: boolean()
|
|
10139
10948
|
});
|
|
10140
10949
|
|
|
10141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/tagging.js
|
|
10142
10951
|
var tagging = strictObject({
|
|
10143
10952
|
tag: text,
|
|
10144
10953
|
type: picklist(TAG_TYPES),
|
|
@@ -10151,7 +10960,7 @@ var tagging = strictObject({
|
|
|
10151
10960
|
created_at: time
|
|
10152
10961
|
});
|
|
10153
10962
|
|
|
10154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/task-pair.js
|
|
10155
10964
|
var side = strictObject({ ref: reference, key: text, title: text, status: text });
|
|
10156
10965
|
var taskPair = strictObject({
|
|
10157
10966
|
task: nullable(side),
|
|
@@ -10174,7 +10983,7 @@ var taskPair = strictObject({
|
|
|
10174
10983
|
created_at: time
|
|
10175
10984
|
});
|
|
10176
10985
|
|
|
10177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/task-results.js
|
|
10178
10987
|
var nullableTime = nullable(time);
|
|
10179
10988
|
var link = strictObject({
|
|
10180
10989
|
id,
|
|
@@ -10209,6 +11018,10 @@ var taskCard = strictObject({
|
|
|
10209
11018
|
revision: number(),
|
|
10210
11019
|
parent: nullable(reference),
|
|
10211
11020
|
source: nullable(text),
|
|
11021
|
+
/** `<service>:<id>`, its id in an outside service, such as `avito:4512345678`. */
|
|
11022
|
+
external_id: nullable(text),
|
|
11023
|
+
/** The http or https page it is about, such as an Avito ad. */
|
|
11024
|
+
source_url: nullable(text),
|
|
10212
11025
|
due_at: nullableTime,
|
|
10213
11026
|
next_check_at: nullableTime,
|
|
10214
11027
|
closed_at: nullableTime,
|
|
@@ -10304,8 +11117,47 @@ var taskScan = strictObject({
|
|
|
10304
11117
|
held_chats: optional(count),
|
|
10305
11118
|
tasks: array(strictObject({ source: text, kind: picklist(TASK_KINDS), category: nullable(text) }))
|
|
10306
11119
|
});
|
|
11120
|
+
var taskAnalysisMark = strictObject({
|
|
11121
|
+
chat: text,
|
|
11122
|
+
from: time,
|
|
11123
|
+
through: time,
|
|
11124
|
+
through_id: text,
|
|
11125
|
+
by: text,
|
|
11126
|
+
checked_at: time,
|
|
11127
|
+
checked_through: time,
|
|
11128
|
+
at: time
|
|
11129
|
+
});
|
|
11130
|
+
var taskAnalysisMarkMoved = strictObject({ ...taskAnalysisMark.entries, moved: boolean() });
|
|
11131
|
+
var taskAnalysis = strictObject({
|
|
11132
|
+
chat: text,
|
|
11133
|
+
title: nullable(text),
|
|
11134
|
+
kind: text,
|
|
11135
|
+
newest_at: nullableTime,
|
|
11136
|
+
mark: nullable(taskAnalysisMark),
|
|
11137
|
+
waiting: count,
|
|
11138
|
+
late: count,
|
|
11139
|
+
untrusted
|
|
11140
|
+
});
|
|
11141
|
+
var taskReview = strictObject({
|
|
11142
|
+
chat: text,
|
|
11143
|
+
from: time,
|
|
11144
|
+
mark: nullable(taskAnalysisMark),
|
|
11145
|
+
late: count,
|
|
11146
|
+
has_more: boolean(),
|
|
11147
|
+
through: nullable(reference),
|
|
11148
|
+
messages: array(strictObject({
|
|
11149
|
+
ref: reference,
|
|
11150
|
+
at: time,
|
|
11151
|
+
sender: nullable(text),
|
|
11152
|
+
outgoing: boolean(),
|
|
11153
|
+
reply_to: nullable(text),
|
|
11154
|
+
text
|
|
11155
|
+
})),
|
|
11156
|
+
open_tasks: array(strictObject({ key: nullable(text), kind: text, title: nullable(text), source: nullable(text) })),
|
|
11157
|
+
untrusted
|
|
11158
|
+
});
|
|
10307
11159
|
|
|
10308
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/topic.js
|
|
10309
11161
|
var topic = strictObject({
|
|
10310
11162
|
id,
|
|
10311
11163
|
title: text,
|
|
@@ -10319,9 +11171,13 @@ var topic = strictObject({
|
|
|
10319
11171
|
untrusted
|
|
10320
11172
|
});
|
|
10321
11173
|
|
|
10322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/entities/index.js
|
|
10323
11175
|
var ENTITIES = {
|
|
10324
11176
|
sync_progress: progress,
|
|
11177
|
+
deal,
|
|
11178
|
+
lead,
|
|
11179
|
+
pipeline,
|
|
11180
|
+
stage,
|
|
10325
11181
|
...MEETING_RESULT_ENTITIES,
|
|
10326
11182
|
message,
|
|
10327
11183
|
message_context: messageContext,
|
|
@@ -10349,18 +11205,22 @@ var ENTITIES = {
|
|
|
10349
11205
|
attachments: optional(array(hitFile)),
|
|
10350
11206
|
untrusted
|
|
10351
11207
|
}),
|
|
10352
|
-
"message.summary":
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
11208
|
+
"message.summary": strictObject({
|
|
11209
|
+
...pick(message, [
|
|
11210
|
+
"ref",
|
|
11211
|
+
"chat_id",
|
|
11212
|
+
"chat_title",
|
|
11213
|
+
"timestamp",
|
|
11214
|
+
"sender_name",
|
|
11215
|
+
"sender_is_me",
|
|
11216
|
+
"outgoing",
|
|
11217
|
+
"text",
|
|
11218
|
+
"transcript",
|
|
11219
|
+
"attachments",
|
|
11220
|
+
"email"
|
|
11221
|
+
]).entries,
|
|
11222
|
+
untrusted
|
|
11223
|
+
}),
|
|
10364
11224
|
message_link: messageLink,
|
|
10365
11225
|
message_write: messageWrite,
|
|
10366
11226
|
message_send: messageSend,
|
|
@@ -10457,6 +11317,9 @@ var ENTITIES = {
|
|
|
10457
11317
|
task_unmerge: taskUnmerge,
|
|
10458
11318
|
task_categories: taskCategories,
|
|
10459
11319
|
task_scan: taskScan,
|
|
11320
|
+
task_analysis: taskAnalysis,
|
|
11321
|
+
task_analysis_mark: taskAnalysisMarkMoved,
|
|
11322
|
+
task_review: taskReview,
|
|
10460
11323
|
fact,
|
|
10461
11324
|
memory,
|
|
10462
11325
|
meeting,
|
|
@@ -10467,6 +11330,7 @@ var ENTITIES = {
|
|
|
10467
11330
|
meeting_project_evidence: meetingProjectEvidence,
|
|
10468
11331
|
meeting_preparation: meetingPreparation,
|
|
10469
11332
|
meeting_findings: meetingFindings,
|
|
11333
|
+
mail_findings: mailFindings,
|
|
10470
11334
|
meeting_transcript: meetingTranscript,
|
|
10471
11335
|
meeting_summary: meetingSummary,
|
|
10472
11336
|
meeting_evidence: meetingEvidence,
|
|
@@ -10475,6 +11339,7 @@ var ENTITIES = {
|
|
|
10475
11339
|
meeting_review: meetingReview,
|
|
10476
11340
|
meeting_link: meetingLink,
|
|
10477
11341
|
meeting_stats: meetingStats,
|
|
11342
|
+
meeting_counts: meetingCounts,
|
|
10478
11343
|
meeting_speaker: meetingSpeaker,
|
|
10479
11344
|
meeting_participants: meetingParticipants,
|
|
10480
11345
|
meeting_passage: meetingPassage,
|
|
@@ -10512,6 +11377,7 @@ var ENTITIES = {
|
|
|
10512
11377
|
job,
|
|
10513
11378
|
store_chat_status: storeChatStatus,
|
|
10514
11379
|
store_clear: storeClear,
|
|
11380
|
+
chat_coverage: chatCoverage,
|
|
10515
11381
|
store_export: storeExport,
|
|
10516
11382
|
store_gap_plan: storeGapPlan,
|
|
10517
11383
|
store_gap_repair: storeGapRepair,
|
|
@@ -10567,6 +11433,9 @@ var ENTITIES = {
|
|
|
10567
11433
|
topic,
|
|
10568
11434
|
folder,
|
|
10569
11435
|
message_counts: messageCounts,
|
|
11436
|
+
response_times: responseTimes,
|
|
11437
|
+
waiting_chats: waitingChats,
|
|
11438
|
+
mail_counts: mailCounts,
|
|
10570
11439
|
ranking,
|
|
10571
11440
|
admin_report: adminReport,
|
|
10572
11441
|
analysis_consent: analysisConsent,
|
|
@@ -10588,7 +11457,7 @@ var entityDefinitions = /* @__PURE__ */ __name(() => Object.fromEntries(Object.e
|
|
|
10588
11457
|
return [name, definition];
|
|
10589
11458
|
})), "entityDefinitions");
|
|
10590
11459
|
|
|
10591
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
|
|
10592
11461
|
var schemas = /* @__PURE__ */ new WeakMap();
|
|
10593
11462
|
var answerEntity = /* @__PURE__ */ __name((command, name, schema2, options = {}) => {
|
|
10594
11463
|
if (Object.hasOwn(ENTITIES, name))
|
|
@@ -10622,8 +11491,8 @@ var answerRow = /* @__PURE__ */ __name((command) => {
|
|
|
10622
11491
|
return own && metaOf(command).output?.entity === own.name ? own.row : void 0;
|
|
10623
11492
|
}, "answerRow");
|
|
10624
11493
|
|
|
10625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10626
|
-
import { join as
|
|
11494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/images/picture/models.js
|
|
11495
|
+
import { join as join6 } from "node:path";
|
|
10627
11496
|
var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
|
|
10628
11497
|
var IMAGE_MODELS = [
|
|
10629
11498
|
{
|
|
@@ -10673,10 +11542,10 @@ var imageModel = /* @__PURE__ */ __name((id6) => {
|
|
|
10673
11542
|
return found;
|
|
10674
11543
|
}, "imageModel");
|
|
10675
11544
|
var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
|
|
10676
|
-
var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file,
|
|
11545
|
+
var placedImage = /* @__PURE__ */ __name((model3, directory) => model3.files.map((file) => [file, join6(directory, model3.id, file.name)]), "placedImage");
|
|
10677
11546
|
var isImageModelInstalled = /* @__PURE__ */ __name((model3, directory) => filesPresent(placedImage(model3, directory)), "isImageModelInstalled");
|
|
10678
11547
|
|
|
10679
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/steps.js
|
|
10680
11549
|
var STEPS2 = defineSteps([
|
|
10681
11550
|
...STEPS,
|
|
10682
11551
|
{
|
|
@@ -10880,6 +11749,16 @@ var STEPS2 = defineSteps([
|
|
|
10880
11749
|
args: [],
|
|
10881
11750
|
why: "serve still runs an older version; a restart runs the one installed now"
|
|
10882
11751
|
},
|
|
11752
|
+
{
|
|
11753
|
+
id: "tasks.acknowledge",
|
|
11754
|
+
command: "tasks acknowledge",
|
|
11755
|
+
args: [
|
|
11756
|
+
{ name: "chat", required: true },
|
|
11757
|
+
{ name: "message", required: true },
|
|
11758
|
+
{ name: "since_time", required: false }
|
|
11759
|
+
],
|
|
11760
|
+
why: "once the tasks these {shown} messages hold are opened, updated or closed, so the next review starts after them"
|
|
11761
|
+
},
|
|
10883
11762
|
{
|
|
10884
11763
|
id: "search.meetings",
|
|
10885
11764
|
command: "*",
|
|
@@ -10888,7 +11767,7 @@ var STEPS2 = defineSteps([
|
|
|
10888
11767
|
}
|
|
10889
11768
|
]);
|
|
10890
11769
|
var nextStep = /* @__PURE__ */ __name((id6, input) => {
|
|
10891
|
-
const definition = STEPS2.find((
|
|
11770
|
+
const definition = STEPS2.find((step2) => step2.id === id6);
|
|
10892
11771
|
if (!definition)
|
|
10893
11772
|
throw new Error(`no step "${id6}"`);
|
|
10894
11773
|
const args = Object.fromEntries(Object.entries(input.args ?? {}).filter(([, value]) => value !== void 0));
|
|
@@ -10911,7 +11790,7 @@ var commandAt = /* @__PURE__ */ __name((root, path2) => {
|
|
|
10911
11790
|
at2 = at2?.commands.find((one) => one.name() === word || one.aliases().includes(word));
|
|
10912
11791
|
return at2 === root ? void 0 : at2;
|
|
10913
11792
|
}, "commandAt");
|
|
10914
|
-
var runnable = /* @__PURE__ */ __name((root, steps) => withSafety((steps ?? []).filter((
|
|
11793
|
+
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
11794
|
var failureSteps = /* @__PURE__ */ __name((root, error) => {
|
|
10916
11795
|
const model3 = error.details?.model;
|
|
10917
11796
|
const own = error.reason === "model.not-downloaded" && typeof model3 === "string" ? [
|
|
@@ -10921,55 +11800,46 @@ var failureSteps = /* @__PURE__ */ __name((root, error) => {
|
|
|
10921
11800
|
] : [];
|
|
10922
11801
|
return runnable(root, [...error.next ?? [], ...own]);
|
|
10923
11802
|
}, "failureSteps");
|
|
10924
|
-
var withSafety = /* @__PURE__ */ __name((steps, targets) => steps.map((
|
|
10925
|
-
if (
|
|
10926
|
-
return
|
|
10927
|
-
const effects = targets(
|
|
10928
|
-
return { ...
|
|
11803
|
+
var withSafety = /* @__PURE__ */ __name((steps, targets) => steps.map((step2) => {
|
|
11804
|
+
if (step2.kind === "user_action")
|
|
11805
|
+
return step2;
|
|
11806
|
+
const effects = targets(step2.command)?.effects;
|
|
11807
|
+
return { ...step2, safe_to_auto_execute: effects !== void 0 && !writes(effects) };
|
|
10929
11808
|
}), "withSafety");
|
|
10930
|
-
var withLines = /* @__PURE__ */ __name((root, steps) => steps.map((
|
|
11809
|
+
var withLines = /* @__PURE__ */ __name((root, steps) => steps.map((step2) => step2.kind === "command" ? { ...step2, line: stepLine(root, step2) } : step2), "withLines");
|
|
10931
11810
|
var kebab = /* @__PURE__ */ __name((name) => name.replaceAll("_", "-"), "kebab");
|
|
10932
11811
|
var quoted2 = /* @__PURE__ */ __name((value) => {
|
|
10933
11812
|
const text5 = String(value);
|
|
10934
11813
|
return /^[\w@:./+-]+$/.test(text5) ? text5 : JSON.stringify(text5);
|
|
10935
11814
|
}, "quoted");
|
|
10936
|
-
var stepLine = /* @__PURE__ */ __name((root,
|
|
10937
|
-
const command = commandAt(root,
|
|
11815
|
+
var stepLine = /* @__PURE__ */ __name((root, step2) => {
|
|
11816
|
+
const command = commandAt(root, step2.command);
|
|
10938
11817
|
const positional = new Set(command?.registeredArguments.map((argument) => argument.name()) ?? []);
|
|
10939
|
-
const args = Object.entries(
|
|
11818
|
+
const args = Object.entries(step2.args).filter(([, value]) => value !== void 0 && value !== false);
|
|
10940
11819
|
const profile = root.getOptionValue("profile");
|
|
10941
11820
|
return [
|
|
10942
11821
|
root.name(),
|
|
10943
11822
|
...typeof profile === "string" && profile !== "" ? [quoted2(profile)] : [],
|
|
10944
|
-
|
|
10945
|
-
...(command?.registeredArguments ?? []).flatMap((argument) =>
|
|
11823
|
+
step2.command,
|
|
11824
|
+
...(command?.registeredArguments ?? []).flatMap((argument) => step2.args[argument.name()] === void 0 ? [] : [quoted2(step2.args[argument.name()])]),
|
|
10946
11825
|
...args.filter(([name]) => !positional.has(name)).map(([name, value]) => value === true ? `--${kebab(name)}` : `--${kebab(name)} ${quoted2(value)}`)
|
|
10947
11826
|
].join(" ");
|
|
10948
11827
|
}, "stepLine");
|
|
10949
11828
|
|
|
10950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10951
|
-
var where = [{ field: "ref" }
|
|
11829
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/project-status-rows.js
|
|
11830
|
+
var where = [{ field: "ref" }];
|
|
10952
11831
|
var who2 = { field: ["who.owner", "who.name"], tag: "you" };
|
|
11832
|
+
var ON_CHAT_ROW = /* @__PURE__ */ new Set(["reply-next", "coverage"]);
|
|
10953
11833
|
var STATUS_SIGNAL_ROWS = {
|
|
10954
|
-
"status.last-message": { columns: [...where, { field: "at", as: "time" }, who2] },
|
|
10955
|
-
"status.reply-next": {
|
|
10956
|
-
columns: [
|
|
10957
|
-
...where,
|
|
10958
|
-
{ field: "data.next" },
|
|
10959
|
-
{ field: "data.addressed.name" },
|
|
10960
|
-
{ field: "data.waiting_since", as: "day" },
|
|
10961
|
-
{ field: "data.overdue", tag: "overdue" }
|
|
10962
|
-
]
|
|
10963
|
-
},
|
|
10964
11834
|
"status.questions": {
|
|
10965
|
-
columns: [...where, { field: "at", as: "day" },
|
|
11835
|
+
columns: [...where, { field: "at", as: "day" }, who2],
|
|
10966
11836
|
text: ["data.excerpt"]
|
|
10967
11837
|
},
|
|
10968
11838
|
"status.promises": {
|
|
10969
11839
|
columns: [
|
|
10970
11840
|
...where,
|
|
10971
11841
|
{ field: "at", as: "day" },
|
|
10972
|
-
{ field: "
|
|
11842
|
+
{ field: "basis" },
|
|
10973
11843
|
{ field: "data.side" },
|
|
10974
11844
|
{ field: "data.due", as: "day" },
|
|
10975
11845
|
{ field: "data.status" }
|
|
@@ -10996,21 +11866,10 @@ var STATUS_SIGNAL_ROWS = {
|
|
|
10996
11866
|
columns: [
|
|
10997
11867
|
...where,
|
|
10998
11868
|
{ field: "data.query" },
|
|
10999
|
-
{ field: "data.theirs_last", as: "day" },
|
|
11000
11869
|
{ field: "data.yours_last", as: "day" },
|
|
11001
11870
|
{ field: "data.silent_since", as: "day" }
|
|
11002
11871
|
]
|
|
11003
11872
|
},
|
|
11004
|
-
"status.coverage": {
|
|
11005
|
-
columns: [
|
|
11006
|
-
{ field: "chat" },
|
|
11007
|
-
{ field: "chat_title" },
|
|
11008
|
-
{ field: "data.state" },
|
|
11009
|
-
{ field: "data.held.messages", as: "count", tag: "held" },
|
|
11010
|
-
{ field: "data.held.oldest_at", as: "day" },
|
|
11011
|
-
{ field: "sync_command" }
|
|
11012
|
-
]
|
|
11013
|
-
},
|
|
11014
11873
|
"status.children": {
|
|
11015
11874
|
columns: [
|
|
11016
11875
|
{ field: "data.child" },
|
|
@@ -11027,10 +11886,14 @@ var STATUS_ROWS = {
|
|
|
11027
11886
|
columns: [
|
|
11028
11887
|
{ field: "chat" },
|
|
11029
11888
|
{ field: "title" },
|
|
11030
|
-
{ field: "kind" },
|
|
11031
11889
|
{ field: "role" },
|
|
11032
|
-
{ field: "
|
|
11033
|
-
{ field: "
|
|
11890
|
+
{ field: "next", prefix: "next" },
|
|
11891
|
+
{ field: "addressed.name" },
|
|
11892
|
+
{ field: "waiting_since", as: "day" },
|
|
11893
|
+
{ field: "overdue", tag: "overdue" },
|
|
11894
|
+
{ field: "held.messages", as: "count", tag: "held" },
|
|
11895
|
+
{ field: "unlisted.questions", as: "count", tag: "questions unlisted" },
|
|
11896
|
+
{ field: "unlisted.promises", as: "count", tag: "promises unlisted" }
|
|
11034
11897
|
]
|
|
11035
11898
|
},
|
|
11036
11899
|
"status.money": {
|
|
@@ -11041,7 +11904,6 @@ var STATUS_ROWS = {
|
|
|
11041
11904
|
{ field: "rows", as: "count", tag: "rows" }
|
|
11042
11905
|
]
|
|
11043
11906
|
},
|
|
11044
|
-
"status.signal": { columns: [{ field: "id" }, { field: "version" }] },
|
|
11045
11907
|
"status.out-of-scope": {
|
|
11046
11908
|
columns: [
|
|
11047
11909
|
{ field: "chat" },
|
|
@@ -11056,7 +11918,7 @@ var STATUS_ROWS = {
|
|
|
11056
11918
|
"status.failed": { columns: [{ field: "signal" }], text: ["why"] }
|
|
11057
11919
|
};
|
|
11058
11920
|
|
|
11059
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/compact.js
|
|
11060
11922
|
var TEXT_CHARS = 400;
|
|
11061
11923
|
var sender = { field: ["sender_is_me", "sender_name"], tag: "me" };
|
|
11062
11924
|
var messageRow = {
|
|
@@ -11209,10 +12071,10 @@ var clockFor = /* @__PURE__ */ __name((zone) => {
|
|
|
11209
12071
|
return {
|
|
11210
12072
|
zone,
|
|
11211
12073
|
parts: /* @__PURE__ */ __name((iso) => {
|
|
11212
|
-
const
|
|
11213
|
-
if (Number.isNaN(
|
|
12074
|
+
const ms2 = Date.parse(iso);
|
|
12075
|
+
if (Number.isNaN(ms2))
|
|
11214
12076
|
return void 0;
|
|
11215
|
-
const part = Object.fromEntries(format.formatToParts(
|
|
12077
|
+
const part = Object.fromEntries(format.formatToParts(ms2).map(({ type, value }) => [type, value]));
|
|
11216
12078
|
return { date: `${part.year}-${part.month}-${part.day}`, time: `${part.hour}:${part.minute}` };
|
|
11217
12079
|
}, "parts")
|
|
11218
12080
|
};
|
|
@@ -11241,8 +12103,8 @@ var cellOf = /* @__PURE__ */ __name((item, column, clock) => {
|
|
|
11241
12103
|
const parts = clock.parts(iso);
|
|
11242
12104
|
if (!parts)
|
|
11243
12105
|
return { text: clean(iso) };
|
|
11244
|
-
const
|
|
11245
|
-
return
|
|
12106
|
+
const day3 = parts.date.slice(5);
|
|
12107
|
+
return column.as === "day" ? { text: day3, date: parts.date } : { text: `${day3} ${parts.time}`, date: parts.date, time: parts.time };
|
|
11246
12108
|
}
|
|
11247
12109
|
case "count":
|
|
11248
12110
|
return typeof value === "number" && value !== 0 ? { text: column.tag ? `${value} ${column.tag}` : String(value) } : void 0;
|
|
@@ -11290,6 +12152,17 @@ var sameEverywhere = /* @__PURE__ */ __name((rows2, index) => {
|
|
|
11290
12152
|
const first2 = rows2[0]?.cells[index]?.text;
|
|
11291
12153
|
return first2 !== void 0 && rows2.every(({ cells }) => cells[index]?.text === first2);
|
|
11292
12154
|
}, "sameEverywhere");
|
|
12155
|
+
var ordered = /* @__PURE__ */ __name((dates) => dates.every((one, at2) => at2 === 0 || one >= dates[at2 - 1]) || dates.every((one, at2) => at2 === 0 || one <= dates[at2 - 1]), "ordered");
|
|
12156
|
+
var dayColumn = /* @__PURE__ */ __name((rows2, shape, hoisted) => {
|
|
12157
|
+
const index = shape.columns.findIndex((column, at2) => column.as === "time" && !hoisted[at2]);
|
|
12158
|
+
if (index < 0)
|
|
12159
|
+
return -1;
|
|
12160
|
+
const dates = rows2.map(({ cells }) => cells[index]?.date);
|
|
12161
|
+
if (dates.some((one) => one === void 0))
|
|
12162
|
+
return -1;
|
|
12163
|
+
const days2 = dates;
|
|
12164
|
+
return ordered(days2) && new Set(days2).size * 3 <= days2.length ? index : -1;
|
|
12165
|
+
}, "dayColumn");
|
|
11293
12166
|
var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
|
|
11294
12167
|
const dates = [];
|
|
11295
12168
|
const rows2 = items.map((item) => {
|
|
@@ -11312,18 +12185,31 @@ var rowsOfItems = /* @__PURE__ */ __name((items, shape, clock, chars) => {
|
|
|
11312
12185
|
return [];
|
|
11313
12186
|
return [`${sourceOf(item, column) ?? fieldsOfColumn(column.field)[0]}: ${rows2[0]?.cells[index]?.text}`];
|
|
11314
12187
|
});
|
|
11315
|
-
const
|
|
11316
|
-
|
|
12188
|
+
const byDay = dayColumn(rows2, shape, hoisted);
|
|
12189
|
+
let shownDay;
|
|
12190
|
+
const lines = rows2.flatMap(({ cells, text: text5, item }) => {
|
|
12191
|
+
const parts = cells.map((cell2, index) => hoisted[index] ? void 0 : cell2?.text);
|
|
12192
|
+
const dayLine = [];
|
|
12193
|
+
const cell = cells[byDay];
|
|
12194
|
+
if (byDay >= 0 && cell?.date && cell.time) {
|
|
12195
|
+
if (cell.date !== shownDay)
|
|
12196
|
+
dayLine.push(`# ${cell.date}`);
|
|
12197
|
+
shownDay = cell.date;
|
|
12198
|
+
parts[byDay] = cell.time;
|
|
12199
|
+
}
|
|
11317
12200
|
const shortened = prefix ? clean(prefix) : void 0;
|
|
11318
12201
|
if (shortened && parts[0]?.startsWith(shortened))
|
|
11319
12202
|
parts[0] = `#${parts[0].slice(shortened.length)}`;
|
|
11320
12203
|
const shown = [...parts, text5].filter((part) => part !== void 0 && part !== "");
|
|
11321
|
-
return guarded(shown.length ? shown.join(" \xB7 ") : item ? blockLine(item, chars) : "");
|
|
12204
|
+
return [...dayLine, guarded(shown.length ? shown.join(" \xB7 ") : item ? blockLine(item, chars) : "")];
|
|
11322
12205
|
});
|
|
11323
|
-
const
|
|
11324
|
-
|
|
11325
|
-
return { header, lines };
|
|
12206
|
+
const header = [...prefix ? [`ref: ${clean(prefix)}<id>`] : [], ...named3];
|
|
12207
|
+
return { header, lines, dates };
|
|
11326
12208
|
}, "rowsOfItems");
|
|
12209
|
+
var spanOf = /* @__PURE__ */ __name((dates, clock) => {
|
|
12210
|
+
const when = span(dates);
|
|
12211
|
+
return when ? [when, clock.zone] : [];
|
|
12212
|
+
}, "spanOf");
|
|
11327
12213
|
var blockLine = /* @__PURE__ */ __name((fields, chars) => blockOf(fields, chars).join(" "), "blockLine");
|
|
11328
12214
|
var blockOf = /* @__PURE__ */ __name((fields, chars, indent = "", whole = []) => Object.entries(fields).filter(([name]) => !(name === "priority" && "priority_label" in fields)).filter(([, value]) => present(value) || value === false).flatMap(([name, value]) => {
|
|
11329
12215
|
const label = `${indent}${clean(name)}:`;
|
|
@@ -11336,20 +12222,20 @@ var blockOf = /* @__PURE__ */ __name((fields, chars, indent = "", whole = []) =>
|
|
|
11336
12222
|
var footerOf = /* @__PURE__ */ __name((body) => {
|
|
11337
12223
|
const lines = [];
|
|
11338
12224
|
const steps = body.next ?? [];
|
|
11339
|
-
const lineOf2 = /* @__PURE__ */ __name((
|
|
12225
|
+
const lineOf2 = /* @__PURE__ */ __name((step2) => step2.kind === "command" ? step2.line ?? step2.command : void 0, "lineOf");
|
|
11340
12226
|
if ("items" in body && body.page.has_more) {
|
|
11341
|
-
const more = steps.find((
|
|
12227
|
+
const more = steps.find((step2) => step2.step === "page.next");
|
|
11342
12228
|
const line = more?.kind === "command" ? more.line : void 0;
|
|
11343
12229
|
const page2 = body.page;
|
|
11344
12230
|
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
12231
|
}
|
|
11346
12232
|
for (const missing of body.missing ?? [])
|
|
11347
12233
|
lines.push(`# missing: ${clean(missing.field)}: ${clean(missing.why)}`);
|
|
11348
|
-
for (const
|
|
11349
|
-
if (
|
|
12234
|
+
for (const step2 of steps) {
|
|
12235
|
+
if (step2.step === "page.next" && "items" in body)
|
|
11350
12236
|
continue;
|
|
11351
|
-
const line = lineOf2(
|
|
11352
|
-
lines.push(`# next: ${clean(
|
|
12237
|
+
const line = lineOf2(step2);
|
|
12238
|
+
lines.push(`# next: ${clean(step2.why)}${line ? `: ${clean(line)}` : ""}`);
|
|
11353
12239
|
}
|
|
11354
12240
|
if (body.meta?.complete === false) {
|
|
11355
12241
|
const issues = (body.meta.issues ?? []).map((issue) => `${clean(issue.source)}: ${clean(String(issue.code))}`);
|
|
@@ -11374,25 +12260,89 @@ var compactText = /* @__PURE__ */ __name((body, shape, options, rowsOf = rowsOfE
|
|
|
11374
12260
|
const chars = options.textChars ?? TEXT_CHARS;
|
|
11375
12261
|
let lines = [];
|
|
11376
12262
|
if ("items" in body) {
|
|
11377
|
-
const { header, lines: rows2 } = rowsOfItems(body.items, shape, clock, chars);
|
|
11378
|
-
|
|
12263
|
+
const { header, lines: rows2, dates } = rowsOfItems(body.items, shape, clock, chars);
|
|
12264
|
+
const head = [...header, ...spanOf(dates, clock)];
|
|
12265
|
+
lines = (head.length ? [`# ${head.join(" \xB7 ")}`] : []).concat(rows2.length ? rows2 : ["# nothing found"]);
|
|
11379
12266
|
} else if (isFields(body.item)) {
|
|
11380
12267
|
const sections = shape.sections ?? {};
|
|
11381
|
-
const rest = Object.fromEntries(Object.entries(body.item).filter(([name]) => !Object.hasOwn(sections, name)));
|
|
12268
|
+
const rest = Object.fromEntries(Object.entries(body.item).filter(([name]) => !Object.hasOwn(sections, name) && !shape.hidden?.includes(name)));
|
|
11382
12269
|
lines = blockOf(rest, chars, "", shape.whole).map(guarded);
|
|
12270
|
+
let dates = [];
|
|
12271
|
+
let drawn = [];
|
|
11383
12272
|
for (const [name, entity] of Object.entries(sections)) {
|
|
11384
12273
|
const list = body.item[name];
|
|
11385
12274
|
if (!Array.isArray(list))
|
|
11386
12275
|
continue;
|
|
11387
|
-
const { header, lines: rows2 } = rowsOfItems(list, rowsOf(entity), clock, chars);
|
|
11388
|
-
|
|
12276
|
+
const { header, lines: rows2, dates: more } = rowsOfItems(list, rowsOf(entity), clock, chars);
|
|
12277
|
+
dates = dates.concat(more);
|
|
12278
|
+
drawn = drawn.concat([`# ${[`${clean(name)}: ${list.length}`, ...header].join(" \xB7 ")}`], rows2);
|
|
11389
12279
|
}
|
|
12280
|
+
const when = spanOf(dates, clock);
|
|
12281
|
+
lines = lines.concat(when.length ? [`# ${when.join(" \xB7 ")}`] : [], drawn);
|
|
11390
12282
|
} else if (present(body.item))
|
|
11391
12283
|
lines = [guarded(cut(clean(String(body.item)), chars))];
|
|
11392
12284
|
return lines.concat(footerOf(body)).join("\n");
|
|
11393
12285
|
}, "compactText");
|
|
11394
12286
|
|
|
11395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/output-budget.js
|
|
12288
|
+
var SOFT_OUTPUT_BYTES = 256 * 1024;
|
|
12289
|
+
var CARRIED = ["json", "compact", "offline", "timeout", "full", "brief", "maxOutputBytes"];
|
|
12290
|
+
var NOT_WITH_COMPACT = /* @__PURE__ */ new Set(["json", "brief"]);
|
|
12291
|
+
var snake3 = /* @__PURE__ */ __name((name) => name.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
12292
|
+
var typed = /* @__PURE__ */ __name((command, key) => command.getOptionValueSource(key) === "cli", "typed");
|
|
12293
|
+
var typedArgs = /* @__PURE__ */ __name((command) => {
|
|
12294
|
+
const root = rootOf2(command);
|
|
12295
|
+
if (root.getOptionValue("fields") !== void 0)
|
|
12296
|
+
return void 0;
|
|
12297
|
+
if (command.options.some((option) => option.negate && typed(command, option.attributeName())))
|
|
12298
|
+
return void 0;
|
|
12299
|
+
const positional = command.registeredArguments.flatMap((argument, index) => {
|
|
12300
|
+
const value = command.processedArgs[index];
|
|
12301
|
+
const word = Array.isArray(value) ? value.join(" ") : value;
|
|
12302
|
+
return word === void 0 || word === "" ? [] : [[argument.name(), word]];
|
|
12303
|
+
});
|
|
12304
|
+
const own = command.options.map((option) => option.attributeName()).filter((key) => typed(command, key)).map((key) => [snake3(key), command.getOptionValue(key)]);
|
|
12305
|
+
const global = CARRIED.filter((key) => typed(root, key)).map((key) => [snake3(key), root.getOptionValue(key)]);
|
|
12306
|
+
return Object.fromEntries([...positional, ...own, ...global]);
|
|
12307
|
+
}, "typedArgs");
|
|
12308
|
+
var declaresRow = /* @__PURE__ */ __name((command) => {
|
|
12309
|
+
const { rows: rows2 } = environmentOf(command);
|
|
12310
|
+
return rowShapeOf(command, rows2 && entityRows(rows2)) !== GENERIC_ROW;
|
|
12311
|
+
}, "declaresRow");
|
|
12312
|
+
var pathOf3 = /* @__PURE__ */ __name((command) => {
|
|
12313
|
+
const words = [];
|
|
12314
|
+
for (let at2 = command; at2.parent; at2 = at2.parent)
|
|
12315
|
+
words.unshift(at2.name());
|
|
12316
|
+
return words.join(" ");
|
|
12317
|
+
}, "pathOf");
|
|
12318
|
+
var step = /* @__PURE__ */ __name((command, id6, args, why) => ({
|
|
12319
|
+
kind: "command",
|
|
12320
|
+
step: id6,
|
|
12321
|
+
command: pathOf3(command),
|
|
12322
|
+
args,
|
|
12323
|
+
why,
|
|
12324
|
+
safe_to_auto_execute: true
|
|
12325
|
+
}), "step");
|
|
12326
|
+
var compactStep = /* @__PURE__ */ __name((command, args, why) => rootOf2(command).getOptionValue("compact") === true || !declaresRow(command) ? [] : [
|
|
12327
|
+
step(command, "output.compact", { ...Object.fromEntries(Object.entries(args).filter(([key]) => !NOT_WITH_COMPACT.has(key))), compact: true }, why)
|
|
12328
|
+
], "compactStep");
|
|
12329
|
+
var tooLargeSteps = /* @__PURE__ */ __name((command, { maxBytes, neededBytes }) => {
|
|
12330
|
+
const args = typedArgs(command);
|
|
12331
|
+
if (!args)
|
|
12332
|
+
return [];
|
|
12333
|
+
const limit = Number(command.getOptionValue("limit"));
|
|
12334
|
+
const fits = Math.floor(limit * maxBytes / neededBytes * 0.9);
|
|
12335
|
+
return [
|
|
12336
|
+
...compactStep(command, args, "the answer is over the output cap as JSON; one line per item keeps every ref"),
|
|
12337
|
+
...Number.isSafeInteger(limit) && fits >= 1 && fits < limit ? [step(command, "output.limit", { ...args, limit: fits }, `about ${fits} items fit under the output cap`)] : []
|
|
12338
|
+
];
|
|
12339
|
+
}, "tooLargeSteps");
|
|
12340
|
+
var largeAnswerSteps = /* @__PURE__ */ __name((command) => {
|
|
12341
|
+
const args = typedArgs(command);
|
|
12342
|
+
return args ? compactStep(command, args, "the answer is large as JSON; one line per item keeps every ref") : [];
|
|
12343
|
+
}, "largeAnswerSteps");
|
|
12344
|
+
|
|
12345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/provider-refs.js
|
|
11396
12346
|
var HIDDEN = /* @__PURE__ */ new Set(["providerRef", "provider_ref"]);
|
|
11397
12347
|
var withoutProviderRefs = /* @__PURE__ */ __name((value) => strip(value), "withoutProviderRefs");
|
|
11398
12348
|
var strip = /* @__PURE__ */ __name((value) => {
|
|
@@ -11406,7 +12356,7 @@ var strip = /* @__PURE__ */ __name((value) => {
|
|
|
11406
12356
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => HIDDEN.has(key) ? [] : [[key, strip(inner)]]));
|
|
11407
12357
|
}, "strip");
|
|
11408
12358
|
|
|
11409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/envelope.js
|
|
11410
12360
|
var answerSchema = /* @__PURE__ */ __name((item = unknown()) => union([listEnvelopeSchema(item), itemEnvelopeSchema(item)]), "answerSchema");
|
|
11411
12361
|
var capped2 = /* @__PURE__ */ __name((steps) => steps.length > 0 ? { next: steps.slice(0, MAX_NEXT_STEPS) } : {}, "capped");
|
|
11412
12362
|
var listOf = /* @__PURE__ */ __name((command, input) => {
|
|
@@ -11449,7 +12399,7 @@ var itemOf = /* @__PURE__ */ __name((item, { next = [], missing, meta } = {}) =>
|
|
|
11449
12399
|
};
|
|
11450
12400
|
return body;
|
|
11451
12401
|
}, "itemOf");
|
|
11452
|
-
var
|
|
12402
|
+
var snake4 = /* @__PURE__ */ __name((key) => key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), "snake");
|
|
11453
12403
|
var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
11454
12404
|
const kept = new Set(verbatim);
|
|
11455
12405
|
const convert = /* @__PURE__ */ __name((value) => {
|
|
@@ -11460,7 +12410,7 @@ var snakeKeysKeeping = /* @__PURE__ */ __name((verbatim) => {
|
|
|
11460
12410
|
return Object.fromEntries(Object.entries(value).flatMap(([key, inner]) => {
|
|
11461
12411
|
if (inner === void 0)
|
|
11462
12412
|
return [];
|
|
11463
|
-
const name =
|
|
12413
|
+
const name = snake4(key);
|
|
11464
12414
|
return [[name, kept.has(key) || kept.has(name) ? inner : convert(inner)]];
|
|
11465
12415
|
}));
|
|
11466
12416
|
}, "convert");
|
|
@@ -11500,7 +12450,16 @@ var sealed = /* @__PURE__ */ __name((value) => {
|
|
|
11500
12450
|
const { meta, ...rest } = withoutProviderRefs(value);
|
|
11501
12451
|
return { ...rest, meta: metaNow(meta) };
|
|
11502
12452
|
}, "sealed");
|
|
11503
|
-
var compactSteps = /* @__PURE__ */ __name((root, steps) => steps.map((
|
|
12453
|
+
var compactSteps = /* @__PURE__ */ __name((root, steps) => steps.map((step2) => step2.kind === "command" ? { ...step2, line: `${step2.line ?? stepLine(root, step2)} ${COMPACT_FLAG}` } : step2), "compactSteps");
|
|
12454
|
+
var withLargeAnswerStep = /* @__PURE__ */ __name((command, body) => {
|
|
12455
|
+
if ((body.next?.length ?? 0) >= MAX_NEXT_STEPS)
|
|
12456
|
+
return body;
|
|
12457
|
+
const added = largeAnswerSteps(command);
|
|
12458
|
+
if (added.length === 0 || Buffer.byteLength(JSON.stringify(body)) <= SOFT_OUTPUT_BYTES)
|
|
12459
|
+
return body;
|
|
12460
|
+
const root = rootOf2(command);
|
|
12461
|
+
return { ...body, next: [...body.next ?? [], ...withLines(root, runnable(root, added))] };
|
|
12462
|
+
}, "withLargeAnswerStep");
|
|
11504
12463
|
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
12464
|
var jsonlRecords = /* @__PURE__ */ __name((body) => linesOf(sealed(body)).split("\n").map((line) => JSON.parse(line)), "jsonlRecords");
|
|
11506
12465
|
var renderAnswer = /* @__PURE__ */ __name((command, { renderer, format, streams, compact, full }, body, view) => {
|
|
@@ -11512,9 +12471,10 @@ var renderAnswer = /* @__PURE__ */ __name((command, { renderer, format, streams,
|
|
|
11512
12471
|
const kept = withoutProviderRefs({ ...body, ...next.length > 0 ? { next } : {} });
|
|
11513
12472
|
if (next.length === 0)
|
|
11514
12473
|
delete kept.next;
|
|
11515
|
-
const
|
|
12474
|
+
const sealedBody = sealed(kept);
|
|
11516
12475
|
const environment = environmentOf(command);
|
|
11517
12476
|
const drawn = compact && !environment.agent;
|
|
12477
|
+
const whole = format === "json" && !drawn && !environment.agent ? withLargeAnswerStep(command, sealedBody) : sealedBody;
|
|
11518
12478
|
if (drawn) {
|
|
11519
12479
|
const lined = whole.next ? { ...whole, next: compactSteps(root, whole.next) } : whole;
|
|
11520
12480
|
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
@@ -11534,8 +12494,8 @@ var renderAnswer = /* @__PURE__ */ __name((command, { renderer, format, streams,
|
|
|
11534
12494
|
setExitCode(command, code);
|
|
11535
12495
|
if (drawn || format === "json")
|
|
11536
12496
|
return;
|
|
11537
|
-
for (const
|
|
11538
|
-
renderer.note(
|
|
12497
|
+
for (const step2 of next)
|
|
12498
|
+
renderer.note(step2.kind === "command" ? `\u2192 ${step2.why}: ${stepLine(root, step2)}` : `\u2192 ${step2.why}`);
|
|
11539
12499
|
}, "renderAnswer");
|
|
11540
12500
|
var renderDocument = /* @__PURE__ */ __name(({ renderer }, document2) => renderer.result(document2), "renderDocument");
|
|
11541
12501
|
var itemAnswer = /* @__PURE__ */ __name((item) => sealed(itemOf(item)), "itemAnswer");
|
|
@@ -11643,8 +12603,14 @@ export {
|
|
|
11643
12603
|
assertRetentionEvidenceRead,
|
|
11644
12604
|
historyWindow,
|
|
11645
12605
|
limitBatch,
|
|
12606
|
+
botFiles,
|
|
12607
|
+
ChatRegistry,
|
|
12608
|
+
registryProfiles,
|
|
12609
|
+
REPAIR_WORDS,
|
|
12610
|
+
repairConfigText,
|
|
11646
12611
|
permissionIssues,
|
|
11647
12612
|
publicIssue,
|
|
12613
|
+
fixVerb,
|
|
11648
12614
|
issueMessage,
|
|
11649
12615
|
rememberAccount,
|
|
11650
12616
|
recalledAccount,
|
|
@@ -11656,6 +12622,7 @@ export {
|
|
|
11656
12622
|
setExitCode,
|
|
11657
12623
|
provide,
|
|
11658
12624
|
environmentOf,
|
|
12625
|
+
withAgentLevels,
|
|
11659
12626
|
secretInputOf,
|
|
11660
12627
|
outputFor,
|
|
11661
12628
|
baseContext,
|
|
@@ -11672,6 +12639,7 @@ export {
|
|
|
11672
12639
|
logsInOrOut,
|
|
11673
12640
|
isLogin,
|
|
11674
12641
|
destroysNothing,
|
|
12642
|
+
admittedUnderLock,
|
|
11675
12643
|
changesStore,
|
|
11676
12644
|
readsOverMcpAt,
|
|
11677
12645
|
isStoreChange,
|
|
@@ -11748,9 +12716,9 @@ export {
|
|
|
11748
12716
|
answerEntity,
|
|
11749
12717
|
answerEntitySchema,
|
|
11750
12718
|
answerProjectionSchema,
|
|
12719
|
+
ON_CHAT_ROW,
|
|
11751
12720
|
STATUS_SIGNAL_ROWS,
|
|
11752
12721
|
entityRows,
|
|
11753
|
-
withoutProviderRefs,
|
|
11754
12722
|
IMAGE_MODELS,
|
|
11755
12723
|
DEFAULT_IMAGE_MODEL,
|
|
11756
12724
|
imageModel,
|
|
@@ -11765,6 +12733,8 @@ export {
|
|
|
11765
12733
|
failureSteps,
|
|
11766
12734
|
withLines,
|
|
11767
12735
|
stepLine,
|
|
12736
|
+
tooLargeSteps,
|
|
12737
|
+
withoutProviderRefs,
|
|
11768
12738
|
answerSchema,
|
|
11769
12739
|
listOf,
|
|
11770
12740
|
itemOf,
|