@wirecat/drive-cli 0.52.0 → 0.53.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/README.md +2 -2
- package/dist/bin/drive.js +2 -2
- package/dist/bin/drive.js.map +1 -1
- package/dist/bundle/{chunk-ZWSG7OCA.js → all-profiles-WRN35CUF.js} +11 -6
- package/dist/bundle/{anthropic-KW6KU36Y.js → anthropic-DZASXWG3.js} +1 -1
- package/dist/bundle/{app-server-TCJZ333E.js → app-server-4VHT7QZN.js} +33 -41
- package/dist/bundle/{bun-sqlite-RI7DR6RZ.js → bun-sqlite-2GOM5PM3.js} +1 -1
- package/dist/bundle/{chunk-LONV6HIK.js → chunk-2HHOMN2G.js} +440 -25
- package/dist/bundle/{chunk-4A2PIGC6.js → chunk-2PVDFLJJ.js} +8 -3
- package/dist/bundle/{chunk-725OHXKR.js → chunk-3RYX7IB6.js} +2218 -30
- package/dist/bundle/{chunk-CB7SBYLO.js → chunk-54BYJQ77.js} +41 -21
- package/dist/bundle/{chunk-5FONRUG6.js → chunk-5D4AEUVA.js} +1 -23
- package/dist/bundle/{chunk-RNSP57TC.js → chunk-6BNALDGA.js} +1 -1
- package/dist/bundle/{chunk-H47W2J6S.js → chunk-6XYGTRMQ.js} +812 -381
- package/dist/bundle/{chunk-UR32UWTQ.js → chunk-7IUMHMTP.js} +11 -0
- package/dist/bundle/{chunk-W7IK7E4B.js → chunk-BEL4XZ3M.js} +5 -7
- package/dist/bundle/{chunk-43QVYW3K.js → chunk-CL4GVCXS.js} +230 -56
- package/dist/bundle/{chunk-PQYVPCJ2.js → chunk-CNKILAWA.js} +18 -24
- package/dist/bundle/chunk-DOZOLBXE.js +110 -0
- package/dist/bundle/{chunk-2AUXBJRX.js → chunk-DT2YCB2V.js} +84 -11
- package/dist/bundle/{chunk-HQVJK5E7.js → chunk-DZMK255Y.js} +210 -357
- package/dist/bundle/{chunk-G6QF5KWF.js → chunk-E6XDFMRZ.js} +22 -28
- package/dist/bundle/{chunk-DW46P2DY.js → chunk-EKFEY3KP.js} +1 -1
- package/dist/bundle/{chunk-54O62JWP.js → chunk-F3KHUJEE.js} +24 -5
- package/dist/bundle/{chunk-I7UH5CTA.js → chunk-FXWBUTR7.js} +7 -9
- package/dist/bundle/{chunk-ZNZUZGSV.js → chunk-GE4DP24O.js} +131 -4
- package/dist/bundle/{chunk-PEOCBV2Z.js → chunk-GPJEYW2J.js} +1 -1
- package/dist/bundle/{chunk-A4UNTWAX.js → chunk-HM352LJR.js} +84 -15
- package/dist/bundle/{chunk-KYVXMEBC.js → chunk-IAQ4L6SM.js} +1 -1
- package/dist/bundle/{chunk-PQJYM5ES.js → chunk-IJFZKQC4.js} +1 -1
- package/dist/bundle/{chunk-O6IOL6RX.js → chunk-KPBCGUJC.js} +1 -1
- package/dist/bundle/{chunk-XOLQSCMF.js → chunk-KXMJE3XC.js} +2 -2
- package/dist/bundle/{chunk-33NVQGUY.js → chunk-LSGAJYVN.js} +2 -2
- package/dist/bundle/{chunk-2UIMEMWU.js → chunk-MK3N7WX7.js} +1 -1
- package/dist/bundle/{chunk-IDUNJCFO.js → chunk-OQMK6WXQ.js} +1 -1
- package/dist/bundle/{chunk-CM7GAXGD.js → chunk-PC4UA6UN.js} +1 -1
- package/dist/bundle/{chunk-YNFELLNQ.js → chunk-PIMMF67N.js} +2 -2
- package/dist/bundle/{chunk-WBTVGFXI.js → chunk-PR3DA7KA.js} +9 -9
- package/dist/bundle/{chunk-VJZST5RD.js → chunk-QXYGK6G5.js} +1 -1
- package/dist/bundle/{chunk-WQJBAWQP.js → chunk-R4TE4ZSD.js} +549 -224
- package/dist/bundle/{chunk-BSSCTWWK.js → chunk-RNIHKIQP.js} +1 -1
- package/dist/bundle/{chunk-PAXKALHV.js → chunk-SIWBUGBU.js} +116 -5
- package/dist/bundle/{chunk-2623YE5I.js → chunk-SQHPJBNO.js} +6 -8
- package/dist/bundle/chunk-SVTYS36O.js +5305 -0
- package/dist/bundle/{chunk-WLFUBNFX.js → chunk-T334CFU4.js} +2 -2
- package/dist/bundle/{chunk-UC22Q5KU.js → chunk-TZLO3ZZF.js} +16 -16
- package/dist/bundle/{chunk-5PLJKSG4.js → chunk-UFWK3L5Z.js} +4 -6
- package/dist/bundle/{chunk-FCJAHD4R.js → chunk-VTWADVEQ.js} +2 -2
- package/dist/bundle/{chunk-HX7Y2ASG.js → chunk-WJRJBQIM.js} +26040 -15126
- package/dist/bundle/{chunk-VSOLLTYT.js → chunk-YLKQSVLI.js} +5 -0
- package/dist/bundle/{chunk-IWFBAWZK.js → chunk-YQOVVCIA.js} +282 -10
- package/dist/bundle/{chunk-7YMDL4JQ.js → chunk-ZG6X24ON.js} +4 -1
- package/dist/bundle/{command-contract-I2YB5IXI.js → command-contract-D4UG3D33.js} +12 -15
- package/dist/bundle/{decode-EDN2ARXZ.js → decode-WAPM2VBH.js} +1 -1
- package/dist/bundle/drive.js +10 -21
- package/dist/bundle/{embed-3GSQIQXE.js → embed-HW3N3KNP.js} +4 -4
- package/dist/bundle/{embedder-6ULWRG3R.js → embedder-7WNFXYYP.js} +4 -4
- package/dist/bundle/{entry-IPRJLFHO.js → entry-J7YIRDPD.js} +4 -4
- package/dist/bundle/{first-run-FGHGWHC2.js → first-run-53CL2IYH.js} +6 -6
- package/dist/bundle/{first-screen-M62KTPZG.js → first-screen-2KT7HM2K.js} +13 -16
- package/dist/bundle/{google-BD3ZNFVJ.js → google-5NNVARNR.js} +2 -2
- package/dist/bundle/{chunk-GR5GGZKH.js → google-api-EQQH53QD.js} +60 -4
- package/dist/bundle/grants-4NETZ4MR.js +98 -0
- package/dist/bundle/{identity-QLBSASO5.js → identity-LBTXDMTA.js} +4 -2
- package/dist/bundle/{login-VNZKRSAD.js → login-Y6ENYKC3.js} +50 -52
- package/dist/bundle/{node-sqlite-J3OODPYK.js → node-sqlite-FSQIKGED.js} +1 -1
- package/dist/bundle/{oauth-L4VTCBLF.js → oauth-HF5USWXY.js} +5 -5
- package/dist/bundle/{open-SGUN7ZVF.js → open-NHGJENCX.js} +2 -2
- package/dist/bundle/{openai-RLVISEDH.js → openai-3JCJYKNX.js} +6 -6
- package/dist/bundle/{program-6S5EH7BS.js → program-QAJ66K3Z.js} +715 -904
- package/dist/bundle/{prompt-AUWTBLO7.js → prompt-LQJBCCUF.js} +3 -3
- package/dist/bundle/{reasons-M5AKCNCU.js → reasons-J57GSRWN.js} +1 -1
- package/dist/bundle/{recognize-ORX2UBQW.js → recognize-QM3LN4ZF.js} +1 -1
- package/dist/bundle/{remote-AGIJY73X.js → remote-WREGEZJQ.js} +5 -5
- package/dist/bundle/{rerank-R6PE44M5.js → rerank-YFUB6J6M.js} +4 -4
- package/dist/bundle/{chunk-G7DCVJ4F.js → serve-7NFEZ564.js} +7 -4
- package/dist/bundle/{chunk-F7UUZATI.js → server-KBCFZ2AU.js} +38 -11
- package/dist/bundle/server-UYVL2CFI.js +63 -0
- package/dist/bundle/{services-HZFTTZSF.js → services-C3XWRA2W.js} +16 -21
- package/dist/bundle/{sqlite-runtime-DTGPR2T2.js → sqlite-runtime-H3TSAMIN.js} +3 -3
- package/dist/bundle/{state-WG3JKJM3.js → state-S2Q53L6L.js} +3 -3
- package/dist/bundle/{store-33VHIMEO.js → store-H345VQHP.js} +6 -8
- package/dist/bundle/{store-EV72MT5U.js → store-I27LAJPU.js} +7 -9
- package/dist/bundle/store-maintenance-command-3XA73XMC.js +52 -0
- package/dist/bundle/{chunk-GNI7INK6.js → terminal-DHJ4D3BC.js} +2 -3
- package/dist/bundle/tokens-7MUGKFEM.js +96 -0
- package/dist/commands/context.d.ts +14 -13
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +1 -4
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/mirrors.d.ts.map +1 -1
- package/dist/commands/mirrors.js +1 -2
- package/dist/commands/mirrors.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +2 -1
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/upgrade.d.ts +1 -1
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/commands/upgrade.js +4 -9
- package/dist/commands/upgrade.js.map +1 -1
- package/dist/config.d.ts +182 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +38 -3
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.d.ts +0 -3
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -234
- package/dist/contract-overrides.js.map +1 -1
- package/dist/first-screen.d.ts +3 -2
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +17 -22
- package/dist/first-screen.js.map +1 -1
- package/dist/grants.d.ts +9 -0
- package/dist/grants.d.ts.map +1 -0
- package/dist/grants.js +30 -0
- package/dist/grants.js.map +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +2 -0
- package/dist/identity.js.map +1 -1
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +7 -3
- package/dist/login.js.map +1 -1
- package/dist/policy-keys.d.ts +12 -0
- package/dist/policy-keys.d.ts.map +1 -0
- package/dist/policy-keys.js +107 -0
- package/dist/policy-keys.js.map +1 -0
- package/dist/policy.d.ts +1 -8
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +2 -105
- package/dist/policy.js.map +1 -1
- package/dist/program.d.ts +8 -4
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +251 -222
- package/dist/program.js.map +1 -1
- package/dist/reasons.js +1 -1
- package/dist/reasons.js.map +1 -1
- package/dist/testing/mcp.d.ts +28 -0
- package/dist/testing/mcp.d.ts.map +1 -0
- package/dist/testing/mcp.js +56 -0
- package/dist/testing/mcp.js.map +1 -0
- package/dist/tokens.d.ts +0 -2
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +12 -13
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -3
- package/scenarios/agent-access.md +4 -2
- package/dist/bundle/all-profiles-CYW6XBBS.js +0 -26
- package/dist/bundle/chunk-234MHU76.js +0 -384
- package/dist/bundle/chunk-4CPLOMRK.js +0 -1714
- package/dist/bundle/chunk-4Z6TCU5T.js +0 -9
- package/dist/bundle/chunk-DO4PDQY5.js +0 -48
- package/dist/bundle/chunk-FDWYPONW.js +0 -1988
- package/dist/bundle/chunk-FQRJWVEB.js +0 -2
- package/dist/bundle/chunk-NPSZPUK6.js +0 -193
- package/dist/bundle/chunk-PDGECM5D.js +0 -138
- package/dist/bundle/chunk-Q765VPZY.js +0 -421
- package/dist/bundle/chunk-WQRGA75U.js +0 -256
- package/dist/bundle/chunk-X6ID5EAR.js +0 -522
- package/dist/bundle/chunk-YVPHJHIL.js +0 -15572
- package/dist/bundle/chunk-Z47LOJUS.js +0 -484
- package/dist/bundle/failure-4CVEVY45.js +0 -37
- package/dist/bundle/google-api-BDUWZMRV.js +0 -83
- package/dist/bundle/mcp-5SNSMI2M.js +0 -502
- package/dist/bundle/mcp-JZSYPQA4.js +0 -96
- package/dist/bundle/serve-VOBAQHAQ.js +0 -20
- package/dist/bundle/server-24PS4M7U.js +0 -70
- package/dist/bundle/server-G6HFZ2CK.js +0 -57
- package/dist/bundle/store-maintenance-command-ZTUEI4EC.js +0 -58
- package/dist/bundle/terminal-TFCTWLOS.js +0 -11
- package/dist/bundle/tokens-XDQXUFDQ.js +0 -104
- package/dist/commands/doctor.d.ts +0 -56
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -75
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -6
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -156
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/skill.d.ts +0 -6
- package/dist/commands/skill.d.ts.map +0 -1
- package/dist/commands/skill.js +0 -34
- package/dist/commands/skill.js.map +0 -1
- package/dist/failure.d.ts +0 -88
- package/dist/failure.d.ts.map +0 -1
- package/dist/failure.js +0 -60
- package/dist/failure.js.map +0 -1
- package/dist/mcp.d.ts +0 -175
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js +0 -412
- package/dist/mcp.js.map +0 -1
|
@@ -12,6 +12,16 @@ var MAX_BUFFERED_INPUT = 16 * 1024 * 1024;
|
|
|
12
12
|
var MAX_SECRET_INPUT = 64 * 1024;
|
|
13
13
|
var policies = /* @__PURE__ */ new WeakMap();
|
|
14
14
|
var inputPolicy = /* @__PURE__ */ __name((input) => policies.get(input) ?? {}, "inputPolicy");
|
|
15
|
+
var provideInputPolicy = /* @__PURE__ */ __name((input, policy) => {
|
|
16
|
+
const previous = policies.get(input);
|
|
17
|
+
policies.set(input, policy);
|
|
18
|
+
return () => {
|
|
19
|
+
if (previous)
|
|
20
|
+
policies.set(input, previous);
|
|
21
|
+
else
|
|
22
|
+
policies.delete(input);
|
|
23
|
+
};
|
|
24
|
+
}, "provideInputPolicy");
|
|
15
25
|
var bufferedInput = /* @__PURE__ */ __name((input, options = {}) => {
|
|
16
26
|
const policy = inputPolicy(input);
|
|
17
27
|
const maxBytes = options.maxBytes ?? policy.maxBytes ?? MAX_BUFFERED_INPUT;
|
|
@@ -67,5 +77,6 @@ export {
|
|
|
67
77
|
MAX_BUFFERED_INPUT,
|
|
68
78
|
MAX_SECRET_INPUT,
|
|
69
79
|
inputPolicy,
|
|
80
|
+
provideInputPolicy,
|
|
70
81
|
bufferedInput
|
|
71
82
|
};
|
|
@@ -12,6 +12,10 @@ import {
|
|
|
12
12
|
botNamed,
|
|
13
13
|
canonicalTagNamed,
|
|
14
14
|
decodeProjectAnnotationSnapshot,
|
|
15
|
+
filesAccountSql,
|
|
16
|
+
folderProviderOf,
|
|
17
|
+
folderProviderSql,
|
|
18
|
+
isDocumentAccountProvider,
|
|
15
19
|
migrate,
|
|
16
20
|
openSqlite,
|
|
17
21
|
openStoreContext,
|
|
@@ -28,13 +32,7 @@ import {
|
|
|
28
32
|
tagMemberIds,
|
|
29
33
|
thingOf,
|
|
30
34
|
write
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import {
|
|
33
|
-
filesAccountSql,
|
|
34
|
-
folderProviderOf,
|
|
35
|
-
folderProviderSql,
|
|
36
|
-
isDocumentAccountProvider
|
|
37
|
-
} from "./chunk-234MHU76.js";
|
|
35
|
+
} from "./chunk-R4TE4ZSD.js";
|
|
38
36
|
import {
|
|
39
37
|
queryFieldsOf
|
|
40
38
|
} from "./chunk-NHBUTCNR.js";
|
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
answerOf,
|
|
5
5
|
messengerContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-54BYJQ77.js";
|
|
7
7
|
import {
|
|
8
8
|
chatEventAnswer,
|
|
9
9
|
memberAnswer,
|
|
@@ -12,17 +12,14 @@ import {
|
|
|
12
12
|
serveRelay,
|
|
13
13
|
typedQuery,
|
|
14
14
|
withQuery
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
renderMessages
|
|
18
|
-
} from "./chunk-NPSZPUK6.js";
|
|
15
|
+
} from "./chunk-DT2YCB2V.js";
|
|
19
16
|
import {
|
|
20
17
|
holdLock,
|
|
21
18
|
lockPath,
|
|
22
19
|
releaseLock,
|
|
23
20
|
servingProfiles,
|
|
24
21
|
takeLock
|
|
25
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-IAQ4L6SM.js";
|
|
26
23
|
import {
|
|
27
24
|
RULES_VERSION,
|
|
28
25
|
applyTaskRulesOnArrival,
|
|
@@ -32,12 +29,18 @@ import {
|
|
|
32
29
|
senderIsMe,
|
|
33
30
|
servicesFor,
|
|
34
31
|
syncsOneChat
|
|
35
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-6XYGTRMQ.js";
|
|
33
|
+
import {
|
|
34
|
+
stringWidth,
|
|
35
|
+
wrapAnsi
|
|
36
|
+
} from "./chunk-HTQTIKWP.js";
|
|
36
37
|
import {
|
|
38
|
+
Command,
|
|
37
39
|
LOCAL_READ,
|
|
38
40
|
LOCAL_WRITE,
|
|
39
41
|
REMOTE_READ,
|
|
40
42
|
REMOTE_WRITE,
|
|
43
|
+
annotate,
|
|
41
44
|
destroysNothing,
|
|
42
45
|
endpoint,
|
|
43
46
|
environmentOf,
|
|
@@ -54,30 +57,24 @@ import {
|
|
|
54
57
|
snakeKeys,
|
|
55
58
|
storeTable,
|
|
56
59
|
withoutProviderRefs
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import {
|
|
59
|
-
Command,
|
|
60
|
-
annotate
|
|
61
|
-
} from "./chunk-725OHXKR.js";
|
|
60
|
+
} from "./chunk-3RYX7IB6.js";
|
|
62
61
|
import {
|
|
63
62
|
holdersOf
|
|
64
63
|
} from "./chunk-NSIFQ5OP.js";
|
|
65
64
|
import {
|
|
66
65
|
codeOf,
|
|
67
|
-
currentRun
|
|
68
|
-
|
|
66
|
+
currentRun,
|
|
67
|
+
levelFor
|
|
68
|
+
} from "./chunk-2HHOMN2G.js";
|
|
69
69
|
import {
|
|
70
70
|
failureKey
|
|
71
|
-
} from "./chunk-
|
|
72
|
-
import {
|
|
73
|
-
levelFor
|
|
74
|
-
} from "./chunk-Q765VPZY.js";
|
|
71
|
+
} from "./chunk-YLKQSVLI.js";
|
|
75
72
|
import {
|
|
76
73
|
envName
|
|
77
74
|
} from "./chunk-ZDLIO76S.js";
|
|
78
75
|
import {
|
|
79
76
|
readSecret
|
|
80
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-IJFZKQC4.js";
|
|
81
78
|
import {
|
|
82
79
|
checkedOptions,
|
|
83
80
|
range
|
|
@@ -94,12 +91,14 @@ import {
|
|
|
94
91
|
fileFacts,
|
|
95
92
|
fillSearchIndex,
|
|
96
93
|
fillStems,
|
|
94
|
+
formatLocator,
|
|
97
95
|
involvementStoreOver,
|
|
98
96
|
migrate,
|
|
99
97
|
noteIndexState,
|
|
100
98
|
openSqlite,
|
|
101
99
|
openStore,
|
|
102
100
|
orphanPointers,
|
|
101
|
+
parseLocator,
|
|
103
102
|
pendingNormalization,
|
|
104
103
|
readStoreTables,
|
|
105
104
|
resetAttachmentWords,
|
|
@@ -113,26 +112,24 @@ import {
|
|
|
113
112
|
storeClients,
|
|
114
113
|
storeContents,
|
|
115
114
|
vectorIndexCounts
|
|
116
|
-
} from "./chunk-
|
|
117
|
-
import {
|
|
118
|
-
formatLocator,
|
|
119
|
-
parseLocator
|
|
120
|
-
} from "./chunk-234MHU76.js";
|
|
115
|
+
} from "./chunk-R4TE4ZSD.js";
|
|
121
116
|
import {
|
|
122
117
|
queryFieldsOf
|
|
123
118
|
} from "./chunk-NHBUTCNR.js";
|
|
124
119
|
import {
|
|
125
120
|
storePath
|
|
126
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-QXYGK6G5.js";
|
|
127
122
|
import {
|
|
128
123
|
openCache
|
|
129
|
-
} from "./chunk-
|
|
124
|
+
} from "./chunk-LSGAJYVN.js";
|
|
130
125
|
import {
|
|
131
126
|
Credentials,
|
|
132
127
|
pathsAreOverridden,
|
|
133
128
|
resolvePaths,
|
|
129
|
+
singleLine,
|
|
130
|
+
visibleControls,
|
|
134
131
|
writeSecurely
|
|
135
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-DZMK255Y.js";
|
|
136
133
|
import {
|
|
137
134
|
CliError,
|
|
138
135
|
array,
|
|
@@ -2442,10 +2439,10 @@ var require_liquid_node = __commonJS({
|
|
|
2442
2439
|
readHashes(jekyllStyle) {
|
|
2443
2440
|
const hashes = [];
|
|
2444
2441
|
while (true) {
|
|
2445
|
-
const
|
|
2446
|
-
if (!
|
|
2442
|
+
const hash2 = this.readHash(jekyllStyle);
|
|
2443
|
+
if (!hash2)
|
|
2447
2444
|
return hashes;
|
|
2448
|
-
hashes.push(
|
|
2445
|
+
hashes.push(hash2);
|
|
2449
2446
|
}
|
|
2450
2447
|
}
|
|
2451
2448
|
readHash(jekyllStyle) {
|
|
@@ -2714,16 +2711,16 @@ var require_liquid_node = __commonJS({
|
|
|
2714
2711
|
constructor(input, jekyllStyle) {
|
|
2715
2712
|
this.hash = {};
|
|
2716
2713
|
const tokenizer = input instanceof Tokenizer ? input : new Tokenizer(input, {});
|
|
2717
|
-
for (const
|
|
2718
|
-
this.hash[
|
|
2714
|
+
for (const hash2 of tokenizer.readHashes(jekyllStyle)) {
|
|
2715
|
+
this.hash[hash2.name.content] = hash2.value;
|
|
2719
2716
|
}
|
|
2720
2717
|
}
|
|
2721
2718
|
*render(ctx) {
|
|
2722
|
-
const
|
|
2719
|
+
const hash2 = {};
|
|
2723
2720
|
for (const key of Object.keys(this.hash)) {
|
|
2724
|
-
|
|
2721
|
+
hash2[key] = this.hash[key] === void 0 ? true : yield evalToken(this.hash[key], ctx);
|
|
2725
2722
|
}
|
|
2726
|
-
return
|
|
2723
|
+
return hash2;
|
|
2727
2724
|
}
|
|
2728
2725
|
};
|
|
2729
2726
|
function createTagClass(options2) {
|
|
@@ -2735,8 +2732,8 @@ var require_liquid_node = __commonJS({
|
|
|
2735
2732
|
}
|
|
2736
2733
|
}
|
|
2737
2734
|
*render(ctx, emitter) {
|
|
2738
|
-
const
|
|
2739
|
-
return yield options2.render.call(this, ctx, emitter,
|
|
2735
|
+
const hash2 = yield new Hash(this.token.args, ctx.opts.keyValueSeparator).render(ctx);
|
|
2736
|
+
return yield options2.render.call(this, ctx, emitter, hash2);
|
|
2740
2737
|
}
|
|
2741
2738
|
};
|
|
2742
2739
|
}
|
|
@@ -4117,10 +4114,10 @@ var require_liquid_node = __commonJS({
|
|
|
4117
4114
|
const str = stringify(v);
|
|
4118
4115
|
pattern = stringify(pattern);
|
|
4119
4116
|
replacement = stringify(replacement);
|
|
4120
|
-
const
|
|
4121
|
-
const outputSize = str.length + (
|
|
4117
|
+
const parts2 = str.split(pattern);
|
|
4118
|
+
const outputSize = str.length + (parts2.length - 1) * (replacement.length - pattern.length);
|
|
4122
4119
|
this.context.memoryLimit.use(outputSize);
|
|
4123
|
-
return
|
|
4120
|
+
return parts2.join(replacement);
|
|
4124
4121
|
}
|
|
4125
4122
|
__name(replace, "replace");
|
|
4126
4123
|
function replace_first(v, arg1, arg2) {
|
|
@@ -4358,17 +4355,17 @@ var require_liquid_node = __commonJS({
|
|
|
4358
4355
|
}
|
|
4359
4356
|
const continueKey = "continue-" + this.variable + "-" + this.collection.getText();
|
|
4360
4357
|
ctx.push(createScope({ continue: ctx.getRegister(continueKey, {}) }));
|
|
4361
|
-
const
|
|
4358
|
+
const hash2 = yield this.hash.render(ctx);
|
|
4362
4359
|
ctx.pop();
|
|
4363
|
-
const modifiers = this.liquid.options.orderedFilterParameters ? Object.keys(
|
|
4360
|
+
const modifiers = this.liquid.options.orderedFilterParameters ? Object.keys(hash2).filter((x) => MODIFIERS.includes(x)) : MODIFIERS.filter((x) => hash2[x] !== void 0);
|
|
4364
4361
|
collection = modifiers.reduce((collection2, modifier) => {
|
|
4365
4362
|
if (modifier === "offset")
|
|
4366
|
-
return offset(collection2,
|
|
4363
|
+
return offset(collection2, hash2["offset"]);
|
|
4367
4364
|
if (modifier === "limit")
|
|
4368
|
-
return limit2(collection2,
|
|
4365
|
+
return limit2(collection2, hash2["limit"]);
|
|
4369
4366
|
return reversed(collection2);
|
|
4370
4367
|
}, collection);
|
|
4371
|
-
ctx.setRegister(continueKey, (
|
|
4368
|
+
ctx.setRegister(continueKey, (hash2["offset"] || 0) + collection.length);
|
|
4372
4369
|
const scope = createScope({ forloop: new ForloopDrop(collection.length, this.collection.getText(), this.variable) });
|
|
4373
4370
|
ctx.push(scope);
|
|
4374
4371
|
for (const item of collection) {
|
|
@@ -4583,12 +4580,12 @@ var require_liquid_node = __commonJS({
|
|
|
4583
4580
|
this.hash = new Hash(tokenizer, liquid.options.keyValueSeparator);
|
|
4584
4581
|
}
|
|
4585
4582
|
*render(ctx, emitter) {
|
|
4586
|
-
const { liquid, hash } = this;
|
|
4583
|
+
const { liquid, hash: hash2 } = this;
|
|
4587
4584
|
const filepath = yield renderFilePath(this.file, ctx, liquid);
|
|
4588
4585
|
assert(filepath, () => `illegal file path "${filepath}"`);
|
|
4589
4586
|
const childCtx = ctx.spawn();
|
|
4590
4587
|
const scope = childCtx.bottom();
|
|
4591
|
-
__assign(scope, yield
|
|
4588
|
+
__assign(scope, yield hash2.render(ctx));
|
|
4592
4589
|
if (this.with) {
|
|
4593
4590
|
const { value, alias } = this.with;
|
|
4594
4591
|
scope[alias || filepath] = yield evalToken(value, ctx);
|
|
@@ -4709,14 +4706,14 @@ var require_liquid_node = __commonJS({
|
|
|
4709
4706
|
this.hash = new Hash(tokenizer, liquid.options.jekyllInclude || liquid.options.keyValueSeparator);
|
|
4710
4707
|
}
|
|
4711
4708
|
*render(ctx, emitter) {
|
|
4712
|
-
const { liquid, hash, withVar } = this;
|
|
4709
|
+
const { liquid, hash: hash2, withVar } = this;
|
|
4713
4710
|
const { renderer } = liquid;
|
|
4714
4711
|
const filepath = yield renderFilePath(this.file, ctx, liquid);
|
|
4715
4712
|
assert(filepath, () => `illegal file path "${filepath}"`);
|
|
4716
4713
|
const saved = ctx.saveRegister("blocks", "blockMode");
|
|
4717
4714
|
ctx.setRegister("blocks", {});
|
|
4718
4715
|
ctx.setRegister("blockMode", BlockMode.OUTPUT);
|
|
4719
|
-
const scope = createScope(yield
|
|
4716
|
+
const scope = createScope(yield hash2.render(ctx));
|
|
4720
4717
|
if (withVar)
|
|
4721
4718
|
scope[filepath] = yield evalToken(withVar, ctx);
|
|
4722
4719
|
const templates = yield liquid._parsePartialFile(filepath, ctx.sync, this.currentFile);
|
|
@@ -5517,8 +5514,8 @@ var keyOf = /* @__PURE__ */ __name((password, salt, { log2N, r, p }) => new Prom
|
|
|
5517
5514
|
var checkFor = /* @__PURE__ */ __name(async (password, cost = COST) => {
|
|
5518
5515
|
refuseEmpty(password);
|
|
5519
5516
|
const salt = randomBytes(SALT);
|
|
5520
|
-
const
|
|
5521
|
-
return { salt: salt.toString("hex"), ...cost, hash };
|
|
5517
|
+
const hash2 = createHash("sha256").update(await keyOf(password, salt, cost)).digest("hex");
|
|
5518
|
+
return { salt: salt.toString("hex"), ...cost, hash: hash2 };
|
|
5522
5519
|
}, "checkFor");
|
|
5523
5520
|
var passes = /* @__PURE__ */ __name(async (password, check2) => {
|
|
5524
5521
|
refuseCost(check2);
|
|
@@ -6251,14 +6248,14 @@ var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
|
6251
6248
|
}, "decide");
|
|
6252
6249
|
var mentionsOwner = /* @__PURE__ */ __name((message, owner) => message.replyTo?.outgoing === true || owner.id !== null && (message.mentions ?? []).includes(owner.id) || owner.username !== void 0 && hasWord(message.text, `@${owner.username}`), "mentionsOwner");
|
|
6253
6250
|
var local = /* @__PURE__ */ __name((zone, now) => {
|
|
6254
|
-
const
|
|
6251
|
+
const parts2 = new Intl.DateTimeFormat("en-US", {
|
|
6255
6252
|
timeZone: zone,
|
|
6256
6253
|
weekday: "short",
|
|
6257
6254
|
hour: "2-digit",
|
|
6258
6255
|
minute: "2-digit",
|
|
6259
6256
|
hourCycle: "h23"
|
|
6260
6257
|
}).formatToParts(now);
|
|
6261
|
-
const part = /* @__PURE__ */ __name((type) =>
|
|
6258
|
+
const part = /* @__PURE__ */ __name((type) => parts2.find((one) => one.type === type)?.value ?? "", "part");
|
|
6262
6259
|
return {
|
|
6263
6260
|
day: part("weekday").toLowerCase(),
|
|
6264
6261
|
minute: Number(part("hour")) * 60 + Number(part("minute"))
|
|
@@ -6325,7 +6322,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
6325
6322
|
let parsingAI = false;
|
|
6326
6323
|
try {
|
|
6327
6324
|
const zone = input.timezone ?? "UTC";
|
|
6328
|
-
const
|
|
6325
|
+
const parts2 = Object.fromEntries(new Intl.DateTimeFormat("en-CA", {
|
|
6329
6326
|
timeZone: zone,
|
|
6330
6327
|
year: "numeric",
|
|
6331
6328
|
month: "2-digit",
|
|
@@ -6336,7 +6333,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
6336
6333
|
timeZoneName: "longOffset",
|
|
6337
6334
|
hourCycle: "h23"
|
|
6338
6335
|
}).formatToParts(input.now).map(({ type, value }) => [type, value]));
|
|
6339
|
-
const localTime = `${
|
|
6336
|
+
const localTime = `${parts2.year}-${parts2.month}-${parts2.day}T${parts2.hour}:${parts2.minute}:${parts2.second}${parts2.timeZoneName?.replace("GMT", "") || "+00:00"}`;
|
|
6340
6337
|
const engine = new import_liquidjs.Liquid({
|
|
6341
6338
|
ownPropertyOnly: true,
|
|
6342
6339
|
strictVariables: true,
|
|
@@ -6651,7 +6648,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
6651
6648
|
if (!adapter && target.provider === "openai")
|
|
6652
6649
|
adapter = openai;
|
|
6653
6650
|
if (!adapter && target.provider === "anthropic")
|
|
6654
|
-
adapter = (await import("./anthropic-
|
|
6651
|
+
adapter = (await import("./anthropic-DZASXWG3.js")).anthropic;
|
|
6655
6652
|
if (!adapter)
|
|
6656
6653
|
throw new CliError("validation_error", `no model adapter for ${target.provider}`);
|
|
6657
6654
|
if (request.images !== void 0 && adapter.images !== true)
|
|
@@ -6984,6 +6981,182 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
6984
6981
|
};
|
|
6985
6982
|
}, "stemFills");
|
|
6986
6983
|
|
|
6984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/render/messages.js
|
|
6985
|
+
import { styleText } from "node:util";
|
|
6986
|
+
var TIME_WIDTH = 8;
|
|
6987
|
+
var INDENT = " ".repeat(TIME_WIDTH + 2);
|
|
6988
|
+
var MIN_WIDTH = 40;
|
|
6989
|
+
var SENDER_COLOURS = ["green", "yellow", "magenta", "blue", "red"];
|
|
6990
|
+
var renderMessages = /* @__PURE__ */ __name((messages, options2 = {}) => {
|
|
6991
|
+
if (messages.length === 0)
|
|
6992
|
+
return "(nothing)";
|
|
6993
|
+
const day = dayFormatter(options2);
|
|
6994
|
+
const paint = painter(options2);
|
|
6995
|
+
let previous;
|
|
6996
|
+
const blocks = [];
|
|
6997
|
+
for (const message of messages) {
|
|
6998
|
+
const date = day(message.timestamp);
|
|
6999
|
+
if (date !== previous)
|
|
7000
|
+
blocks.push(paint("dim", `\u2500\u2500 ${date} \u2500\u2500`));
|
|
7001
|
+
previous = date;
|
|
7002
|
+
blocks.push(renderMessage(message, options2));
|
|
7003
|
+
}
|
|
7004
|
+
return blocks.join("\n\n");
|
|
7005
|
+
}, "renderMessages");
|
|
7006
|
+
var renderMessage = /* @__PURE__ */ __name((message, options2 = {}) => {
|
|
7007
|
+
const paint = painter(options2);
|
|
7008
|
+
const width = Math.max(MIN_WIDTH, options2.width ?? 80);
|
|
7009
|
+
const room = width - INDENT.length;
|
|
7010
|
+
const time = timeFormatter(options2);
|
|
7011
|
+
const verbosity = options2.verbosity ?? 0;
|
|
7012
|
+
const chat = "chatTitle" in message ? paint("dim", ` \xB7 ${singleLine(message.chatTitle ?? message.chatId)}`) : "";
|
|
7013
|
+
const mark = "anchor" in message && message.anchor ? paint("bold", " \u25C0") : "";
|
|
7014
|
+
const lines = [`${paint("dim", time(message.timestamp))} ${senderOf(message, options2)}${chat}${mark}`];
|
|
7015
|
+
const body = /* @__PURE__ */ __name((text) => wrapAnsi(visibleControls(text), room, { hard: true }).split("\n"), "body");
|
|
7016
|
+
const email = message.email;
|
|
7017
|
+
if (email)
|
|
7018
|
+
lines.push(paint("dim", mailLine(email)));
|
|
7019
|
+
if (message.replyTo)
|
|
7020
|
+
lines.push(paint("dim", preview("\u21B3", message.replyTo, room, options2)));
|
|
7021
|
+
if (message.forwardedFrom) {
|
|
7022
|
+
lines.push(paint("dim", `\u21AA ${nameOf(message.forwardedFrom, options2)}`));
|
|
7023
|
+
if (message.forwardedFrom.text)
|
|
7024
|
+
for (const line of body(message.forwardedFrom.text))
|
|
7025
|
+
lines.push(line);
|
|
7026
|
+
lines.push(...attachmentLines(message.forwardedFrom.attachments, paint, options2));
|
|
7027
|
+
}
|
|
7028
|
+
if (message.text)
|
|
7029
|
+
for (const line of body(message.text))
|
|
7030
|
+
lines.push(line);
|
|
7031
|
+
lines.push(...attachmentLines(message.attachments, paint, options2));
|
|
7032
|
+
if (message.reactions && message.reactions.total > 0)
|
|
7033
|
+
lines.push(paint("dim", reactionLine(message.reactions)));
|
|
7034
|
+
if (message.editedAt)
|
|
7035
|
+
lines.push(paint("dim", `edited ${editedAt(message, options2)}`));
|
|
7036
|
+
if (verbosity >= 1) {
|
|
7037
|
+
const fields = [
|
|
7038
|
+
["message", message.id],
|
|
7039
|
+
["sender", message.senderId],
|
|
7040
|
+
["chat", message.chatId],
|
|
7041
|
+
["reply to", message.replyTo?.id ?? message.replyToId],
|
|
7042
|
+
["thread", message.threadId],
|
|
7043
|
+
["forward of", message.forwardedFrom?.id],
|
|
7044
|
+
...message.attachments.map((a) => ["link", a.url])
|
|
7045
|
+
];
|
|
7046
|
+
if (verbosity >= 2) {
|
|
7047
|
+
fields.push(["provider", options2.provider], ["profile", options2.profile], ["sent", message.timestamp], ["edited", message.editedAt], ["outgoing", message.outgoing === null ? "unknown" : String(message.outgoing)], ...message.attachments.map((a) => ["attachment", JSON.stringify(a)]), ["metadata", message.providerMetadata && JSON.stringify(message.providerMetadata)]);
|
|
7048
|
+
}
|
|
7049
|
+
const shown = fields.filter((field) => typeof field[1] === "string");
|
|
7050
|
+
const label = Math.max(...shown.map(([key]) => key.length));
|
|
7051
|
+
lines.push("", ...shown.map(([key, value]) => paint("dim", `${key.padEnd(label)} ${singleLine(value)}`)));
|
|
7052
|
+
}
|
|
7053
|
+
return lines.map((line, index) => index === 0 || line === "" ? line : `${INDENT}${line}`).join("\n");
|
|
7054
|
+
}, "renderMessage");
|
|
7055
|
+
var mailLine = /* @__PURE__ */ __name(({ to, cc, labels }) => {
|
|
7056
|
+
const names = /* @__PURE__ */ __name((people) => people.map(({ name, address }) => singleLine(name ?? address)).join(", "), "names");
|
|
7057
|
+
return [to.length ? `to ${names(to)}` : "", cc.length ? `cc ${names(cc)}` : "", labels.join(", ")].filter(Boolean).join(" \xB7 ");
|
|
7058
|
+
}, "mailLine");
|
|
7059
|
+
var painter = /* @__PURE__ */ __name(({ color = false }) => (style, text) => color ? styleText(style, text, { validateStream: false }) : text, "painter");
|
|
7060
|
+
var senderOf = /* @__PURE__ */ __name((message, options2) => {
|
|
7061
|
+
const paint = painter(options2);
|
|
7062
|
+
if (message.outgoing === true)
|
|
7063
|
+
return paint(["bold", "cyan"], you(options2));
|
|
7064
|
+
const name = nameOf(message, options2);
|
|
7065
|
+
if (!options2.senderColors)
|
|
7066
|
+
return paint("bold", name);
|
|
7067
|
+
const colour = SENDER_COLOURS[hash(message.senderId ?? name) % SENDER_COLOURS.length] ?? "green";
|
|
7068
|
+
return paint(["bold", colour], name);
|
|
7069
|
+
}, "senderOf");
|
|
7070
|
+
var nameOf = /* @__PURE__ */ __name(({ senderName, senderId, outgoing }, options2) => outgoing === true ? you(options2) : singleLine(senderName ?? senderId ?? "unknown"), "nameOf");
|
|
7071
|
+
var DEFAULT_LOCALE = "ru-RU";
|
|
7072
|
+
var you = /* @__PURE__ */ __name(({ locale = DEFAULT_LOCALE }) => locale.startsWith("ru") ? "\u0432\u044B" : "you", "you");
|
|
7073
|
+
var hash = /* @__PURE__ */ __name((value) => [...value].reduce((sum, char) => sum * 31 + char.charCodeAt(0) >>> 0, 7), "hash");
|
|
7074
|
+
var preview = /* @__PURE__ */ __name((mark, quoted, room, options2) => {
|
|
7075
|
+
const text = singleLine(quoted.text.split("\n")[0] ?? "") || (quoted.attachments[0] ? `\u{1F4CE} ${quoted.attachments[0].kind}` : "");
|
|
7076
|
+
const line = text ? `${mark} ${nameOf(quoted, options2)}: ${text}` : `${mark} message ${quoted.id}`;
|
|
7077
|
+
if (stringWidth(line) <= room)
|
|
7078
|
+
return line;
|
|
7079
|
+
return `${wrapAnsi(line, room - 1, { hard: true }).split("\n")[0]}\u2026`;
|
|
7080
|
+
}, "preview");
|
|
7081
|
+
var attachmentLines = /* @__PURE__ */ __name((attachments, paint, options2) => {
|
|
7082
|
+
const link = /* @__PURE__ */ __name((label, raw) => {
|
|
7083
|
+
if (raw === void 0)
|
|
7084
|
+
return label;
|
|
7085
|
+
const url = singleLine(raw);
|
|
7086
|
+
return options2.color ? `\x1B]8;;${url}\x07${label}\x1B]8;;\x07` : `${label} ${url}`;
|
|
7087
|
+
}, "link");
|
|
7088
|
+
let number2 = 0;
|
|
7089
|
+
const keyboard = attachments.flatMap((attachment) => attachment.buttons ?? []).map((row) => paint("dim", row.map((button) => link(`[${++number2} ${singleLine(button.text)}]`, button.url)).join(" ")));
|
|
7090
|
+
const polls = attachments.flatMap((attachment) => attachment.poll ? pollLines(attachment.poll) : []);
|
|
7091
|
+
const cards = attachments.flatMap(({ contact }) => contact ? [
|
|
7092
|
+
paint("dim", `\u{1F464} ${[contact.name, contact.phone].flatMap((part) => part ? [singleLine(part)] : []).join(" \xB7 ")}`)
|
|
7093
|
+
] : []);
|
|
7094
|
+
const groups = /* @__PURE__ */ new Map();
|
|
7095
|
+
for (const attachment of attachments) {
|
|
7096
|
+
if (attachment.buttons || attachment.poll || attachment.contact)
|
|
7097
|
+
continue;
|
|
7098
|
+
const key = singleLine(attachment.name ?? attachment.title ?? attachment.kind);
|
|
7099
|
+
groups.set(key, [...groups.get(key) ?? [], attachment]);
|
|
7100
|
+
}
|
|
7101
|
+
const files = [...groups].map(([label, same2]) => {
|
|
7102
|
+
const first = same2[0];
|
|
7103
|
+
const size = first?.size === void 0 ? "" : ` \xB7 ${megabytes(first.size)}`;
|
|
7104
|
+
if (same2.length === 1)
|
|
7105
|
+
return paint("dim", `\u{1F4CE} ${link(`${label}${size}`, first?.url)}`);
|
|
7106
|
+
const each = same2.map((attachment, index) => link(String(index + 1), attachment.url)).join(" ");
|
|
7107
|
+
return paint("dim", `\u{1F4CE} ${label} \xD7${same2.length} ${each}`);
|
|
7108
|
+
});
|
|
7109
|
+
return [...polls, ...cards, ...files, ...keyboard];
|
|
7110
|
+
}, "attachmentLines");
|
|
7111
|
+
var pollLines = /* @__PURE__ */ __name((poll) => {
|
|
7112
|
+
const kind = [
|
|
7113
|
+
poll.closed ? "closed" : "",
|
|
7114
|
+
poll.multiple ? "several answers" : "",
|
|
7115
|
+
poll.anonymous ? "anonymous" : "",
|
|
7116
|
+
poll.quiz ? "quiz" : ""
|
|
7117
|
+
].filter(Boolean);
|
|
7118
|
+
const count3 = /* @__PURE__ */ __name((voters) => voters === null ? "?" : String(voters), "count");
|
|
7119
|
+
return [
|
|
7120
|
+
`\u{1F4CA} ${visibleControls(poll.question)}`,
|
|
7121
|
+
...poll.answers.map((answer) => ` [${answer.id}] ${visibleControls(answer.text)} \u2014 ${count3(answer.voters)}${answer.chosen ? " \u2713" : ""}`),
|
|
7122
|
+
` ${[`${count3(poll.voters)} voted`, ...kind].join(" \xB7 ")}`
|
|
7123
|
+
];
|
|
7124
|
+
}, "pollLines");
|
|
7125
|
+
var megabytes = /* @__PURE__ */ __name((bytes) => bytes >= 1e6 ? `${Math.round(bytes / 1e6)} MB` : `${Math.max(1, Math.round(bytes / 1e3))} KB`, "megabytes");
|
|
7126
|
+
var parts = /* @__PURE__ */ __name((format, iso) => Object.fromEntries(format.formatToParts(new Date(iso)).map(({ type, value }) => [type, value])), "parts");
|
|
7127
|
+
var timeFormatter = /* @__PURE__ */ __name(({ timeZone }) => {
|
|
7128
|
+
const format = new Intl.DateTimeFormat("en-GB", {
|
|
7129
|
+
hour: "2-digit",
|
|
7130
|
+
minute: "2-digit",
|
|
7131
|
+
second: "2-digit",
|
|
7132
|
+
hourCycle: "h23",
|
|
7133
|
+
...timeZone ? { timeZone } : {}
|
|
7134
|
+
});
|
|
7135
|
+
return (iso) => {
|
|
7136
|
+
const { hour, minute, second } = parts(format, iso);
|
|
7137
|
+
return `${hour}:${minute}:${second}`;
|
|
7138
|
+
};
|
|
7139
|
+
}, "timeFormatter");
|
|
7140
|
+
var dayFormatter = /* @__PURE__ */ __name(({ locale = DEFAULT_LOCALE, timeZone }) => {
|
|
7141
|
+
const format = new Intl.DateTimeFormat(locale, {
|
|
7142
|
+
day: "numeric",
|
|
7143
|
+
month: "long",
|
|
7144
|
+
year: "numeric",
|
|
7145
|
+
...timeZone ? { timeZone } : {}
|
|
7146
|
+
});
|
|
7147
|
+
return (iso) => format.format(new Date(iso)).replace(/\s*г\.$/, "");
|
|
7148
|
+
}, "dayFormatter");
|
|
7149
|
+
var reactionLine = /* @__PURE__ */ __name(({ counts, mine }) => {
|
|
7150
|
+
const shown = counts.map(({ reaction, count: count3 }) => `${singleLine(reaction)} ${count3}`).join(" ");
|
|
7151
|
+
return mine ? `${shown} (you: ${singleLine(mine)})` : shown;
|
|
7152
|
+
}, "reactionLine");
|
|
7153
|
+
var editedAt = /* @__PURE__ */ __name((message, options2) => {
|
|
7154
|
+
const edited = message.editedAt ?? message.timestamp;
|
|
7155
|
+
const time = timeFormatter(options2)(edited);
|
|
7156
|
+
const day = dayFormatter(options2);
|
|
7157
|
+
return day(edited) === day(message.timestamp) ? time : `${day(edited)} ${time}`;
|
|
7158
|
+
}, "editedAt");
|
|
7159
|
+
|
|
6987
7160
|
// node_modules/.pnpm/@wirecat+cli-core@0.501.0_@wirecat+cli-base@0.67.0_commander@15.0.0_esbuild@0.28.2_type_e6af10c98f87b1454255e560646d3ddf/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
6988
7161
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
6989
7162
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
@@ -8176,6 +8349,7 @@ export {
|
|
|
8176
8349
|
writeReplyConsent,
|
|
8177
8350
|
replyModelIdentity,
|
|
8178
8351
|
replyRenderer,
|
|
8352
|
+
renderMessages,
|
|
8179
8353
|
messageItem,
|
|
8180
8354
|
messageItems,
|
|
8181
8355
|
selfOf,
|
|
@@ -5,69 +5,63 @@ import {
|
|
|
5
5
|
UNTRUSTED_NEUTRAL,
|
|
6
6
|
agentArguments,
|
|
7
7
|
agentJson,
|
|
8
|
-
commandAvailability
|
|
9
|
-
|
|
8
|
+
commandAvailability,
|
|
9
|
+
failureContext
|
|
10
|
+
} from "./chunk-YQOVVCIA.js";
|
|
10
11
|
import {
|
|
11
12
|
callerOf
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import {
|
|
14
|
-
failureContext
|
|
15
|
-
} from "./chunk-WQRGA75U.js";
|
|
13
|
+
} from "./chunk-VTWADVEQ.js";
|
|
16
14
|
import {
|
|
17
15
|
lentConnection,
|
|
18
16
|
refuseLacking
|
|
19
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-DT2YCB2V.js";
|
|
20
18
|
import {
|
|
21
19
|
onlineDeps,
|
|
22
20
|
servicesFor,
|
|
23
21
|
storeModeDeps
|
|
24
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-6XYGTRMQ.js";
|
|
25
23
|
import {
|
|
26
24
|
ENTITIES
|
|
27
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SQHPJBNO.js";
|
|
28
26
|
import {
|
|
29
27
|
DEFAULT_OUTPUT_BYTES,
|
|
30
28
|
LOCAL_WRITE,
|
|
31
29
|
REMOTE_WRITE,
|
|
32
30
|
answerSchema,
|
|
33
31
|
changesMessenger,
|
|
32
|
+
flatten,
|
|
34
33
|
judgedAnswer,
|
|
35
34
|
judgedEffects,
|
|
36
35
|
listOf,
|
|
37
36
|
refuseStoreChange,
|
|
38
37
|
sealed,
|
|
39
38
|
startRecording
|
|
40
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-3RYX7IB6.js";
|
|
41
40
|
import {
|
|
42
41
|
currentCaller,
|
|
43
42
|
keepsSuccess,
|
|
44
43
|
runContextOf,
|
|
45
44
|
withCaller
|
|
46
|
-
} from "./chunk-
|
|
47
|
-
import {
|
|
48
|
-
flatten
|
|
49
|
-
} from "./chunk-725OHXKR.js";
|
|
50
|
-
import {
|
|
51
|
-
enclosingTraceId,
|
|
52
|
-
inRun,
|
|
53
|
-
newRunId,
|
|
54
|
-
traceOf
|
|
55
|
-
} from "./chunk-LONV6HIK.js";
|
|
45
|
+
} from "./chunk-GPJEYW2J.js";
|
|
56
46
|
import {
|
|
57
47
|
authorityAllowed,
|
|
58
48
|
botApiAllowed,
|
|
49
|
+
enclosingTraceId,
|
|
50
|
+
inRun,
|
|
59
51
|
keyForCommand,
|
|
60
52
|
levelFor,
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
newRunId,
|
|
54
|
+
readKeysForCommand,
|
|
55
|
+
traceOf
|
|
56
|
+
} from "./chunk-2HHOMN2G.js";
|
|
63
57
|
import {
|
|
64
58
|
MAX_BUFFERED_INPUT
|
|
65
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-7IUMHMTP.js";
|
|
66
60
|
import {
|
|
67
61
|
captureStreams,
|
|
68
62
|
errorObjectOf,
|
|
69
63
|
mcpErrorResult
|
|
70
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-DZMK255Y.js";
|
|
71
65
|
import {
|
|
72
66
|
CliError,
|
|
73
67
|
SNAKE_CASE,
|