@wirecat/zoom-cli 0.55.0 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/bin/zm.js +35 -5
- package/dist/bundle/all-profiles-EKHWTGOY.js +25 -0
- package/dist/bundle/answer-policy-KH2IFXPN.js +96 -0
- package/dist/bundle/anthropic-VL54IUGF.js +70 -0
- package/dist/bundle/bun-ADJVI4HY.js +169 -0
- package/dist/bundle/bun-sqlite-2SDA3YOT.js +69 -0
- package/dist/bundle/chunk-2IKY7VBH.js +9 -0
- package/dist/bundle/chunk-2WOGZDZG.js +431 -0
- package/dist/bundle/chunk-4R7HYNZS.js +73 -0
- package/dist/bundle/chunk-4VCA7QU3.js +538 -0
- package/dist/bundle/chunk-4YLS4YLS.js +29 -0
- package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
- package/dist/bundle/chunk-5F7IOESV.js +281 -0
- package/dist/bundle/chunk-5QESMCQK.js +122 -0
- package/dist/bundle/chunk-6M6FJV5D.js +138 -0
- package/dist/bundle/chunk-6MX5T6AQ.js +17 -0
- package/dist/bundle/chunk-6P3YHT54.js +385 -0
- package/dist/bundle/chunk-7A6PZUDR.js +938 -0
- package/dist/bundle/chunk-7GUG6UZS.js +884 -0
- package/dist/bundle/chunk-7JZJMHQY.js +487 -0
- package/dist/bundle/chunk-A4ETXPMZ.js +98 -0
- package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
- package/dist/bundle/chunk-AE4BOXH7.js +5292 -0
- package/dist/bundle/chunk-AN3GVZTU.js +76 -0
- package/dist/bundle/chunk-BAYNCCNM.js +215 -0
- package/dist/bundle/chunk-BW2WPOXP.js +166 -0
- package/dist/bundle/chunk-BW52AJ4R.js +3387 -0
- package/dist/bundle/chunk-CB5UTASG.js +18 -0
- package/dist/bundle/chunk-CLMXBW53.js +1028 -0
- package/dist/bundle/chunk-DCTXOMOR.js +35 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-EOQFWJJD.js +1095 -0
- package/dist/bundle/chunk-G4R4ZIGD.js +3569 -0
- package/dist/bundle/chunk-G4VZDINN.js +161 -0
- package/dist/bundle/chunk-GARCOIB6.js +409 -0
- package/dist/bundle/chunk-GKMGS7G5.js +1938 -0
- package/dist/bundle/chunk-HCNMFFG3.js +82 -0
- package/dist/bundle/chunk-HG5KRV55.js +1970 -0
- package/dist/bundle/chunk-HKYLSIZ2.js +82 -0
- package/dist/bundle/chunk-HTQTIKWP.js +928 -0
- package/dist/bundle/chunk-I4VQDXFR.js +100 -0
- package/dist/bundle/chunk-ICSKEDPI.js +36139 -0
- package/dist/bundle/chunk-IP4OK7RQ.js +24 -0
- package/dist/bundle/chunk-IVQ6342B.js +2 -0
- package/dist/bundle/chunk-K72SEMYI.js +160 -0
- package/dist/bundle/chunk-LHRCJYFC.js +19 -0
- package/dist/bundle/chunk-LPTIQLDW.js +192 -0
- package/dist/bundle/chunk-LQ3T2ZIX.js +124 -0
- package/dist/bundle/chunk-LSVI3A5X.js +836 -0
- package/dist/bundle/chunk-LW2G4U6W.js +570 -0
- package/dist/bundle/chunk-LXB6ONWC.js +3517 -0
- package/dist/bundle/chunk-LY26NW3I.js +6848 -0
- package/dist/bundle/chunk-MAEFLDHG.js +6092 -0
- package/dist/bundle/chunk-MZH4GDR4.js +45 -0
- package/dist/bundle/chunk-NN5B24KP.js +1109 -0
- package/dist/bundle/chunk-NO7CJEYV.js +22 -0
- package/dist/bundle/chunk-NTDWAAGL.js +18435 -0
- package/dist/bundle/chunk-NW3X3G5X.js +264 -0
- package/dist/bundle/chunk-O66V2WHK.js +48 -0
- package/dist/bundle/chunk-OCGPZHXW.js +25 -0
- package/dist/bundle/chunk-OIHDCGV4.js +151 -0
- package/dist/bundle/chunk-OVSWVPXL.js +8190 -0
- package/dist/bundle/chunk-PIN5RZ3D.js +63 -0
- package/dist/bundle/chunk-QLIB3PEC.js +1146 -0
- package/dist/bundle/chunk-QTR6D5HT.js +58 -0
- package/dist/bundle/chunk-QUJPQMHJ.js +2315 -0
- package/dist/bundle/chunk-R3HPOCZD.js +188 -0
- package/dist/bundle/chunk-RMV4C2YL.js +482 -0
- package/dist/bundle/chunk-RRRBMQ2E.js +844 -0
- package/dist/bundle/chunk-S4S7E54J.js +60 -0
- package/dist/bundle/chunk-SB6WOSHG.js +1109 -0
- package/dist/bundle/chunk-SE75DPBY.js +31 -0
- package/dist/bundle/chunk-SQJ7EH2D.js +97 -0
- package/dist/bundle/chunk-TKCHUT2H.js +422 -0
- package/dist/bundle/chunk-TLQUKHEM.js +193 -0
- package/dist/bundle/chunk-TZ2MKETI.js +100 -0
- package/dist/bundle/chunk-UC44ZMQV.js +78 -0
- package/dist/bundle/chunk-UI5UTMSZ.js +275 -0
- package/dist/bundle/chunk-VPPYYWOH.js +630 -0
- package/dist/bundle/chunk-WJHK5D7Z.js +35612 -0
- package/dist/bundle/chunk-WQ24UC44.js +239 -0
- package/dist/bundle/chunk-X5DFDGWS.js +2 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YB4DMKYX.js +119 -0
- package/dist/bundle/chunk-Z4TZ6TAF.js +288 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/cli-72EQATJF.js +825 -0
- package/dist/bundle/command-contract-4MHSZUN3.js +38 -0
- package/dist/bundle/config-GFIJK6G2.js +79 -0
- package/dist/bundle/dist-IBNHCQXT.js +136 -0
- package/dist/bundle/dist-XUFQCJXW.js +7577 -0
- package/dist/bundle/echarts-RFTK737T.js +42501 -0
- package/dist/bundle/embed-7QYA2ZZE.js +35 -0
- package/dist/bundle/embedder-YNN6PCHG.js +108 -0
- package/dist/bundle/first-run-EVSRQKZJ.js +23 -0
- package/dist/bundle/first-screen-RG4GUKW7.js +36 -0
- package/dist/bundle/folders-JEPOMYM4.js +13 -0
- package/dist/bundle/instructions-FHNL7CMW.js +9 -0
- package/dist/bundle/main-NYGJXPH7.js +130 -0
- package/dist/bundle/mcp-IXFC2VVR.js +165 -0
- package/dist/bundle/mcp-VGSZDCKK.js +189 -0
- package/dist/bundle/mcp-XKP2PXLS.js +92 -0
- package/dist/bundle/meetings-IBPI4MM4.js +215 -0
- package/dist/bundle/node-P4E63KXA.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-ZMCACJVS.js +176 -0
- package/dist/bundle/node-sqlite-ZNGOBA5Q.js +45 -0
- package/dist/bundle/oauth-Q6LKF7DB.js +17 -0
- package/dist/bundle/open-LJ332Y5O.js +19 -0
- package/dist/bundle/output-file-RYQZ3RTE.js +63 -0
- package/dist/bundle/process-ZPTLNVQS.js +91 -0
- package/dist/bundle/program-IBRQBQ6W.js +5845 -0
- package/dist/bundle/prompt-RT7GUUXH.js +12 -0
- package/dist/bundle/recognize-QXGE7YJH.js +190 -0
- package/dist/bundle/remote-FD4MZQV3.js +26 -0
- package/dist/bundle/rerank-V6AVV755.js +49 -0
- package/dist/bundle/run-log-RE2EI3UU.js +111 -0
- package/dist/bundle/serve-HIJTFAW7.js +19 -0
- package/dist/bundle/server-3QOXOYYL.js +53 -0
- package/dist/bundle/server-WLJCU7KK.js +812 -0
- package/dist/bundle/services-KC5KQFBS.js +330 -0
- package/dist/bundle/speech-5JOXLYDA.js +44 -0
- package/dist/bundle/state-PPGRB3T6.js +33 -0
- package/dist/bundle/store-LODVDPK3.js +141 -0
- package/dist/bundle/store-WB5BICTG.js +124 -0
- package/dist/bundle/store-connection-EG6Z5ITP.js +76 -0
- package/dist/bundle/store-maintenance-command-Q5WMFUZ2.js +54 -0
- package/dist/bundle/streaming-UGFFNOXL.js +15 -0
- package/dist/bundle/tokens-AF5CPY2F.js +17 -0
- package/dist/bundle/zm.js +8 -0
- package/dist/commands.js +2 -2
- package/dist/commands.js.map +1 -1
- package/dist/config-issues.d.ts.map +1 -1
- package/dist/config-issues.js +3 -0
- package/dist/config-issues.js.map +1 -1
- package/dist/config.d.ts +3 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +23 -0
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +34 -45
- package/dist/contract-overrides.js.map +1 -1
- package/dist/first-screen.js +1 -1
- package/dist/first-screen.js.map +1 -1
- package/dist/mcp-command.d.ts +5 -3
- package/dist/mcp-command.d.ts.map +1 -1
- package/dist/mcp-command.js +73 -15
- package/dist/mcp-command.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +1 -0
- package/dist/program-bindings.js.map +1 -1
- package/dist/recording-archive.d.ts.map +1 -1
- package/dist/recording-archive.js +9 -4
- package/dist/recording-archive.js.map +1 -1
- package/dist/remote-http.d.ts +2 -0
- package/dist/remote-http.d.ts.map +1 -1
- package/dist/remote-http.js +21 -11
- package/dist/remote-http.js.map +1 -1
- package/dist/request-events.d.ts +12 -0
- package/dist/request-events.d.ts.map +1 -1
- package/dist/request-events.js +56 -4
- package/dist/request-events.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +4 -1
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +7 -5
- package/skills/zoom-cli/SKILL.md +3 -1
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
commandPathOf,
|
|
5
|
+
findCommand,
|
|
6
|
+
outputOf
|
|
7
|
+
} from "./chunk-BW2WPOXP.js";
|
|
8
|
+
import {
|
|
9
|
+
Command,
|
|
10
|
+
Help,
|
|
11
|
+
NO_EFFECTS,
|
|
12
|
+
Option,
|
|
13
|
+
annotate,
|
|
14
|
+
commandAt,
|
|
15
|
+
environmentOf,
|
|
16
|
+
metaOf,
|
|
17
|
+
takesProfile
|
|
18
|
+
} from "./chunk-MAEFLDHG.js";
|
|
19
|
+
import {
|
|
20
|
+
wrapAnsi
|
|
21
|
+
} from "./chunk-HTQTIKWP.js";
|
|
22
|
+
import {
|
|
23
|
+
CliError,
|
|
24
|
+
writes
|
|
25
|
+
} from "./chunk-AE4BOXH7.js";
|
|
26
|
+
import {
|
|
27
|
+
__name
|
|
28
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
29
|
+
|
|
30
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
|
|
31
|
+
var SECTIONS = {
|
|
32
|
+
read: "Read",
|
|
33
|
+
write: "Write",
|
|
34
|
+
organise: "Organise",
|
|
35
|
+
automate: "Automate",
|
|
36
|
+
setup: "Set up",
|
|
37
|
+
other: "Other"
|
|
38
|
+
};
|
|
39
|
+
var sections = /* @__PURE__ */ new WeakMap();
|
|
40
|
+
var inSection = /* @__PURE__ */ __name((command, section) => {
|
|
41
|
+
sections.set(command, section);
|
|
42
|
+
return command;
|
|
43
|
+
}, "inSection");
|
|
44
|
+
var sectionOf = /* @__PURE__ */ __name((command) => {
|
|
45
|
+
for (let at = command; at; at = at.parent) {
|
|
46
|
+
const section = sections.get(at) ?? (at.parent && !at.parent.parent ? CORE_SECTIONS[at.name()] : void 0);
|
|
47
|
+
if (section)
|
|
48
|
+
return section;
|
|
49
|
+
}
|
|
50
|
+
return "other";
|
|
51
|
+
}, "sectionOf");
|
|
52
|
+
var CORE_SECTIONS = {
|
|
53
|
+
attachments: "read",
|
|
54
|
+
chats: "read",
|
|
55
|
+
contacts: "read",
|
|
56
|
+
conversations: "read",
|
|
57
|
+
images: "read",
|
|
58
|
+
inbox: "read",
|
|
59
|
+
meetings: "read",
|
|
60
|
+
mentions: "read",
|
|
61
|
+
messages: "read",
|
|
62
|
+
review: "read",
|
|
63
|
+
search: "read",
|
|
64
|
+
stats: "read",
|
|
65
|
+
topics: "read",
|
|
66
|
+
watch: "read",
|
|
67
|
+
flood: "write",
|
|
68
|
+
polls: "write",
|
|
69
|
+
reactions: "write",
|
|
70
|
+
recipients: "write",
|
|
71
|
+
sends: "write",
|
|
72
|
+
metadata: "organise",
|
|
73
|
+
searches: "organise",
|
|
74
|
+
tags: "organise",
|
|
75
|
+
tasks: "organise",
|
|
76
|
+
bot: "automate",
|
|
77
|
+
mcp: "automate",
|
|
78
|
+
replies: "automate",
|
|
79
|
+
runs: "automate",
|
|
80
|
+
schedule: "automate",
|
|
81
|
+
serve: "automate",
|
|
82
|
+
server: "automate",
|
|
83
|
+
account: "setup",
|
|
84
|
+
commands: "setup",
|
|
85
|
+
complete: "setup",
|
|
86
|
+
config: "setup",
|
|
87
|
+
doctor: "setup",
|
|
88
|
+
guide: "setup",
|
|
89
|
+
models: "setup",
|
|
90
|
+
skill: "setup",
|
|
91
|
+
store: "setup",
|
|
92
|
+
upgrade: "setup"
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
|
|
96
|
+
var DESCRIPTION = 90;
|
|
97
|
+
var COLUMN = 52;
|
|
98
|
+
var short = /* @__PURE__ */ __name((text) => {
|
|
99
|
+
const line = text.replace(/\s+/g, " ").trim();
|
|
100
|
+
if (line.length <= DESCRIPTION)
|
|
101
|
+
return line;
|
|
102
|
+
const cut = line.slice(0, DESCRIPTION);
|
|
103
|
+
return `${cut.slice(0, Math.max(cut.lastIndexOf(" "), DESCRIPTION / 2))}\u2026`;
|
|
104
|
+
}, "short");
|
|
105
|
+
var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
|
|
106
|
+
const cli = root.name();
|
|
107
|
+
const runs = /* @__PURE__ */ __name((info) => [
|
|
108
|
+
...info.commands.length === 0 || info.runnable ? [info] : [],
|
|
109
|
+
...info.commands.flatMap(runs)
|
|
110
|
+
], "runs");
|
|
111
|
+
const bySection = new Map(Object.keys(SECTIONS).map((key) => [key, []]));
|
|
112
|
+
for (const info of commands.flatMap(runs))
|
|
113
|
+
bySection.get(sectionOf(findCommand(root, info.path)))?.push(info);
|
|
114
|
+
const where = scope ? `${cli} ${scope.join(" ")}` : cli;
|
|
115
|
+
const lines = [
|
|
116
|
+
`${where} commands, by section. One command's arguments and options: ${cli} <command> --help.`,
|
|
117
|
+
`As JSON: ${cli} commands${scope ? ` ${scope.join(" ")}` : ""} --json. (writes) marks a command that changes something.`
|
|
118
|
+
];
|
|
119
|
+
for (const [section, infos] of bySection) {
|
|
120
|
+
if (infos.length === 0)
|
|
121
|
+
continue;
|
|
122
|
+
lines.push("", SECTIONS[section]);
|
|
123
|
+
for (const { usage, summary, description, effects, availability } of infos) {
|
|
124
|
+
const what = short(summary ?? description);
|
|
125
|
+
const mark = effects === void 0 || writes(effects) ? " (writes)" : "";
|
|
126
|
+
const access = availability?.available === false ? ` [unavailable: ${availability.reason}]` : "";
|
|
127
|
+
lines.push(` ${usage.padEnd(COLUMN)} ${what}${mark}${access}`.trimEnd());
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return `${lines.join("\n")}
|
|
131
|
+
`;
|
|
132
|
+
}, "commandsText");
|
|
133
|
+
|
|
134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
|
|
135
|
+
var ARGUMENT_KINDS = {
|
|
136
|
+
chat: "chat",
|
|
137
|
+
chats: "chat",
|
|
138
|
+
message: "message",
|
|
139
|
+
messages: "message",
|
|
140
|
+
post: "message",
|
|
141
|
+
person: "person",
|
|
142
|
+
people: "person",
|
|
143
|
+
task: "task",
|
|
144
|
+
meeting: "meeting",
|
|
145
|
+
folder: "folder",
|
|
146
|
+
folders: "folder",
|
|
147
|
+
topic: "topic",
|
|
148
|
+
note: "note",
|
|
149
|
+
document: "document",
|
|
150
|
+
model: "model"
|
|
151
|
+
};
|
|
152
|
+
var ENTITY_KINDS = {
|
|
153
|
+
message: "message",
|
|
154
|
+
message_link: "message",
|
|
155
|
+
chat: "chat",
|
|
156
|
+
contact: "person",
|
|
157
|
+
member: "person",
|
|
158
|
+
person: "person",
|
|
159
|
+
task: "task",
|
|
160
|
+
meeting: "meeting",
|
|
161
|
+
meeting_details: "meeting",
|
|
162
|
+
meeting_hit: "meeting",
|
|
163
|
+
meeting_summary: "meeting",
|
|
164
|
+
folder: "folder",
|
|
165
|
+
topic: "topic",
|
|
166
|
+
note: "note",
|
|
167
|
+
document: "document",
|
|
168
|
+
model: "model"
|
|
169
|
+
};
|
|
170
|
+
var HOME = {
|
|
171
|
+
chat: "chats",
|
|
172
|
+
message: "messages",
|
|
173
|
+
person: "contacts",
|
|
174
|
+
task: "tasks",
|
|
175
|
+
meeting: "meetings",
|
|
176
|
+
folder: "folders",
|
|
177
|
+
topic: "topics",
|
|
178
|
+
note: "notes",
|
|
179
|
+
document: "documents",
|
|
180
|
+
model: "models"
|
|
181
|
+
};
|
|
182
|
+
var SAMPLES = {
|
|
183
|
+
chat: "Team",
|
|
184
|
+
message: "1234",
|
|
185
|
+
post: "1234",
|
|
186
|
+
person: "Anna",
|
|
187
|
+
people: "Anna",
|
|
188
|
+
task: "12",
|
|
189
|
+
meeting: "123",
|
|
190
|
+
folder: "Work",
|
|
191
|
+
topic: "General",
|
|
192
|
+
model: "default",
|
|
193
|
+
query: '"invoice"',
|
|
194
|
+
text: '"on my way"',
|
|
195
|
+
title: '"Weekly sync"',
|
|
196
|
+
name: "daily",
|
|
197
|
+
id: "1",
|
|
198
|
+
file: "./report.pdf",
|
|
199
|
+
link: "https://example.com/join/abc",
|
|
200
|
+
url: "https://example.com",
|
|
201
|
+
since: "1d",
|
|
202
|
+
duration: "1d",
|
|
203
|
+
limit: "20"
|
|
204
|
+
};
|
|
205
|
+
var MAX_NEXT = 3;
|
|
206
|
+
var choices = /* @__PURE__ */ new WeakMap();
|
|
207
|
+
var nextUsually = /* @__PURE__ */ __name((command, choice) => {
|
|
208
|
+
choices.set(command, choice);
|
|
209
|
+
return command;
|
|
210
|
+
}, "nextUsually");
|
|
211
|
+
var kindOfArgument = /* @__PURE__ */ __name((argument) => ARGUMENT_KINDS[argument.name()], "kindOfArgument");
|
|
212
|
+
var leaves = /* @__PURE__ */ __name((command) => command.commands.filter((child) => !child._hidden).flatMap((child) => child.commands.length === 0 ? [child] : leaves(child)), "leaves");
|
|
213
|
+
var rootOf = /* @__PURE__ */ __name((command) => {
|
|
214
|
+
let at = command;
|
|
215
|
+
while (at.parent)
|
|
216
|
+
at = at.parent;
|
|
217
|
+
return at;
|
|
218
|
+
}, "rootOf");
|
|
219
|
+
var call = /* @__PURE__ */ __name((command) => [
|
|
220
|
+
rootOf(command).name(),
|
|
221
|
+
...commandPathOf(command),
|
|
222
|
+
...command.registeredArguments.map((one) => one.required ? `<${one.name()}>` : `[${one.name()}]`)
|
|
223
|
+
].join(" "), "call");
|
|
224
|
+
var fieldsOf = /* @__PURE__ */ __name((schema) => {
|
|
225
|
+
const variants = schema.anyOf;
|
|
226
|
+
if (variants)
|
|
227
|
+
return variants.flatMap(fieldsOf);
|
|
228
|
+
const required = schema.required ?? [];
|
|
229
|
+
return [...required, ...Object.keys(schema.properties ?? {})];
|
|
230
|
+
}, "fieldsOf");
|
|
231
|
+
var returnsOf = /* @__PURE__ */ __name((command) => {
|
|
232
|
+
const output = metaOf(command).output;
|
|
233
|
+
const { item, coverage } = outputOf(command);
|
|
234
|
+
if (!output || coverage !== "declared-entity")
|
|
235
|
+
return short(command.summary() || command.description()) || "not declared";
|
|
236
|
+
const fields = [...new Set(fieldsOf(item))];
|
|
237
|
+
const noun = (output.view ? `${output.entity} ${output.view}` : output.entity).replaceAll("_", " ");
|
|
238
|
+
const more = fields.length > 8 ? `, and ${fields.length - 8} more` : "";
|
|
239
|
+
const root = rootOf(command);
|
|
240
|
+
const schema = commandAt(root, "commands info") ? `; every field: ${root.name()} commands info ${commandPathOf(command).join(" ")}` : "";
|
|
241
|
+
return `${noun} \u2014 ${fields.slice(0, 8).join(", ")}${more}${schema}`;
|
|
242
|
+
}, "returnsOf");
|
|
243
|
+
var nextOf = /* @__PURE__ */ __name((command) => {
|
|
244
|
+
const root = rootOf(command);
|
|
245
|
+
const choice = choices.get(command) ?? {};
|
|
246
|
+
const drop = new Set(choice.drop ?? []);
|
|
247
|
+
const pinned = (choice.pin ?? []).flatMap((path) => commandAt(root, path) ?? []);
|
|
248
|
+
const output = metaOf(command).output;
|
|
249
|
+
const kind = output ? ENTITY_KINDS[output.entity] : void 0;
|
|
250
|
+
const all = leaves(root);
|
|
251
|
+
const derived = kind ? all.filter((other) => other !== command && !pinned.includes(other)).filter((other) => other.registeredArguments.some((argument) => kindOfArgument(argument) === kind)).map((other, order) => ({ other, order })).sort((a, b) => {
|
|
252
|
+
const rank = /* @__PURE__ */ __name((other) => [
|
|
253
|
+
Number(writes(metaOf(other).effects)),
|
|
254
|
+
Number(!other.registeredArguments.some((one) => one.required && kindOfArgument(one) === kind)),
|
|
255
|
+
Number(commandPathOf(other)[0] !== HOME[kind]),
|
|
256
|
+
Number(other.parent !== command.parent)
|
|
257
|
+
], "rank");
|
|
258
|
+
const [left, right] = [rank(a.other), rank(b.other)];
|
|
259
|
+
return left.reduce((found, value, at) => found || value - (right[at] ?? 0), 0) || a.order - b.order;
|
|
260
|
+
}).map(({ other }) => other) : [];
|
|
261
|
+
return [...pinned, ...derived].filter((other) => !drop.has(commandPathOf(other).join(" "))).slice(0, MAX_NEXT);
|
|
262
|
+
}, "nextOf");
|
|
263
|
+
var sample = /* @__PURE__ */ __name((name) => SAMPLES[name] ?? `<${name}>`, "sample");
|
|
264
|
+
var generatedExample = /* @__PURE__ */ __name((command) => {
|
|
265
|
+
const { query } = metaOf(command);
|
|
266
|
+
const words = command.registeredArguments.flatMap((argument) => {
|
|
267
|
+
const name = argument.name();
|
|
268
|
+
if (name === "query" && query)
|
|
269
|
+
return [];
|
|
270
|
+
if (!argument.required && SAMPLES[name] === void 0)
|
|
271
|
+
return [];
|
|
272
|
+
return [argument.argChoices?.[0] ?? sample(name)];
|
|
273
|
+
});
|
|
274
|
+
const options = command.options.filter((option) => option.mandatory).flatMap((option) => {
|
|
275
|
+
const flag = option.long ?? option.short ?? option.flags;
|
|
276
|
+
const placeholder = /[<[]([^>\]]+)[>\]]/.exec(option.flags)?.[1];
|
|
277
|
+
if (!(option.required || option.optional))
|
|
278
|
+
return [flag];
|
|
279
|
+
return [flag, option.argChoices?.[0] ?? sample(placeholder ?? option.attributeName())];
|
|
280
|
+
});
|
|
281
|
+
return [rootOf(command).name(), ...commandPathOf(command), ...words, ...options].join(" ");
|
|
282
|
+
}, "generatedExample");
|
|
283
|
+
var profiled = /* @__PURE__ */ new WeakSet();
|
|
284
|
+
var EXAMPLE_PROFILE = "personal";
|
|
285
|
+
var withProfile = /* @__PURE__ */ __name((command, example) => {
|
|
286
|
+
const root = rootOf(command);
|
|
287
|
+
const top = commandPathOf(command)[0];
|
|
288
|
+
if (!profiled.has(root) || top === void 0 || !takesProfile(command))
|
|
289
|
+
return example;
|
|
290
|
+
const prefix = `${root.name()} ${top}`;
|
|
291
|
+
return example === prefix || example.startsWith(`${prefix} `) ? `${root.name()} ${EXAMPLE_PROFILE} ${example.slice(root.name().length + 1)}` : example;
|
|
292
|
+
}, "withProfile");
|
|
293
|
+
var commandHelp = /* @__PURE__ */ __name((command) => {
|
|
294
|
+
const written = metaOf(command).examples ?? [];
|
|
295
|
+
return {
|
|
296
|
+
returns: returnsOf(command),
|
|
297
|
+
next: nextOf(command).map(call),
|
|
298
|
+
examples: (written.length > 0 ? written : [generatedExample(command)]).map((one) => withProfile(command, one)),
|
|
299
|
+
origin: written.length > 0 ? "written" : "generated"
|
|
300
|
+
};
|
|
301
|
+
}, "commandHelp");
|
|
302
|
+
var LABEL = 15;
|
|
303
|
+
var commandHelpText = /* @__PURE__ */ __name((command) => {
|
|
304
|
+
const { returns, next, examples } = commandHelp(command);
|
|
305
|
+
const rows = /* @__PURE__ */ __name((label, values) => values.map((value, at) => `${(at === 0 ? label : "").padEnd(LABEL)}${value}`), "rows");
|
|
306
|
+
const availability = environmentOf(command).discoveryAvailability?.({
|
|
307
|
+
...metaOf(command),
|
|
308
|
+
path: commandPathOf(command)
|
|
309
|
+
});
|
|
310
|
+
const profileMatters = profiled.has(rootOf(command)) && takesProfile(command);
|
|
311
|
+
const access = !availability ? [] : availability.available ? profileMatters ? rows("Availability:", ["available for this profile"]) : [] : rows("Availability:", [`unavailable \u2014 ${availability.reason}`]);
|
|
312
|
+
return [
|
|
313
|
+
"",
|
|
314
|
+
...access,
|
|
315
|
+
...rows("Returns:", [returns]),
|
|
316
|
+
...rows("Next usually:", next),
|
|
317
|
+
...rows("Example:", examples),
|
|
318
|
+
""
|
|
319
|
+
].join("\n");
|
|
320
|
+
}, "commandHelpText");
|
|
321
|
+
var commandHelpMarkdown = /* @__PURE__ */ __name((root, path) => {
|
|
322
|
+
const command = commandAt(root, path.join(" "));
|
|
323
|
+
if (!command || command.commands.length > 0)
|
|
324
|
+
return [];
|
|
325
|
+
const { returns, next, examples } = commandHelp(command);
|
|
326
|
+
const code = /* @__PURE__ */ __name((values) => values.map((value) => `\`${value}\``).join(", "), "code");
|
|
327
|
+
return [
|
|
328
|
+
`**Returns:** ${returns}`,
|
|
329
|
+
...next.length > 0 ? [`**Next usually:** ${code(next)}`] : [],
|
|
330
|
+
`**Example:** ${code(examples)}`
|
|
331
|
+
];
|
|
332
|
+
}, "commandHelpMarkdown");
|
|
333
|
+
var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {}) => {
|
|
334
|
+
if (profile)
|
|
335
|
+
profiled.add(program);
|
|
336
|
+
for (const command of leaves(program))
|
|
337
|
+
command.addHelpText("after", () => commandHelpText(command));
|
|
338
|
+
}, "installCommandHelp");
|
|
339
|
+
var exampleReport = /* @__PURE__ */ __name((program) => {
|
|
340
|
+
const written = [];
|
|
341
|
+
const generated = [];
|
|
342
|
+
for (const command of leaves(program))
|
|
343
|
+
(commandHelp(command).origin === "written" ? written : generated).push(commandPathOf(command).join(" "));
|
|
344
|
+
const total = written.length + generated.length;
|
|
345
|
+
const text = [
|
|
346
|
+
`${program.name()}: ${written.length} of ${total} commands have a written example; ${generated.length} show a generated one:`,
|
|
347
|
+
...generated.map((path) => ` ${program.name()} ${path}`),
|
|
348
|
+
""
|
|
349
|
+
].join("\n");
|
|
350
|
+
return { written, generated, text };
|
|
351
|
+
}, "exampleReport");
|
|
352
|
+
|
|
353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
|
|
354
|
+
var WIRECAT_TOOLS = [
|
|
355
|
+
{
|
|
356
|
+
command: "tg",
|
|
357
|
+
package: "@wirecat/tg-cli",
|
|
358
|
+
does: "Telegram in the same local store: search, review and tasks offline"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
command: "max",
|
|
362
|
+
package: "@wirecat/max-cli",
|
|
363
|
+
does: "MAX in the same local store: search, review and tasks offline"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
command: "wa",
|
|
367
|
+
package: "@wirecat/whatsapp-cli",
|
|
368
|
+
does: "WhatsApp in the same local store: search, review and tasks offline"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
command: "zm",
|
|
372
|
+
package: "@wirecat/zoom-cli",
|
|
373
|
+
does: "Zoom meetings: transcripts and summaries, searchable with your other WireCat data"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
command: "drive",
|
|
377
|
+
package: "@wirecat/drive-cli",
|
|
378
|
+
does: "Google Drive and Docs as local text, searchable with your other WireCat data"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
command: "memo",
|
|
382
|
+
package: "@wirecat/cli-memo",
|
|
383
|
+
shown: "memo context <person>",
|
|
384
|
+
does: "one person across messengers, mail, notes and meetings"
|
|
385
|
+
}
|
|
386
|
+
];
|
|
387
|
+
var WIDTH = 100;
|
|
388
|
+
var widest = /* @__PURE__ */ __name((texts) => texts.reduce((most, text) => Math.max(most, text.length), 0), "widest");
|
|
389
|
+
var block = /* @__PURE__ */ __name((title, rows, column) => rows.length === 0 ? [] : ["", `${title}:`, ...rows.map(([left, right]) => ` ${left.padEnd(column)}${right}`)], "block");
|
|
390
|
+
var TOPICS = [
|
|
391
|
+
["--json", "output"],
|
|
392
|
+
["--offline", "offline"],
|
|
393
|
+
["--timeout", "timeouts"],
|
|
394
|
+
["--dry-run", "dry run"]
|
|
395
|
+
];
|
|
396
|
+
var optionTopics = /* @__PURE__ */ __name((program) => {
|
|
397
|
+
const longs = new Set(program.options.map((option) => option.long));
|
|
398
|
+
const topics = TOPICS.filter(([long]) => longs.has(long)).map(([, topic]) => topic);
|
|
399
|
+
return topics.length > 0 ? topics.join(", ") : "the options every command takes";
|
|
400
|
+
}, "optionTopics");
|
|
401
|
+
var pointers = /* @__PURE__ */ __name((program, cli, start, profile) => {
|
|
402
|
+
const has = /* @__PURE__ */ __name((path) => commandAt(program, path) !== void 0, "has");
|
|
403
|
+
const next = [
|
|
404
|
+
has("commands") ? [`${cli} commands`, "every command, by section"] : void 0,
|
|
405
|
+
has("guide") ? [`${cli} guide`, "scenarios: command sequences for common tasks"] : void 0,
|
|
406
|
+
[`${cli} help options`, optionTopics(program)]
|
|
407
|
+
].filter((row) => row !== void 0);
|
|
408
|
+
const rows = [
|
|
409
|
+
...start ? [["Start here:", start, profile ? "(any profile name works)" : ""]] : [],
|
|
410
|
+
...has("account list") ? [["", `${cli} account list`, "your profiles and their logged-in accounts"]] : [],
|
|
411
|
+
...next.map(([command = "", does = ""], at) => [at === 0 ? "Next:" : "", command, does]),
|
|
412
|
+
...has("skill show") ? [["For agents:", `${cli} skill show`, "rules and the discovery loop"]] : []
|
|
413
|
+
];
|
|
414
|
+
const width = widest(rows.map(([, command]) => command)) + 2;
|
|
415
|
+
return ["", ...rows.map(([label, command, does]) => `${label.padEnd(14)}${command.padEnd(width)}${does}`.trimEnd())];
|
|
416
|
+
}, "pointers");
|
|
417
|
+
var firstScreen = /* @__PURE__ */ __name((program, screen = {}) => {
|
|
418
|
+
const cli = program.name();
|
|
419
|
+
const profile = screen.profile !== false;
|
|
420
|
+
const pitch = screen.pitch ?? program.description().split("\n")[0] ?? "";
|
|
421
|
+
const can = (screen.can ?? []).map(({ command, does }) => [command, does]);
|
|
422
|
+
const works = WIRECAT_TOOLS.filter((tool) => tool.command !== cli).map(({ command, shown, does }) => [shown ?? command, does]);
|
|
423
|
+
const column = Math.max(22, widest([...can, ...works].map(([left]) => left))) + 2;
|
|
424
|
+
const start = screen.start ?? (commandAt(program, "setup") ? `${cli} ${EXAMPLE_PROFILE} setup` : void 0);
|
|
425
|
+
return [
|
|
426
|
+
wrapAnsi(`${cli} \u2014 ${pitch}`, WIDTH),
|
|
427
|
+
"",
|
|
428
|
+
`Usage: ${cli} ${profile ? "<profile> " : ""}<command> [options]`,
|
|
429
|
+
...profile ? ["Account commands start with your profile, a name you choose; none is ever assumed."] : [],
|
|
430
|
+
...block("What you can do", can, column),
|
|
431
|
+
...block("Works with", works, column),
|
|
432
|
+
...pointers(program, cli, start, profile),
|
|
433
|
+
""
|
|
434
|
+
].join("\n");
|
|
435
|
+
}, "firstScreen");
|
|
436
|
+
var optionsScreen = /* @__PURE__ */ __name((program) => {
|
|
437
|
+
const helper = program.createHelp();
|
|
438
|
+
const width = helper.longestOptionTermLength(program, helper);
|
|
439
|
+
return [
|
|
440
|
+
`Options for every ${program.name()} command:`,
|
|
441
|
+
...helper.visibleOptions(program).map((option) => helper.formatItem(helper.optionTerm(option), width, helper.optionDescription(option), helper)),
|
|
442
|
+
""
|
|
443
|
+
].join("\n");
|
|
444
|
+
}, "optionsScreen");
|
|
445
|
+
var installHelp = /* @__PURE__ */ __name((program, screen = {}) => {
|
|
446
|
+
let full = false;
|
|
447
|
+
const own = program.configureHelp();
|
|
448
|
+
program.configureHelp({
|
|
449
|
+
...own,
|
|
450
|
+
// Commander copies this configuration to children made with `.command()`, so only the root gets the screen.
|
|
451
|
+
formatHelp: /* @__PURE__ */ __name((command, helper) => command === program && !full ? firstScreen(program, screen) : (own.formatHelp ?? Help.prototype.formatHelp).call(helper, command, helper), "formatHelp")
|
|
452
|
+
});
|
|
453
|
+
installCommandHelp(program, { profile: screen.profile !== false });
|
|
454
|
+
program.addOption(new Option("--help-all", "the full help: every command and option").hideHelp());
|
|
455
|
+
program.on("option:help-all", () => {
|
|
456
|
+
full = true;
|
|
457
|
+
program.help();
|
|
458
|
+
});
|
|
459
|
+
if (program.commands.some((command) => command.name() === "help"))
|
|
460
|
+
return program;
|
|
461
|
+
const help = annotate(new Command("help"), { effects: NO_EFFECTS, mcp: false }).description("this screen; help options: the options for every command; help <command>: that command's help").argument("[topic...]", "options, or a command path").action((topic) => {
|
|
462
|
+
if (topic.length === 0)
|
|
463
|
+
return program.outputHelp();
|
|
464
|
+
if (topic.length === 1 && topic[0] === "options")
|
|
465
|
+
return program.configureOutput().writeOut?.(optionsScreen(program));
|
|
466
|
+
const command = commandAt(program, topic.join(" "));
|
|
467
|
+
if (!command)
|
|
468
|
+
throw new CliError("validation_error", `no command "${topic.join(" ")}" \u2014 run \`${program.name()} help\`, or \`${program.name()} help options\``, { available: program.commands.map((one) => one.name()).filter((name) => name !== "help") });
|
|
469
|
+
command.outputHelp();
|
|
470
|
+
});
|
|
471
|
+
program.addCommand(help, { hidden: true });
|
|
472
|
+
return program;
|
|
473
|
+
}, "installHelp");
|
|
474
|
+
|
|
475
|
+
export {
|
|
476
|
+
SECTIONS,
|
|
477
|
+
inSection,
|
|
478
|
+
commandsText,
|
|
479
|
+
nextUsually,
|
|
480
|
+
commandHelp,
|
|
481
|
+
commandHelpText,
|
|
482
|
+
commandHelpMarkdown,
|
|
483
|
+
exampleReport,
|
|
484
|
+
WIRECAT_TOOLS,
|
|
485
|
+
firstScreen,
|
|
486
|
+
installHelp
|
|
487
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
timezoneOf,
|
|
5
|
+
wallTime
|
|
6
|
+
} from "./chunk-LSVI3A5X.js";
|
|
7
|
+
import {
|
|
8
|
+
CliError,
|
|
9
|
+
isCliError
|
|
10
|
+
} from "./chunk-AE4BOXH7.js";
|
|
11
|
+
import {
|
|
12
|
+
__name
|
|
13
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
14
|
+
|
|
15
|
+
// dist/errors.js
|
|
16
|
+
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
17
|
+
if (!signal?.aborted)
|
|
18
|
+
return;
|
|
19
|
+
if (isCliError(signal.reason))
|
|
20
|
+
throw signal.reason;
|
|
21
|
+
const timedOut = signal.reason instanceof Error && signal.reason.name === "TimeoutError";
|
|
22
|
+
throw new CliError(timedOut ? "timeout" : "cancelled", timedOut ? "command timed out" : "command cancelled");
|
|
23
|
+
}, "checkCancelled");
|
|
24
|
+
var cancellableStore = /* @__PURE__ */ __name((store, signal) => new Proxy(store, {
|
|
25
|
+
get(target, key, receiver) {
|
|
26
|
+
const method = Reflect.get(target, key, receiver);
|
|
27
|
+
return typeof method === "function" ? async (...args) => {
|
|
28
|
+
checkCancelled(signal());
|
|
29
|
+
const result = await method.apply(target, args);
|
|
30
|
+
checkCancelled(signal());
|
|
31
|
+
return result;
|
|
32
|
+
} : method;
|
|
33
|
+
}
|
|
34
|
+
}), "cancellableStore");
|
|
35
|
+
var object = /* @__PURE__ */ __name((value) => {
|
|
36
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
37
|
+
throw new CliError("invalid_response", "Zoom returned an invalid response");
|
|
38
|
+
return value;
|
|
39
|
+
}, "object");
|
|
40
|
+
var string = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() ? value : null, "string");
|
|
41
|
+
var number = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) ? value : null, "number");
|
|
42
|
+
var zoomInstant = /* @__PURE__ */ __name((text, message) => {
|
|
43
|
+
const invalid = /* @__PURE__ */ __name(() => new CliError("invalid_response", message), "invalid");
|
|
44
|
+
if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/.test(text))
|
|
45
|
+
throw invalid();
|
|
46
|
+
const local = text.replace(/(?:Z|[+-]\d{2}:\d{2})$/, "Z");
|
|
47
|
+
const date = new Date(local);
|
|
48
|
+
if (!Number.isFinite(date.getTime()) || date.toISOString().slice(0, 19) !== local.slice(0, 19))
|
|
49
|
+
throw invalid();
|
|
50
|
+
const stamp = Date.parse(text);
|
|
51
|
+
if (!Number.isSafeInteger(stamp))
|
|
52
|
+
throw invalid();
|
|
53
|
+
return stamp;
|
|
54
|
+
}, "zoomInstant");
|
|
55
|
+
var TIME_WITHOUT_ZONE = "time_without_zone";
|
|
56
|
+
var ZoneAssumptions = class {
|
|
57
|
+
static {
|
|
58
|
+
__name(this, "ZoneAssumptions");
|
|
59
|
+
}
|
|
60
|
+
count = 0;
|
|
61
|
+
zones = /* @__PURE__ */ new Set();
|
|
62
|
+
add(zone) {
|
|
63
|
+
this.count++;
|
|
64
|
+
this.zones.add(zone);
|
|
65
|
+
}
|
|
66
|
+
take() {
|
|
67
|
+
if (this.count === 0)
|
|
68
|
+
return [];
|
|
69
|
+
const notice = `${this.count} Zoom ${this.count === 1 ? "time had" : "times had"} no zone; read in ${[...this.zones].join(" or ")} and marked ${TIME_WITHOUT_ZONE}`;
|
|
70
|
+
this.count = 0;
|
|
71
|
+
this.zones.clear();
|
|
72
|
+
return [notice];
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
var zoomTime = /* @__PURE__ */ __name((text, message) => {
|
|
76
|
+
if (/(?:Z|[+-]\d{2}:\d{2})$/.test(text))
|
|
77
|
+
return { time: zoomInstant(text, message), zone: null };
|
|
78
|
+
const utc = zoomInstant(`${text}Z`, message);
|
|
79
|
+
const zone = timezoneOf();
|
|
80
|
+
try {
|
|
81
|
+
return { time: wallTime(text.replace(/(\.\d{3})\d+$/, "$1"), zone, { start: 0, end: text.length }), zone };
|
|
82
|
+
} catch {
|
|
83
|
+
return { time: utc, zone: "UTC" };
|
|
84
|
+
}
|
|
85
|
+
}, "zoomTime");
|
|
86
|
+
var withIssue = /* @__PURE__ */ __name((metadata, doubtful) => doubtful ? { ...metadata, issues: [TIME_WITHOUT_ZONE] } : metadata, "withIssue");
|
|
87
|
+
|
|
88
|
+
export {
|
|
89
|
+
checkCancelled,
|
|
90
|
+
cancellableStore,
|
|
91
|
+
object,
|
|
92
|
+
string,
|
|
93
|
+
number,
|
|
94
|
+
zoomInstant,
|
|
95
|
+
ZoneAssumptions,
|
|
96
|
+
zoomTime,
|
|
97
|
+
withIssue
|
|
98
|
+
};
|