@moxxy/cli 0.47.1 → 0.48.1
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/bin.js +196 -27
- package/package.json +2 -2
package/dist/bin.js
CHANGED
|
@@ -24020,10 +24020,10 @@ var init_catalog = __esm({
|
|
|
24020
24020
|
{
|
|
24021
24021
|
id: "tts-local",
|
|
24022
24022
|
label: "Local voice (offline TTS)",
|
|
24023
|
-
description: "Fully on-device text-to-speech (English + Polish) via sherpa-onnx
|
|
24023
|
+
description: "Fully on-device text-to-speech (English + Polish) with Supertonic 3 via sherpa-onnx. No API key; a one-time ~129 MB verified download.",
|
|
24024
24024
|
packageName: "@moxxy/plugin-tts-local",
|
|
24025
24025
|
installSpec: "@moxxy/plugin-tts-local",
|
|
24026
|
-
provides: [{ category: "synthesizer", name: "local-
|
|
24026
|
+
provides: [{ category: "synthesizer", name: "local-supertonic" }]
|
|
24027
24027
|
},
|
|
24028
24028
|
{
|
|
24029
24029
|
id: "tts-gemini",
|
|
@@ -24039,7 +24039,10 @@ var init_catalog = __esm({
|
|
|
24039
24039
|
description: "Fully on-device speech-to-text via sherpa-onnx multilingual Whisper (English + Polish). No API key; the model is a one-time verified download (base ~198 MB by default; small ~610 MB recommended for Polish).",
|
|
24040
24040
|
packageName: "@moxxy/plugin-stt-local",
|
|
24041
24041
|
installSpec: "@moxxy/plugin-stt-local",
|
|
24042
|
-
provides: [
|
|
24042
|
+
provides: [
|
|
24043
|
+
{ category: "transcriber", name: "local-whisper" },
|
|
24044
|
+
{ category: "transcriber", name: "local-parakeet" }
|
|
24045
|
+
]
|
|
24043
24046
|
},
|
|
24044
24047
|
{
|
|
24045
24048
|
id: "provider-admin",
|
|
@@ -76015,6 +76018,82 @@ var init_id = __esm({
|
|
|
76015
76018
|
}
|
|
76016
76019
|
});
|
|
76017
76020
|
|
|
76021
|
+
// ../chat-model/dist/trim-trailing.js
|
|
76022
|
+
function trimTrailing2(text3, marks) {
|
|
76023
|
+
let end = text3.length;
|
|
76024
|
+
while (end > 0 && marks.has(text3.charAt(end - 1)))
|
|
76025
|
+
end -= 1;
|
|
76026
|
+
return text3.slice(0, end);
|
|
76027
|
+
}
|
|
76028
|
+
var init_trim_trailing = __esm({
|
|
76029
|
+
"../chat-model/dist/trim-trailing.js"() {
|
|
76030
|
+
}
|
|
76031
|
+
});
|
|
76032
|
+
|
|
76033
|
+
// ../chat-model/dist/speech-tables.js
|
|
76034
|
+
function isTableRow(line) {
|
|
76035
|
+
return line !== void 0 && line.includes("|") && line.trim() !== "";
|
|
76036
|
+
}
|
|
76037
|
+
function cells(line) {
|
|
76038
|
+
return line.trim().replace(/^\|/u, "").replace(/\|$/u, "").split("|").map((cell) => cell.trim());
|
|
76039
|
+
}
|
|
76040
|
+
function isSeparatorFor(header, line) {
|
|
76041
|
+
if (line === void 0)
|
|
76042
|
+
return false;
|
|
76043
|
+
const marks = cells(line);
|
|
76044
|
+
return marks.length === cells(header).length && marks.every((mark) => SEPARATOR_CELL.test(mark));
|
|
76045
|
+
}
|
|
76046
|
+
function tableStartsAt(lines, index) {
|
|
76047
|
+
const header = lines[index];
|
|
76048
|
+
return header !== void 0 && isTableRow(header) && isSeparatorFor(header, lines[index + 1]);
|
|
76049
|
+
}
|
|
76050
|
+
function tableLength(lines, index) {
|
|
76051
|
+
let end = index + 2;
|
|
76052
|
+
while (isTableRow(lines[end]))
|
|
76053
|
+
end += 1;
|
|
76054
|
+
return end - index;
|
|
76055
|
+
}
|
|
76056
|
+
function bare(cell) {
|
|
76057
|
+
return trimTrailing2(cell, SENTENCE_PUNCTUATION);
|
|
76058
|
+
}
|
|
76059
|
+
function speakTable(lines) {
|
|
76060
|
+
if (!tableStartsAt(lines, 0))
|
|
76061
|
+
return null;
|
|
76062
|
+
const [header = "", , ...rows] = lines;
|
|
76063
|
+
const names = cells(header);
|
|
76064
|
+
return rows.map((row) => {
|
|
76065
|
+
const [first = "", ...rest] = cells(row).map(bare);
|
|
76066
|
+
const values = rest.map((value2, index) => value2 ? `${names[index + 1] ?? ""} ${value2}`.trim() : "").filter(Boolean);
|
|
76067
|
+
if (!first)
|
|
76068
|
+
return values.length ? `${values.join("; ")}.` : "";
|
|
76069
|
+
return values.length ? `${first}: ${values.join("; ")}.` : `${first}.`;
|
|
76070
|
+
}).filter(Boolean);
|
|
76071
|
+
}
|
|
76072
|
+
function speakMarkdownTables(markdown) {
|
|
76073
|
+
const lines = markdown.split("\n");
|
|
76074
|
+
const out = [];
|
|
76075
|
+
for (let index = 0; index < lines.length; ) {
|
|
76076
|
+
if (!tableStartsAt(lines, index)) {
|
|
76077
|
+
out.push(lines[index] ?? "");
|
|
76078
|
+
index += 1;
|
|
76079
|
+
continue;
|
|
76080
|
+
}
|
|
76081
|
+
const length = tableLength(lines, index);
|
|
76082
|
+
const spoken = speakTable(lines.slice(index, index + length)) ?? [];
|
|
76083
|
+
out.push(...spoken.flatMap((sentence, at) => at === 0 ? [sentence] : ["", sentence]));
|
|
76084
|
+
index += length;
|
|
76085
|
+
}
|
|
76086
|
+
return out.join("\n");
|
|
76087
|
+
}
|
|
76088
|
+
var SEPARATOR_CELL, SENTENCE_PUNCTUATION;
|
|
76089
|
+
var init_speech_tables = __esm({
|
|
76090
|
+
"../chat-model/dist/speech-tables.js"() {
|
|
76091
|
+
init_trim_trailing();
|
|
76092
|
+
SEPARATOR_CELL = /^:?-{3,}:?$/u;
|
|
76093
|
+
SENTENCE_PUNCTUATION = /* @__PURE__ */ new Set([".", ",", ";", ":"]);
|
|
76094
|
+
}
|
|
76095
|
+
});
|
|
76096
|
+
|
|
76018
76097
|
// ../chat-model/dist/streaming-speech.js
|
|
76019
76098
|
function detectSpeechLanguage(text3, previous) {
|
|
76020
76099
|
const lower2 = text3.toLocaleLowerCase();
|
|
@@ -76042,6 +76121,7 @@ function detectSpeechLanguage(text3, previous) {
|
|
|
76042
76121
|
var POLISH_WORDS, ENGLISH_WORDS, POLISH_DIACRITIC_RE, WORD_RE, ENGLISH_SUFFIX_RE, POLISH_CLUSTER_RE;
|
|
76043
76122
|
var init_streaming_speech = __esm({
|
|
76044
76123
|
"../chat-model/dist/streaming-speech.js"() {
|
|
76124
|
+
init_speech_tables();
|
|
76045
76125
|
POLISH_WORDS = /* @__PURE__ */ new Set([
|
|
76046
76126
|
"a",
|
|
76047
76127
|
"aby",
|
|
@@ -76253,6 +76333,104 @@ var init_streaming_speech = __esm({
|
|
|
76253
76333
|
}
|
|
76254
76334
|
});
|
|
76255
76335
|
|
|
76336
|
+
// ../chat-model/dist/spoken-links.js
|
|
76337
|
+
function hostOf(address) {
|
|
76338
|
+
return address.replace(SCHEME_RE, "").split(/[/?#]/u)[0]?.replace(/:\d+$/u, "") ?? "";
|
|
76339
|
+
}
|
|
76340
|
+
function siteName(address) {
|
|
76341
|
+
const labels = hostOf(address).replace(/^www\./iu, "").split(".").filter(Boolean);
|
|
76342
|
+
if (labels.length === 0 || labels.every((label3) => /^\d+$/u.test(label3)))
|
|
76343
|
+
return null;
|
|
76344
|
+
if (labels.length > 1)
|
|
76345
|
+
labels.pop();
|
|
76346
|
+
if (labels.length > 1 && SECOND_LEVEL_LABELS.has(labels.at(-1)?.toLowerCase() ?? ""))
|
|
76347
|
+
labels.pop();
|
|
76348
|
+
return labels.at(-1) ?? null;
|
|
76349
|
+
}
|
|
76350
|
+
function isWebAddress(value2) {
|
|
76351
|
+
if (SCHEME_RE.test(value2))
|
|
76352
|
+
return true;
|
|
76353
|
+
const host = hostOf(value2);
|
|
76354
|
+
return host.length < value2.length && DOMAIN_RE.test(host);
|
|
76355
|
+
}
|
|
76356
|
+
function isBareDomain(value2) {
|
|
76357
|
+
return DOMAIN_RE.test(value2);
|
|
76358
|
+
}
|
|
76359
|
+
function spokenLink(address, language) {
|
|
76360
|
+
const site = siteName(address);
|
|
76361
|
+
if (language === "pl")
|
|
76362
|
+
return site ? `link do strony ${site}` : "link";
|
|
76363
|
+
return site ? `a link to ${site}` : "a link";
|
|
76364
|
+
}
|
|
76365
|
+
var SECOND_LEVEL_LABELS, SCHEME_RE, DOMAIN_RE;
|
|
76366
|
+
var init_spoken_links = __esm({
|
|
76367
|
+
"../chat-model/dist/spoken-links.js"() {
|
|
76368
|
+
SECOND_LEVEL_LABELS = /* @__PURE__ */ new Set(["ac", "co", "com", "edu", "gov", "net", "org"]);
|
|
76369
|
+
SCHEME_RE = /^[a-z][a-z0-9+.-]*:\/\//iu;
|
|
76370
|
+
DOMAIN_RE = /^(?:www\.)?(?:[a-z0-9-]+\.)+[a-z]{2,}$/iu;
|
|
76371
|
+
}
|
|
76372
|
+
});
|
|
76373
|
+
|
|
76374
|
+
// ../chat-model/dist/speech-text.js
|
|
76375
|
+
function stripNonVerbalArtifacts(text3) {
|
|
76376
|
+
return text3.replace(KEYCAP_EMOJI_RE, " ").replace(NON_VERBAL_SYMBOL_RE, " ").replace(EMOJI_MODIFIER_RE, "").replace(EMOJI_JOINER_RE, "").replace(/\*/g, " ");
|
|
76377
|
+
}
|
|
76378
|
+
function isUrlOrFileReference(value2) {
|
|
76379
|
+
const candidate = trimTrailing2(value2.trim(), TRAILING_PUNCTUATION);
|
|
76380
|
+
return /^(?:https?:\/\/|www\.)/iu.test(candidate) || /^(?:~[\\/]|\.{1,2}[\\/]|[A-Za-z]:[\\/]|\/)/u.test(candidate) || /[\\/][^\\/]+\.[A-Za-z0-9]{2,8}(?::\d+(?::\d+)?)?$/u.test(candidate) || FILE_EXTENSION_RE.test(candidate) || /^(?:[a-z0-9-]+\.)+[a-z]{2,}(?:\/[^\s<>)]*)?$/iu.test(candidate) && !FILE_EXTENSION_RE.test(candidate);
|
|
76381
|
+
}
|
|
76382
|
+
function speakReference(value2, language) {
|
|
76383
|
+
const trimmed = value2.trim();
|
|
76384
|
+
const reference = trimTrailing2(trimmed, TRAILING_PUNCTUATION);
|
|
76385
|
+
const after = trimmed.slice(reference.length);
|
|
76386
|
+
if (isWebAddress(reference))
|
|
76387
|
+
return `${spokenLink(reference, language)}${after}`;
|
|
76388
|
+
if (isBareDomain(reference) && !FILE_EXTENSION_RE.test(reference))
|
|
76389
|
+
return `${siteName(reference) ?? " "}${after}`;
|
|
76390
|
+
return isUrlOrFileReference(reference) ? " " : value2;
|
|
76391
|
+
}
|
|
76392
|
+
function proseLanguage(markdown) {
|
|
76393
|
+
return detectSpeechLanguage(markdown.replace(/\([^()]*\)|<[^<>]*>/gu, " ").replace(WEB_ADDRESS_RE, " "));
|
|
76394
|
+
}
|
|
76395
|
+
function normalizeSpeakableMarkdown(markdown, fencedCodeReplacement) {
|
|
76396
|
+
const language = proseLanguage(markdown);
|
|
76397
|
+
const stripped = speakMarkdownTables(markdown).replace(/```[\s\S]*?```/g, fencedCodeReplacement).replace(/~~~[\s\S]*?~~~/g, fencedCodeReplacement).replace(/^\s*\[[^\]]+\]:\s*\S+.*$/gm, " ").replace(/!\[([^\]]*)\]\([^)]*\)/g, (_match, label3) => speakReference(label3, language)).replace(/\[([^\]]+)\]\([^)]*\)/g, (_match, label3) => speakReference(label3, language)).replace(/\[([^\]]+)\]\s*\[[^\]]*\]/g, (_match, label3) => speakReference(label3, language)).replace(/<(https?:\/\/[^>]+)>/giu, (_match, address) => spokenLink(address, language)).replace(WEB_ADDRESS_RE, (address) => speakReference(address, language)).replace(/`([^`]+)`/g, (_match, code) => speakReference(code, language)).replace(/\*\*([^*]+)\*\*/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/__([^_]+)__/g, "$1").replace(/(^|[^a-zA-Z0-9])_([^_]+)_(?![a-zA-Z0-9])/g, "$1$2").replace(/~~([^~]+)~~/g, "$1").replace(/^\s{0,3}#{1,6}\s+/gm, "").replace(/^\s*>\s?/gm, "").replace(/^\s*[-*+]\s+/gm, "").replace(/^\s*\d+[.)]\s+/gm, "").replace(/^\s*([-*_])\1{2,}\s*$/gm, "").replace(/\|/g, " ");
|
|
76398
|
+
const withoutPaths = stripped.replace(ABSOLUTE_FILE_PATH_RE, " ").replace(FILE_PATH_RE, (match) => {
|
|
76399
|
+
if (SLASHED_PROSE_RE.test(match))
|
|
76400
|
+
return match;
|
|
76401
|
+
return isWebAddress(match) ? speakReference(match, language) : " ";
|
|
76402
|
+
}).replace(DOMAIN_RE2, (match, offset, whole) => FILE_EXTENSION_RE.test(match) || DOTTED_PROSE_RE.test(match) || whole[offset - 1] === "@" ? match : speakReference(match, language));
|
|
76403
|
+
return stripNonVerbalArtifacts(withoutPaths).split(/\n{2,}/).map((p3) => p3.replace(/\s+/g, " ").trim()).filter(Boolean).map((p3) => /[.!?:]$/.test(p3) ? p3 : `${p3}.`).join(" ").replace(/\s+([.!?])/gu, "$1").replace(/\s+([,;:!?])/gu, "$1").replace(/([,;:])\s*[.!?]/gu, ".").replace(/([,;:])(?:\s*[,;:])+/gu, "$1").replace(/\s{2,}/g, " ").trim();
|
|
76404
|
+
}
|
|
76405
|
+
function toSpeakableText(markdown) {
|
|
76406
|
+
return normalizeSpeakableMarkdown(markdown, " (code block) ");
|
|
76407
|
+
}
|
|
76408
|
+
function toVoiceConversationText(markdown) {
|
|
76409
|
+
const withoutCode = markdown.replace(/```[\s\S]*?```/g, " ").replace(/~~~[\s\S]*?~~~/g, " ").replace(/```[\s\S]*$/g, " ").replace(/~~~[\s\S]*$/g, " ").replace(/^(?: {4}|\t).*(?:\n|$)/gm, " ");
|
|
76410
|
+
return normalizeSpeakableMarkdown(withoutCode, " ");
|
|
76411
|
+
}
|
|
76412
|
+
var KEYCAP_EMOJI_RE, NON_VERBAL_SYMBOL_RE, EMOJI_MODIFIER_RE, EMOJI_JOINER_RE, DOMAIN_RE2, FILE_EXTENSION_RE, ABSOLUTE_FILE_PATH_RE, FILE_PATH_RE, DOTTED_PROSE_RE, SLASHED_PROSE_RE, TRAILING_PUNCTUATION, WEB_ADDRESS_RE;
|
|
76413
|
+
var init_speech_text = __esm({
|
|
76414
|
+
"../chat-model/dist/speech-text.js"() {
|
|
76415
|
+
init_speech_tables();
|
|
76416
|
+
init_spoken_links();
|
|
76417
|
+
init_streaming_speech();
|
|
76418
|
+
init_trim_trailing();
|
|
76419
|
+
KEYCAP_EMOJI_RE = /[#*0-9]\uFE0F?\u20E3/gu;
|
|
76420
|
+
NON_VERBAL_SYMBOL_RE = new RegExp("(?!\xB0)\\p{So}", "gu");
|
|
76421
|
+
EMOJI_MODIFIER_RE = new RegExp("\\p{Emoji_Modifier}", "gu");
|
|
76422
|
+
EMOJI_JOINER_RE = /(?:\uFE0E|\uFE0F|\u200D|[\u{E0020}-\u{E007F}])/gu;
|
|
76423
|
+
DOMAIN_RE2 = /\b(?:[a-z0-9-]+\.)+[a-z]{2,}(?:\/[^\s<>)]*)?/giu;
|
|
76424
|
+
FILE_EXTENSION_RE = /\.(?:js|jsx|ts|tsx|mjs|cjs|json|jsonl|ya?ml|toml|md|mdx|txt|log|pdf|docx|xlsx|pptx|csv|tsv|py|rs|go|java|kt|c|h|cpp|hpp|cs|php|sh|bash|zsh|sql|html|css|scss|xml|ini|env|conf|png|jpe?g|svg|webp|wav|mp3|ogg)(?::\d+(?::\d+)?)?$/iu;
|
|
76425
|
+
ABSOLUTE_FILE_PATH_RE = /(?<![\p{L}\p{N}_])(?:~[\\/]|[A-Za-z]:[\\/]|\/)[^<>\r\n`"'()[\],;!?]*?\.[A-Za-z]{2,8}(?::\d+(?::\d+)?)?(?=$|[\s),;.!?])/gu;
|
|
76426
|
+
FILE_PATH_RE = /(?<![\p{L}\p{N}_])(?:~[\\/]|\.{1,2}[\\/]|[A-Za-z]:[\\/]|\/)?(?:[\p{L}\p{N}_.@+-]+[\\/])+[\p{L}\p{N}_.@+-]+(?:\.[A-Za-z0-9]{2,8})?(?::\d+(?::\d+)?)?(?![\p{L}\p{N}_])/gu;
|
|
76427
|
+
DOTTED_PROSE_RE = /^m\.in$/iu;
|
|
76428
|
+
SLASHED_PROSE_RE = new RegExp("^(?:\\d+(?:[.,]\\d+)?(?:\\/\\d+(?:[.,]\\d+)?)+|(?:k?m|mi|[kKMG][bB])\\/(?:h|s|min)|\\p{Lu}{1,5}\\/\\p{Lu}{1,5}|and\\/or|i\\/lub)[.,;:!?]?$", "u");
|
|
76429
|
+
TRAILING_PUNCTUATION = /* @__PURE__ */ new Set([")", ",", ".", ";", ":", "!", "?"]);
|
|
76430
|
+
WEB_ADDRESS_RE = /\b(?:https?:\/\/|www\.)[^\s<>()[\]`]+/giu;
|
|
76431
|
+
}
|
|
76432
|
+
});
|
|
76433
|
+
|
|
76256
76434
|
// ../chat-model/dist/voice-operations.js
|
|
76257
76435
|
var init_voice_operations = __esm({
|
|
76258
76436
|
"../chat-model/dist/voice-operations.js"() {
|
|
@@ -76370,6 +76548,8 @@ var init_dist24 = __esm({
|
|
|
76370
76548
|
init_log2();
|
|
76371
76549
|
init_id();
|
|
76372
76550
|
init_streaming_speech();
|
|
76551
|
+
init_speech_tables();
|
|
76552
|
+
init_speech_text();
|
|
76373
76553
|
init_voice_feedback_scheduler();
|
|
76374
76554
|
init_voice_operations();
|
|
76375
76555
|
init_account_limit();
|
|
@@ -76421,12 +76601,12 @@ function parseBlocks(src) {
|
|
|
76421
76601
|
assertDefined4(row, "line index within bounds");
|
|
76422
76602
|
if (!row.trim().startsWith("|"))
|
|
76423
76603
|
break;
|
|
76424
|
-
const
|
|
76425
|
-
if (
|
|
76604
|
+
const cells2 = parseTableCells(row);
|
|
76605
|
+
if (cells2.length === 0)
|
|
76426
76606
|
break;
|
|
76427
|
-
while (
|
|
76428
|
-
|
|
76429
|
-
rows.push(
|
|
76607
|
+
while (cells2.length < header.length)
|
|
76608
|
+
cells2.push("");
|
|
76609
|
+
rows.push(cells2.slice(0, header.length));
|
|
76430
76610
|
i2++;
|
|
76431
76611
|
}
|
|
76432
76612
|
blocks.push({ kind: "table", header, aligns, rows });
|
|
@@ -76555,8 +76735,8 @@ function parseTableCells(line) {
|
|
|
76555
76735
|
return stripOuterPipes(line).split("|").map((s) => s.trim());
|
|
76556
76736
|
}
|
|
76557
76737
|
function parseTableAligns(sep8) {
|
|
76558
|
-
const
|
|
76559
|
-
return
|
|
76738
|
+
const cells2 = stripOuterPipes(sep8).split("|");
|
|
76739
|
+
return cells2.map((c3) => {
|
|
76560
76740
|
const t2 = c3.trim();
|
|
76561
76741
|
const left = t2.startsWith(":");
|
|
76562
76742
|
const right = t2.endsWith(":");
|
|
@@ -76819,8 +76999,8 @@ var init_table = __esm({
|
|
|
76819
76999
|
const aligns = block2.header.map((_2, ci) => block2.aligns[ci] ?? "left");
|
|
76820
77000
|
return (0, import_jsx_runtime10.jsxs)(Box_default, { flexDirection: "column", marginTop: suppressTopMargin ? 0 : 1, children: [(0, import_jsx_runtime10.jsx)(TableRow, { cells: block2.header, widths, aligns, bold: true }), (0, import_jsx_runtime10.jsx)(TableRule, { widths }), block2.rows.map((row, i2) => (0, import_jsx_runtime10.jsx)(TableRow, { cells: row, widths, aligns }, i2))] });
|
|
76821
77001
|
};
|
|
76822
|
-
TableRow = ({ cells, widths, aligns, bold }) => (0, import_jsx_runtime10.jsx)(Box_default, { children: widths.map((w, ci) => {
|
|
76823
|
-
const text3 = padCell(
|
|
77002
|
+
TableRow = ({ cells: cells2, widths, aligns, bold }) => (0, import_jsx_runtime10.jsx)(Box_default, { children: widths.map((w, ci) => {
|
|
77003
|
+
const text3 = padCell(cells2[ci] ?? "", w, aligns[ci] ?? "left");
|
|
76824
77004
|
return (0, import_jsx_runtime10.jsxs)(import_react31.default.Fragment, { children: [ci > 0 ? (0, import_jsx_runtime10.jsx)(Text, { dimColor: true, children: " \u2502 " }) : null, (0, import_jsx_runtime10.jsx)(Box_default, { width: w, flexShrink: 0, children: (0, import_jsx_runtime10.jsx)(Text, { bold, color: "white", wrap: "truncate", children: text3 }) })] }, ci);
|
|
76825
77005
|
}) });
|
|
76826
77006
|
TableRule = ({ widths }) => (0, import_jsx_runtime10.jsx)(Text, { dimColor: true, children: widths.map((w) => "\u2500".repeat(w)).join("\u2500\u253C\u2500") });
|
|
@@ -79164,19 +79344,7 @@ var init_dedupe2 = __esm({
|
|
|
79164
79344
|
}
|
|
79165
79345
|
});
|
|
79166
79346
|
function toSpeech(markdown) {
|
|
79167
|
-
|
|
79168
|
-
t2 = t2.replace(/```[\s\S]*?```/g, " (code omitted) ");
|
|
79169
|
-
t2 = t2.replace(/```[\s\S]*$/g, " (code omitted) ");
|
|
79170
|
-
t2 = t2.replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1");
|
|
79171
|
-
t2 = t2.replace(/\[([^\]]+)\]\([^)]*\)/g, "$1");
|
|
79172
|
-
t2 = t2.replace(/`([^`]+)`/g, "$1");
|
|
79173
|
-
t2 = t2.replace(/(\*\*|__|~~|\*|_)/g, "");
|
|
79174
|
-
t2 = t2.replace(/^\s{0,3}#{1,6}\s*/gm, "");
|
|
79175
|
-
t2 = t2.replace(/^\s{0,3}>\s?/gm, "");
|
|
79176
|
-
t2 = t2.replace(/^\s{0,3}[-*+]\s+/gm, "");
|
|
79177
|
-
t2 = t2.replace(/[ \t]+/g, " ");
|
|
79178
|
-
t2 = t2.replace(/\n{3,}/g, "\n\n");
|
|
79179
|
-
return t2.trim();
|
|
79347
|
+
return toSpeakableText(markdown ?? "");
|
|
79180
79348
|
}
|
|
79181
79349
|
function truncateForSpeech(text3, max) {
|
|
79182
79350
|
if (text3.length <= max)
|
|
@@ -79196,7 +79364,8 @@ async function synthesizeReply(session, text3, opts = {}) {
|
|
|
79196
79364
|
}
|
|
79197
79365
|
if (!synth)
|
|
79198
79366
|
return { ok: false, reason: "no-synthesizer" };
|
|
79199
|
-
const
|
|
79367
|
+
const spoken = opts.conversation ? toVoiceConversationText(text3 ?? "") : toSpeech(text3);
|
|
79368
|
+
const speech = truncateForSpeech(spoken, opts.maxChars ?? DEFAULT_MAX_SPEECH_CHARS);
|
|
79200
79369
|
if (!speech)
|
|
79201
79370
|
return { ok: false, reason: "empty" };
|
|
79202
79371
|
const synthOpts = {};
|
|
@@ -93150,7 +93319,7 @@ function surfaceInputWithinCap(m3) {
|
|
|
93150
93319
|
var RUNNER_PROTOCOL_VERSION, MIN_COMPATIBLE_PROTOCOL_VERSION, RunnerMethod, RunnerNotification, attachmentSchema, principalSchema, attachParamsSchema, runTurnParamsSchema, abortParamsSchema, setResolverParamsSchema, questionAnswerParamsSchema, modeSetActiveParamsSchema, sessionSetReasoningParamsSchema, sessionSetFastParamsSchema, MAX_HISTORY_PAGE_LIMIT, sessionLoadHistoryParamsSchema, sessionReadAttachmentParamsSchema, MAX_RECORDED_EXCHANGE_CHARS, recordedText, sessionRecordExchangeParamsSchema, sessionSetAutoApproveParamsSchema, sessionStopBackgroundWorkParamsSchema, providerSetActiveParamsSchema, providerSetEnabledParamsSchema, providerConfigureParamsSchema, permissionAddAllowParamsSchema, commandRunParamsSchema, MAX_TRANSCRIBE_AUDIO_B64_BYTES, MAX_SYNTHESIZE_TEXT_BYTES, MEDIA_DESCRIPTOR_MAX, transcribeParamsSchema, synthesizeParamsSchema, cancelSynthesizeParamsSchema, mcpEnableAndAttachParamsSchema, mcpDetachParamsSchema, workflowSetEnabledParamsSchema, workflowRunParamsSchema, workflowValidateDraftParamsSchema, workflowSaveParamsSchema, workflowGetRunParamsSchema, workflowResumeParamsSchema, surfaceOpenParamsSchema, MAX_SURFACE_INPUT_BYTES, surfaceInputParamsSchema, surfaceResizeParamsSchema, surfaceCloseParamsSchema;
|
|
93151
93320
|
var init_protocol2 = __esm({
|
|
93152
93321
|
"../runner/dist/protocol.js"() {
|
|
93153
|
-
RUNNER_PROTOCOL_VERSION =
|
|
93322
|
+
RUNNER_PROTOCOL_VERSION = 33;
|
|
93154
93323
|
MIN_COMPATIBLE_PROTOCOL_VERSION = 1;
|
|
93155
93324
|
RunnerMethod = {
|
|
93156
93325
|
/** client->server: handshake; returns the initial info snapshot. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moxxy/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.1",
|
|
4
4
|
"description": "moxxy command-line agent: TUI, one-shot prompts, setup, services, and API-key or installed-CLI subscription providers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"moxxy",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"undici": "^8.12.2",
|
|
51
51
|
"zod": "^4.6.6",
|
|
52
|
-
"@moxxy/sdk": "0.
|
|
52
|
+
"@moxxy/sdk": "0.48.1"
|
|
53
53
|
},
|
|
54
54
|
"optionalDependencies": {
|
|
55
55
|
"@napi-rs/keyring": "^2.1.0"
|