@wirecat/cli-memo 0.131.75 → 0.131.77
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/actions/actions.d.ts +1 -0
- package/dist/actions/actions.d.ts.map +1 -1
- package/dist/actions/actions.js +3 -3
- package/dist/actions/actions.js.map +1 -1
- package/dist/actions/command.d.ts.map +1 -1
- package/dist/actions/command.js +3 -1
- package/dist/actions/command.js.map +1 -1
- package/dist/agents/command.d.ts.map +1 -1
- package/dist/agents/command.js +3 -2
- package/dist/agents/command.js.map +1 -1
- package/dist/agents/log.d.ts +1 -1
- package/dist/agents/log.d.ts.map +1 -1
- package/dist/agents/log.js +5 -4
- package/dist/agents/log.js.map +1 -1
- package/dist/bin/memo.js +2 -2
- package/dist/bin/memo.js.map +1 -1
- package/dist/bundle/{all-profiles-LUGN5BHP.js → all-profiles-4UWCPMRQ.js} +10 -8
- package/dist/bundle/{anthropic-W7JXDZPL.js → anthropic-HECHQVOK.js} +7 -5
- package/dist/bundle/{app-server-TRRARE66.js → app-server-GQEQWFYQ.js} +42 -40
- package/dist/bundle/auto-3O7JD27U.js +91 -0
- package/dist/bundle/{bun-S3JZIN4S.js → bun-IWGIAD7H.js} +2 -2
- package/dist/bundle/{bun-sqlite-X3WQN3CV.js → bun-sqlite-VJFM4TVN.js} +7 -5
- package/dist/bundle/{chunk-KDBAY5JZ.js → chunk-2DLCQ4AK.js} +1 -1
- package/dist/bundle/{chunk-W46O6RJ5.js → chunk-2IQWMWMC.js} +42 -130
- package/dist/bundle/{chunk-4O2MYFYC.js → chunk-3EPBPSP6.js} +1 -1
- package/dist/bundle/{chunk-KEBL3PY4.js → chunk-3QBRLN6T.js} +2 -2
- package/dist/bundle/{chunk-V7BDQIZS.js → chunk-3URQNBDV.js} +2 -2
- package/dist/bundle/{chunk-UU3OAPGO.js → chunk-4EFQOTNQ.js} +7 -7
- package/dist/bundle/{chunk-RZS24U4N.js → chunk-4VO2RJAE.js} +12 -10
- package/dist/bundle/{chunk-WKLF7CAM.js → chunk-5APYWW46.js} +34 -32
- package/dist/bundle/{chunk-VYCLOFPC.js → chunk-6A37YXAL.js} +6 -184
- package/dist/bundle/{chunk-346PWQJF.js → chunk-6RN34ZWU.js} +6 -6
- package/dist/bundle/{chunk-WZHCQ4VZ.js → chunk-6VISMU6R.js} +8 -8
- package/dist/bundle/{chunk-ZP2XI5DR.js → chunk-76T57Y3Q.js} +6 -6
- package/dist/bundle/{chunk-FGMFJUHR.js → chunk-7YALAAL4.js} +734 -374
- package/dist/bundle/{chunk-KA5MDFLU.js → chunk-A3QZXQI3.js} +1 -1
- package/dist/bundle/{chunk-4XI7S3PO.js → chunk-A54EZ6DV.js} +15 -15
- package/dist/bundle/{chunk-5RLCKP5E.js → chunk-AH6V2UJZ.js} +22 -18
- package/dist/bundle/{chunk-2EZFUIL4.js → chunk-BA6GHX5B.js} +27 -27
- package/dist/bundle/{chunk-E74VWHZ2.js → chunk-BFEXVALS.js} +1 -1
- package/dist/bundle/{chunk-XPSXVUZG.js → chunk-BNOSAHVH.js} +3 -3
- package/dist/bundle/{chunk-ZXW5FPH2.js → chunk-C3HS26N5.js} +1 -1
- package/dist/bundle/{chunk-VFKCZJFT.js → chunk-CFZZUGUD.js} +22 -22
- package/dist/bundle/{chunk-KYJBGCTC.js → chunk-CPKS7JKX.js} +2 -2
- package/dist/bundle/{chunk-7Y4HUYI3.js → chunk-D7KQYLAN.js} +8 -8
- package/dist/bundle/{chunk-LX3OSTBD.js → chunk-DE5BNDIA.js} +4 -4
- package/dist/bundle/{chunk-SJD4KTK2.js → chunk-DJYMK7EI.js} +4 -4
- package/dist/bundle/{chunk-EWRHTZD3.js → chunk-DNPE4LOZ.js} +11 -11
- package/dist/bundle/chunk-EXFRC4OT.js +106 -0
- package/dist/bundle/{chunk-XMHWGHID.js → chunk-EY46RMMS.js} +183 -158
- package/dist/bundle/{chunk-UIAGASGP.js → chunk-HFZHXP4U.js} +6 -6
- package/dist/bundle/{chunk-QYJJBE56.js → chunk-HKDUGTWQ.js} +3 -3
- package/dist/bundle/{chunk-VB4OLJHK.js → chunk-HWIKY7KF.js} +3 -3
- package/dist/bundle/{chunk-2QND7VJS.js → chunk-INXIJXU2.js} +7 -7
- package/dist/bundle/{chunk-OWUEEVF6.js → chunk-IYINNZQE.js} +13 -12
- package/dist/bundle/{chunk-YLYZNPAZ.js → chunk-JKLJM7EG.js} +2 -2
- package/dist/bundle/{chunk-6VMIMAZ2.js → chunk-JSGRDE5Q.js} +302 -298
- package/dist/bundle/{chunk-G45BLLDR.js → chunk-JTLPFUIQ.js} +4 -4
- package/dist/bundle/{chunk-4QGUBKN5.js → chunk-KTBPBMNR.js} +6 -6
- package/dist/bundle/{chunk-ZTZLAGZA.js → chunk-KYW7RWGE.js} +3 -3
- package/dist/bundle/{chunk-6I4DOBSD.js → chunk-LHVNZ25W.js} +13 -13
- package/dist/bundle/{chunk-SIQDO5DN.js → chunk-LO74ISD6.js} +4 -4
- package/dist/bundle/{chunk-XQ3RZU3J.js → chunk-M4MM4QUM.js} +1 -1
- package/dist/bundle/{chunk-6AOPUQTC.js → chunk-MRUE3BWX.js} +1 -1
- package/dist/bundle/{chunk-QKWM4VK4.js → chunk-MZHH5XMX.js} +2 -2
- package/dist/bundle/{chunk-SCYHDYLI.js → chunk-NGWUFB4K.js} +1 -1
- package/dist/bundle/{chunk-NR633L2N.js → chunk-OAWNQZ3V.js} +4 -4
- package/dist/bundle/{chunk-SIOPF2UG.js → chunk-OB3OPV55.js} +6 -6
- package/dist/bundle/{chunk-E2PSOSTN.js → chunk-OQSIFLZS.js} +2 -2
- package/dist/bundle/{chunk-4KDORB7C.js → chunk-PPARTGFE.js} +10 -10
- package/dist/bundle/{chunk-YB4KGUXY.js → chunk-QNJ6O6J4.js} +3 -3
- package/dist/bundle/{chunk-GFVSZY4J.js → chunk-S5T4SO7I.js} +8 -2
- package/dist/bundle/{chunk-YDTGYYOR.js → chunk-SHO3T3F2.js} +4 -4
- package/dist/bundle/{chunk-6FTZ53TT.js → chunk-TFXKS2WG.js} +1 -1
- package/dist/bundle/{chunk-5CTOWPOL.js → chunk-TIHQFMH2.js} +12 -10
- package/dist/bundle/{chunk-XQHOMQNZ.js → chunk-TXXKLYJQ.js} +4 -4
- package/dist/bundle/{chunk-ZISVFVQU.js → chunk-UD5JUJES.js} +365 -364
- package/dist/bundle/{chunk-KUFOM3SB.js → chunk-UDRKGCDS.js} +2 -2
- package/dist/bundle/chunk-UIS44ZMF.js +185 -0
- package/dist/bundle/{chunk-AOHT5FNX.js → chunk-VIY77EDM.js} +48 -48
- package/dist/bundle/{chunk-MPZBV5RL.js → chunk-VMTTWF2M.js} +8 -8
- package/dist/bundle/{chunk-IQIM4UC7.js → chunk-W36BMC6F.js} +5 -5
- package/dist/bundle/{chunk-JINEHQ2T.js → chunk-WZZ426CJ.js} +99 -84
- package/dist/bundle/chunk-X2SA73EE.js +200 -0
- package/dist/bundle/{chunk-BDVM5652.js → chunk-XLZPP5MB.js} +1 -1
- package/dist/bundle/{chunk-LPGE6ACC.js → chunk-YABNPKKQ.js} +2 -2
- package/dist/bundle/{chunk-ZL63GL3Y.js → chunk-YZ4J67GU.js} +3 -3
- package/dist/bundle/{chunk-C6MWOBEL.js → chunk-ZPB3VTS7.js} +22 -12
- package/dist/bundle/{chunk-W64FO6DD.js → chunk-ZPPMGXER.js} +400 -37
- package/dist/bundle/command-contract-SEDOYJIJ.js +34 -0
- package/dist/bundle/{command-server-entry-XVUPTSSH.js → command-server-entry-TQBKNSM3.js} +71 -53
- package/dist/bundle/{decode-METZOSMG.js → decode-VFRSEIBD.js} +7 -5
- package/dist/bundle/{dispatch-PHB2Y6ZL.js → dispatch-N73TJNYM.js} +3 -3
- package/dist/bundle/{echarts-EBSP4VCK.js → echarts-DP2GC2C6.js} +2 -2
- package/dist/bundle/{embed-GVVU7N7W.js → embed-BIINGRNY.js} +8 -6
- package/dist/bundle/{embedder-6BZOYAXV.js → embedder-2AUO2PHQ.js} +11 -9
- package/dist/bundle/entry-APUFP74B.js +23 -0
- package/dist/bundle/entry-LGJ2Y7AS.js +78 -0
- package/dist/bundle/failure-5QSMH2CD.js +71 -0
- package/dist/bundle/{failure-OBT7CUVW.js → failure-IPHFR3KW.js} +3 -2
- package/dist/bundle/{first-run-HQ4GA4EF.js → first-run-7UMKRQL7.js} +11 -9
- package/dist/bundle/first-screen-H5CQSLIX.js +32 -0
- package/dist/bundle/{instructions-VDKK3Y5Z.js → instructions-WDKCHEG6.js} +1 -1
- package/dist/bundle/mcp-3HKOGYHL.js +92 -0
- package/dist/bundle/memo.js +9 -56
- package/dist/bundle/{node-HWGZYNUX.js → node-QBL3F2VF.js} +2 -2
- package/dist/bundle/{node-sqlite-PSYENWGS.js → node-sqlite-WFKC73E5.js} +8 -6
- package/dist/bundle/{oauth-TQGMUJK2.js → oauth-4PT7N4SE.js} +9 -7
- package/dist/bundle/{open-KDDJDKCE.js → open-I7XENSGI.js} +7 -5
- package/dist/bundle/openai-DUSBTUFI.js +26 -0
- package/dist/bundle/{process-APNTXJJE.js → process-TVXEHAK6.js} +1 -1
- package/dist/bundle/{program-OGDARQTX.js → program-3X4EPBEW.js} +587 -234
- package/dist/bundle/{prompt-BMBZCLGF.js → prompt-QRYXTON7.js} +7 -5
- package/dist/bundle/{recognize-3SEY2MAR.js → recognize-ZLDPIN36.js} +6 -4
- package/dist/bundle/{remote-ODH54UXO.js → remote-3GRP5YE3.js} +9 -7
- package/dist/bundle/{rerank-JQHBNTUK.js → rerank-6B2FI6LN.js} +9 -7
- package/dist/bundle/serve-ZP3TEANT.js +24 -0
- package/dist/bundle/{server-ADPO4V4B.js → server-3SJJNNSX.js} +63 -59
- package/dist/bundle/server-72VZYABL.js +50 -0
- package/dist/bundle/server-UY47EXPQ.js +64 -0
- package/dist/bundle/{state-M3VGXSV4.js → state-JDH2X2CY.js} +8 -6
- package/dist/bundle/{store-GSZAXU3A.js → store-FDNYGJUF.js} +14 -12
- package/dist/bundle/store-maintenance-command-5LFS45JM.js +49 -0
- package/dist/bundle/update-257J2SPM.js +74 -0
- package/dist/digest/backfill.d.ts.map +1 -1
- package/dist/digest/backfill.js +2 -1
- package/dist/digest/backfill.js.map +1 -1
- package/dist/digest/digest-commands.d.ts.map +1 -1
- package/dist/digest/digest-commands.js +2 -1
- package/dist/digest/digest-commands.js.map +1 -1
- package/dist/doctor/command.d.ts.map +1 -1
- package/dist/doctor/command.js +2 -1
- package/dist/doctor/command.js.map +1 -1
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +13 -1
- package/dist/examples.js.map +1 -1
- package/dist/exit-code.d.ts +7 -0
- package/dist/exit-code.d.ts.map +1 -0
- package/dist/exit-code.js +19 -0
- package/dist/exit-code.js.map +1 -0
- package/dist/facts/command.d.ts.map +1 -1
- package/dist/facts/command.js +3 -2
- package/dist/facts/command.js.map +1 -1
- package/dist/facts/fact.d.ts +1 -1
- package/dist/facts/fact.d.ts.map +1 -1
- package/dist/facts/fact.js +3 -3
- package/dist/facts/fact.js.map +1 -1
- package/dist/mcp/catalogue.d.ts +3 -0
- package/dist/mcp/catalogue.d.ts.map +1 -1
- package/dist/mcp/catalogue.js +1 -0
- package/dist/mcp/catalogue.js.map +1 -1
- package/dist/memories/command.d.ts.map +1 -1
- package/dist/memories/command.js +3 -2
- package/dist/memories/command.js.map +1 -1
- package/dist/memories/memory.d.ts +1 -1
- package/dist/memories/memory.d.ts.map +1 -1
- package/dist/memories/memory.js +2 -2
- package/dist/memories/memory.js.map +1 -1
- package/dist/page.d.ts +14 -5
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +11 -5
- package/dist/page.js.map +1 -1
- package/dist/program.d.ts +3 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +7 -1
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +6 -0
- package/dist/reasons.js.map +1 -1
- package/dist/records/import.d.ts.map +1 -1
- package/dist/records/import.js +60 -5
- package/dist/records/import.js.map +1 -1
- package/dist/records/input.d.ts +6 -2
- package/dist/records/input.d.ts.map +1 -1
- package/dist/records/input.js +87 -3
- package/dist/records/input.js.map +1 -1
- package/dist/run/entry.d.ts +7 -0
- package/dist/run/entry.d.ts.map +1 -0
- package/dist/run/entry.js +62 -0
- package/dist/run/entry.js.map +1 -0
- package/dist/run/import.d.ts.map +1 -1
- package/dist/run/import.js +2 -1
- package/dist/run/import.js.map +1 -1
- package/dist/sources/command.d.ts.map +1 -1
- package/dist/sources/command.js +55 -4
- package/dist/sources/command.js.map +1 -1
- package/dist/sources/read.d.ts +29 -2
- package/dist/sources/read.d.ts.map +1 -1
- package/dist/sources/read.js +67 -5
- package/dist/sources/read.js.map +1 -1
- package/dist/sources/readers/ai-model.d.ts +4 -0
- package/dist/sources/readers/ai-model.d.ts.map +1 -0
- package/dist/sources/readers/ai-model.js +74 -0
- package/dist/sources/readers/ai-model.js.map +1 -0
- package/dist/sources/readers/index.d.ts +1 -0
- package/dist/sources/readers/index.d.ts.map +1 -1
- package/dist/sources/readers/index.js +3 -1
- package/dist/sources/readers/index.js.map +1 -1
- package/dist/sources/readers/keys.js +1 -1
- package/dist/sources/readers/keys.js.map +1 -1
- package/dist/sources/readers/types.d.ts +5 -2
- package/dist/sources/readers/types.d.ts.map +1 -1
- package/dist/sources/readers/types.js +1 -1
- package/dist/sources/readers/types.js.map +1 -1
- package/dist/sources/suggest-command.d.ts.map +1 -1
- package/dist/sources/suggest-command.js +16 -5
- package/dist/sources/suggest-command.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/auto-AQAKW55Z.js +0 -89
- package/dist/bundle/chunk-XPCTY6XV.js +0 -116
- package/dist/bundle/command-contract-QQG343ZQ.js +0 -32
- package/dist/bundle/entry-TBOYUMWB.js +0 -21
- package/dist/bundle/failure-EKMEAYZH.js +0 -69
- package/dist/bundle/first-screen-6T65PQ37.js +0 -30
- package/dist/bundle/mcp-DEY765VA.js +0 -90
- package/dist/bundle/openai-QPGCUM4T.js +0 -24
- package/dist/bundle/serve-C22ZONSM.js +0 -22
- package/dist/bundle/server-3UX245DY.js +0 -62
- package/dist/bundle/server-6G5XF3V5.js +0 -48
- package/dist/bundle/store-maintenance-command-QMTALGSQ.js +0 -47
- package/dist/bundle/update-HDJ23IV5.js +0 -72
- /package/dist/bundle/{chunk-IXSUVHW6.js → chunk-6AALVDEA.js} +0 -0
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BA6GHX5B.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/ports/app.js
|
|
11
11
|
var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
|
|
12
12
|
var readOnlyLockOf = /* @__PURE__ */ __name((app, env) => {
|
|
13
13
|
const name = envName(app, "READ_ONLY");
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
stdinFieldOf
|
|
5
|
+
} from "./chunk-TFXKS2WG.js";
|
|
6
|
+
import {
|
|
7
|
+
isCommandServer
|
|
8
|
+
} from "./chunk-HKDUGTWQ.js";
|
|
9
|
+
import {
|
|
10
|
+
commandPathOf
|
|
11
|
+
} from "./chunk-JTLPFUIQ.js";
|
|
12
|
+
import {
|
|
13
|
+
commandServerRequest,
|
|
14
|
+
metaOf
|
|
15
|
+
} from "./chunk-EY46RMMS.js";
|
|
16
|
+
import {
|
|
17
|
+
errorObjectOf,
|
|
18
|
+
renderError
|
|
19
|
+
} from "./chunk-X2SA73EE.js";
|
|
20
|
+
import {
|
|
21
|
+
CliError
|
|
22
|
+
} from "./chunk-BA6GHX5B.js";
|
|
23
|
+
import {
|
|
24
|
+
__name
|
|
25
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
26
|
+
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/command-server.js
|
|
28
|
+
import { createInterface } from "node:readline";
|
|
29
|
+
var COMMAND_SERVER_PROTOCOL = 1;
|
|
30
|
+
var COMMAND_SERVER_IDLE_MS = 10 * 6e4;
|
|
31
|
+
var COMMAND_SERVER_CONCURRENT = 8;
|
|
32
|
+
var runsAlone = /* @__PURE__ */ __name((command) => commandPathOf(command)[0] === "store", "runsAlone");
|
|
33
|
+
var enterCommandServer = /* @__PURE__ */ __name(async (command, cli) => {
|
|
34
|
+
const request = commandServerRequest();
|
|
35
|
+
if (!request)
|
|
36
|
+
return;
|
|
37
|
+
refuseInCommandServer(command, cli);
|
|
38
|
+
if (runsAlone(command))
|
|
39
|
+
await request.alone();
|
|
40
|
+
}, "enterCommandServer");
|
|
41
|
+
var refuseInCommandServer = /* @__PURE__ */ __name((command, cli) => {
|
|
42
|
+
if (!commandServerRequest())
|
|
43
|
+
return;
|
|
44
|
+
const typed = [cli, ...commandPathOf(command)].join(" ");
|
|
45
|
+
const { lifetime } = metaOf(command);
|
|
46
|
+
if (lifetime)
|
|
47
|
+
throw new CliError("validation_error", `\`${typed}\` ${lifetime === "persistent" ? "runs until it is stopped" : "waits on a person"}; the command server runs only commands that return \u2014 start it as a process of its own`);
|
|
48
|
+
if (stdinFieldOf(command))
|
|
49
|
+
throw new CliError("validation_error", `\`${typed}\` reads its input on stdin, which the command server does not pass on \u2014 start it as a process of its own`);
|
|
50
|
+
}, "refuseInCommandServer");
|
|
51
|
+
var refusal = /* @__PURE__ */ __name((cli, message) => `${renderError(errorObjectOf(new CliError("validation_error", message)), { cli, interactive: false })}
|
|
52
|
+
`, "refusal");
|
|
53
|
+
var requestOf = /* @__PURE__ */ __name((line, cli) => {
|
|
54
|
+
let parsed;
|
|
55
|
+
try {
|
|
56
|
+
parsed = JSON.parse(line);
|
|
57
|
+
} catch {
|
|
58
|
+
return { id: null, error: "a request is one JSON object per line" };
|
|
59
|
+
}
|
|
60
|
+
const { id, argv } = parsed ?? {};
|
|
61
|
+
const known = typeof id === "number" && Number.isFinite(id) ? id : null;
|
|
62
|
+
if (known === null)
|
|
63
|
+
return { id: null, error: 'a request needs a numeric "id"' };
|
|
64
|
+
if (!Array.isArray(argv) || !argv.every((word) => typeof word === "string"))
|
|
65
|
+
return { id: known, error: '"argv" is a list of strings' };
|
|
66
|
+
if (isCommandServer(argv))
|
|
67
|
+
return { id: known, error: `\`${cli} commands --serve\` cannot run inside itself` };
|
|
68
|
+
return { id: known, argv };
|
|
69
|
+
}, "requestOf");
|
|
70
|
+
var serveCommands = /* @__PURE__ */ __name(async ({ input, write, run, cli, version, idleMs = COMMAND_SERVER_IDLE_MS, concurrent = COMMAND_SERVER_CONCURRENT, signal }) => {
|
|
71
|
+
const send = /* @__PURE__ */ __name((value) => write(`${JSON.stringify(value)}
|
|
72
|
+
`), "send");
|
|
73
|
+
await send({ ready: true, protocol: COMMAND_SERVER_PROTOCOL, version, concurrent });
|
|
74
|
+
const lines = createInterface({ input, crlfDelay: Number.POSITIVE_INFINITY });
|
|
75
|
+
return new Promise((resolve) => {
|
|
76
|
+
const waiting = [];
|
|
77
|
+
let active = 0;
|
|
78
|
+
let running = 0;
|
|
79
|
+
let gated = false;
|
|
80
|
+
let drained;
|
|
81
|
+
let turns = Promise.resolve();
|
|
82
|
+
let timer;
|
|
83
|
+
let ending = false;
|
|
84
|
+
let done = false;
|
|
85
|
+
const finish = /* @__PURE__ */ __name(() => {
|
|
86
|
+
if (done)
|
|
87
|
+
return;
|
|
88
|
+
done = true;
|
|
89
|
+
clearTimeout(timer);
|
|
90
|
+
lines.close();
|
|
91
|
+
resolve(0);
|
|
92
|
+
}, "finish");
|
|
93
|
+
const settle = /* @__PURE__ */ __name(() => {
|
|
94
|
+
if (running === 0 && drained) {
|
|
95
|
+
const go = drained;
|
|
96
|
+
drained = void 0;
|
|
97
|
+
go();
|
|
98
|
+
}
|
|
99
|
+
pump();
|
|
100
|
+
if (active > 0 || waiting.length > 0 || done)
|
|
101
|
+
return;
|
|
102
|
+
if (ending)
|
|
103
|
+
finish();
|
|
104
|
+
else {
|
|
105
|
+
clearTimeout(timer);
|
|
106
|
+
timer = setTimeout(finish, idleMs);
|
|
107
|
+
}
|
|
108
|
+
}, "settle");
|
|
109
|
+
const start = /* @__PURE__ */ __name((line) => {
|
|
110
|
+
active += 1;
|
|
111
|
+
running += 1;
|
|
112
|
+
let holdsPlace = true;
|
|
113
|
+
let ended = false;
|
|
114
|
+
let turn;
|
|
115
|
+
let release;
|
|
116
|
+
const alone = /* @__PURE__ */ __name(() => {
|
|
117
|
+
if (turn)
|
|
118
|
+
return turn;
|
|
119
|
+
holdsPlace = false;
|
|
120
|
+
running -= 1;
|
|
121
|
+
turn = turns.then(() => new Promise((go) => {
|
|
122
|
+
if (ended)
|
|
123
|
+
return go();
|
|
124
|
+
gated = true;
|
|
125
|
+
drained = /* @__PURE__ */ __name(() => {
|
|
126
|
+
if (ended)
|
|
127
|
+
gated = false;
|
|
128
|
+
else {
|
|
129
|
+
holdsPlace = true;
|
|
130
|
+
running += 1;
|
|
131
|
+
}
|
|
132
|
+
go();
|
|
133
|
+
}, "drained");
|
|
134
|
+
settle();
|
|
135
|
+
}));
|
|
136
|
+
turns = turn.then(() => ended && !holdsPlace ? void 0 : new Promise((free) => release = free));
|
|
137
|
+
return turn;
|
|
138
|
+
}, "alone");
|
|
139
|
+
const answer = /* @__PURE__ */ __name(async () => {
|
|
140
|
+
const request = requestOf(line, cli);
|
|
141
|
+
if ("error" in request)
|
|
142
|
+
return send({ id: request.id, code: 2, stdout: "", stderr: refusal(cli, request.error) });
|
|
143
|
+
const answered = await run(request.argv, alone);
|
|
144
|
+
return send({ id: request.id, ...answered });
|
|
145
|
+
}, "answer");
|
|
146
|
+
answer().catch(finish).finally(() => {
|
|
147
|
+
ended = true;
|
|
148
|
+
active -= 1;
|
|
149
|
+
if (holdsPlace)
|
|
150
|
+
running -= 1;
|
|
151
|
+
if (release) {
|
|
152
|
+
gated = false;
|
|
153
|
+
release();
|
|
154
|
+
}
|
|
155
|
+
settle();
|
|
156
|
+
});
|
|
157
|
+
}, "start");
|
|
158
|
+
const pump = /* @__PURE__ */ __name(() => {
|
|
159
|
+
while (!done && !gated && running < concurrent && waiting.length > 0)
|
|
160
|
+
start(waiting.shift());
|
|
161
|
+
}, "pump");
|
|
162
|
+
lines.on("line", (line) => {
|
|
163
|
+
if (done || ending || line.trim() === "")
|
|
164
|
+
return;
|
|
165
|
+
clearTimeout(timer);
|
|
166
|
+
waiting.push(line);
|
|
167
|
+
pump();
|
|
168
|
+
});
|
|
169
|
+
const end = /* @__PURE__ */ __name(() => {
|
|
170
|
+
ending = true;
|
|
171
|
+
settle();
|
|
172
|
+
}, "end");
|
|
173
|
+
lines.on("close", end);
|
|
174
|
+
if (signal?.aborted)
|
|
175
|
+
end();
|
|
176
|
+
signal?.addEventListener("abort", end, { once: true });
|
|
177
|
+
settle();
|
|
178
|
+
});
|
|
179
|
+
}, "serveCommands");
|
|
180
|
+
|
|
181
|
+
export {
|
|
182
|
+
COMMAND_SERVER_CONCURRENT,
|
|
183
|
+
enterCommandServer,
|
|
184
|
+
serveCommands
|
|
185
|
+
};
|
|
@@ -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-A54EZ6DV.js";
|
|
7
7
|
import {
|
|
8
8
|
FETCHING,
|
|
9
9
|
QUICK_HEALTH_CHECKS,
|
|
@@ -33,21 +33,21 @@ import {
|
|
|
33
33
|
typedQuery,
|
|
34
34
|
withQuery,
|
|
35
35
|
withTimeLimit
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-JSGRDE5Q.js";
|
|
37
37
|
import {
|
|
38
38
|
holdLock,
|
|
39
39
|
lockPath,
|
|
40
40
|
releaseLock,
|
|
41
41
|
servingProfiles,
|
|
42
42
|
takeLock
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-YZ4J67GU.js";
|
|
44
44
|
import {
|
|
45
45
|
stringWidth,
|
|
46
46
|
wrapAnsi
|
|
47
47
|
} from "./chunk-HTQTIKWP.js";
|
|
48
48
|
import {
|
|
49
49
|
readSecret
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-BNOSAHVH.js";
|
|
51
51
|
import {
|
|
52
52
|
CORPORA,
|
|
53
53
|
MIGRATIONS,
|
|
@@ -82,10 +82,10 @@ import {
|
|
|
82
82
|
storeClients,
|
|
83
83
|
storeContents,
|
|
84
84
|
vectorIndexCounts
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-UD5JUJES.js";
|
|
86
86
|
import {
|
|
87
87
|
openCache
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-HFZHXP4U.js";
|
|
89
89
|
import {
|
|
90
90
|
Command,
|
|
91
91
|
LOCAL_READ,
|
|
@@ -111,10 +111,10 @@ import {
|
|
|
111
111
|
snakeKeys,
|
|
112
112
|
storeTable,
|
|
113
113
|
withoutProviderRefs
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-EY46RMMS.js";
|
|
115
115
|
import {
|
|
116
116
|
holdersOf
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-MRUE3BWX.js";
|
|
118
118
|
import {
|
|
119
119
|
currentRun,
|
|
120
120
|
formatLocator,
|
|
@@ -124,18 +124,18 @@ import {
|
|
|
124
124
|
readHealthMark,
|
|
125
125
|
readJournalMark,
|
|
126
126
|
recordDeepCheck
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-WZZ426CJ.js";
|
|
128
128
|
import {
|
|
129
129
|
failureKey,
|
|
130
130
|
isStoreDamage
|
|
131
|
-
} from "./chunk-
|
|
131
|
+
} from "./chunk-HWIKY7KF.js";
|
|
132
132
|
import {
|
|
133
133
|
storePath
|
|
134
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-YABNPKKQ.js";
|
|
135
135
|
import {
|
|
136
136
|
resolvePaths,
|
|
137
137
|
writeSecurely
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-2IQWMWMC.js";
|
|
139
139
|
import {
|
|
140
140
|
array,
|
|
141
141
|
boolean,
|
|
@@ -156,12 +156,12 @@ import {
|
|
|
156
156
|
string,
|
|
157
157
|
transform,
|
|
158
158
|
trim
|
|
159
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-6A37YXAL.js";
|
|
160
160
|
import {
|
|
161
161
|
CliError,
|
|
162
162
|
singleLine,
|
|
163
163
|
visibleControls
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-BA6GHX5B.js";
|
|
165
165
|
import {
|
|
166
166
|
__commonJS,
|
|
167
167
|
__name,
|
|
@@ -5501,11 +5501,11 @@ var require_liquid_node = __commonJS({
|
|
|
5501
5501
|
}
|
|
5502
5502
|
});
|
|
5503
5503
|
|
|
5504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5505
5505
|
import { chmodSync, constants, copyFileSync, existsSync as existsSync10, mkdirSync, realpathSync as realpathSync3, renameSync as renameSync3, rmSync as rmSync3, statfsSync as statfsSync2, statSync as statSync4, writeFileSync as writeFileSync2 } from "node:fs";
|
|
5506
5506
|
import { dirname as dirname3, resolve } from "node:path";
|
|
5507
5507
|
|
|
5508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5509
5509
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5510
5510
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5511
5511
|
import { Transform } from "node:stream";
|
|
@@ -5612,7 +5612,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5612
5612
|
renameSync(pending, to);
|
|
5613
5613
|
}, "unsealFile");
|
|
5614
5614
|
|
|
5615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5616
5616
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5617
5617
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5618
5618
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5636,7 +5636,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5636
5636
|
};
|
|
5637
5637
|
}, "compatibilityOf");
|
|
5638
5638
|
|
|
5639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5640
5640
|
import { createHash as createHash2 } from "node:crypto";
|
|
5641
5641
|
var COPY_MARK = "__repair_";
|
|
5642
5642
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5890,19 +5890,19 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5890
5890
|
return found;
|
|
5891
5891
|
}, "deleteCopy");
|
|
5892
5892
|
|
|
5893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5894
5894
|
import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
|
|
5895
5895
|
|
|
5896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5896
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
5897
5897
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5898
5898
|
|
|
5899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5900
5900
|
import { execFileSync, spawn } from "node:child_process";
|
|
5901
5901
|
import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
5902
5902
|
import { basename, dirname, join } from "node:path";
|
|
5903
5903
|
import { Transform as Transform2 } from "node:stream";
|
|
5904
5904
|
|
|
5905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/store/refill.js
|
|
5906
5906
|
var REFILL_MARGIN_MS = 864e5;
|
|
5907
5907
|
var TIME_KEYS = 1e12;
|
|
5908
5908
|
var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
|
|
@@ -5982,7 +5982,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
|
|
|
5982
5982
|
return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
|
|
5983
5983
|
}, "forgetMail");
|
|
5984
5984
|
|
|
5985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5985
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5986
5986
|
var SQLITE3_MINIMUM = [3, 43, 0];
|
|
5987
5987
|
var STORE_PARTS = ["", "-wal", "-shm"];
|
|
5988
5988
|
var RECOVER_LOCK = ".recover-lock";
|
|
@@ -6510,7 +6510,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6510
6510
|
}
|
|
6511
6511
|
}, "recoverLocked");
|
|
6512
6512
|
|
|
6513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
6514
6514
|
var COUNTED = [
|
|
6515
6515
|
"accounts",
|
|
6516
6516
|
"chats",
|
|
@@ -6666,7 +6666,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6666
6666
|
return recover;
|
|
6667
6667
|
}, "storeRecoverCommand");
|
|
6668
6668
|
|
|
6669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6669
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
6670
6670
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
6671
6671
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
|
|
6672
6672
|
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
@@ -6712,7 +6712,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
|
|
|
6712
6712
|
renderAnswer(this, outputFor(this), itemOf(answer));
|
|
6713
6713
|
}), "storeInfoCommand");
|
|
6714
6714
|
|
|
6715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
6716
6716
|
var ENCRYPT_OPTION = [
|
|
6717
6717
|
"--encrypt",
|
|
6718
6718
|
"compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
|
|
@@ -6731,7 +6731,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
6731
6731
|
return password;
|
|
6732
6732
|
}, "passwordOf");
|
|
6733
6733
|
|
|
6734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
6735
6735
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
|
|
6736
6736
|
import { join as join2 } from "node:path";
|
|
6737
6737
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
@@ -6902,7 +6902,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6902
6902
|
}, "problem");
|
|
6903
6903
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6904
6904
|
|
|
6905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6906
6906
|
import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
|
|
6907
6907
|
import { join as join3 } from "node:path";
|
|
6908
6908
|
var ANSWERED_KEPT = 1e3;
|
|
@@ -6955,7 +6955,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6955
6955
|
}, "recordReply");
|
|
6956
6956
|
var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
|
|
6957
6957
|
|
|
6958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
6959
6959
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6960
6960
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6961
6961
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -7061,10 +7061,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
7061
7061
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
7062
7062
|
}, "filled");
|
|
7063
7063
|
|
|
7064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7065
7065
|
var import_liquidjs2 = __toESM(require_liquid_node(), 1);
|
|
7066
7066
|
|
|
7067
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/render/liquid.js
|
|
7068
7068
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
7069
7069
|
var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
7070
7070
|
const engine = new import_liquidjs.Liquid({
|
|
@@ -7091,7 +7091,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
|
7091
7091
|
return engine;
|
|
7092
7092
|
}, "safeLiquid");
|
|
7093
7093
|
|
|
7094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7095
7095
|
var TEMPLATE_LIMITS = {
|
|
7096
7096
|
parse: 32768,
|
|
7097
7097
|
renders: 2e3,
|
|
@@ -7230,7 +7230,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
7230
7230
|
}
|
|
7231
7231
|
}, "renderReplyTemplate");
|
|
7232
7232
|
|
|
7233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
7234
7234
|
var DRY_RUN_DAYS = 7;
|
|
7235
7235
|
var PAGE = 500;
|
|
7236
7236
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -7344,7 +7344,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
7344
7344
|
}
|
|
7345
7345
|
}, "storedSince");
|
|
7346
7346
|
|
|
7347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
7348
7348
|
import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
|
|
7349
7349
|
import { join as join4 } from "node:path";
|
|
7350
7350
|
var shape = strictObject({
|
|
@@ -7369,7 +7369,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
7369
7369
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
7370
7370
|
}, "mayModelReply");
|
|
7371
7371
|
|
|
7372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
7373
7373
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
|
|
7374
7374
|
ai: true
|
|
7375
7375
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -7416,7 +7416,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7416
7416
|
return result2;
|
|
7417
7417
|
}, "replyRenderer");
|
|
7418
7418
|
|
|
7419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
7420
7420
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
7421
7421
|
var NO_RULES = "no rules";
|
|
7422
7422
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -7509,7 +7509,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
7509
7509
|
return { skip: why };
|
|
7510
7510
|
}, "replyTo");
|
|
7511
7511
|
|
|
7512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
|
|
7513
7513
|
var START_SYNC_DELAY_MS = 3e4;
|
|
7514
7514
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
7515
7515
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
@@ -7586,7 +7586,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
|
|
|
7586
7586
|
};
|
|
7587
7587
|
}, "startSync");
|
|
7588
7588
|
|
|
7589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
7590
7590
|
var FIRST_FETCH_MS = 6e4;
|
|
7591
7591
|
var DAY_MS = 864e5;
|
|
7592
7592
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -7640,7 +7640,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
|
|
|
7640
7640
|
};
|
|
7641
7641
|
}, "memberFetches");
|
|
7642
7642
|
|
|
7643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
7644
7644
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
7645
7645
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
7646
7646
|
if (context.format === "pretty") {
|
|
@@ -7673,7 +7673,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7673
7673
|
return context;
|
|
7674
7674
|
}, "recordDiagnostics");
|
|
7675
7675
|
|
|
7676
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
|
|
7677
7677
|
import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
|
|
7678
7678
|
import { dirname as dirname2, join as join5 } from "node:path";
|
|
7679
7679
|
var OUTDATED_CHECK_MS = 6e4;
|
|
@@ -7759,7 +7759,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
|
|
|
7759
7759
|
};
|
|
7760
7760
|
}, "watchOutdated");
|
|
7761
7761
|
|
|
7762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
7763
7763
|
var STEMS_EVERY_MS = 3e4;
|
|
7764
7764
|
var STEMS_SLICE_MS = 2e3;
|
|
7765
7765
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -7799,7 +7799,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
7799
7799
|
};
|
|
7800
7800
|
}, "stemFills");
|
|
7801
7801
|
|
|
7802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/render/messages.js
|
|
7803
7803
|
import { styleText } from "node:util";
|
|
7804
7804
|
var TIME_WIDTH = 8;
|
|
7805
7805
|
var INDENT = " ".repeat(TIME_WIDTH + 2);
|
|
@@ -7975,7 +7975,7 @@ var editedAt = /* @__PURE__ */ __name((message, options) => {
|
|
|
7975
7975
|
return day(edited) === day(message.timestamp) ? time : `${day(edited)} ${time}`;
|
|
7976
7976
|
}, "editedAt");
|
|
7977
7977
|
|
|
7978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
7979
7979
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
7980
7980
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
7981
7981
|
kind: attachment.kind,
|
|
@@ -8070,7 +8070,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
8070
8070
|
locale: messenger.app.locale
|
|
8071
8071
|
}), "viewOf");
|
|
8072
8072
|
|
|
8073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8073
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
8074
8074
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
8075
8075
|
value: value.value,
|
|
8076
8076
|
observed_at: value.observedAt,
|
|
@@ -8137,7 +8137,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
8137
8137
|
}
|
|
8138
8138
|
}, "watchEventItem");
|
|
8139
8139
|
|
|
8140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
8141
8141
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
8142
8142
|
output: { entity: "watch_item" },
|
|
8143
8143
|
effects: REMOTE_READ,
|
|
@@ -8292,7 +8292,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
8292
8292
|
}
|
|
8293
8293
|
}, "describe");
|
|
8294
8294
|
|
|
8295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
8296
8296
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
8297
8297
|
const command = annotate(new Command("serve"), {
|
|
8298
8298
|
output: { entity: "serve_summary" },
|
|
@@ -8575,7 +8575,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
8575
8575
|
};
|
|
8576
8576
|
}, "tasking");
|
|
8577
8577
|
|
|
8578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
8579
8579
|
import { existsSync as existsSync9 } from "node:fs";
|
|
8580
8580
|
var PATH = "store tables list";
|
|
8581
8581
|
var STORE_TABLES_QUERY = {
|
|
@@ -8618,7 +8618,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
8618
8618
|
return tables;
|
|
8619
8619
|
}, "storeTablesCommand");
|
|
8620
8620
|
|
|
8621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
8622
8622
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
8623
8623
|
var WORD_INDEX = "message_words";
|
|
8624
8624
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BA6GHX5B.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/search/languages.js
|
|
11
11
|
var LANGUAGES = [
|
|
12
12
|
{ name: "russian", code: "ru", label: "Russian", script: "cyrillic", dictionary: "dictionary-ru" },
|
|
13
13
|
{ name: "english", code: "en", label: "English", script: "latin", dictionary: "dictionary-en" },
|
|
@@ -15,12 +15,12 @@ var LANGUAGES = [
|
|
|
15
15
|
];
|
|
16
16
|
var languagesOf = /* @__PURE__ */ __name((script) => LANGUAGES.filter((one) => one.script === script).map(({ name }) => name), "languagesOf");
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/store/normalize.js
|
|
19
19
|
var NORMALIZER_VERSION = 1;
|
|
20
20
|
var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
|
|
21
21
|
var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
|
|
24
24
|
var BaseStemmer = class {
|
|
25
25
|
static {
|
|
26
26
|
__name(this, "BaseStemmer");
|
|
@@ -395,7 +395,7 @@ var BaseStemmer = class {
|
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
397
|
|
|
398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
|
|
399
399
|
var a_0 = [
|
|
400
400
|
["arsen", -1],
|
|
401
401
|
["commun", -1],
|
|
@@ -1096,7 +1096,7 @@ var english_stemmer_default = class extends BaseStemmer {
|
|
|
1096
1096
|
stemWord = this.stem;
|
|
1097
1097
|
};
|
|
1098
1098
|
|
|
1099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
|
|
1100
1100
|
var a_02 = [
|
|
1101
1101
|
["\u0432", 1],
|
|
1102
1102
|
["\u0438\u0432", 2, 1],
|
|
@@ -1519,7 +1519,7 @@ var russian_stemmer_default = class extends BaseStemmer {
|
|
|
1519
1519
|
stemWord = this.stem;
|
|
1520
1520
|
};
|
|
1521
1521
|
|
|
1522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
|
|
1523
1523
|
var a_03 = [
|
|
1524
1524
|
["", 6],
|
|
1525
1525
|
["\xE1", 1, 1],
|
|
@@ -2195,7 +2195,7 @@ var spanish_stemmer_default = class extends BaseStemmer {
|
|
|
2195
2195
|
stemWord = this.stem;
|
|
2196
2196
|
};
|
|
2197
2197
|
|
|
2198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.628.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_ae6a34897f184099b1a87c0d4b483e54/node_modules/@wirecat/cli-core/dist/search/stem.js
|
|
2199
2199
|
var SNOWBALL_VERSION = "3.1.1";
|
|
2200
2200
|
var CYRILLIC_STEMMERS = [...languagesOf("cyrillic"), "none"];
|
|
2201
2201
|
var LATIN_STEMMERS = [...languagesOf("latin"), "none"];
|