@wirecat/cli-template 0.10.0 → 0.12.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/.github/workflows/ci.yml +17 -0
- package/.github/workflows/release.yml +62 -0
- package/CHANGELOG.md +46 -0
- package/CLAUDE.md +1 -3
- package/contracts/help.snap +2 -0
- package/dist/bin/clidev.js +2 -2
- package/dist/bundle/{all-profiles-XHC7BG3P.js → all-profiles-MJ6XSFOO.js} +4 -4
- package/dist/bundle/{anthropic-N6B3ZZHQ.js → anthropic-W5UKBZUB.js} +3 -3
- package/dist/bundle/app-server-EZ46JAHB.js +217 -0
- package/dist/bundle/{bun-HUJLS7KP.js → bun-HB6O2TTT.js} +2 -2
- package/dist/bundle/{bun-sqlite-OWFO2TVR.js → bun-sqlite-KBXOW2ES.js} +2 -2
- package/dist/bundle/{chunk-B4EED2RF.js → chunk-2B5U4Z5H.js} +5 -5
- package/dist/bundle/{chunk-ABP7FDMJ.js → chunk-35KYY65W.js} +2 -2
- package/dist/bundle/{chunk-MZVV2JZT.js → chunk-4LURWBVV.js} +17 -9
- package/dist/bundle/{chunk-QGNNMPUB.js → chunk-7IXL4UFK.js} +7 -7
- package/dist/bundle/{chunk-NE3NSB5O.js → chunk-AK257OMS.js} +55 -43
- package/dist/bundle/{chunk-IJ3IA7EK.js → chunk-CXQXVKUY.js} +1 -1
- package/dist/bundle/{chunk-7RB76E2L.js → chunk-EGRB55FF.js} +4 -4
- package/dist/bundle/{chunk-DMCN22H6.js → chunk-ERGB4NJA.js} +20 -2
- package/dist/bundle/{chunk-TJLGI3N6.js → chunk-ERKR3VJ5.js} +79 -28
- package/dist/bundle/{chunk-2CFBHYFA.js → chunk-FDBINRWA.js} +4 -4
- package/dist/bundle/{chunk-FIHDGZIB.js → chunk-FZZIU4B7.js} +2416 -2254
- package/dist/bundle/{chunk-BDSDQCV4.js → chunk-HDY5X3WQ.js} +4 -4
- package/dist/bundle/{chunk-XFXBXQBS.js → chunk-IBBN7Z3A.js} +2 -2
- package/dist/bundle/{chunk-4QRLPOJ7.js → chunk-IDWW4TU2.js} +1 -1
- package/dist/bundle/{chunk-OPPMGPFW.js → chunk-IGHEW777.js} +4 -4
- package/dist/bundle/{chunk-437W3Z2M.js → chunk-IN3FVRPK.js} +1 -1
- package/dist/bundle/{chunk-FWVKHD2L.js → chunk-JAOGZMKQ.js} +1 -1
- package/dist/bundle/{chunk-O3PBQVAB.js → chunk-JHO2LL2J.js} +18 -6
- package/dist/bundle/{chunk-MNSD5BX2.js → chunk-JRK73FOW.js} +1 -1
- package/dist/bundle/{chunk-O5LMDQTO.js → chunk-KJTNT4SW.js} +1 -1
- package/dist/bundle/{chunk-B4LM2B6F.js → chunk-L5WWMP5M.js} +24 -20
- package/dist/bundle/{chunk-NTLPDH76.js → chunk-MJRSEUKG.js} +9 -7
- package/dist/bundle/{chunk-AP7QKYBG.js → chunk-MUSYGFCY.js} +165 -140
- package/dist/bundle/{server-L5GNG7KC.js → chunk-N2Z3MCOF.js} +31 -45
- package/dist/bundle/{chunk-JTTW5ZKF.js → chunk-NOVLCHDV.js} +1 -1
- package/dist/bundle/{chunk-54AJONOM.js → chunk-O3UXNU3S.js} +2 -2
- package/dist/bundle/{chunk-75LVQQEK.js → chunk-OV6PHTAY.js} +2034 -1590
- package/dist/bundle/{chunk-W2IDKBNB.js → chunk-PBN4RBHS.js} +7 -7
- package/dist/bundle/{chunk-2TBVT4SZ.js → chunk-PDGXMKJS.js} +1 -1
- package/dist/bundle/{recognize-TTED4SE3.js → chunk-PJOVK7PG.js} +6 -5
- package/dist/bundle/{chunk-LY7GS2YI.js → chunk-QBP7OMN5.js} +1 -1
- package/dist/bundle/{chunk-VMTM46FH.js → chunk-QJ6XW4DM.js} +75 -51
- package/dist/bundle/{chunk-OPJ24VGH.js → chunk-QKWRL4OD.js} +5 -5
- package/dist/bundle/{chunk-MTGLJCAZ.js → chunk-QQUFZLFP.js} +1 -1
- package/dist/bundle/{chunk-6CBWO7OF.js → chunk-RUKDZEID.js} +2 -2
- package/dist/bundle/{chunk-TARN7CHN.js → chunk-SVDF6NJF.js} +10 -10
- package/dist/bundle/{chunk-FXS3X76A.js → chunk-TAYOKLGF.js} +4 -4
- package/dist/bundle/{chunk-ASMH7JWZ.js → chunk-TGB5F7NC.js} +2 -2
- package/dist/bundle/{chunk-222FANS2.js → chunk-V3ZTQ24B.js} +4 -4
- package/dist/bundle/{chunk-LSEF4QC3.js → chunk-VLNKTMV7.js} +75 -47
- package/dist/bundle/{chunk-7RXBN7HP.js → chunk-VYSUKHKL.js} +1 -1
- package/dist/bundle/{chunk-JEBSORH7.js → chunk-YJNUDHJD.js} +25 -14
- package/dist/bundle/{chunk-S57AMKLX.js → chunk-Z7MSIRSQ.js} +1 -1
- package/dist/bundle/{chunk-2KQZ24GI.js → chunk-ZLY6GUAS.js} +2 -2
- package/dist/bundle/clidev.js +2 -2
- package/dist/bundle/{command-contract-PEM3S634.js → command-contract-75VJ36U4.js} +10 -10
- package/dist/bundle/decode-AMXUVKNY.js +158 -0
- package/dist/bundle/{echarts-2QGL2JP5.js → echarts-GJDMQ2AQ.js} +2 -2
- package/dist/bundle/{embed-HHAAGHA6.js → embed-L4CRZ2XQ.js} +3 -3
- package/dist/bundle/{embedder-W2OGVVYH.js → embedder-IBGV4M2K.js} +6 -6
- package/dist/bundle/{first-run-WCJUDUBU.js → first-run-VTKC2IBV.js} +5 -5
- package/dist/bundle/{first-screen-U4DFUKUC.js → first-screen-X5IJKBSU.js} +11 -11
- package/dist/bundle/{instructions-OTZHT6NV.js → instructions-YJECS4KN.js} +3 -1
- package/dist/bundle/mcp-RDZGYPSY.js +78 -0
- package/dist/bundle/{mcp-VVF6J7SQ.js → mcp-TEMCENVV.js} +33 -33
- package/dist/bundle/{node-SYD4GX5O.js → node-NQG4EVZR.js} +2 -2
- package/dist/bundle/node-sqlite-BR7F3BLB.js +61 -0
- package/dist/bundle/{oauth-42M34GQ5.js → oauth-J7UAWNIK.js} +4 -4
- package/dist/bundle/{open-SWXRCDLN.js → open-BR47R5UE.js} +1 -1
- package/dist/bundle/{process-KAFGXZ7Q.js → process-66I7RDPJ.js} +1 -1
- package/dist/bundle/{program-EHR4G7VN.js → program-RNGI562F.js} +913 -601
- package/dist/bundle/{prompt-ZQTMHRGX.js → prompt-NE5JJ7UP.js} +2 -2
- package/dist/bundle/recognize-GC3YFVIA.js +21 -0
- package/dist/bundle/{remote-C37XJ4BP.js → remote-QELOMKQM.js} +4 -4
- package/dist/bundle/{rerank-APFZAMQL.js → rerank-BH6TZ2SP.js} +4 -4
- package/dist/bundle/{serve-DDPIHDVZ.js → serve-WWLRNDT2.js} +6 -6
- package/dist/bundle/server-DE6NLNUF.js +52 -0
- package/dist/bundle/server-ZPSQKOAH.js +39 -0
- package/dist/bundle/{state-WWPPHERF.js → state-2BEGXAMO.js} +3 -3
- package/dist/bundle/{store-H6UIA4PK.js → store-AH6WZMCF.js} +7 -7
- package/dist/bundle/store-maintenance-command-PBXX3IEV.js +40 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/configuration.md +3 -1
- package/docs/dev/TESTING.md +2 -0
- package/docs/dev/skills/release/SKILL.md +9 -5
- package/docs/dev/test-matrix.md +1 -1
- package/kit/dist/new.js +3 -0
- package/package.json +4 -2
- package/scripts/audit.sh +11 -1
- package/scripts/smoke-bundle.ts +2 -1
- package/scripts/smoke.ts +18 -0
- package/scripts/test-matrix-untested.ts +1 -1
- package/server.json +38 -0
- package/src/version.ts +1 -1
- package/template.json +1 -0
- package/dist/bundle/mcp-Y7VCIZ2J.js +0 -78
- package/dist/bundle/node-sqlite-X2DGRFOZ.js +0 -45
- package/dist/bundle/server-LKVYA2AE.js +0 -39
- package/dist/bundle/store-maintenance-command-EYBT64A2.js +0 -40
- /package/dist/bundle/{chunk-QVJLOUQB.js → chunk-GOO67PDU.js} +0 -0
|
@@ -2,14 +2,14 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
answeredWire
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IN3FVRPK.js";
|
|
6
6
|
import {
|
|
7
7
|
CALLER_META_KEY,
|
|
8
8
|
PROXY_CLIENT_NAME,
|
|
9
9
|
StdioServerTransport,
|
|
10
10
|
callerOf,
|
|
11
11
|
serveStdio
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IBBN7Z3A.js";
|
|
13
13
|
import {
|
|
14
14
|
McpServer
|
|
15
15
|
} from "./chunk-5D4AEUVA.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
__name
|
|
18
18
|
} from "./chunk-ZVVMGPBJ.js";
|
|
19
19
|
|
|
20
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
|
|
21
21
|
import { spawn } from "node:child_process";
|
|
22
22
|
import { randomUUID } from "node:crypto";
|
|
23
23
|
var PROTOCOL = "2025-06-18";
|
|
@@ -251,7 +251,7 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
|
|
|
251
251
|
}, "serveAllProfilesOverStdio");
|
|
252
252
|
var serveAllProfilesOverHttp = /* @__PURE__ */ __name(async (options, http) => {
|
|
253
253
|
const { build, close } = allProfilesServer(options);
|
|
254
|
-
const { serveOverHttp } = await import("./serve-
|
|
254
|
+
const { serveOverHttp } = await import("./serve-WWLRNDT2.js");
|
|
255
255
|
const listening = await serveOverHttp(build, {
|
|
256
256
|
...http,
|
|
257
257
|
appName: options.command,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
agentOf,
|
|
30
30
|
clientHash
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-MJRSEUKG.js";
|
|
32
32
|
import {
|
|
33
33
|
__name
|
|
34
34
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -540,7 +540,7 @@ function toError(value) {
|
|
|
540
540
|
}
|
|
541
541
|
__name(toError, "toError");
|
|
542
542
|
|
|
543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
543
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
544
544
|
var CALLER_META_KEY = "wirecat.dev/caller";
|
|
545
545
|
var PROXY_CLIENT_NAME = "all-profiles";
|
|
546
546
|
var NAME = /^[\w .@()/+-]{1,64}$/;
|
|
@@ -7,7 +7,7 @@ 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.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/store/path.js
|
|
11
11
|
import { join } from "node:path";
|
|
12
12
|
var wirecatDirectory = /* @__PURE__ */ __name((env = process.env, platform) => resolvePaths({ appName: "WireCat", prefix: "WIRECAT", env, ...platform ? { platform } : {} }).state, "wirecatDirectory");
|
|
13
13
|
var storePath = /* @__PURE__ */ __name((env = process.env) => env.MESSAGING_STORE ?? join(wirecatDirectory(env), "wirecat.db"), "storePath");
|
|
@@ -2,14 +2,14 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
ENTITIES
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MUSYGFCY.js";
|
|
6
6
|
import {
|
|
7
7
|
annotate,
|
|
8
8
|
answerSchema,
|
|
9
9
|
describeOptions,
|
|
10
10
|
keyForCommand,
|
|
11
11
|
metaOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QJ6XW4DM.js";
|
|
13
13
|
import {
|
|
14
14
|
CliError,
|
|
15
15
|
jsonSchemaOf
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
__name
|
|
19
19
|
} from "./chunk-ZVVMGPBJ.js";
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/answer-entity.js
|
|
22
22
|
var schemas = /* @__PURE__ */ new WeakMap();
|
|
23
23
|
var answerEntity = /* @__PURE__ */ __name((command, name, schema, options = {}) => {
|
|
24
24
|
if (Object.hasOwn(ENTITIES, name))
|
|
@@ -48,7 +48,7 @@ var answerProjectionSchema = /* @__PURE__ */ __name((command) => {
|
|
|
48
48
|
return own && metaOf(command).output?.entity === own.name ? own.project : void 0;
|
|
49
49
|
}, "answerProjectionSchema");
|
|
50
50
|
|
|
51
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
51
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
|
|
52
52
|
var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
53
53
|
var outputOf = /* @__PURE__ */ __name((command) => {
|
|
54
54
|
const entity = answerEntitySchema(command);
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
|
|
8
8
|
import { PassThrough, Writable } from "node:stream";
|
|
9
9
|
var lineReader = /* @__PURE__ */ __name((onMessage) => {
|
|
10
10
|
let rest = "";
|
|
@@ -7,7 +7,7 @@ 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.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/http/public-url.js
|
|
11
11
|
var EXAMPLE = "--public-url https://<name>.ts.net";
|
|
12
12
|
var publicUrlOf = /* @__PURE__ */ __name((given, { missing, reaches, path = false }) => {
|
|
13
13
|
if (!given)
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
commandPathOf,
|
|
8
8
|
findCommand,
|
|
9
9
|
outputOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IGHEW777.js";
|
|
11
11
|
import {
|
|
12
12
|
Command,
|
|
13
13
|
Help,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
environmentOf,
|
|
19
19
|
metaOf,
|
|
20
20
|
takesProfile
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-QJ6XW4DM.js";
|
|
22
22
|
import {
|
|
23
23
|
CliError,
|
|
24
24
|
writes
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
__name
|
|
28
28
|
} from "./chunk-ZVVMGPBJ.js";
|
|
29
29
|
|
|
30
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
|
|
31
31
|
var SECTIONS = {
|
|
32
32
|
read: "Read",
|
|
33
33
|
write: "Write",
|
|
@@ -88,7 +88,7 @@ var CORE_SECTIONS = {
|
|
|
88
88
|
upgrade: "setup"
|
|
89
89
|
};
|
|
90
90
|
|
|
91
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
91
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
|
|
92
92
|
var DESCRIPTION = 90;
|
|
93
93
|
var COLUMN = 52;
|
|
94
94
|
var short = /* @__PURE__ */ __name((text) => {
|
|
@@ -127,7 +127,7 @@ var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
|
|
|
127
127
|
`;
|
|
128
128
|
}, "commandsText");
|
|
129
129
|
|
|
130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
|
|
131
131
|
var ARGUMENT_KINDS = {
|
|
132
132
|
chat: "chat",
|
|
133
133
|
chats: "chat",
|
|
@@ -279,6 +279,8 @@ var withProfile = /* @__PURE__ */ __name((command, example) => {
|
|
|
279
279
|
const top = commandPathOf(command)[0];
|
|
280
280
|
if (!profiled.has(root) || top === void 0 || !takesProfile(command))
|
|
281
281
|
return example;
|
|
282
|
+
if (example.split(" ").includes("--profiles"))
|
|
283
|
+
return example;
|
|
282
284
|
const prefix = `${root.name()} ${top}`;
|
|
283
285
|
return example === prefix || example.startsWith(`${prefix} `) ? `${root.name()} ${EXAMPLE_PROFILE} ${example.slice(root.name().length + 1)}` : example;
|
|
284
286
|
}, "withProfile");
|
|
@@ -317,7 +319,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
|
|
|
317
319
|
command.addHelpText("after", () => commandHelpText(command));
|
|
318
320
|
}, "installCommandHelp");
|
|
319
321
|
|
|
320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
|
|
321
323
|
var WIRECAT_TOOLS = [
|
|
322
324
|
{
|
|
323
325
|
command: "tg",
|
|
@@ -344,11 +346,21 @@ var WIRECAT_TOOLS = [
|
|
|
344
346
|
package: "@wirecat/drive-cli",
|
|
345
347
|
does: "Google Drive and Docs as local text, searchable with your other WireCat data"
|
|
346
348
|
},
|
|
349
|
+
{
|
|
350
|
+
command: "gcal",
|
|
351
|
+
package: "@wirecat/gcal-cli",
|
|
352
|
+
does: "Google Calendar events, searchable with your other WireCat data"
|
|
353
|
+
},
|
|
347
354
|
{
|
|
348
355
|
command: "memo",
|
|
349
356
|
package: "@wirecat/cli-memo",
|
|
350
357
|
shown: "memo context <person>",
|
|
351
358
|
does: "one person across messengers, mail, notes and meetings"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
command: "mail",
|
|
362
|
+
package: "@wirecat/mail-cli",
|
|
363
|
+
does: "IMAP mail in the same local store: search your mailbox offline, next to your other WireCat data"
|
|
352
364
|
}
|
|
353
365
|
];
|
|
354
366
|
var WIDTH = 100;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/http/listen.js
|
|
8
8
|
import { createServer } from "node:http";
|
|
9
9
|
import { Readable } from "node:stream";
|
|
10
10
|
var MAX_BODY = 4 * 1024 * 1024;
|
|
@@ -7,7 +7,7 @@ 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.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/input-policy.js
|
|
11
11
|
var MAX_BUFFERED_INPUT = 16 * 1024 * 1024;
|
|
12
12
|
var MAX_SECRET_INPUT = 64 * 1024;
|
|
13
13
|
var policies = /* @__PURE__ */ new WeakMap();
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
refuseLacking,
|
|
11
11
|
servicesFor,
|
|
12
12
|
throughWrapper
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FZZIU4B7.js";
|
|
14
14
|
import {
|
|
15
15
|
servingProfiles
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RUKDZEID.js";
|
|
17
17
|
import {
|
|
18
18
|
openStore
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-OV6PHTAY.js";
|
|
20
20
|
import {
|
|
21
21
|
CEILING_KEY,
|
|
22
22
|
LOG_ATTRIBUTES,
|
|
@@ -42,11 +42,11 @@ import {
|
|
|
42
42
|
rememberAccount,
|
|
43
43
|
rootOf2 as rootOf,
|
|
44
44
|
skipFlagFor
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-QJ6XW4DM.js";
|
|
46
46
|
import {
|
|
47
47
|
isCliFailure,
|
|
48
48
|
providerErrorKey
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-MJRSEUKG.js";
|
|
50
50
|
import {
|
|
51
51
|
CliError,
|
|
52
52
|
logRecordOf,
|
|
@@ -58,10 +58,10 @@ import {
|
|
|
58
58
|
__name
|
|
59
59
|
} from "./chunk-ZVVMGPBJ.js";
|
|
60
60
|
|
|
61
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
61
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
62
62
|
import { randomUUID } from "node:crypto";
|
|
63
63
|
|
|
64
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
65
65
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
66
66
|
import { dirname, join } from "node:path";
|
|
67
67
|
var MOST_DEADLINES = 50;
|
|
@@ -145,11 +145,11 @@ var FloodMemory = class {
|
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
149
149
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
150
150
|
import { dirname as dirname3, join as join2 } from "node:path";
|
|
151
151
|
|
|
152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
153
153
|
import { closeSync, mkdirSync as mkdirSync2, openSync, statSync, unlinkSync } from "node:fs";
|
|
154
154
|
import { dirname as dirname2 } from "node:path";
|
|
155
155
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -216,7 +216,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
216
216
|
}
|
|
217
217
|
}, "lockTime");
|
|
218
218
|
|
|
219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
220
220
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
221
221
|
var SendJournal = class {
|
|
222
222
|
static {
|
|
@@ -293,7 +293,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
293
293
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
294
294
|
}, "withSendId");
|
|
295
295
|
|
|
296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
297
297
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
298
298
|
import { join as join3 } from "node:path";
|
|
299
299
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -405,7 +405,7 @@ var RecipientList = class {
|
|
|
405
405
|
}
|
|
406
406
|
};
|
|
407
407
|
|
|
408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
409
409
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
410
410
|
var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
|
|
411
411
|
"attachments.extract",
|
|
@@ -598,7 +598,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
598
598
|
}), "guardFor");
|
|
599
599
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
600
600
|
|
|
601
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
601
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
602
602
|
import { openSync as openSync2 } from "node:fs";
|
|
603
603
|
import { createInterface } from "node:readline";
|
|
604
604
|
import { ReadStream } from "node:tty";
|
|
@@ -653,7 +653,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
653
653
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
654
654
|
}, "terminalAsker");
|
|
655
655
|
|
|
656
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
657
657
|
import { readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
658
658
|
import { join as join4 } from "node:path";
|
|
659
659
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -712,7 +712,7 @@ var Pacer = class {
|
|
|
712
712
|
}
|
|
713
713
|
};
|
|
714
714
|
|
|
715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
716
716
|
var pathOf = /* @__PURE__ */ __name((command) => {
|
|
717
717
|
const words = [];
|
|
718
718
|
for (let at = command; at?.parent; at = at.parent)
|
|
@@ -772,7 +772,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
772
772
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
773
773
|
}, "refuseUnknownPermissionKeys");
|
|
774
774
|
|
|
775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
776
776
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
777
777
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
778
778
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -891,7 +891,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
891
891
|
});
|
|
892
892
|
}, "flooded");
|
|
893
893
|
|
|
894
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
894
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
895
895
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
896
896
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
897
897
|
const write = currentOperation();
|
|
@@ -990,7 +990,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
990
990
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
991
991
|
}, "byPart");
|
|
992
992
|
|
|
993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
994
994
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
995
995
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false }) => {
|
|
996
996
|
let warned = false;
|
|
@@ -1482,7 +1482,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1482
1482
|
}
|
|
1483
1483
|
}, "keep");
|
|
1484
1484
|
|
|
1485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1486
1486
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1487
1487
|
let opened;
|
|
1488
1488
|
return {
|
|
@@ -1545,7 +1545,11 @@ var storedMessages = /* @__PURE__ */ __name((provider, store, account) => {
|
|
|
1545
1545
|
pollVotes: /* @__PURE__ */ __name(async (chatId, messageId) => {
|
|
1546
1546
|
const owner = key();
|
|
1547
1547
|
return owner ? (await store()).messages.pollVotes(owner, chatId, messageId) : [];
|
|
1548
|
-
}, "pollVotes")
|
|
1548
|
+
}, "pollVotes"),
|
|
1549
|
+
reactors: /* @__PURE__ */ __name(async (chatId, messageId) => {
|
|
1550
|
+
const owner = key();
|
|
1551
|
+
return owner ? (await store()).messages.reactors(owner, chatId, messageId) : [];
|
|
1552
|
+
}, "reactors")
|
|
1549
1553
|
};
|
|
1550
1554
|
}, "storedMessages");
|
|
1551
1555
|
var connectFor = /* @__PURE__ */ __name((command, messenger, base, options = {}) => {
|
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
__name
|
|
9
9
|
} from "./chunk-ZVVMGPBJ.js";
|
|
10
10
|
|
|
11
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
12
12
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
13
13
|
import { createHash } from "node:crypto";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
16
16
|
import { homedir } from "node:os";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/errors/failures.js
|
|
19
19
|
var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
|
|
20
20
|
var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
21
21
|
const { code, exitCode } = value ?? {};
|
|
@@ -23,7 +23,7 @@ var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
|
23
23
|
}, "isCommanderFailure");
|
|
24
24
|
var failureKey = /* @__PURE__ */ __name((error) => isCliFailure(error) ? error.code : error instanceof Error ? error.name : "error", "failureKey");
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/runs/events.js
|
|
27
27
|
var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
|
|
28
28
|
var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
29
29
|
if (event.event === "warning") {
|
|
@@ -71,7 +71,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
|
|
|
71
71
|
var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
|
|
72
72
|
var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
|
|
73
73
|
|
|
74
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
74
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/runs/secrets.js
|
|
75
75
|
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
76
76
|
"authorization",
|
|
77
77
|
"cookie",
|
|
@@ -152,7 +152,7 @@ var withoutSecrets = /* @__PURE__ */ __name((text, mark = "[redacted]") => text.
|
|
|
152
152
|
var RUN = /(?<![A-Za-z0-9_+/-])[A-Za-z0-9_+/-]{20,}/g;
|
|
153
153
|
var HEX = /(?<![A-Za-z0-9])(?=[0-9]*[a-f])[0-9a-f]{20,}(?![A-Za-z0-9])/g;
|
|
154
154
|
|
|
155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
156
156
|
var MESSAGE_AT_MOST = 500;
|
|
157
157
|
var CAUSES_AT_MOST = 5;
|
|
158
158
|
var FRAMES_AT_MOST = 15;
|
|
@@ -161,6 +161,7 @@ var errorDetailOf = /* @__PURE__ */ __name((error, response) => {
|
|
|
161
161
|
const thrown = error instanceof Error ? error : void 0;
|
|
162
162
|
const code = isCliFailure(error) ? error.code : codeOf(error);
|
|
163
163
|
const reason = typeof details.reason === "string" ? details.reason : void 0;
|
|
164
|
+
const causeCode = typeof details.cause_code === "string" && /^[A-Za-z0-9_.-]{1,40}$/.test(details.cause_code) ? details.cause_code : void 0;
|
|
164
165
|
const message = thrown ? redactText(thrown.message) : void 0;
|
|
165
166
|
const operation = stringOf(details.operation) ?? response?.operation;
|
|
166
167
|
const status = numberOf(details.status) ?? response?.status;
|
|
@@ -179,6 +180,7 @@ var errorDetailOf = /* @__PURE__ */ __name((error, response) => {
|
|
|
179
180
|
class: classOf(error),
|
|
180
181
|
...code === void 0 ? {} : { code },
|
|
181
182
|
...reason === void 0 ? {} : { reason },
|
|
183
|
+
...causeCode === void 0 ? {} : { cause_code: causeCode },
|
|
182
184
|
...message ? { message } : {},
|
|
183
185
|
...operation === void 0 ? {} : { operation },
|
|
184
186
|
...http ? { http } : {},
|
|
@@ -258,7 +260,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
|
|
|
258
260
|
return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
|
|
259
261
|
}, "redactText");
|
|
260
262
|
|
|
261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
262
264
|
var REDACTED = "[redacted]";
|
|
263
265
|
var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
|
|
264
266
|
if (!record)
|