@wirecat/cli-memo 0.131.19 → 0.131.21
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 -3
- package/dist/actions/command.d.ts +1 -1
- package/dist/actions/command.d.ts.map +1 -1
- package/dist/actions/command.js +12 -1
- package/dist/actions/command.js.map +1 -1
- package/dist/bin/memo.js +2 -2
- package/dist/bin/memo.js.map +1 -1
- package/dist/bundle/{all-profiles-MVF2XGZK.js → all-profiles-EZLU6CY7.js} +9 -7
- package/dist/bundle/{anthropic-OPFHMF2S.js → anthropic-XC34PJH5.js} +6 -4
- package/dist/bundle/{app-server-VHVC55S3.js → app-server-26YPLJ7M.js} +53 -48
- package/dist/bundle/auto-QHTPHGNA.js +86 -0
- package/dist/bundle/{bun-P6TMDZGU.js → bun-CKGKUKW5.js} +2 -2
- package/dist/bundle/{bun-sqlite-3G3NLK4O.js → bun-sqlite-S6KUSMTC.js} +5 -3
- package/dist/bundle/{chunk-XZWUBDBG.js → chunk-2NJUPIAO.js} +1 -1
- package/dist/bundle/{chunk-RFB5LOYR.js → chunk-2TBIVKBH.js} +8 -6
- package/dist/bundle/{chunk-3DVKC2XM.js → chunk-3V4WIGWC.js} +8 -19
- package/dist/bundle/{chunk-BMHSGZNE.js → chunk-5RBLNI6C.js} +4 -4
- package/dist/bundle/{chunk-LKYHSVQL.js → chunk-7F6FGMCC.js} +8 -8
- package/dist/bundle/{chunk-FMSA2X3E.js → chunk-7MLWSUEK.js} +1 -1
- package/dist/bundle/{chunk-DLRLOGVU.js → chunk-7NEWBM2O.js} +13 -9
- package/dist/bundle/{chunk-SO6VNTF6.js → chunk-AIIQ7YU4.js} +1 -1
- package/dist/bundle/{chunk-4TERVG26.js → chunk-B3YV6Z7Y.js} +8 -2
- package/dist/bundle/{chunk-IW3U6XXI.js → chunk-BB2MGFOZ.js} +6 -6
- package/dist/bundle/chunk-CCHHEMPM.js +71 -0
- package/dist/bundle/{chunk-6DG7VK3H.js → chunk-CCOYC6HL.js} +5 -5
- package/dist/bundle/{chunk-MXP4J6BJ.js → chunk-CDZZ2DZO.js} +70 -2517
- package/dist/bundle/{chunk-VUWUSGSN.js → chunk-CP5N3KH3.js} +4 -4
- package/dist/bundle/{chunk-NKTAEBCU.js → chunk-CRZSJHAK.js} +13 -9
- package/dist/bundle/{chunk-LPUFOWL3.js → chunk-D72URWJE.js} +1 -39
- package/dist/bundle/{chunk-BINR6MJ5.js → chunk-DNGHE2Q4.js} +1 -1
- package/dist/bundle/{chunk-KVVDRD7M.js → chunk-DZSWKA3K.js} +2 -2
- package/dist/bundle/{chunk-63XICXGM.js → chunk-E5FQ7U7L.js} +5 -3
- package/dist/bundle/{chunk-BPYQYZXA.js → chunk-EAYYWS67.js} +14 -12
- package/dist/bundle/chunk-EG2OMKWH.js +2423 -0
- package/dist/bundle/chunk-EW3XTUPB.js +166 -0
- package/dist/bundle/{chunk-4VKNUBD5.js → chunk-FFWK5NEZ.js} +10 -8
- package/dist/bundle/{chunk-3ORDQ62F.js → chunk-GV2FSWFS.js} +10 -8
- package/dist/bundle/chunk-ILHTNOIV.js +23 -0
- package/dist/bundle/{chunk-VQGVPDMH.js → chunk-INURBEAO.js} +20 -16
- package/dist/bundle/{chunk-OVFMY6ZP.js → chunk-IRDGD3QQ.js} +1 -1
- package/dist/bundle/{chunk-D6G23NFJ.js → chunk-J4GC33JU.js} +2 -2
- package/dist/bundle/{chunk-XWS4PTES.js → chunk-J55Z6EJ3.js} +363 -278
- package/dist/bundle/{chunk-TQNQS6TR.js → chunk-JJ3C5AYK.js} +64 -60
- package/dist/bundle/{chunk-LQJ4KHXK.js → chunk-JXH22ZGA.js} +15 -15
- package/dist/bundle/{chunk-5KUPVC5M.js → chunk-KUNA6MQZ.js} +2 -2
- package/dist/bundle/{chunk-LDVU22MF.js → chunk-LGNS4JVK.js} +8 -8
- package/dist/bundle/{chunk-57Q6NXQT.js → chunk-LR5EY5JY.js} +4 -4
- package/dist/bundle/{chunk-ZYM4M62Q.js → chunk-MCPDL5YU.js} +4 -4
- package/dist/bundle/{chunk-V7DZG62U.js → chunk-MHDLZCEO.js} +11 -9
- package/dist/bundle/{chunk-SHDZVM3B.js → chunk-NELE7AIX.js} +2 -2
- package/dist/bundle/{chunk-WRPRPVZF.js → chunk-NOG5O2NS.js} +44 -42
- package/dist/bundle/{chunk-RITXQKYG.js → chunk-NWB5NAGB.js} +6 -6
- package/dist/bundle/{chunk-UC4IL2P7.js → chunk-OJRLTJRS.js} +1 -1
- package/dist/bundle/{chunk-OTHEM74Z.js → chunk-OUF6RCRZ.js} +6 -6
- package/dist/bundle/{chunk-JDJDNMCP.js → chunk-PF3ALSAV.js} +1 -1
- package/dist/bundle/{chunk-GJKM32WA.js → chunk-PO5C7VNC.js} +24 -22
- package/dist/bundle/chunk-PQLBPYJR.js +46 -0
- package/dist/bundle/{chunk-66YZUX2C.js → chunk-QMMUPDRK.js} +10 -10
- package/dist/bundle/{chunk-P3TYFDMP.js → chunk-R26CXR5Z.js} +9 -7
- package/dist/bundle/{chunk-F5CQ2NVA.js → chunk-RC7TIYUZ.js} +11 -9
- package/dist/bundle/{chunk-P22V2OLJ.js → chunk-RG6ITTLQ.js} +22 -16
- package/dist/bundle/{chunk-T557KUST.js → chunk-RHJC4PHV.js} +3 -3
- package/dist/bundle/{chunk-Z54GPSVH.js → chunk-RNXYDBQO.js} +186 -162
- package/dist/bundle/{chunk-YVECM7XA.js → chunk-SMDWUPXE.js} +4 -4
- package/dist/bundle/{chunk-KO455254.js → chunk-SXGAIQ5X.js} +13 -13
- package/dist/bundle/{chunk-EMKFG5BP.js → chunk-THGFFQCK.js} +3 -3
- package/dist/bundle/{chunk-2R25UBIH.js → chunk-TMNHNZVA.js} +26 -24
- package/dist/bundle/{chunk-WOIRWVDJ.js → chunk-UXCSNSUU.js} +563 -351
- package/dist/bundle/{chunk-EFKEG2BA.js → chunk-VECICKTE.js} +5 -5
- package/dist/bundle/{chunk-4MIPN37I.js → chunk-VQM3H422.js} +266 -176
- package/dist/bundle/chunk-VXHN3SWW.js +35 -0
- package/dist/bundle/{chunk-EL4ZKQUN.js → chunk-WEOFWTWZ.js} +6 -4
- package/dist/bundle/{chunk-LEUNYKL6.js → chunk-WUCQ56RP.js} +3 -3
- package/dist/bundle/{chunk-SJLVBJ2L.js → chunk-XA6YO24S.js} +2 -2
- package/dist/bundle/{chunk-36ULPM2W.js → chunk-XPRYBLTS.js} +6 -6
- package/dist/bundle/{chunk-2KOVYXWK.js → chunk-YAUDFROV.js} +1243 -743
- package/dist/bundle/{chunk-Y3DGAYTD.js → chunk-YUFUUQUO.js} +7 -5
- package/dist/bundle/{chunk-JHKTN6NL.js → chunk-ZCKU6WMX.js} +13 -11
- package/dist/bundle/{chunk-5XDYV2YT.js → chunk-ZD3STMY7.js} +1 -1
- package/dist/bundle/command-contract-TMVGYSQQ.js +32 -0
- package/dist/bundle/{decode-BUTF6VGO.js → decode-6XSZIZAA.js} +5 -3
- package/dist/bundle/dispatch-VUMQPYMA.js +411 -0
- package/dist/bundle/{echarts-KH3YOWMK.js → echarts-NGS4QG4E.js} +2 -2
- package/dist/bundle/{embed-WBVM7KQ2.js → embed-YNH5M6UL.js} +6 -4
- package/dist/bundle/{embedder-27HQIFHM.js → embedder-LLNK4JF4.js} +11 -9
- package/dist/bundle/{entry-K2WWMF2B.js → entry-DO6ZBFIS.js} +7 -5
- package/dist/bundle/failure-LHMJNFY6.js +66 -0
- package/dist/bundle/failure-Z2FXWIBY.js +24 -0
- package/dist/bundle/first-run-BXFQN6M5.js +27 -0
- package/dist/bundle/first-screen-56KZKY77.js +30 -0
- package/dist/bundle/{instructions-POJKHKRZ.js → instructions-4EJ4BBWD.js} +1 -1
- package/dist/bundle/mcp-A4HPKQK5.js +90 -0
- package/dist/bundle/{mcp-FUSDPAOL.js → mcp-MNI62HHE.js} +4 -2
- package/dist/bundle/memo.js +182 -39
- package/dist/bundle/{node-W245R2OP.js → node-QQXKQWNC.js} +2 -2
- package/dist/bundle/{node-sqlite-FUYOXFW5.js → node-sqlite-GJI2GMLW.js} +6 -4
- package/dist/bundle/{oauth-ATB3NWQA.js → oauth-Q5VGUPUR.js} +7 -5
- package/dist/bundle/{open-HEBEWCYB.js → open-NSXIYF3N.js} +5 -3
- package/dist/bundle/{openai-DN7NA2IU.js → openai-LHH7MSGQ.js} +10 -8
- package/dist/bundle/{process-QTIDOJMF.js → process-PI6XUJWP.js} +1 -1
- package/dist/bundle/{program-WNFCYNGP.js → program-3ZTQ5FEM.js} +8382 -8312
- package/dist/bundle/{prompt-RQXVPJ4A.js → prompt-VFXA7IKL.js} +5 -3
- package/dist/bundle/{recognize-G7NIZ3IT.js → recognize-UWAARXOH.js} +4 -2
- package/dist/bundle/{remote-H452UBSK.js → remote-KGEVCB2Q.js} +7 -5
- package/dist/bundle/{rerank-77UYD2UD.js → rerank-SCBTCBPO.js} +7 -5
- package/dist/bundle/{serve-L6R4ODZV.js → serve-WPVKVR24.js} +9 -7
- package/dist/bundle/{server-ZBX4HFHT.js → server-BMQBWBBN.js} +71 -64
- package/dist/bundle/server-NQK5EX7P.js +48 -0
- package/dist/bundle/server-UN43Y6BY.js +61 -0
- package/dist/bundle/{setup-ZGH5OZ7A.js → setup-FGSVWQ32.js} +47 -43
- package/dist/bundle/{state-KHMYDV4I.js → state-KGHS4C6J.js} +6 -4
- package/dist/bundle/{store-M7KGTLUG.js → store-VCVOIQES.js} +12 -10
- package/dist/bundle/store-maintenance-command-QTEWWDST.js +48 -0
- package/dist/bundle/update-XC6KAVCK.js +69 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides/skill.d.ts.map +1 -1
- package/dist/contract-overrides/skill.js +14 -0
- package/dist/contract-overrides/skill.js.map +1 -1
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +34 -3
- package/dist/examples.js.map +1 -1
- package/dist/knowledge/project-actions-command.js +1 -1
- package/dist/knowledge/project-actions-command.js.map +1 -1
- package/dist/mail/command.d.ts.map +1 -1
- package/dist/mail/command.js +11 -1
- package/dist/mail/command.js.map +1 -1
- package/dist/mail/findings-command.d.ts +8 -0
- package/dist/mail/findings-command.d.ts.map +1 -0
- package/dist/mail/findings-command.js +80 -0
- package/dist/mail/findings-command.js.map +1 -0
- package/dist/mail/messages-command.d.ts.map +1 -1
- package/dist/mail/messages-command.js +27 -3
- package/dist/mail/messages-command.js.map +1 -1
- package/dist/mail/review-command.d.ts +12 -0
- package/dist/mail/review-command.d.ts.map +1 -0
- package/dist/mail/review-command.js +46 -0
- package/dist/mail/review-command.js.map +1 -0
- package/dist/mcp/catalogue.d.ts +3 -0
- package/dist/mcp/catalogue.d.ts.map +1 -1
- package/dist/mcp/catalogue.js +2 -1
- package/dist/mcp/catalogue.js.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +17 -1
- package/dist/program.js.map +1 -1
- package/dist/read-only.d.ts +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 +9 -2
- package/dist/records/import.js.map +1 -1
- package/dist/records/mapping.d.ts +9 -0
- package/dist/records/mapping.d.ts.map +1 -0
- package/dist/records/mapping.js +67 -0
- package/dist/records/mapping.js.map +1 -0
- package/dist/review/kinds.d.ts +0 -6
- package/dist/review/kinds.d.ts.map +1 -1
- package/dist/review/kinds.js +14 -45
- package/dist/review/kinds.js.map +1 -1
- package/dist/review/status.d.ts +1 -0
- package/dist/review/status.d.ts.map +1 -1
- package/dist/schedule/command.d.ts +3 -1
- package/dist/schedule/command.d.ts.map +1 -1
- package/dist/schedule/command.js +6 -1
- package/dist/schedule/command.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -3
- package/skills/cli-memo/SKILL.md +15 -4
- package/skills/mail-triage/SKILL.md +120 -0
- package/dist/bundle/auto-F53FUP45.js +0 -82
- package/dist/bundle/chunk-7J5HTZCM.js +0 -18
- package/dist/bundle/command-contract-NMJKYTS4.js +0 -30
- package/dist/bundle/failure-NHDQ5WEW.js +0 -62
- package/dist/bundle/first-run-7P5N72VR.js +0 -23
- package/dist/bundle/first-screen-3GM5HC4Y.js +0 -28
- package/dist/bundle/mcp-YGWNSJUH.js +0 -86
- package/dist/bundle/server-SWUSQSRW.js +0 -44
- package/dist/bundle/server-W4IKTTUY.js +0 -57
- package/dist/bundle/store-maintenance-command-ZPN2ZUL4.js +0 -44
- package/dist/bundle/update-RFTADFRO.js +0 -65
- /package/dist/bundle/{chunk-7YF2MSEC.js → chunk-YYQN5ES2.js} +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
singleLine
|
|
5
|
+
} from "./chunk-CCHHEMPM.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
+
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
|
|
11
|
+
var FIRST_PARTY_TOOLS = [
|
|
12
|
+
{ name: "tg", package: "@wirecat/tg-cli" },
|
|
13
|
+
{ name: "max", package: "@wirecat/max-cli" },
|
|
14
|
+
{ name: "wa", package: "@wirecat/whatsapp-cli" },
|
|
15
|
+
{ name: "zm", package: "@wirecat/zoom-cli" },
|
|
16
|
+
{ name: "drive", package: "@wirecat/drive-cli" },
|
|
17
|
+
{ name: "memo", package: "@wirecat/cli-memo" },
|
|
18
|
+
{ name: "mail", package: "@wirecat/mail-cli" },
|
|
19
|
+
// memo reads email today; the name is held for a tool of its own.
|
|
20
|
+
{ name: "email" }
|
|
21
|
+
];
|
|
22
|
+
var BUILT_IN_COMMANDS = ["help", "version", "shortcuts", "doctor", "update", "upgrade", "app"];
|
|
23
|
+
var RESERVED_NAMES = [
|
|
24
|
+
...FIRST_PARTY_TOOLS.map((tool) => tool.name),
|
|
25
|
+
...BUILT_IN_COMMANDS,
|
|
26
|
+
"wcat"
|
|
27
|
+
];
|
|
28
|
+
var TOOL_NAME = /^[a-z][a-z0-9-]{0,39}$/;
|
|
29
|
+
var PROGRAM_PREFIX = "wcat-";
|
|
30
|
+
var DESCRIBE_FLAG = "--wcat-describe";
|
|
31
|
+
var DISPATCH_FLAG = "--wcat-dispatch";
|
|
32
|
+
|
|
33
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
|
|
34
|
+
var DESCRIBE_FORMAT = 1;
|
|
35
|
+
var describeAnswer = /* @__PURE__ */ __name((tool) => ({
|
|
36
|
+
wcat_describe: DESCRIBE_FORMAT,
|
|
37
|
+
name: tool.command,
|
|
38
|
+
version: tool.version,
|
|
39
|
+
description: tool.description,
|
|
40
|
+
...tool.docs ? { docs_url: tool.docs } : {}
|
|
41
|
+
}), "describeAnswer");
|
|
42
|
+
var MAX_TEXT = 200;
|
|
43
|
+
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? singleLine(value.trim()).slice(0, MAX_TEXT) : void 0, "clean");
|
|
44
|
+
var parseDescribe = /* @__PURE__ */ __name((text) => {
|
|
45
|
+
let answer;
|
|
46
|
+
try {
|
|
47
|
+
answer = JSON.parse(text);
|
|
48
|
+
} catch {
|
|
49
|
+
return void 0;
|
|
50
|
+
}
|
|
51
|
+
if (typeof answer !== "object" || answer === null || !("wcat_describe" in answer))
|
|
52
|
+
return void 0;
|
|
53
|
+
const { version, description, docs_url: docs } = answer;
|
|
54
|
+
const url = clean(docs);
|
|
55
|
+
return {
|
|
56
|
+
version: clean(version) ?? "",
|
|
57
|
+
description: clean(description) ?? "",
|
|
58
|
+
...url && /^https?:\/\//.test(url) ? { docs: url } : {}
|
|
59
|
+
};
|
|
60
|
+
}, "parseDescribe");
|
|
61
|
+
|
|
62
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
|
|
63
|
+
import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
64
|
+
import { join } from "node:path";
|
|
65
|
+
var SHIM_FORMAT = 1;
|
|
66
|
+
var MARK = /^(?:#|REM) wirecat-shim (\d+) (launcher|shortcut) (\S+)\r?$/m;
|
|
67
|
+
var NOTE = {
|
|
68
|
+
launcher: "Written by @wirecat/cli-base. Any WireCat tool rewrites it when it breaks; it is safe to delete.",
|
|
69
|
+
shortcut: "Made by `wcat shortcuts add`; `wcat shortcuts remove` takes it out."
|
|
70
|
+
};
|
|
71
|
+
var shellQuote = /* @__PURE__ */ __name((text) => `'${text.replaceAll("'", `'\\''`)}'`, "shellQuote");
|
|
72
|
+
var shimFiles = /* @__PURE__ */ __name((kind, { dir, name, target, platform }) => {
|
|
73
|
+
const mark = `wirecat-shim ${SHIM_FORMAT} ${kind} ${target}`;
|
|
74
|
+
const extra = kind === "launcher" ? ` ${DISPATCH_FLAG}` : "";
|
|
75
|
+
if (platform !== "win32")
|
|
76
|
+
return [
|
|
77
|
+
{
|
|
78
|
+
path: join(dir, name),
|
|
79
|
+
text: `#!/bin/sh
|
|
80
|
+
# ${mark}
|
|
81
|
+
# ${NOTE[kind]}
|
|
82
|
+
exec ${shellQuote(join(dir, target))}${extra} "$@"
|
|
83
|
+
`
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
return [
|
|
87
|
+
{
|
|
88
|
+
path: join(dir, `${name}.cmd`),
|
|
89
|
+
text: ["@ECHO off", `REM ${mark}`, `REM ${NOTE[kind]}`, `"%~dp0${target}"${extra} %*`, ""].join("\r\n")
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
path: join(dir, `${name}.ps1`),
|
|
93
|
+
text: [
|
|
94
|
+
`# ${mark}`,
|
|
95
|
+
`# ${NOTE[kind]}`,
|
|
96
|
+
// PowerShell hands a .cmd its arguments unquoted, so `a&b` would run `b`; npm and pnpm write a .ps1 beside
|
|
97
|
+
// their .cmd, and it is started instead whenever it is there.
|
|
98
|
+
`$stem = Join-Path $PSScriptRoot "${target.replace(/\.(cmd|exe|bat)$/i, "")}"`,
|
|
99
|
+
`$target = if (Test-Path -LiteralPath "$stem.ps1") { "$stem.ps1" } else { Join-Path $PSScriptRoot "${target}" }`,
|
|
100
|
+
"if ($MyInvocation.ExpectingInput) {",
|
|
101
|
+
` $input | & $target${extra} @args`,
|
|
102
|
+
"} else {",
|
|
103
|
+
` & $target${extra} @args`,
|
|
104
|
+
"}",
|
|
105
|
+
"exit $LASTEXITCODE",
|
|
106
|
+
""
|
|
107
|
+
].join("\r\n")
|
|
108
|
+
}
|
|
109
|
+
];
|
|
110
|
+
}, "shimFiles");
|
|
111
|
+
var parseShim = /* @__PURE__ */ __name((text) => {
|
|
112
|
+
const found = MARK.exec(text.split("\n", 3).join("\n"));
|
|
113
|
+
if (!found)
|
|
114
|
+
return void 0;
|
|
115
|
+
return { format: Number(found[1]), kind: found[2], target: found[3] };
|
|
116
|
+
}, "parseShim");
|
|
117
|
+
var MAX_SHIM_BYTES = 4096;
|
|
118
|
+
var fileState = /* @__PURE__ */ __name((path) => {
|
|
119
|
+
let stat;
|
|
120
|
+
try {
|
|
121
|
+
stat = lstatSync(path);
|
|
122
|
+
} catch (error) {
|
|
123
|
+
return error.code === "ENOENT" ? { state: "missing" } : { state: "foreign" };
|
|
124
|
+
}
|
|
125
|
+
if (!stat.isFile() || stat.size > MAX_SHIM_BYTES)
|
|
126
|
+
return { state: "foreign" };
|
|
127
|
+
try {
|
|
128
|
+
const text = readFileSync(path, "utf8");
|
|
129
|
+
const mark = parseShim(text);
|
|
130
|
+
return mark ? { state: "ours", mark, text } : { state: "foreign" };
|
|
131
|
+
} catch {
|
|
132
|
+
return { state: "foreign" };
|
|
133
|
+
}
|
|
134
|
+
}, "fileState");
|
|
135
|
+
var exists = /* @__PURE__ */ __name((path) => {
|
|
136
|
+
try {
|
|
137
|
+
return statSync(path).isFile();
|
|
138
|
+
} catch {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
}, "exists");
|
|
142
|
+
var writeShim = /* @__PURE__ */ __name(({ path, text }) => {
|
|
143
|
+
const temporary = `${path}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
144
|
+
try {
|
|
145
|
+
writeFileSync(temporary, text, { mode: 493 });
|
|
146
|
+
renameSync(temporary, path);
|
|
147
|
+
} finally {
|
|
148
|
+
rmSync(temporary, { force: true });
|
|
149
|
+
}
|
|
150
|
+
}, "writeShim");
|
|
151
|
+
|
|
152
|
+
export {
|
|
153
|
+
describeAnswer,
|
|
154
|
+
parseDescribe,
|
|
155
|
+
FIRST_PARTY_TOOLS,
|
|
156
|
+
BUILT_IN_COMMANDS,
|
|
157
|
+
TOOL_NAME,
|
|
158
|
+
PROGRAM_PREFIX,
|
|
159
|
+
DESCRIBE_FLAG,
|
|
160
|
+
DISPATCH_FLAG,
|
|
161
|
+
SHIM_FORMAT,
|
|
162
|
+
shimFiles,
|
|
163
|
+
fileState,
|
|
164
|
+
exists,
|
|
165
|
+
writeShim
|
|
166
|
+
};
|
|
@@ -2,29 +2,31 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
loadConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CRZSJHAK.js";
|
|
6
6
|
import {
|
|
7
7
|
upgradeCommand
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UXCSNSUU.js";
|
|
9
9
|
import {
|
|
10
10
|
FETCH,
|
|
11
11
|
annotate,
|
|
12
12
|
overrideSharedContract
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-VQM3H422.js";
|
|
14
14
|
import {
|
|
15
|
-
installerOf,
|
|
16
15
|
latestVersion,
|
|
17
16
|
runUpdate,
|
|
18
17
|
updateNotice
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3V4WIGWC.js";
|
|
20
19
|
import {
|
|
21
20
|
APP,
|
|
22
21
|
VERSION
|
|
23
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-B3YV6Z7Y.js";
|
|
23
|
+
import {
|
|
24
|
+
installerOf
|
|
25
|
+
} from "./chunk-ILHTNOIV.js";
|
|
24
26
|
import {
|
|
25
27
|
createRenderer,
|
|
26
28
|
resolvePaths
|
|
27
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-CDZZ2DZO.js";
|
|
28
30
|
import {
|
|
29
31
|
__name
|
|
30
32
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -32,7 +34,7 @@ import {
|
|
|
32
34
|
// dist/update.js
|
|
33
35
|
import { join } from "node:path";
|
|
34
36
|
|
|
35
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/update/index.js
|
|
36
38
|
import { realpathSync } from "node:fs";
|
|
37
39
|
import { fileURLToPath } from "node:url";
|
|
38
40
|
var QUIET_WORDS = [
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
commandPathOf,
|
|
8
8
|
findCommand,
|
|
9
9
|
outputOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WEOFWTWZ.js";
|
|
11
11
|
import {
|
|
12
12
|
Command,
|
|
13
13
|
Help,
|
|
@@ -18,16 +18,18 @@ import {
|
|
|
18
18
|
environmentOf,
|
|
19
19
|
metaOf,
|
|
20
20
|
takesProfile
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-VQM3H422.js";
|
|
22
22
|
import {
|
|
23
|
-
CliError,
|
|
24
23
|
writes
|
|
25
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-EG2OMKWH.js";
|
|
25
|
+
import {
|
|
26
|
+
CliError
|
|
27
|
+
} from "./chunk-CCHHEMPM.js";
|
|
26
28
|
import {
|
|
27
29
|
__name
|
|
28
30
|
} from "./chunk-ZVVMGPBJ.js";
|
|
29
31
|
|
|
30
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
|
|
31
33
|
var SECTIONS = {
|
|
32
34
|
read: "Read",
|
|
33
35
|
write: "Write",
|
|
@@ -92,7 +94,7 @@ var CORE_SECTIONS = {
|
|
|
92
94
|
upgrade: "setup"
|
|
93
95
|
};
|
|
94
96
|
|
|
95
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
97
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
|
|
96
98
|
var DESCRIPTION = 90;
|
|
97
99
|
var COLUMN = 52;
|
|
98
100
|
var short = /* @__PURE__ */ __name((text) => {
|
|
@@ -131,7 +133,7 @@ var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
|
|
|
131
133
|
`;
|
|
132
134
|
}, "commandsText");
|
|
133
135
|
|
|
134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
|
|
135
137
|
var ARGUMENT_KINDS = {
|
|
136
138
|
chat: "chat",
|
|
137
139
|
chats: "chat",
|
|
@@ -323,7 +325,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
|
|
|
323
325
|
command.addHelpText("after", () => commandHelpText(command));
|
|
324
326
|
}, "installCommandHelp");
|
|
325
327
|
|
|
326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
328
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
|
|
327
329
|
var WIRECAT_TOOLS = [
|
|
328
330
|
{
|
|
329
331
|
command: "tg",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__name
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
|
|
8
|
+
var installerOf = /* @__PURE__ */ __name((scriptPath) => {
|
|
9
|
+
const path = scriptPath.replaceAll("\\", "/");
|
|
10
|
+
if (path.includes("/_npx/"))
|
|
11
|
+
return "npx";
|
|
12
|
+
if (path.includes("/install/global/node_modules/"))
|
|
13
|
+
return "bun";
|
|
14
|
+
if (/\/\.?pnpm\//.test(path))
|
|
15
|
+
return "pnpm";
|
|
16
|
+
if (path.includes("/node_modules/"))
|
|
17
|
+
return "npm";
|
|
18
|
+
return path.includes("/dist/") ? "checkout" : "unknown";
|
|
19
|
+
}, "installerOf");
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
installerOf
|
|
23
|
+
};
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
agentJson,
|
|
8
8
|
commandAvailability,
|
|
9
9
|
failureContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RG6ITTLQ.js";
|
|
11
11
|
import {
|
|
12
12
|
callerOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CCOYC6HL.js";
|
|
14
14
|
import {
|
|
15
15
|
QUERY_ARGUMENT,
|
|
16
16
|
lentConnection,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
refuseLacking,
|
|
19
19
|
servicesFor,
|
|
20
20
|
storeModeDeps
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-J55Z6EJ3.js";
|
|
22
22
|
import {
|
|
23
23
|
DEFAULT_OUTPUT_BYTES,
|
|
24
24
|
ENTITIES,
|
|
@@ -42,29 +42,30 @@ import {
|
|
|
42
42
|
sealed,
|
|
43
43
|
startRecording,
|
|
44
44
|
traceOf
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-VQM3H422.js";
|
|
46
46
|
import {
|
|
47
47
|
currentCaller,
|
|
48
48
|
keepsSuccess,
|
|
49
49
|
runContextOf,
|
|
50
50
|
withCaller
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-RC7TIYUZ.js";
|
|
52
52
|
import {
|
|
53
53
|
queryDescription
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-RNXYDBQO.js";
|
|
55
55
|
import {
|
|
56
56
|
MAX_BUFFERED_INPUT
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-DZSWKA3K.js";
|
|
58
|
+
import {
|
|
59
|
+
captureStreams,
|
|
60
|
+
traceIdOf
|
|
61
|
+
} from "./chunk-CDZZ2DZO.js";
|
|
58
62
|
import {
|
|
59
63
|
COMPACT_FLAG,
|
|
60
|
-
CliError,
|
|
61
64
|
SNAKE_CASE,
|
|
62
65
|
array,
|
|
63
66
|
boolean,
|
|
64
|
-
captureStreams,
|
|
65
67
|
description,
|
|
66
68
|
duplicates,
|
|
67
|
-
errorCodes,
|
|
68
69
|
errorObjectOf,
|
|
69
70
|
integer,
|
|
70
71
|
isoDate,
|
|
@@ -92,17 +93,20 @@ import {
|
|
|
92
93
|
text,
|
|
93
94
|
toJsonSchema,
|
|
94
95
|
toStandardJsonSchema,
|
|
95
|
-
traceIdOf,
|
|
96
96
|
union,
|
|
97
97
|
unknown,
|
|
98
98
|
word,
|
|
99
99
|
writes
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-EG2OMKWH.js";
|
|
101
|
+
import {
|
|
102
|
+
CliError,
|
|
103
|
+
errorCodes
|
|
104
|
+
} from "./chunk-CCHHEMPM.js";
|
|
101
105
|
import {
|
|
102
106
|
__name
|
|
103
107
|
} from "./chunk-ZVVMGPBJ.js";
|
|
104
108
|
|
|
105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
106
110
|
import { Readable } from "node:stream";
|
|
107
111
|
|
|
108
112
|
// node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/lint.js
|
|
@@ -2830,7 +2834,7 @@ var VOCABULARY = defineVocabulary({
|
|
|
2830
2834
|
flags: [...HOW_FLAGS, ...WHAT_FLAGS, ...CALENDAR_FLAGS, ...MAIL_FLAGS]
|
|
2831
2835
|
});
|
|
2832
2836
|
|
|
2833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/mcp/agent.js
|
|
2834
2838
|
var TYPES = new Map(VOCABULARY.flags.map((flag) => [flag.name, flag.type]));
|
|
2835
2839
|
var snake = /* @__PURE__ */ __name((name) => name.replaceAll("|", "_or_").replace(/[^a-z0-9]+/gi, "_"), "snake");
|
|
2836
2840
|
var longOf = /* @__PURE__ */ __name((option) => option.flags.match(/--[a-z0-9][a-z0-9-]*/)?.[0], "longOf");
|
|
@@ -3053,7 +3057,7 @@ var runCommandForAgent = /* @__PURE__ */ __name(async (program, path, input, ctx
|
|
|
3053
3057
|
}
|
|
3054
3058
|
}, "runCommandForAgent");
|
|
3055
3059
|
|
|
3056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/mcp/tool.js
|
|
3057
3061
|
var limit = optional(pipe(number(), integer(), minValue(1), maxValue(100), description("how many")));
|
|
3058
3062
|
var page = optional(pipe(number(), integer(), minValue(1), description("which page, from 1")));
|
|
3059
3063
|
var message = pipe(
|
|
@@ -3312,7 +3316,7 @@ var failed = /* @__PURE__ */ __name((error, errors, effects) => {
|
|
|
3312
3316
|
return mcpErrorResult(JSON.parse(agentJson(errorObjectOf(error, context))));
|
|
3313
3317
|
}, "failed");
|
|
3314
3318
|
|
|
3315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/mcp/surface.js
|
|
3316
3320
|
import { randomUUID } from "node:crypto";
|
|
3317
3321
|
var MATCHES = 8;
|
|
3318
3322
|
var ANSWER = answerSchema();
|
|
@@ -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.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/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 = "";
|
|
@@ -2,10 +2,10 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
providerRequest
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UXCSNSUU.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CCHHEMPM.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|