@wirecat/zoom-cli 0.64.0 → 0.66.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/dist/answer-entities.d.ts +13 -0
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +5 -0
- package/dist/answer-entities.js.map +1 -1
- package/dist/answers.d.ts +8 -0
- package/dist/answers.d.ts.map +1 -1
- package/dist/archive-import.d.ts +1 -1
- package/dist/archive-import.d.ts.map +1 -1
- package/dist/archive-import.js +2 -1
- package/dist/archive-import.js.map +1 -1
- package/dist/bin/zm.js +6 -2
- package/dist/bin/zm.js.map +1 -1
- package/dist/bundle/{all-profiles-W2OVBZ7S.js → all-profiles-D5CFH2OK.js} +11 -8
- package/dist/bundle/answer-policy-YAYMKRRD.js +101 -0
- package/dist/bundle/{anthropic-P4BKQNBO.js → anthropic-K2E2JS4S.js} +7 -4
- package/dist/bundle/{app-server-AYUW45ND.js → app-server-TVXDG6HZ.js} +68 -61
- package/dist/bundle/{bun-MNGPTYDQ.js → bun-O4WHGL2F.js} +2 -2
- package/dist/bundle/{bun-sqlite-PTPUSXAO.js → bun-sqlite-HGBEHQI3.js} +6 -3
- package/dist/bundle/{chunk-TYKZCJD7.js → chunk-2T5BOLBS.js} +35 -35
- package/dist/bundle/{chunk-H3DMYF3W.js → chunk-2VPHQFO5.js} +8 -8
- package/dist/bundle/{chunk-JMSKDW5G.js → chunk-2YLNUZ3T.js} +5 -3
- package/dist/bundle/{chunk-AAC6VNSL.js → chunk-3B7L2UX4.js} +3 -3
- package/dist/bundle/{chunk-6NBQJJT6.js → chunk-3WTKZ2ZS.js} +13 -11
- package/dist/bundle/{chunk-H65B6A7Y.js → chunk-3Y2F65AY.js} +8 -8
- package/dist/bundle/{chunk-A2FOW3ZC.js → chunk-5A26IBAR.js} +162 -107
- package/dist/bundle/{chunk-BO5YVG3X.js → chunk-5GD2XZ6X.js} +132 -40
- package/dist/bundle/{chunk-7D56BQZL.js → chunk-5HPALDUO.js} +2 -2
- package/dist/bundle/{chunk-5FN4Q5H5.js → chunk-62GOOZO3.js} +8 -13
- package/dist/bundle/{chunk-J25UNZIL.js → chunk-67RNZGAG.js} +12 -10
- package/dist/bundle/{chunk-3AAO5N4L.js → chunk-6GSJLNP4.js} +2 -2
- package/dist/bundle/{chunk-UNO4G5NX.js → chunk-6TIKPRVQ.js} +11 -7
- package/dist/bundle/{chunk-HQHUPTZR.js → chunk-756RS4PH.js} +1393 -712
- package/dist/bundle/{chunk-R4NTPYXZ.js → chunk-7JMBEPW2.js} +2 -2
- package/dist/bundle/{chunk-HIGFBTEI.js → chunk-7KCTPGOF.js} +2 -2
- package/dist/bundle/{chunk-TJODNJKE.js → chunk-7PF56S6U.js} +33 -22
- package/dist/bundle/{chunk-LEQCRVPD.js → chunk-7SQJCKR6.js} +1 -1
- package/dist/bundle/{chunk-BWPKSUXW.js → chunk-A2SCXNA7.js} +4518 -402
- package/dist/bundle/{chunk-QK54GOGE.js → chunk-AU4JHT3R.js} +7 -9
- package/dist/bundle/{chunk-63MRRNDL.js → chunk-AZ7ICKIA.js} +8 -8
- package/dist/bundle/chunk-BLT3LR3U.js +34 -0
- package/dist/bundle/{chunk-UABUBDYB.js → chunk-BXSAROQP.js} +2 -2
- package/dist/bundle/{chunk-Q3EDUZ5R.js → chunk-CAW6IMFZ.js} +25 -18
- package/dist/bundle/{chunk-UCPL55YP.js → chunk-CR4CXOLX.js} +17 -17
- package/dist/bundle/{chunk-SMT6SFBK.js → chunk-CZ4KLUJG.js} +2 -2
- package/dist/bundle/{chunk-COTC7HF3.js → chunk-D72URWJE.js} +1 -39
- package/dist/bundle/{chunk-X6M5DK66.js → chunk-EXXM4RNI.js} +14 -12
- package/dist/bundle/{chunk-CZKV4USJ.js → chunk-FWFFQV4D.js} +59 -4
- package/dist/bundle/{chunk-JJZAGKUK.js → chunk-GHAPWKG2.js} +5 -3
- package/dist/bundle/{chunk-JRPYHDCO.js → chunk-GI6QVSCW.js} +4 -4
- package/dist/bundle/{chunk-Y7TWNMTW.js → chunk-GKXFL35E.js} +198 -65
- package/dist/bundle/{chunk-K6OSD6DG.js → chunk-GNGBG5BT.js} +81 -35
- package/dist/bundle/{chunk-RJLNVHIU.js → chunk-H5ZVZAOD.js} +3 -3
- package/dist/bundle/{chunk-XZSQLVED.js → chunk-HKQWV3KT.js} +5 -3
- package/dist/bundle/chunk-IDWHJ35K.js +166 -0
- package/dist/bundle/{chunk-JM43EKTY.js → chunk-IKQ73INC.js} +1928 -679
- package/dist/bundle/chunk-ILHTNOIV.js +23 -0
- package/dist/bundle/{chunk-OPP5CWAX.js → chunk-J4EZL6HY.js} +61 -56
- package/dist/bundle/{chunk-54UEJGYB.js → chunk-JX3V35A5.js} +3 -3
- package/dist/bundle/{chunk-7VJIKJNW.js → chunk-K5CIN4JP.js} +8 -8
- package/dist/bundle/{chunk-KJCCT3QY.js → chunk-KDKFGQWG.js} +17 -14
- package/dist/bundle/{chunk-RK3JBC4U.js → chunk-L7IK4FOA.js} +2 -2
- package/dist/bundle/{chunk-7EOW47PV.js → chunk-LN2S3RA3.js} +4 -4
- package/dist/bundle/{chunk-I5QX2HAT.js → chunk-N5JRRBEG.js} +214 -107
- package/dist/bundle/chunk-N67BLTBV.js +2443 -0
- package/dist/bundle/{chunk-23LOMA2I.js → chunk-N6JMJN5A.js} +48 -26
- package/dist/bundle/{chunk-CZFV6XTW.js → chunk-NMQUCHTX.js} +3 -3
- package/dist/bundle/{chunk-TJH5IQVZ.js → chunk-NO24PJNW.js} +1 -1
- package/dist/bundle/{chunk-UFI5SX3F.js → chunk-O5FKJV3T.js} +14 -12
- package/dist/bundle/{chunk-IIP4J3PD.js → chunk-P2G4KGTR.js} +94 -12
- package/dist/bundle/{chunk-OWXMQVVN.js → chunk-P2SYZNM4.js} +1 -1
- package/dist/bundle/{chunk-EQYPTGCT.js → chunk-P3XVLHIQ.js} +6 -4
- package/dist/bundle/chunk-PQLBPYJR.js +46 -0
- package/dist/bundle/{chunk-5BCNJB2A.js → chunk-Q47C3QZW.js} +675 -507
- package/dist/bundle/{chunk-IIGXCYEL.js → chunk-QAPU2JNO.js} +13 -13
- package/dist/bundle/{chunk-WFIJOFS5.js → chunk-QJHRYUMJ.js} +1 -1
- package/dist/bundle/{chunk-YNYMWXXH.js → chunk-QV5ZGRK3.js} +40 -11
- package/dist/bundle/{chunk-3IMEAZIM.js → chunk-RMKHYUHK.js} +9 -20
- package/dist/bundle/{chunk-AF4HONAZ.js → chunk-RO44LANT.js} +6449 -4436
- package/dist/bundle/{chunk-3DGQJASQ.js → chunk-S4GDDO5S.js} +1 -1
- package/dist/bundle/chunk-S6S3KVJI.js +45 -0
- package/dist/bundle/{chunk-SJIBJQJN.js → chunk-SU4WPBQE.js} +44 -14
- package/dist/bundle/{chunk-7NDSBTKR.js → chunk-TFDVFD4N.js} +91 -2546
- package/dist/bundle/{chunk-HQHYPKSU.js → chunk-TMVKZMDO.js} +54 -37
- package/dist/bundle/{chunk-PBJY5VR6.js → chunk-TN7K66PU.js} +1 -1
- package/dist/bundle/{chunk-ZW4N73FO.js → chunk-TUEEXECZ.js} +5 -5
- package/dist/bundle/{chunk-H5LLZ5XA.js → chunk-U3ZUT557.js} +1 -1
- package/dist/bundle/{chunk-4XVRA6P5.js → chunk-U4RVOSX3.js} +1 -1
- package/dist/bundle/{chunk-5YLR24D5.js → chunk-UOIXBEFR.js} +13 -6
- package/dist/bundle/chunk-UYV2JGLQ.js +34 -0
- package/dist/bundle/{chunk-7SWNZ44U.js → chunk-XFUID5NY.js} +4 -4
- package/dist/bundle/{chunk-BMYZWBAX.js → chunk-XWDSEJWP.js} +6 -6
- package/dist/bundle/{chunk-JZKNHA44.js → chunk-Y3EIK4XW.js} +1 -1
- package/dist/bundle/{chunk-24WCZURP.js → chunk-YLEQN6PB.js} +5 -3
- package/dist/bundle/{chunk-2UONVSJQ.js → chunk-Z6U3MEGJ.js} +2 -2
- package/dist/bundle/{chunk-L4JGVSBN.js → chunk-ZKTXUDSR.js} +33 -28
- package/dist/bundle/{chunk-FSYO3PUW.js → chunk-ZNFPDTQM.js} +2 -2
- package/dist/bundle/{chunk-C3RRIJ5C.js → chunk-ZTL7ANSG.js} +9 -42
- package/dist/bundle/{cli-Y2ZO3D5U.js → cli-HWQIL2AC.js} +124 -73
- package/dist/bundle/command-contract-CQFJXWX6.js +40 -0
- package/dist/bundle/config-R2Y6ZVQS.js +83 -0
- package/dist/bundle/{decode-GO6GAYH2.js → decode-XPAPPUGE.js} +6 -3
- package/dist/bundle/dispatch-AKVJGP2S.js +412 -0
- package/dist/bundle/{dist-MIJKAGXW.js → dist-LDIUQBM7.js} +23 -16
- package/dist/bundle/{echarts-NWK7LALR.js → echarts-FMACRZQC.js} +2 -2
- package/dist/bundle/{embed-2DOSN4DV.js → embed-LK45GRQ7.js} +7 -4
- package/dist/bundle/{embedder-3Q3C2WKC.js → embedder-QPBC5XBY.js} +12 -9
- package/dist/bundle/failure-7OULAOWQ.js +25 -0
- package/dist/bundle/first-run-J5FG773Q.js +28 -0
- package/dist/bundle/first-screen-MULOBUHN.js +38 -0
- package/dist/bundle/{folders-RSWEBHDZ.js → folders-RHPUVMDI.js} +5 -2
- package/dist/bundle/{instructions-M3FZPQVI.js → instructions-E5FXYCWF.js} +1 -1
- package/dist/bundle/{main-R77BPRRS.js → main-FJHE5YHU.js} +28 -22
- package/dist/bundle/{mcp-YJEQYYTR.js → mcp-MNI62HHE.js} +5 -3
- package/dist/bundle/{meetings-IV4Y4WRH.js → meetings-MYIDGYGW.js} +19 -6
- package/dist/bundle/{node-I3GEHYGL.js → node-4SNKUPXT.js} +2 -2
- package/dist/bundle/{node-sqlite-W6MR2TVQ.js → node-sqlite-SYZUTVPC.js} +12 -3
- package/dist/bundle/{oauth-M6YL4QXP.js → oauth-QPS5VTN6.js} +8 -5
- package/dist/bundle/{open-2VITLJAN.js → open-OVCASRSJ.js} +6 -2
- package/dist/bundle/openai-VEVT7D7L.js +25 -0
- package/dist/bundle/{output-file-XJJ3XMLQ.js → output-file-K5JEL33Z.js} +7 -4
- package/dist/bundle/{process-UBA4L4B2.js → process-HQZOTT6U.js} +1 -1
- package/dist/bundle/{program-5R5MRXUM.js → program-A546WC4F.js} +120 -112
- package/dist/bundle/{prompt-AVIXIM7Z.js → prompt-CYBKP7S5.js} +6 -3
- package/dist/bundle/{recognize-DJKTJOYU.js → recognize-3H3YDCFI.js} +5 -2
- package/dist/bundle/{remote-S3DTNYRP.js → remote-VAYVTJBS.js} +8 -5
- package/dist/bundle/{rerank-FMCDP6VF.js → rerank-XA4GA5PS.js} +8 -5
- package/dist/bundle/{run-log-T4MV2VEH.js → run-log-XAFHMI3F.js} +59 -54
- package/dist/bundle/{serve-5SGFJFMC.js → serve-KGHEDUHB.js} +18 -14
- package/dist/bundle/server-IDNSJXF3.js +71 -0
- package/dist/bundle/{server-PCMCY7WK.js → server-ZYTSMDTP.js} +47 -42
- package/dist/bundle/{services-SKRQ2POT.js → services-ZHMZC2OQ.js} +106 -28
- package/dist/bundle/{speech-FSDICIKO.js → speech-7CJEFKM3.js} +14 -11
- package/dist/bundle/{state-KPUSPWO6.js → state-U6KSYVOH.js} +7 -4
- package/dist/bundle/{store-W7LFPKG2.js → store-DJE3LAEG.js} +17 -13
- package/dist/bundle/{store-7MP2ZGQ7.js → store-WS4CQGYU.js} +40 -18
- package/dist/bundle/store-connection-T5WGOOPH.js +81 -0
- package/dist/bundle/store-maintenance-command-5CBQCEQQ.js +61 -0
- package/dist/bundle/{streaming-Q44ESD3E.js → streaming-QMHH7L6N.js} +7 -4
- package/dist/bundle/{tokens-TAFCHANI.js → tokens-PWQ56OXO.js} +7 -4
- package/dist/bundle/zm.js +150 -1
- package/dist/local-transcription.d.ts.map +1 -1
- package/dist/local-transcription.js +1 -0
- package/dist/local-transcription.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -4
- package/dist/bundle/answer-policy-HOA43GNA.js +0 -96
- package/dist/bundle/chunk-JRPAZ2WD.js +0 -3635
- package/dist/bundle/command-contract-DGTZIH2F.js +0 -38
- package/dist/bundle/config-N2UHDKGG.js +0 -78
- package/dist/bundle/first-run-S75VKIT3.js +0 -23
- package/dist/bundle/first-screen-DQNRT6GH.js +0 -36
- package/dist/bundle/openai-OG6B3JCU.js +0 -22
- package/dist/bundle/server-EYGZLKKQ.js +0 -66
- package/dist/bundle/store-connection-3HNZFJC4.js +0 -76
- package/dist/bundle/store-maintenance-command-6WBLTUZP.js +0 -55
- /package/dist/bundle/{chunk-WJWLHLQ7.js → chunk-NUN6OGOV.js} +0 -0
|
@@ -1,21 +1,187 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
formatMeetingReference,
|
|
5
|
+
parseMeetingReference
|
|
6
|
+
} from "./chunk-Q47C3QZW.js";
|
|
7
|
+
import {
|
|
8
|
+
CliError
|
|
9
|
+
} from "./chunk-S6S3KVJI.js";
|
|
10
|
+
import {
|
|
5
11
|
singleLine
|
|
6
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UYV2JGLQ.js";
|
|
7
13
|
import {
|
|
8
14
|
__name
|
|
9
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
10
16
|
|
|
11
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/domain/locator.js
|
|
18
|
+
var SCHEME = "msg:";
|
|
19
|
+
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
20
|
+
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
21
|
+
var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
22
|
+
const trimmed = reference.trim();
|
|
23
|
+
const parts2 = trimmed.startsWith(SCHEME) ? trimmed.slice(SCHEME.length).split("/") : [];
|
|
24
|
+
if (parts2.length !== 4 || parts2.some((part) => part === "")) {
|
|
25
|
+
throw new CliError("validation_error", `"${singleLine(reference)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`);
|
|
26
|
+
}
|
|
27
|
+
const [provider, account, chat, message] = parts2.map(decodeURIComponent);
|
|
28
|
+
return { provider, account, chat, message };
|
|
29
|
+
}, "parseLocator");
|
|
30
|
+
|
|
31
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
32
|
+
var SIMPLE_REFERENCES = [
|
|
33
|
+
"note",
|
|
34
|
+
"document",
|
|
35
|
+
"person",
|
|
36
|
+
"organization",
|
|
37
|
+
"project",
|
|
38
|
+
"task",
|
|
39
|
+
"memory",
|
|
40
|
+
"fact",
|
|
41
|
+
"bot",
|
|
42
|
+
"event",
|
|
43
|
+
"entity"
|
|
44
|
+
];
|
|
45
|
+
var malformed = /* @__PURE__ */ __name((text, shape) => new CliError("validation_error", `"${singleLine(text)}" is not a reference \u2014 expected ${shape}`, {
|
|
46
|
+
reason: "ref.malformed"
|
|
47
|
+
}), "malformed");
|
|
48
|
+
var parts = /* @__PURE__ */ __name((rest, count, text, shape) => {
|
|
49
|
+
const split = rest.split("/");
|
|
50
|
+
if (split.length !== count || split.some((part) => part === ""))
|
|
51
|
+
throw malformed(text, shape);
|
|
52
|
+
return split.map(decodeURIComponent);
|
|
53
|
+
}, "parts");
|
|
54
|
+
var encoded = /* @__PURE__ */ __name((...values) => values.map(encodeURIComponent).join("/"), "encoded");
|
|
55
|
+
var folderPath = /* @__PURE__ */ __name((path) => {
|
|
56
|
+
const clean = path.split("/").filter((part) => part !== "" && part !== ".").join("/");
|
|
57
|
+
return clean === "" ? path.trim() === "" ? "" : null : clean;
|
|
58
|
+
}, "folderPath");
|
|
59
|
+
var MEETING_SHAPE = "meeting:<account>/<meeting>[/<transcript>[/<cue>]] with safe integer ids";
|
|
60
|
+
var kind = /* @__PURE__ */ __name((spec) => spec, "kind");
|
|
61
|
+
var simple = /* @__PURE__ */ __name((prefix) => kind({
|
|
62
|
+
prefix,
|
|
63
|
+
type: prefix,
|
|
64
|
+
shape: `${prefix}:<id>`,
|
|
65
|
+
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
66
|
+
if (!rest.trim())
|
|
67
|
+
throw new CliError("validation_error", `"${singleLine(text)}" names no ${prefix}`, {
|
|
68
|
+
reason: "ref.malformed"
|
|
69
|
+
});
|
|
70
|
+
return { type: prefix, id: rest };
|
|
71
|
+
}, "parse"),
|
|
72
|
+
format: /* @__PURE__ */ __name((reference) => `${reference.type}:${reference.id}`, "format")
|
|
73
|
+
}), "simple");
|
|
74
|
+
var REF_KINDS = [
|
|
75
|
+
kind({
|
|
76
|
+
prefix: "msg",
|
|
77
|
+
type: "message",
|
|
78
|
+
shape: "msg:<provider>/<account>/<chat>/<message>",
|
|
79
|
+
parse: /* @__PURE__ */ __name((_, text) => {
|
|
80
|
+
try {
|
|
81
|
+
return { type: "message", ...parseLocator(text) };
|
|
82
|
+
} catch {
|
|
83
|
+
throw malformed(text, "msg:<provider>/<account>/<chat>/<message>");
|
|
84
|
+
}
|
|
85
|
+
}, "parse"),
|
|
86
|
+
format: formatLocator
|
|
87
|
+
}),
|
|
88
|
+
kind({
|
|
89
|
+
prefix: "chat",
|
|
90
|
+
type: "chat",
|
|
91
|
+
shape: "chat:<provider>/<account>/<chat>",
|
|
92
|
+
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
93
|
+
const [provider, account, chat] = parts(rest, 3, text, "chat:<provider>/<account>/<chat>");
|
|
94
|
+
return { type: "chat", provider, account, chat };
|
|
95
|
+
}, "parse"),
|
|
96
|
+
format: /* @__PURE__ */ __name(({ provider, account, chat }) => `chat:${encoded(provider, account, chat)}`, "format")
|
|
97
|
+
}),
|
|
98
|
+
kind({
|
|
99
|
+
prefix: "contact",
|
|
100
|
+
type: "contact",
|
|
101
|
+
shape: "contact:<provider>/<id>",
|
|
102
|
+
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
103
|
+
const [provider, id] = parts(rest, 2, text, "contact:<provider>/<id>");
|
|
104
|
+
return { type: "contact", provider, id };
|
|
105
|
+
}, "parse"),
|
|
106
|
+
format: /* @__PURE__ */ __name(({ provider, id }) => `contact:${encoded(provider, id)}`, "format")
|
|
107
|
+
}),
|
|
108
|
+
kind({
|
|
109
|
+
prefix: "folder",
|
|
110
|
+
type: "folder",
|
|
111
|
+
shape: "folder:<id>[/<path>]",
|
|
112
|
+
parse: /* @__PURE__ */ __name((rest, text) => {
|
|
113
|
+
const slash = rest.indexOf("/");
|
|
114
|
+
const id = decodeURIComponent(slash < 0 ? rest : rest.slice(0, slash));
|
|
115
|
+
const path = slash < 0 ? null : folderPath(decodeURIComponent(rest.slice(slash + 1)));
|
|
116
|
+
if (!id.trim() || path === "")
|
|
117
|
+
throw malformed(text, "folder:<id>[/<path>]");
|
|
118
|
+
return { type: "folder", id, path };
|
|
119
|
+
}, "parse"),
|
|
120
|
+
format: /* @__PURE__ */ __name(({ id, path }) => path === null ? `folder:${encodeURIComponent(id)}` : `folder:${encoded(id, path)}`, "format")
|
|
121
|
+
}),
|
|
122
|
+
kind({
|
|
123
|
+
prefix: "meeting",
|
|
124
|
+
type: "meeting",
|
|
125
|
+
shape: MEETING_SHAPE,
|
|
126
|
+
parse: /* @__PURE__ */ __name((_, text) => {
|
|
127
|
+
try {
|
|
128
|
+
return parseMeetingReference(text);
|
|
129
|
+
} catch {
|
|
130
|
+
throw malformed(text, MEETING_SHAPE);
|
|
131
|
+
}
|
|
132
|
+
}, "parse"),
|
|
133
|
+
format: formatMeetingReference
|
|
134
|
+
}),
|
|
135
|
+
...SIMPLE_REFERENCES.map(simple)
|
|
136
|
+
];
|
|
137
|
+
var byPrefix = new Map(REF_KINDS.map((spec) => [spec.prefix, spec]));
|
|
138
|
+
var byType = new Map(REF_KINDS.map((spec) => [spec.type, spec]));
|
|
139
|
+
var offered = REF_KINDS.map(({ prefix }) => prefix).filter((prefix) => prefix !== "entity");
|
|
140
|
+
var distance = /* @__PURE__ */ __name((a, b) => {
|
|
141
|
+
let row = Array.from({ length: b.length + 1 }, (_, at) => at);
|
|
142
|
+
for (const [i, x] of [...a].entries()) {
|
|
143
|
+
const next = [i + 1];
|
|
144
|
+
for (const [j, y] of [...b].entries())
|
|
145
|
+
next.push(Math.min(row[j + 1] + 1, next[j] + 1, row[j] + (x === y ? 0 : 1)));
|
|
146
|
+
row = next;
|
|
147
|
+
}
|
|
148
|
+
return row[b.length];
|
|
149
|
+
}, "distance");
|
|
150
|
+
var nearest = /* @__PURE__ */ __name((typed) => offered.find((prefix) => typed.length >= 2 && prefix.startsWith(typed)) ?? offered.map((prefix) => ({ prefix, far: distance(typed, prefix) })).filter(({ far }) => far <= 2).sort((a, b) => a.far - b.far)[0]?.prefix, "nearest");
|
|
151
|
+
var unknownKind = /* @__PURE__ */ __name((text, prefix, rest) => {
|
|
152
|
+
const near = prefix === "" ? void 0 : nearest(prefix);
|
|
153
|
+
const kinds = offered.map((one) => `${one}:`).join(", ");
|
|
154
|
+
const hint = near === void 0 ? `; kinds: ${kinds}` : `; did you mean ${near}:${singleLine(rest)}? Kinds: ${kinds}`;
|
|
155
|
+
return new CliError("validation_error", `"${singleLine(text)}" is no kind of reference${hint}`, {
|
|
156
|
+
reason: "ref.unknown-kind"
|
|
157
|
+
});
|
|
158
|
+
}, "unknownKind");
|
|
159
|
+
var formatReference = /* @__PURE__ */ __name((reference) => byType.get(reference.type).format(reference), "formatReference");
|
|
160
|
+
var parseReference = /* @__PURE__ */ __name((text) => {
|
|
161
|
+
const reference = text.trim();
|
|
162
|
+
const colon = reference.indexOf(":");
|
|
163
|
+
const prefix = colon < 0 ? "" : reference.slice(0, colon);
|
|
164
|
+
const rest = reference.slice(colon + 1);
|
|
165
|
+
const spec = byPrefix.get(prefix);
|
|
166
|
+
if (!spec)
|
|
167
|
+
throw unknownKind(reference, prefix, rest);
|
|
168
|
+
return spec.parse(rest, reference);
|
|
169
|
+
}, "parseReference");
|
|
170
|
+
var canonicalReference = /* @__PURE__ */ __name((text) => formatReference(parseReference(text)), "canonicalReference");
|
|
171
|
+
var looksLikeReference = /* @__PURE__ */ __name((text) => {
|
|
172
|
+
const match = /^([a-z]+):\S+$/.exec(text.trim());
|
|
173
|
+
return match !== null && byPrefix.has(match[1]);
|
|
174
|
+
}, "looksLikeReference");
|
|
175
|
+
|
|
176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/domain/providers.js
|
|
12
177
|
var KINDS = ["messages", "mail", "notes", "documents", "meetings", "events"];
|
|
178
|
+
var MESSENGER_OPENS = { chat: "messages list", message: "messages show", contact: "contacts show" };
|
|
13
179
|
var PROVIDERS = [
|
|
14
|
-
{ name: "telegram", kind: "messages", aliases: ["tg"] },
|
|
180
|
+
{ name: "telegram", kind: "messages", aliases: ["tg"], command: "tg", opens: MESSENGER_OPENS },
|
|
15
181
|
{ name: "telegram-bot", kind: "messages", aliases: ["tg-bot"] },
|
|
16
|
-
{ name: "max", kind: "messages", aliases: [] },
|
|
182
|
+
{ name: "max", kind: "messages", aliases: [], command: "max", opens: MESSENGER_OPENS },
|
|
17
183
|
{ name: "max-bot", kind: "messages", aliases: [] },
|
|
18
|
-
{ name: "whatsapp", kind: "messages", aliases: ["wa"] },
|
|
184
|
+
{ name: "whatsapp", kind: "messages", aliases: ["wa"], command: "wa", opens: MESSENGER_OPENS },
|
|
19
185
|
{ name: "whatsapp-bot", kind: "messages", aliases: ["wa-bot"] },
|
|
20
186
|
{ name: "email", kind: "mail", aliases: [] },
|
|
21
187
|
{ name: "notes", kind: "notes", aliases: [] },
|
|
@@ -23,6 +189,17 @@ var PROVIDERS = [
|
|
|
23
189
|
{ name: "obsidian", kind: "notes", aliases: [] },
|
|
24
190
|
{ name: "zoom", kind: "meetings", aliases: [] }
|
|
25
191
|
];
|
|
192
|
+
var LABELS = {
|
|
193
|
+
telegram: "Telegram",
|
|
194
|
+
"telegram-bot": "Telegram bot",
|
|
195
|
+
max: "MAX",
|
|
196
|
+
"max-bot": "MAX bot",
|
|
197
|
+
whatsapp: "WhatsApp",
|
|
198
|
+
"whatsapp-bot": "WhatsApp bot",
|
|
199
|
+
"google-drive": "Google Drive",
|
|
200
|
+
email: "mail"
|
|
201
|
+
};
|
|
202
|
+
var providerLabel = /* @__PURE__ */ __name((provider) => LABELS[provider] ?? provider, "providerLabel");
|
|
26
203
|
var FOLDER_PROVIDERS = ["local", "obsidian", "folder"];
|
|
27
204
|
var isFolderProvider = /* @__PURE__ */ __name((provider) => FOLDER_PROVIDERS.includes(provider), "isFolderProvider");
|
|
28
205
|
var folderProviderSql = /* @__PURE__ */ __name((column = "provider") => `${column} IN (${FOLDER_PROVIDERS.map((name) => `'${name}'`).join(", ")})`, "folderProviderSql");
|
|
@@ -37,23 +214,35 @@ var invalid = /* @__PURE__ */ __name((message) => {
|
|
|
37
214
|
throw new CliError("validation_error", message);
|
|
38
215
|
}, "invalid");
|
|
39
216
|
var wordOf = /* @__PURE__ */ __name((value, what) => typeof value === "string" && WORD.test(value) ? value : invalid(`${what} is lowercase letters, digits, - and _ \u2014 not ${JSON.stringify(value)}`), "wordOf");
|
|
217
|
+
var OPEN_KINDS = new Set(REF_KINDS.map(({ type }) => type).filter((type) => type !== "entity"));
|
|
218
|
+
var COMMAND_WORDS = /^[a-z0-9][a-z0-9_-]*( [a-z0-9][a-z0-9_-]*)*$/;
|
|
219
|
+
var opensOf = /* @__PURE__ */ __name((value, named) => {
|
|
220
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
221
|
+
return invalid(`provider ${named}'s opens maps a kind of reference to a command`);
|
|
222
|
+
const known = Object.entries(value).filter(([kind2]) => OPEN_KINDS.has(kind2));
|
|
223
|
+
for (const [kind2, command] of known)
|
|
224
|
+
if (typeof command !== "string" || !COMMAND_WORDS.test(command))
|
|
225
|
+
invalid(`provider ${named} opens a ${kind2} with command words, not ${JSON.stringify(command)}`);
|
|
226
|
+
return Object.fromEntries(known);
|
|
227
|
+
}, "opensOf");
|
|
40
228
|
var providerEntryOf = /* @__PURE__ */ __name((value) => {
|
|
41
229
|
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
42
230
|
return invalid("a provider entry is an object");
|
|
43
|
-
const { name, kind, aliases = [], command } = value;
|
|
231
|
+
const { name, kind: kind2, aliases = [], command, opens } = value;
|
|
44
232
|
const named = wordOf(name, "a provider's name");
|
|
45
|
-
if (typeof
|
|
46
|
-
invalid(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(
|
|
233
|
+
if (typeof kind2 !== "string" || !KINDS.includes(kind2))
|
|
234
|
+
invalid(`provider ${named}'s kind is one of ${KINDS.join(", ")} \u2014 not ${JSON.stringify(kind2)}`);
|
|
47
235
|
if (!Array.isArray(aliases))
|
|
48
236
|
invalid(`provider ${named}'s aliases are a list`);
|
|
49
237
|
return {
|
|
50
238
|
name: named,
|
|
51
|
-
kind,
|
|
239
|
+
kind: kind2,
|
|
52
240
|
aliases: [...new Set(aliases.map((alias) => wordOf(alias, `an alias of ${named}`)))],
|
|
53
|
-
...command === void 0 ? {} : { command: wordOf(command, `the command of ${named}`) }
|
|
241
|
+
...command === void 0 ? {} : { command: wordOf(command, `the command of ${named}`) },
|
|
242
|
+
...opens === void 0 ? {} : { opens: opensOf(opens, named) }
|
|
54
243
|
};
|
|
55
244
|
}, "providerEntryOf");
|
|
56
|
-
var describe = /* @__PURE__ */ __name(({ name, kind, command }) => `${name} (${
|
|
245
|
+
var describe = /* @__PURE__ */ __name(({ name, kind: kind2, command }) => `${name} (${kind2}${command ? `, from ${command}` : ""})`, "describe");
|
|
57
246
|
var wordsOf = /* @__PURE__ */ __name(({ name, aliases }) => [name, ...aliases], "wordsOf");
|
|
58
247
|
var joined = /* @__PURE__ */ __name((known, entry) => {
|
|
59
248
|
const same = known.find(({ name }) => name === entry.name);
|
|
@@ -62,7 +251,8 @@ var joined = /* @__PURE__ */ __name((known, entry) => {
|
|
|
62
251
|
const merged = same ? {
|
|
63
252
|
...same,
|
|
64
253
|
aliases: [.../* @__PURE__ */ new Set([...same.aliases, ...entry.aliases])],
|
|
65
|
-
...entry.command ? { command: entry.command } : {}
|
|
254
|
+
...entry.command ? { command: entry.command } : {},
|
|
255
|
+
...entry.opens ? { opens: { ...same.opens, ...entry.opens } } : {}
|
|
66
256
|
} : entry;
|
|
67
257
|
const others = known.filter((one) => one !== same);
|
|
68
258
|
for (const word of wordsOf(merged)) {
|
|
@@ -102,93 +292,7 @@ var providerNamed = /* @__PURE__ */ __name((word) => {
|
|
|
102
292
|
var kindIn = /* @__PURE__ */ __name((provider) => isFolderProvider(provider) ? "notes" : registry.find(({ name }) => name === provider)?.kind, "kindIn");
|
|
103
293
|
var kindOf = /* @__PURE__ */ __name((provider) => kindIn(provider) ?? "messages", "kindOf");
|
|
104
294
|
|
|
105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
106
|
-
var SCHEME = "msg:";
|
|
107
|
-
var formatLocator = /* @__PURE__ */ __name(({ provider, account, chat, message }) => SCHEME + [provider, account, chat, message].map(encodeURIComponent).join("/"), "formatLocator");
|
|
108
|
-
var isLocator = /* @__PURE__ */ __name((reference) => reference.trim().startsWith(SCHEME), "isLocator");
|
|
109
|
-
var parseLocator = /* @__PURE__ */ __name((reference) => {
|
|
110
|
-
const trimmed = reference.trim();
|
|
111
|
-
const parts2 = trimmed.startsWith(SCHEME) ? trimmed.slice(SCHEME.length).split("/") : [];
|
|
112
|
-
if (parts2.length !== 4 || parts2.some((part) => part === "")) {
|
|
113
|
-
throw new CliError("validation_error", `"${singleLine(reference)}" is not a message locator \u2014 expected msg:<provider>/<account>/<chat>/<message>`);
|
|
114
|
-
}
|
|
115
|
-
const [provider, account, chat, message] = parts2.map(decodeURIComponent);
|
|
116
|
-
return { provider, account, chat, message };
|
|
117
|
-
}, "parseLocator");
|
|
118
|
-
|
|
119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/domain/references.js
|
|
120
|
-
var SIMPLE_REFERENCES = [
|
|
121
|
-
"note",
|
|
122
|
-
"document",
|
|
123
|
-
"person",
|
|
124
|
-
"organization",
|
|
125
|
-
"project",
|
|
126
|
-
"task",
|
|
127
|
-
"memory",
|
|
128
|
-
"fact",
|
|
129
|
-
"bot",
|
|
130
|
-
"entity"
|
|
131
|
-
];
|
|
132
|
-
var parts = /* @__PURE__ */ __name((rest, count, reference, shape) => {
|
|
133
|
-
const split = rest.split("/");
|
|
134
|
-
if (split.length !== count || split.some((part) => part === ""))
|
|
135
|
-
throw new CliError("validation_error", `"${singleLine(reference)}" is not a reference \u2014 expected ${shape}`);
|
|
136
|
-
return split.map(decodeURIComponent);
|
|
137
|
-
}, "parts");
|
|
138
|
-
var formatReference = /* @__PURE__ */ __name((reference) => {
|
|
139
|
-
switch (reference.type) {
|
|
140
|
-
case "message":
|
|
141
|
-
return formatLocator(reference);
|
|
142
|
-
case "chat":
|
|
143
|
-
return `chat:${[reference.provider, reference.account, reference.chat].map(encodeURIComponent).join("/")}`;
|
|
144
|
-
case "contact":
|
|
145
|
-
return `contact:${[reference.provider, reference.id].map(encodeURIComponent).join("/")}`;
|
|
146
|
-
case "folder":
|
|
147
|
-
return reference.path === null ? `folder:${encodeURIComponent(reference.id)}` : `folder:${encodeURIComponent(reference.id)}/${encodeURIComponent(reference.path)}`;
|
|
148
|
-
default:
|
|
149
|
-
return `${reference.type}:${reference.id}`;
|
|
150
|
-
}
|
|
151
|
-
}, "formatReference");
|
|
152
|
-
var parseReference = /* @__PURE__ */ __name((text) => {
|
|
153
|
-
const reference = text.trim();
|
|
154
|
-
const colon = reference.indexOf(":");
|
|
155
|
-
const prefix = colon < 0 ? "" : reference.slice(0, colon);
|
|
156
|
-
const rest = reference.slice(colon + 1);
|
|
157
|
-
switch (prefix) {
|
|
158
|
-
case "msg":
|
|
159
|
-
return { type: "message", ...parseLocator(reference) };
|
|
160
|
-
case "chat": {
|
|
161
|
-
const [provider, account, chat] = parts(rest, 3, reference, "chat:<provider>/<account>/<chat>");
|
|
162
|
-
return { type: "chat", provider, account, chat };
|
|
163
|
-
}
|
|
164
|
-
case "contact": {
|
|
165
|
-
const [provider, id] = parts(rest, 2, reference, "contact:<provider>/<id>");
|
|
166
|
-
return { type: "contact", provider, id };
|
|
167
|
-
}
|
|
168
|
-
case "folder": {
|
|
169
|
-
const slash = rest.indexOf("/");
|
|
170
|
-
const id = decodeURIComponent(slash < 0 ? rest : rest.slice(0, slash));
|
|
171
|
-
const path = slash < 0 ? null : folderPath(decodeURIComponent(rest.slice(slash + 1)));
|
|
172
|
-
if (!id.trim() || path === "")
|
|
173
|
-
throw new CliError("validation_error", `"${singleLine(reference)}" is not a reference \u2014 expected folder:<id>[/<path>]`);
|
|
174
|
-
return { type: "folder", id, path };
|
|
175
|
-
}
|
|
176
|
-
default:
|
|
177
|
-
if (SIMPLE_REFERENCES.includes(prefix)) {
|
|
178
|
-
if (!rest.trim())
|
|
179
|
-
throw new CliError("validation_error", `"${singleLine(reference)}" names no ${prefix}`);
|
|
180
|
-
return { type: prefix, id: rest };
|
|
181
|
-
}
|
|
182
|
-
throw new CliError("validation_error", `"${singleLine(reference)}" is not a reference \u2014 expected msg:, chat:, contact:, folder:, ${SIMPLE_REFERENCES.filter((one) => one !== "entity").join(":, ")}:`);
|
|
183
|
-
}
|
|
184
|
-
}, "parseReference");
|
|
185
|
-
var folderPath = /* @__PURE__ */ __name((path) => {
|
|
186
|
-
const clean = path.split("/").filter((part) => part !== "" && part !== ".").join("/");
|
|
187
|
-
return clean === "" ? path.trim() === "" ? "" : null : clean;
|
|
188
|
-
}, "folderPath");
|
|
189
|
-
var canonicalReference = /* @__PURE__ */ __name((text) => formatReference(parseReference(text)), "canonicalReference");
|
|
190
|
-
|
|
191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.533.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_d95b0b392230247c519664df7aaeaaab/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/domain/counters.js
|
|
192
296
|
var COUNTER_FIELDS = ["views", "reactions", "comments"];
|
|
193
297
|
var validCounter = /* @__PURE__ */ __name((value) => typeof value === "number" && Number.isFinite(value) && value >= 0, "validCounter");
|
|
194
298
|
var counterValue = /* @__PURE__ */ __name((message, field) => {
|
|
@@ -225,7 +329,7 @@ var counterFreshness = /* @__PURE__ */ __name((states) => {
|
|
|
225
329
|
return states.some((one) => one.freshness === "stale") ? "stale" : "fresh";
|
|
226
330
|
}, "counterFreshness");
|
|
227
331
|
|
|
228
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.552.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_23aa5a610a285948c067a35e1587367b/node_modules/@wirecat/cli-core/dist/domain/rankings-options.js
|
|
229
333
|
var MESSAGE_MEASURES = ["views", "reactions", "forwards", "comments", "replies", "thread-size"];
|
|
230
334
|
var AUTHOR_MEASURES = [
|
|
231
335
|
"messages",
|
|
@@ -366,8 +470,17 @@ var rankingWords = /* @__PURE__ */ __name((text) => withoutUrls(text).match(/[\p
|
|
|
366
470
|
var rankingQuestion = /* @__PURE__ */ __name((text) => withoutUrls(text).includes("?"), "rankingQuestion");
|
|
367
471
|
|
|
368
472
|
export {
|
|
473
|
+
formatLocator,
|
|
474
|
+
isLocator,
|
|
475
|
+
parseLocator,
|
|
476
|
+
REF_KINDS,
|
|
477
|
+
formatReference,
|
|
478
|
+
parseReference,
|
|
479
|
+
canonicalReference,
|
|
480
|
+
looksLikeReference,
|
|
369
481
|
KINDS,
|
|
370
482
|
PROVIDERS,
|
|
483
|
+
providerLabel,
|
|
371
484
|
FOLDER_PROVIDERS,
|
|
372
485
|
isFolderProvider,
|
|
373
486
|
folderProviderSql,
|
|
@@ -386,12 +499,6 @@ export {
|
|
|
386
499
|
providerNamed,
|
|
387
500
|
kindIn,
|
|
388
501
|
kindOf,
|
|
389
|
-
formatLocator,
|
|
390
|
-
isLocator,
|
|
391
|
-
parseLocator,
|
|
392
|
-
formatReference,
|
|
393
|
-
parseReference,
|
|
394
|
-
canonicalReference,
|
|
395
502
|
COUNTER_FIELDS,
|
|
396
503
|
validCounter,
|
|
397
504
|
counterValue,
|