omnius 1.0.226 → 1.0.227
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/index.js +72 -33
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -587422,6 +587422,7 @@ __export(render_exports, {
|
|
|
587422
587422
|
getTermWidth: () => getTermWidth,
|
|
587423
587423
|
pastel: () => pastel,
|
|
587424
587424
|
renderAssistantText: () => renderAssistantText,
|
|
587425
|
+
renderBoxedBlock: () => renderBoxedBlock,
|
|
587425
587426
|
renderCompactHeader: () => renderCompactHeader,
|
|
587426
587427
|
renderConfig: () => renderConfig,
|
|
587427
587428
|
renderContextIntakeBox: () => renderContextIntakeBox,
|
|
@@ -587967,6 +587968,11 @@ function buildToolResultBoxLines(toolName, success, output, opts, width) {
|
|
|
587967
587968
|
metricsColorCode: success ? void 0 : TOOL_ERROR_COLOR_CODE
|
|
587968
587969
|
}, width);
|
|
587969
587970
|
}
|
|
587971
|
+
function resolveToolOutputMaxLines(verbose) {
|
|
587972
|
+
const raw = Number(process.env["OMNIUS_TOOL_OUTPUT_MAX_LINES"]);
|
|
587973
|
+
if (Number.isFinite(raw)) return raw <= 0 ? Number.MAX_SAFE_INTEGER : Math.floor(raw);
|
|
587974
|
+
return verbose ? 1e3 : 500;
|
|
587975
|
+
}
|
|
587970
587976
|
function buildToolResultBody(toolName, success, output, verbose) {
|
|
587971
587977
|
const debug = loadConfig()?.debug ?? false;
|
|
587972
587978
|
if (toolName === "file_write" || toolName === "file_edit") {
|
|
@@ -587981,7 +587987,7 @@ function buildToolResultBody(toolName, success, output, verbose) {
|
|
|
587981
587987
|
if (!success) {
|
|
587982
587988
|
return [{ text: extractFirstLine(output, Number.MAX_SAFE_INTEGER), mode: "wrap", kind: "error" }];
|
|
587983
587989
|
}
|
|
587984
|
-
return codePreviewLines(output,
|
|
587990
|
+
return codePreviewLines(output, resolveToolOutputMaxLines(verbose));
|
|
587985
587991
|
}
|
|
587986
587992
|
if (toolName === "task_complete") {
|
|
587987
587993
|
const summary = output && output.trim() ? output : "Done";
|
|
@@ -588000,7 +588006,7 @@ function buildToolResultBody(toolName, success, output, verbose) {
|
|
|
588000
588006
|
if (filtered.length === 0) {
|
|
588001
588007
|
return [{ text: success ? "Done" : "Failed", mode: "wrap", kind: success ? "success" : "error" }];
|
|
588002
588008
|
}
|
|
588003
|
-
const maxLines = verbose
|
|
588009
|
+
const maxLines = resolveToolOutputMaxLines(verbose);
|
|
588004
588010
|
const shown = [];
|
|
588005
588011
|
for (const line of filtered.slice(0, maxLines)) {
|
|
588006
588012
|
if (isRawJsonDump(line) && !verbose) {
|
|
@@ -588084,18 +588090,35 @@ function renderToolResult(toolName, success, output, verboseOrOpts) {
|
|
|
588084
588090
|
opts
|
|
588085
588091
|
);
|
|
588086
588092
|
}
|
|
588093
|
+
function renderBoxedBlock(opts) {
|
|
588094
|
+
const mode = opts.mode ?? "wrap";
|
|
588095
|
+
const kind = opts.kind ?? "plain";
|
|
588096
|
+
const body = (opts.lines.length > 0 ? opts.lines : [""]).map((text) => ({
|
|
588097
|
+
text,
|
|
588098
|
+
mode,
|
|
588099
|
+
kind
|
|
588100
|
+
}));
|
|
588101
|
+
renderToolDynamicBlock(
|
|
588102
|
+
"tool-result",
|
|
588103
|
+
(width) => buildToolBoxLines({
|
|
588104
|
+
title: opts.title,
|
|
588105
|
+
metrics: opts.metrics ?? "",
|
|
588106
|
+
body,
|
|
588107
|
+
colorCode: opts.colorCode ?? tuiTextDim(),
|
|
588108
|
+
metricsColorCode: opts.metricsColorCode
|
|
588109
|
+
}, width),
|
|
588110
|
+
opts.host === void 0 ? {} : { host: opts.host }
|
|
588111
|
+
);
|
|
588112
|
+
}
|
|
588087
588113
|
function renderImageAsciiPreview(title, imagePath, ascii2, renderer) {
|
|
588088
|
-
|
|
588089
|
-
|
|
588090
|
-
|
|
588091
|
-
|
|
588092
|
-
|
|
588093
|
-
|
|
588094
|
-
|
|
588095
|
-
|
|
588096
|
-
process.stdout.write(`${prefix}${renderedLine}
|
|
588097
|
-
`);
|
|
588098
|
-
}
|
|
588114
|
+
renderBoxedBlock({
|
|
588115
|
+
title: `${title} — ${imagePath}`,
|
|
588116
|
+
metrics: renderer,
|
|
588117
|
+
lines: ascii2.split("\n").map((line) => /\x1B\[[0-?]*[ -/]*[@-~]/.test(line) ? line : c3.dim(line)),
|
|
588118
|
+
mode: "truncate",
|
|
588119
|
+
colorCode: 44
|
|
588120
|
+
// cyan-ish, matching the prior cyan header
|
|
588121
|
+
});
|
|
588099
588122
|
}
|
|
588100
588123
|
function extractFirstLine(output, maxW) {
|
|
588101
588124
|
const line = output.split("\n").find((l2) => l2.trim()) ?? output;
|
|
@@ -589394,16 +589417,15 @@ connectPP();
|
|
|
589394
589417
|
</html>`;
|
|
589395
589418
|
}
|
|
589396
589419
|
function renderVoiceSessionStart(tunnelUrl) {
|
|
589397
|
-
|
|
589398
|
-
|
|
589399
|
-
|
|
589400
|
-
|
|
589401
|
-
|
|
589402
|
-
|
|
589403
|
-
|
|
589404
|
-
|
|
589405
|
-
|
|
589406
|
-
`);
|
|
589420
|
+
renderBoxedBlock({
|
|
589421
|
+
title: "☁ Live Voice Session",
|
|
589422
|
+
lines: [
|
|
589423
|
+
c3.cyan(tunnelUrl),
|
|
589424
|
+
"Bidirectional PCM audio + live transcription",
|
|
589425
|
+
"/hangup to end session (auto-closes after 1 min idle)"
|
|
589426
|
+
],
|
|
589427
|
+
colorCode: 44
|
|
589428
|
+
});
|
|
589407
589429
|
}
|
|
589408
589430
|
function renderVoiceSessionStop(runtime) {
|
|
589409
589431
|
const mins = Math.floor(runtime / 60);
|
|
@@ -589415,13 +589437,13 @@ function renderVoiceSessionStop(runtime) {
|
|
|
589415
589437
|
}
|
|
589416
589438
|
function renderVoiceSessionUser(action, username) {
|
|
589417
589439
|
const icon = action === "connected" ? c3.green("→") : c3.red("←");
|
|
589418
|
-
process.stdout.write(` ${c3.
|
|
589440
|
+
process.stdout.write(` ${c3.cyan("☁")} ${icon} ${username} ${action}
|
|
589419
589441
|
`);
|
|
589420
589442
|
}
|
|
589421
589443
|
function renderVoiceSessionTranscript(speaker, text) {
|
|
589422
589444
|
const label = speaker === "user" ? c3.yellow("user") : c3.cyan("agent");
|
|
589423
589445
|
const preview = text.length > 80 ? text.slice(0, 77) + "..." : text;
|
|
589424
|
-
process.stdout.write(` ${c3.
|
|
589446
|
+
process.stdout.write(` ${c3.cyan("☁")} [${label}] ${preview}
|
|
589425
589447
|
`);
|
|
589426
589448
|
}
|
|
589427
589449
|
var VoiceSession;
|
|
@@ -644494,23 +644516,40 @@ function renderTelegramSubAgentStart(username, text, isAdmin) {
|
|
|
644494
644516
|
`);
|
|
644495
644517
|
}
|
|
644496
644518
|
function renderTelegramSubAgentEvent(username, detail) {
|
|
644497
|
-
|
|
644498
|
-
|
|
644519
|
+
renderBoxedBlock({
|
|
644520
|
+
title: `✈ @${username}`,
|
|
644521
|
+
lines: [detail],
|
|
644522
|
+
colorCode: 45
|
|
644523
|
+
});
|
|
644499
644524
|
}
|
|
644500
644525
|
function renderTelegramSubAgentToolCall(username, toolName, args) {
|
|
644501
644526
|
const preview = args.length > 50 ? args.slice(0, 47) + "..." : args;
|
|
644502
|
-
|
|
644503
|
-
|
|
644527
|
+
renderBoxedBlock({
|
|
644528
|
+
title: `✈ @${username}`,
|
|
644529
|
+
metrics: toolName,
|
|
644530
|
+
lines: [`${c3.bold(toolName)}(${c3.dim(preview)})`],
|
|
644531
|
+
colorCode: 45
|
|
644532
|
+
});
|
|
644504
644533
|
}
|
|
644505
644534
|
function renderTelegramSubAgentComplete(username, summary) {
|
|
644506
644535
|
const preview = summary.length > 80 ? summary.slice(0, 77) + "..." : summary;
|
|
644507
|
-
|
|
644508
|
-
|
|
644536
|
+
renderBoxedBlock({
|
|
644537
|
+
title: `✔ @${username}`,
|
|
644538
|
+
lines: [preview],
|
|
644539
|
+
kind: "success",
|
|
644540
|
+
colorCode: 42
|
|
644541
|
+
// green
|
|
644542
|
+
});
|
|
644509
644543
|
}
|
|
644510
644544
|
function renderTelegramSubAgentError(username, error) {
|
|
644511
644545
|
const preview = error.length > 80 ? error.slice(0, 77) + "..." : error;
|
|
644512
|
-
|
|
644513
|
-
|
|
644546
|
+
renderBoxedBlock({
|
|
644547
|
+
title: `✘ @${username}`,
|
|
644548
|
+
lines: [preview],
|
|
644549
|
+
kind: "error",
|
|
644550
|
+
colorCode: 198
|
|
644551
|
+
// magenta
|
|
644552
|
+
});
|
|
644514
644553
|
}
|
|
644515
644554
|
var TELEGRAM_TOOL_ACTION_GROUPS, TELEGRAM_TOOL_ACTION_GROUP, TELEGRAM_TOOL_MUTATING_GROUPS, DEFAULT_TELEGRAM_TOOL_GROUP_POLICY, TELEGRAM_TOOL_BUTTON_LABELS, TELEGRAM_SAFETY_PROMPT, ADMIN_DM_PROMPT, ADMIN_GROUP_PROMPT, TELEGRAM_PUBLIC_SOUL_PROFILE, TELEGRAM_PUBLIC_ORCHESTRATOR_CONTRACT, TELEGRAM_PUBLIC_MEMORY_SCOPE_CONTRACT, TELEGRAM_PUBLIC_VISION_STACK_CONTRACT, GROUP_REPLY_DISCRETION_PROMPT, TELEGRAM_CHAT_MODE_PROMPT, ADMIN_CHAT_PROFILE_PROMPT, TELEGRAM_ACTION_RESPONSE_CONTRACT, TELEGRAM_EXTERNAL_ACQUISITION_CONTRACT, TELEGRAM_LINK_INTEGRITY_CONTRACT, TELEGRAM_INTERACTION_DECISION_RESPONSE_FORMAT, TELEGRAM_INTERACTION_DECISION_MINIMAL_SCHEMA, TELEGRAM_INTERACTION_DECISION_REPAIR_SCHEMA, TELEGRAM_CHAT_REPLY_RESPONSE_FORMAT, TELEGRAM_SPACED_URL_RE, TELEGRAM_HTTP_URL_RE, TELEGRAM_STUCK_SELF_TALK_PREFIXES, TELEGRAM_CHAT_HISTORY_LIMIT, TELEGRAM_CONTEXT_RECENT_DEFAULT, TELEGRAM_CONTEXT_LINE_LIMIT, TELEGRAM_CONTEXT_SAMPLE_LIMIT, TELEGRAM_MEMORY_CARD_LIMIT, TELEGRAM_MEMORY_NOTE_LIMIT, TELEGRAM_ASSOCIATIVE_FACT_LIMIT, TELEGRAM_ASSOCIATIVE_USER_FACT_LIMIT, TELEGRAM_ASSOCIATIVE_ACTION_LIMIT, TELEGRAM_ASSOCIATIVE_RELATION_LIMIT, TELEGRAM_MEMORY_STOPWORDS, TELEGRAM_MEMORY_GENERIC_QUERY_TOKENS, TELEGRAM_SUB_AGENT_BOUNDED_OPTIONS, TELEGRAM_PUBLIC_FAST_OPTIONS, TELEGRAM_ADMIN_EVIDENCE_OPTIONS, TELEGRAM_SUB_AGENT_DEFAULT_LIMIT, TELEGRAM_SUB_AGENT_MAX_LIMIT, TELEGRAM_SUB_AGENT_BURST_CONTEXT_LIMIT, TELEGRAM_ADMIN_LIVE_PANEL_PAGES, TELEGRAM_ADMIN_LIVE_MUTATION_TOOLS, TELEGRAM_PUBLIC_HELP_COMMANDS2, TELEGRAM_REMINDER_SLASH_COMMANDS, TELEGRAM_REFLECTION_SLASH_COMMANDS, TELEGRAM_PUBLIC_BOT_COMMAND_NAMES, TELEGRAM_IMAGE_EXTENSIONS, MEDIA_CACHE_TTL_MS, TELEGRAM_CHANNEL_DMN_SWEEP_MS, TELEGRAM_CHANNEL_DMN_IDLE_AFTER_MS, TELEGRAM_CHANNEL_DMN_MIN_INTERVAL_MS, TELEGRAM_CHANNEL_DMN_MIN_MESSAGES, TELEGRAM_ALLOWED_UPDATES, TELEGRAM_DEFAULT_LONG_POLL_TIMEOUT_SECONDS, TELEGRAM_ROUTER_AUTO_MIN_PARAMETERS_B, TELEGRAM_PUBLIC_TOOL_QUOTAS, TelegramBridge;
|
|
644516
644555
|
var init_telegram_bridge = __esm({
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.227",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omnius",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.227",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED