omnius 1.0.682 → 1.0.683
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 +151 -133
- package/docs/guides/tui-workflows.md +6 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -76076,12 +76076,12 @@ var init_config2 = __esm({
|
|
|
76076
76076
|
this.config.minSavingsThreshold = Math.max(0, Math.min(1, threshold));
|
|
76077
76077
|
this.save();
|
|
76078
76078
|
}
|
|
76079
|
-
setAutoCompress(
|
|
76080
|
-
this.config.autoCompress =
|
|
76079
|
+
setAutoCompress(enabled3) {
|
|
76080
|
+
this.config.autoCompress = enabled3;
|
|
76081
76081
|
this.save();
|
|
76082
76082
|
}
|
|
76083
|
-
setKeepOriginal(
|
|
76084
|
-
this.config.keepOriginal =
|
|
76083
|
+
setKeepOriginal(enabled3) {
|
|
76084
|
+
this.config.keepOriginal = enabled3;
|
|
76085
76085
|
this.save();
|
|
76086
76086
|
}
|
|
76087
76087
|
setCompressionBatchSize(size) {
|
|
@@ -92313,13 +92313,13 @@ ${earlyError ? "\n" + earlyError : ""}${earlyOutput ? "\n" + earlyOutput : ""}`;
|
|
|
92313
92313
|
if (status.networkStack) {
|
|
92314
92314
|
const ns = status.networkStack;
|
|
92315
92315
|
const disc = ns.discovery || {};
|
|
92316
|
-
const
|
|
92316
|
+
const enabled3 = Object.entries(disc).filter(([, value2]) => value2 === true).map(([key2]) => key2).join(", ");
|
|
92317
92317
|
lines.push(` Network role: ${ns.role || "light"}`);
|
|
92318
92318
|
lines.push(` Profile: ${ns.publicMesh === true ? "public mesh (explicit)" : "local LAN"}`);
|
|
92319
92319
|
if (Number.isFinite(Number(ns.maxPeers))) {
|
|
92320
92320
|
lines.push(` Peer budget: ${ns.maxPeers} (dropped: ${ns.droppedPeers || 0})`);
|
|
92321
92321
|
}
|
|
92322
|
-
lines.push(` Discovery: ${
|
|
92322
|
+
lines.push(` Discovery: ${enabled3 || "none"}`);
|
|
92323
92323
|
lines.push(` Signaling: ${ns.signalingServer || "n/a"}`);
|
|
92324
92324
|
if (Array.isArray(ns.manifestUrls) && ns.manifestUrls.length > 0) {
|
|
92325
92325
|
lines.push(` Bootstrap manifests: ${ns.manifestUrls.length}`);
|
|
@@ -118577,7 +118577,7 @@ function setup(env2) {
|
|
|
118577
118577
|
createDebug.coerce = coerce2;
|
|
118578
118578
|
createDebug.disable = disable;
|
|
118579
118579
|
createDebug.enable = enable;
|
|
118580
|
-
createDebug.enabled =
|
|
118580
|
+
createDebug.enabled = enabled3;
|
|
118581
118581
|
createDebug.humanize = c2;
|
|
118582
118582
|
createDebug.destroy = destroy;
|
|
118583
118583
|
Object.keys(env2).forEach((key2) => {
|
|
@@ -118697,7 +118697,7 @@ function setup(env2) {
|
|
|
118697
118697
|
createDebug.enable("");
|
|
118698
118698
|
return namespaces;
|
|
118699
118699
|
}
|
|
118700
|
-
function
|
|
118700
|
+
function enabled3(name10) {
|
|
118701
118701
|
if (name10[name10.length - 1] === "*") {
|
|
118702
118702
|
return true;
|
|
118703
118703
|
}
|
|
@@ -160293,7 +160293,7 @@ var require_common = __commonJS({
|
|
|
160293
160293
|
createDebug.coerce = coerce2;
|
|
160294
160294
|
createDebug.disable = disable;
|
|
160295
160295
|
createDebug.enable = enable;
|
|
160296
|
-
createDebug.enabled =
|
|
160296
|
+
createDebug.enabled = enabled3;
|
|
160297
160297
|
createDebug.humanize = require_ms();
|
|
160298
160298
|
createDebug.destroy = destroy;
|
|
160299
160299
|
Object.keys(env2).forEach((key2) => {
|
|
@@ -160432,7 +160432,7 @@ var require_common = __commonJS({
|
|
|
160432
160432
|
createDebug.enable("");
|
|
160433
160433
|
return namespaces;
|
|
160434
160434
|
}
|
|
160435
|
-
function
|
|
160435
|
+
function enabled3(name10) {
|
|
160436
160436
|
for (const skip of createDebug.skips) {
|
|
160437
160437
|
if (matchesTemplate(name10, skip)) {
|
|
160438
160438
|
return false;
|
|
@@ -366891,13 +366891,13 @@ ${lanes.join("\n")}
|
|
|
366891
366891
|
}
|
|
366892
366892
|
}
|
|
366893
366893
|
var nullTimer = { enter: noop2, exit: noop2 };
|
|
366894
|
-
var
|
|
366894
|
+
var enabled3 = false;
|
|
366895
366895
|
var timeorigin = timestamp2();
|
|
366896
366896
|
var marks = /* @__PURE__ */ new Map();
|
|
366897
366897
|
var counts = /* @__PURE__ */ new Map();
|
|
366898
366898
|
var durations = /* @__PURE__ */ new Map();
|
|
366899
366899
|
function mark(markName) {
|
|
366900
|
-
if (
|
|
366900
|
+
if (enabled3) {
|
|
366901
366901
|
const count = counts.get(markName) ?? 0;
|
|
366902
366902
|
counts.set(markName, count + 1);
|
|
366903
366903
|
marks.set(markName, timestamp2());
|
|
@@ -366908,7 +366908,7 @@ ${lanes.join("\n")}
|
|
|
366908
366908
|
}
|
|
366909
366909
|
}
|
|
366910
366910
|
function measure(measureName, startMarkName, endMarkName) {
|
|
366911
|
-
if (
|
|
366911
|
+
if (enabled3) {
|
|
366912
366912
|
const end = (endMarkName !== void 0 ? marks.get(endMarkName) : void 0) ?? timestamp2();
|
|
366913
366913
|
const start2 = (startMarkName !== void 0 ? marks.get(startMarkName) : void 0) ?? timeorigin;
|
|
366914
366914
|
const previousDuration = durations.get(measureName) || 0;
|
|
@@ -366944,12 +366944,12 @@ ${lanes.join("\n")}
|
|
|
366944
366944
|
performanceImpl == null ? void 0 : performanceImpl.clearMarks(name10);
|
|
366945
366945
|
}
|
|
366946
366946
|
function isEnabled() {
|
|
366947
|
-
return
|
|
366947
|
+
return enabled3;
|
|
366948
366948
|
}
|
|
366949
366949
|
function enable(system = sys) {
|
|
366950
366950
|
var _a2;
|
|
366951
|
-
if (!
|
|
366952
|
-
|
|
366951
|
+
if (!enabled3) {
|
|
366952
|
+
enabled3 = true;
|
|
366953
366953
|
perfHooks || (perfHooks = tryGetNativePerformanceHooks());
|
|
366954
366954
|
if (perfHooks == null ? void 0 : perfHooks.performance) {
|
|
366955
366955
|
timeorigin = perfHooks.performance.timeOrigin;
|
|
@@ -366961,12 +366961,12 @@ ${lanes.join("\n")}
|
|
|
366961
366961
|
return true;
|
|
366962
366962
|
}
|
|
366963
366963
|
function disable() {
|
|
366964
|
-
if (
|
|
366964
|
+
if (enabled3) {
|
|
366965
366965
|
marks.clear();
|
|
366966
366966
|
counts.clear();
|
|
366967
366967
|
durations.clear();
|
|
366968
366968
|
performanceImpl = void 0;
|
|
366969
|
-
|
|
366969
|
+
enabled3 = false;
|
|
366970
366970
|
}
|
|
366971
366971
|
}
|
|
366972
366972
|
var tracing;
|
|
@@ -582982,8 +582982,8 @@ var require_ts_morph = __commonJS({
|
|
|
582982
582982
|
}
|
|
582983
582983
|
var EnableableLogger = class {
|
|
582984
582984
|
#enabled = false;
|
|
582985
|
-
setEnabled(
|
|
582986
|
-
this.#enabled =
|
|
582985
|
+
setEnabled(enabled3) {
|
|
582986
|
+
this.#enabled = enabled3;
|
|
582987
582987
|
}
|
|
582988
582988
|
log(text3) {
|
|
582989
582989
|
if (this.#enabled)
|
|
@@ -602567,8 +602567,8 @@ Node text: ${this.#forgottenText}`;
|
|
|
602567
602567
|
for (const file of this.#getUnsavedSourceFiles())
|
|
602568
602568
|
file.saveSync();
|
|
602569
602569
|
}
|
|
602570
|
-
enableLogging(
|
|
602571
|
-
this._context.logger.setEnabled(
|
|
602570
|
+
enableLogging(enabled3 = true) {
|
|
602571
|
+
this._context.logger.setEnabled(enabled3);
|
|
602572
602572
|
}
|
|
602573
602573
|
#getUnsavedSourceFiles() {
|
|
602574
602574
|
return Array.from(getUnsavedIterator(this._context.compilerFactory.getSourceFilesByDirectoryDepth()));
|
|
@@ -624464,15 +624464,15 @@ var init_registry3 = __esm({
|
|
|
624464
624464
|
const existing = this._plugins.get(manifest.name);
|
|
624465
624465
|
if (existing)
|
|
624466
624466
|
return existing;
|
|
624467
|
-
const
|
|
624467
|
+
const enabled3 = !this._disabledPlugins.has(manifest.name);
|
|
624468
624468
|
const hookHandlers = [];
|
|
624469
624469
|
const plugin = {
|
|
624470
624470
|
manifest,
|
|
624471
624471
|
hookHandlers,
|
|
624472
|
-
enabled:
|
|
624472
|
+
enabled: enabled3
|
|
624473
624473
|
};
|
|
624474
624474
|
this._plugins.set(manifest.name, plugin);
|
|
624475
|
-
if (
|
|
624475
|
+
if (enabled3) {
|
|
624476
624476
|
this._loadPluginModule(plugin);
|
|
624477
624477
|
}
|
|
624478
624478
|
return plugin;
|
|
@@ -695449,8 +695449,8 @@ async function readUserSystemctl(args, timeout2 = 5e3) {
|
|
|
695449
695449
|
}
|
|
695450
695450
|
}
|
|
695451
695451
|
async function hasManagedDaemonService() {
|
|
695452
|
-
const
|
|
695453
|
-
if (
|
|
695452
|
+
const enabled3 = await runUserSystemctl(["is-enabled", "omnius-daemon.service"], 5e3);
|
|
695453
|
+
if (enabled3.ok) return true;
|
|
695454
695454
|
const active = await runUserSystemctl(["is-active", "omnius-daemon.service"], 5e3);
|
|
695455
695455
|
return active.ok;
|
|
695456
695456
|
}
|
|
@@ -704267,8 +704267,8 @@ var init_live_sensors = __esm({
|
|
|
704267
704267
|
setLiveSpeechSink(sink) {
|
|
704268
704268
|
this.liveSpeechSink = sink ?? null;
|
|
704269
704269
|
}
|
|
704270
|
-
setLiveSpeechEnabled(
|
|
704271
|
-
this.liveSpeechEnabled =
|
|
704270
|
+
setLiveSpeechEnabled(enabled3) {
|
|
704271
|
+
this.liveSpeechEnabled = enabled3;
|
|
704272
704272
|
}
|
|
704273
704273
|
setLiveTtsSpeakingSource(source) {
|
|
704274
704274
|
this.liveTtsSpeaking = source ?? null;
|
|
@@ -704419,18 +704419,18 @@ var init_live_sensors = __esm({
|
|
|
704419
704419
|
const target = device2 || this.config.selectedCamera;
|
|
704420
704420
|
return target ? normalizeLiveCameraFps(this.config.cameraStreams?.[target]?.fps ?? DEFAULT_CAMERA_FPS) : DEFAULT_CAMERA_FPS;
|
|
704421
704421
|
}
|
|
704422
|
-
setCameraStreamEnabled(device2,
|
|
704422
|
+
setCameraStreamEnabled(device2, enabled3) {
|
|
704423
704423
|
const target = device2 || this.config.selectedCamera;
|
|
704424
704424
|
if (!target) return null;
|
|
704425
704425
|
const current = this.config.cameraStreams?.[target];
|
|
704426
704426
|
const next = {
|
|
704427
|
-
enabled:
|
|
704427
|
+
enabled: enabled3,
|
|
704428
704428
|
resolution: current?.resolution ?? DEFAULT_CAMERA_RESOLUTION,
|
|
704429
704429
|
fps: current?.fps ?? DEFAULT_CAMERA_FPS
|
|
704430
704430
|
};
|
|
704431
704431
|
this.config = {
|
|
704432
704432
|
...this.config,
|
|
704433
|
-
selectedCamera:
|
|
704433
|
+
selectedCamera: enabled3 ? target : this.config.selectedCamera,
|
|
704434
704434
|
cameraStreams: {
|
|
704435
704435
|
...this.config.cameraStreams ?? {},
|
|
704436
704436
|
[target]: next
|
|
@@ -710625,7 +710625,7 @@ function getAgentToolCommandPolicy(command) {
|
|
|
710625
710625
|
};
|
|
710626
710626
|
}
|
|
710627
710627
|
if (!cmd.surfaces.agentTool) {
|
|
710628
|
-
const flags = Object.entries(cmd.safety).filter(([,
|
|
710628
|
+
const flags = Object.entries(cmd.safety).filter(([, enabled3]) => enabled3).map(([flag]) => flag).join(", ");
|
|
710629
710629
|
return {
|
|
710630
710630
|
allowed: false,
|
|
710631
710631
|
name: cmd.name,
|
|
@@ -714230,14 +714230,14 @@ function ansi2(code8, text3) {
|
|
|
714230
714230
|
function fg256(code8, text3) {
|
|
714231
714231
|
return stdoutIsTTY() ? `\x1B[38;5;${code8}m${text3}\x1B[0m` : text3;
|
|
714232
714232
|
}
|
|
714233
|
-
function setEmojisEnabled(
|
|
714234
|
-
_emojisEnabled =
|
|
714233
|
+
function setEmojisEnabled(enabled3) {
|
|
714234
|
+
_emojisEnabled = enabled3;
|
|
714235
714235
|
}
|
|
714236
714236
|
function getEmojisEnabled() {
|
|
714237
714237
|
return _emojisEnabled;
|
|
714238
714238
|
}
|
|
714239
|
-
function setColorsEnabled(
|
|
714240
|
-
_colorsEnabled =
|
|
714239
|
+
function setColorsEnabled(enabled3) {
|
|
714240
|
+
_colorsEnabled = enabled3;
|
|
714241
714241
|
}
|
|
714242
714242
|
function getColorsEnabled() {
|
|
714243
714243
|
return _colorsEnabled;
|
|
@@ -724847,6 +724847,35 @@ var init_dist9 = __esm({
|
|
|
724847
724847
|
}
|
|
724848
724848
|
});
|
|
724849
724849
|
|
|
724850
|
+
// packages/cli/src/tui/terminal-capabilities.ts
|
|
724851
|
+
function enabled2(value2) {
|
|
724852
|
+
return /^(?:1|true|yes|on)$/i.test(value2?.trim() ?? "");
|
|
724853
|
+
}
|
|
724854
|
+
function hasNoColor(env2) {
|
|
724855
|
+
return env2["NO_COLOR"] !== void 0 && env2["NO_COLOR"] !== "";
|
|
724856
|
+
}
|
|
724857
|
+
function isLimitedTerminal(env2) {
|
|
724858
|
+
const term = (env2["TERM"] ?? "").trim().toLowerCase();
|
|
724859
|
+
return /^(?:dumb|linux|cons25|vt100|ansi|unknown)$/.test(term);
|
|
724860
|
+
}
|
|
724861
|
+
function isRemoteTerminalSession(env2 = process.env) {
|
|
724862
|
+
return Boolean(env2["SSH_TTY"] || env2["SSH_CONNECTION"] || env2["SSH_CLIENT"]);
|
|
724863
|
+
}
|
|
724864
|
+
function prefersStaticTuiChrome(options2 = {}) {
|
|
724865
|
+
const platform13 = options2.platform ?? process.platform;
|
|
724866
|
+
const env2 = options2.env ?? process.env;
|
|
724867
|
+
if (platform13 === "darwin" || platform13 === "win32") return true;
|
|
724868
|
+
if (enabled2(env2["OMNIUS_TUI_STATIC_CHROME"])) return true;
|
|
724869
|
+
if (enabled2(env2["OMNIUS_TUI_ANIMATED_CHROME"])) return false;
|
|
724870
|
+
if (isRemoteTerminalSession(env2)) return true;
|
|
724871
|
+
if (hasNoColor(env2) || isLimitedTerminal(env2)) return true;
|
|
724872
|
+
return false;
|
|
724873
|
+
}
|
|
724874
|
+
var init_terminal_capabilities = __esm({
|
|
724875
|
+
"packages/cli/src/tui/terminal-capabilities.ts"() {
|
|
724876
|
+
}
|
|
724877
|
+
});
|
|
724878
|
+
|
|
724850
724879
|
// packages/cli/src/tui/stageIndicator.ts
|
|
724851
724880
|
function stageForToolName(toolName) {
|
|
724852
724881
|
const name10 = String(toolName ?? "").trim().toLowerCase();
|
|
@@ -724926,6 +724955,9 @@ function supportsTruecolor() {
|
|
|
724926
724955
|
term
|
|
724927
724956
|
);
|
|
724928
724957
|
}
|
|
724958
|
+
function supportsAnimatedTuiChrome() {
|
|
724959
|
+
return supportsTruecolor() && !prefersStaticTuiChrome();
|
|
724960
|
+
}
|
|
724929
724961
|
function isSweepingStage(stage2) {
|
|
724930
724962
|
return SWEEPING_STAGES.has(stage2);
|
|
724931
724963
|
}
|
|
@@ -725033,6 +725065,7 @@ function onStageChange(cb) {
|
|
|
725033
725065
|
var STAGE_META, SWEEPING_STAGES, MAX_GRADIENT_COLS, STAGE_HUE_SPAN, HUE_LUT, _currentStage, _currentDetail, _subscribers;
|
|
725034
725066
|
var init_stageIndicator = __esm({
|
|
725035
725067
|
"packages/cli/src/tui/stageIndicator.ts"() {
|
|
725068
|
+
init_terminal_capabilities();
|
|
725036
725069
|
STAGE_META = {
|
|
725037
725070
|
idle: { label: "idle", weight: "neutral", baseHue: 210 },
|
|
725038
725071
|
planning: { label: "planning", weight: "active", baseHue: 265 },
|
|
@@ -725113,7 +725146,7 @@ function appendSubAgentActivity(entry, value2, maxLines = 3) {
|
|
|
725113
725146
|
}
|
|
725114
725147
|
entry.updatedAt = Date.now();
|
|
725115
725148
|
}
|
|
725116
|
-
function buildSubAgentLiveBlockLines(sourceEntries, width, phase, truecolor =
|
|
725149
|
+
function buildSubAgentLiveBlockLines(sourceEntries, width, phase, truecolor = supportsAnimatedTuiChrome()) {
|
|
725117
725150
|
const entries2 = Array.from(sourceEntries).slice(-MAX_PREVIEW_AGENTS);
|
|
725118
725151
|
if (entries2.length === 0) return [];
|
|
725119
725152
|
const w = Math.max(48, Math.floor(width));
|
|
@@ -725218,7 +725251,7 @@ function trajectoryStage(checkpoint) {
|
|
|
725218
725251
|
return "planning";
|
|
725219
725252
|
}
|
|
725220
725253
|
}
|
|
725221
|
-
function buildTrajectoryLiveBlockLines(checkpoint, width, phase, truecolor =
|
|
725254
|
+
function buildTrajectoryLiveBlockLines(checkpoint, width, phase, truecolor = supportsAnimatedTuiChrome()) {
|
|
725222
725255
|
if (!checkpoint) return [];
|
|
725223
725256
|
const w = Math.max(48, Math.floor(width));
|
|
725224
725257
|
const inner = Math.max(1, w - 4);
|
|
@@ -725284,7 +725317,7 @@ function buildTrajectoryLiveBlockLines(checkpoint, width, phase, truecolor = sup
|
|
|
725284
725317
|
lines.push(paintBlockBorder(bottom, stage2, phase, truecolor));
|
|
725285
725318
|
return lines;
|
|
725286
725319
|
}
|
|
725287
|
-
function buildTrajectoryLiveBlockCollapsedLine(checkpoint, width, phase, truecolor =
|
|
725320
|
+
function buildTrajectoryLiveBlockCollapsedLine(checkpoint, width, phase, truecolor = supportsAnimatedTuiChrome()) {
|
|
725288
725321
|
if (!checkpoint) return [];
|
|
725289
725322
|
const stage2 = trajectoryStage(checkpoint);
|
|
725290
725323
|
const w = Math.max(24, Math.floor(width));
|
|
@@ -725348,7 +725381,7 @@ function expandedRowCap() {
|
|
|
725348
725381
|
}
|
|
725349
725382
|
function paintActiveRowGradient(text3) {
|
|
725350
725383
|
const { stage: stage2 } = getStage();
|
|
725351
|
-
if (!
|
|
725384
|
+
if (!supportsAnimatedTuiChrome() || !isSweepingStage(stage2)) return null;
|
|
725352
725385
|
let out = "";
|
|
725353
725386
|
const SEG = 2;
|
|
725354
725387
|
for (let i2 = 0; i2 < text3.length; i2 += SEG) {
|
|
@@ -725389,8 +725422,8 @@ function setTuiTasksSession(sessionId) {
|
|
|
725389
725422
|
function onTuiTasksHeightChange(cb) {
|
|
725390
725423
|
_onResizeChange = cb;
|
|
725391
725424
|
}
|
|
725392
|
-
function setTuiTasksEnabled(
|
|
725393
|
-
_enabled =
|
|
725425
|
+
function setTuiTasksEnabled(enabled3) {
|
|
725426
|
+
_enabled = enabled3;
|
|
725394
725427
|
scheduleRedraw();
|
|
725395
725428
|
}
|
|
725396
725429
|
function setTuiTasksScope(scope) {
|
|
@@ -727958,10 +727991,6 @@ __export(status_bar_exports, {
|
|
|
727958
727991
|
});
|
|
727959
727992
|
import { basename as basename35, dirname as dirname63 } from "node:path";
|
|
727960
727993
|
import { readFile as readFileAsync } from "node:fs/promises";
|
|
727961
|
-
function headerButtonGlyphFg() {
|
|
727962
|
-
const a2 = tuiAccent();
|
|
727963
|
-
return a2 < 0 ? "\x1B[39m" : `\x1B[38;5;${a2}m`;
|
|
727964
|
-
}
|
|
727965
727994
|
function headerButtonBg() {
|
|
727966
727995
|
const a2 = tuiAccent();
|
|
727967
727996
|
return a2 < 0 ? "\x1B[7m" : `\x1B[48;5;${a2}m`;
|
|
@@ -728033,7 +728062,6 @@ function refreshThemeVars() {
|
|
|
728033
728062
|
BOX_FG = tuiBoxFg();
|
|
728034
728063
|
TEXT_PRIMARY = tuiTextPrimary() < 0 ? 252 : tuiTextPrimary();
|
|
728035
728064
|
TEXT_DIM = tuiTextDim();
|
|
728036
|
-
HEADER_BUTTON_GLYPH_FG = headerButtonGlyphFg();
|
|
728037
728065
|
HEADER_BUTTON_BG = headerButtonBg();
|
|
728038
728066
|
HEADER_BUTTON_FG = headerButtonFg();
|
|
728039
728067
|
HEADER_ACCENT_BOLD_FG = headerAccentBoldFg();
|
|
@@ -728072,7 +728100,7 @@ function setTerminalTitle(task, version5) {
|
|
|
728072
728100
|
process.stdout.write(data);
|
|
728073
728101
|
}
|
|
728074
728102
|
}
|
|
728075
|
-
var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG_SEQ, CONTENT_BG_SEQ, BOX_FG, TEXT_PRIMARY, TEXT_DIM, NO_SUB_AGENTS_HEADER_LABEL,
|
|
728103
|
+
var EXPERT_TOOL_BASELINES, CONTEXT_SWITCH_OVERHEAD, TURN_PLANNING_OVERHEAD, DEFAULT_TOOL_BASELINE, CODE_READ_CHARS_PER_SEC, PROSE_READ_CHARS_PER_SEC, MIN_CONTENT_FOR_READING, CODE_CONTENT_TOOLS, PROSE_CONTENT_TOOLS, HumanSpeedTracker, PANEL_BG_SEQ, CONTENT_BG_SEQ, BOX_FG, TEXT_PRIMARY, TEXT_DIM, NO_SUB_AGENTS_HEADER_LABEL, HEADER_BUTTON_BG, HEADER_BUTTON_FG, HEADER_ACCENT_BOLD_FG, HEADER_TELEGRAM_FG, BOX_TL3, BOX_TR3, BOX_BL3, BOX_BR3, BOX_H3, BOX_V3, BOX_BJ, BOX_TJ, ENHANCE_SEG_INNER, ENHANCE_SPIN_FRAMES, _globalFooterLock, RESET4, CURSOR_BLINK_BLOCK, HEADER_BUTTON_LEFT, HEADER_BUTTON_RIGHT, SPONSOR_HEADER_LABEL_MAX, _termTitleWriter, StatusBar;
|
|
728076
728104
|
var init_status_bar = __esm({
|
|
728077
728105
|
"packages/cli/src/tui/status-bar.ts"() {
|
|
728078
728106
|
init_render();
|
|
@@ -728257,7 +728285,6 @@ var init_status_bar = __esm({
|
|
|
728257
728285
|
TEXT_PRIMARY = tuiTextPrimary() < 0 ? 252 : tuiTextPrimary();
|
|
728258
728286
|
TEXT_DIM = tuiTextDim();
|
|
728259
728287
|
NO_SUB_AGENTS_HEADER_LABEL = " no sub-agents ";
|
|
728260
|
-
HEADER_BUTTON_GLYPH_FG = headerButtonGlyphFg();
|
|
728261
728288
|
HEADER_BUTTON_BG = headerButtonBg();
|
|
728262
728289
|
HEADER_BUTTON_FG = headerButtonFg();
|
|
728263
728290
|
HEADER_ACCENT_BOLD_FG = headerAccentBoldFg();
|
|
@@ -728275,9 +728302,8 @@ var init_status_bar = __esm({
|
|
|
728275
728302
|
_globalFooterLock = false;
|
|
728276
728303
|
RESET4 = "\x1B[0m";
|
|
728277
728304
|
CURSOR_BLINK_BLOCK = "\x1B[1 q";
|
|
728278
|
-
|
|
728279
|
-
|
|
728280
|
-
HEADER_BUTTON_RIGHT = _isWindows ? "]" : "🭝";
|
|
728305
|
+
HEADER_BUTTON_LEFT = " ";
|
|
728306
|
+
HEADER_BUTTON_RIGHT = " ";
|
|
728281
728307
|
SPONSOR_HEADER_LABEL_MAX = 48;
|
|
728282
728308
|
_termTitleWriter = null;
|
|
728283
728309
|
StatusBar = class _StatusBar {
|
|
@@ -729029,8 +729055,8 @@ var init_status_bar = __esm({
|
|
|
729029
729055
|
* Each category paginates independently across N pages. */
|
|
729030
729056
|
/** Filled header button whose hue band follows the child agent's current action. */
|
|
729031
729057
|
paintAgentButton(content, stage2, active) {
|
|
729032
|
-
const useTruecolor =
|
|
729033
|
-
const chars = Array.from(content);
|
|
729058
|
+
const useTruecolor = supportsAnimatedTuiChrome();
|
|
729059
|
+
const chars = Array.from(`${HEADER_BUTTON_LEFT}${content}${HEADER_BUTTON_RIGHT}`);
|
|
729034
729060
|
let body = "";
|
|
729035
729061
|
for (let i2 = 0; i2 < chars.length; i2++) {
|
|
729036
729062
|
const char = chars[i2];
|
|
@@ -729044,21 +729070,13 @@ var init_status_bar = __esm({
|
|
|
729044
729070
|
body += `${active ? "\x1B[1m" : ""}\x1B[38;5;${contrastTextColor(fallback)}m\x1B[48;5;${fallback}m${char}\x1B[0m`;
|
|
729045
729071
|
}
|
|
729046
729072
|
}
|
|
729047
|
-
|
|
729048
|
-
const leftBorder = useTruecolor ? `\x1B[38;2;${lr};${lg};${lb}m` : `\x1B[38;5;${stageFallbackColor(stage2)}m`;
|
|
729049
|
-
const [rr, rg, rb] = stageGradientRgb(
|
|
729050
|
-
stage2,
|
|
729051
|
-
Math.max(0, chars.length - 1),
|
|
729052
|
-
this._stagePhase
|
|
729053
|
-
);
|
|
729054
|
-
const rightBorder = useTruecolor ? `\x1B[38;2;${rr};${rg};${rb}m` : `\x1B[38;5;${stageFallbackColor(stage2)}m`;
|
|
729055
|
-
return `${leftBorder}${HEADER_BUTTON_LEFT}${RESET4}` + body + `${RESET4}${PANEL_BG_SEQ}${rightBorder}${HEADER_BUTTON_RIGHT}${RESET4}${PANEL_BG_SEQ}`;
|
|
729073
|
+
return `${body}${RESET4}${PANEL_BG_SEQ}`;
|
|
729056
729074
|
}
|
|
729057
729075
|
paintAgentText(value2, stage2, offset = 0) {
|
|
729058
729076
|
const chars = Array.from(value2);
|
|
729059
729077
|
let out = "";
|
|
729060
729078
|
for (let i2 = 0; i2 < chars.length; i2++) {
|
|
729061
|
-
if (
|
|
729079
|
+
if (supportsAnimatedTuiChrome()) {
|
|
729062
729080
|
const [r2, g, b] = stageGradientRgb(stage2, i2 + offset, this._stagePhase);
|
|
729063
729081
|
out += `\x1B[38;2;${r2};${g};${b}m${chars[i2]}`;
|
|
729064
729082
|
} else {
|
|
@@ -729076,7 +729094,7 @@ var init_status_bar = __esm({
|
|
|
729076
729094
|
return `\x1B]8;;${cmdPrefix}\x07${label}\x1B]8;;\x07`;
|
|
729077
729095
|
};
|
|
729078
729096
|
const decorateMenuButton = (cmd, label) => {
|
|
729079
|
-
return `${
|
|
729097
|
+
return `${HEADER_BUTTON_BG}${HEADER_BUTTON_FG}${HEADER_BUTTON_LEFT}${label}${HEADER_BUTTON_RIGHT}\x1B[0m${PANEL_BG_SEQ}`;
|
|
729080
729098
|
};
|
|
729081
729099
|
const renderBtn = (cmd, label) => {
|
|
729082
729100
|
return linkify(cmd, decorateMenuButton(cmd, label));
|
|
@@ -729575,7 +729593,7 @@ var init_status_bar = __esm({
|
|
|
729575
729593
|
this.advanceStagePhase();
|
|
729576
729594
|
this.renderFooterPreserveCursor();
|
|
729577
729595
|
refreshTuiTasksAnimationFrame();
|
|
729578
|
-
if ((this._trajectoryLiveBlockAppended || this._subAgentLiveBlockAppended) && this._activeViewId === "main" &&
|
|
729596
|
+
if ((this._trajectoryLiveBlockAppended || this._subAgentLiveBlockAppended) && this._activeViewId === "main" && supportsAnimatedTuiChrome() && (this.stageBorderActive() || this.hasRunningChildAgentView())) {
|
|
729579
729597
|
this.refreshDynamicBlocks();
|
|
729580
729598
|
}
|
|
729581
729599
|
if (this._agentViews.size > 1 && (String(this.currentHeaderPanel).startsWith("sys-") || this._headerExpanded)) {
|
|
@@ -732466,7 +732484,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
732466
732484
|
/** True when the input-box border should flow with the stage gradient:
|
|
732467
732485
|
* a run is active (sweeping stage) and the terminal supports truecolor. */
|
|
732468
732486
|
stageBorderActive() {
|
|
732469
|
-
return
|
|
732487
|
+
return supportsAnimatedTuiChrome() && isSweepingStage(getStage().stage);
|
|
732470
732488
|
}
|
|
732471
732489
|
/** Paint a raw run of border glyphs with the current stage's gradient band
|
|
732472
732490
|
* (same hue range as the stage indicator block, so the box edges match
|
|
@@ -741288,14 +741306,14 @@ var require_templates = __commonJS({
|
|
|
741288
741306
|
return results;
|
|
741289
741307
|
}
|
|
741290
741308
|
function buildStyle(chalk, styles) {
|
|
741291
|
-
const
|
|
741309
|
+
const enabled3 = {};
|
|
741292
741310
|
for (const layer of styles) {
|
|
741293
741311
|
for (const style of layer.styles) {
|
|
741294
|
-
|
|
741312
|
+
enabled3[style[0]] = layer.inverse ? null : style.slice(1);
|
|
741295
741313
|
}
|
|
741296
741314
|
}
|
|
741297
741315
|
let current = chalk;
|
|
741298
|
-
for (const [styleName, styles2] of Object.entries(
|
|
741316
|
+
for (const [styleName, styles2] of Object.entries(enabled3)) {
|
|
741299
741317
|
if (!Array.isArray(styles2)) {
|
|
741300
741318
|
continue;
|
|
741301
741319
|
}
|
|
@@ -744635,15 +744653,15 @@ function endpointModelCountLabel(ep) {
|
|
|
744635
744653
|
return `all ${ep.models.length} models`;
|
|
744636
744654
|
}
|
|
744637
744655
|
async function stepModelSelection(config, rl, availableRows) {
|
|
744638
|
-
const
|
|
744639
|
-
const totalKnownModels =
|
|
744656
|
+
const enabled3 = config.endpoints.filter((ep) => ep.enabled);
|
|
744657
|
+
const totalKnownModels = enabled3.reduce((sum2, ep) => sum2 + ep.models.length, 0);
|
|
744640
744658
|
if (totalKnownModels === 0) {
|
|
744641
744659
|
renderWarning("No model lists were returned; sponsorship will expose each enabled endpoint's full model set.");
|
|
744642
744660
|
return true;
|
|
744643
744661
|
}
|
|
744644
744662
|
const modelSizesByUrl = /* @__PURE__ */ new Map();
|
|
744645
744663
|
await Promise.all(
|
|
744646
|
-
|
|
744664
|
+
enabled3.filter((ep) => ep.kind === "ollama" && ep.models.length > 0).map(async (ep) => {
|
|
744647
744665
|
const modelSizes = {};
|
|
744648
744666
|
try {
|
|
744649
744667
|
const resp = await fetch(`${ep.url}/api/tags`, { signal: AbortSignal.timeout(5e3) });
|
|
@@ -744661,14 +744679,14 @@ async function stepModelSelection(config, rl, availableRows) {
|
|
|
744661
744679
|
})
|
|
744662
744680
|
);
|
|
744663
744681
|
const selectedByUrl = new Map(
|
|
744664
|
-
|
|
744682
|
+
enabled3.map((ep) => [ep.url, new Set(selectedModelsForEndpoint(ep))])
|
|
744665
744683
|
);
|
|
744666
744684
|
const renderModelLabel = (item) => {
|
|
744667
744685
|
const size = modelSizesByUrl.get(item.endpoint?.url || "")?.[item.modelName];
|
|
744668
744686
|
return `${item.selected ? "[x]" : "[ ]"} ${item.modelName}${size ? ` (${size})` : ""}`;
|
|
744669
744687
|
};
|
|
744670
744688
|
const items = [{ key: "hdr", label: "Select Models to Sponsor", modelName: "", selected: false }];
|
|
744671
|
-
for (const ep of
|
|
744689
|
+
for (const ep of enabled3) {
|
|
744672
744690
|
items.push({
|
|
744673
744691
|
key: `endpoint:${ep.url}`,
|
|
744674
744692
|
label: `${ep.label}`,
|
|
@@ -744694,7 +744712,7 @@ async function stepModelSelection(config, rl, availableRows) {
|
|
|
744694
744712
|
items.push({ key: "all", label: " [A] Select all", modelName: "", selected: false });
|
|
744695
744713
|
items.push({ key: "none", label: " [N] Select none", modelName: "", selected: false });
|
|
744696
744714
|
items.push({ key: "done", label: selectColors.green(" Done →"), modelName: "", selected: false });
|
|
744697
|
-
const endpointSkipKeys =
|
|
744715
|
+
const endpointSkipKeys = enabled3.map((ep) => `endpoint:${ep.url}`);
|
|
744698
744716
|
const result = await tuiSelect({
|
|
744699
744717
|
items,
|
|
744700
744718
|
title: "Step 2/6 — Model Selection",
|
|
@@ -744754,7 +744772,7 @@ async function stepModelSelection(config, rl, availableRows) {
|
|
|
744754
744772
|
renderWarning("Select at least one model before continuing.");
|
|
744755
744773
|
return stepModelSelection(config, rl, availableRows);
|
|
744756
744774
|
}
|
|
744757
|
-
for (const ep of
|
|
744775
|
+
for (const ep of enabled3) {
|
|
744758
744776
|
if (ep.models.length === 0) {
|
|
744759
744777
|
ep.selectedModels = void 0;
|
|
744760
744778
|
continue;
|
|
@@ -751814,11 +751832,11 @@ function writeDirectTerminal(data) {
|
|
|
751814
751832
|
}
|
|
751815
751833
|
}
|
|
751816
751834
|
}
|
|
751817
|
-
function setRawInputMode(
|
|
751835
|
+
function setRawInputMode(enabled3) {
|
|
751818
751836
|
const stdinAny = process.stdin;
|
|
751819
751837
|
try {
|
|
751820
751838
|
if (stdinAny && stdinAny.isTTY && typeof stdinAny.setRawMode === "function") {
|
|
751821
|
-
stdinAny.setRawMode(
|
|
751839
|
+
stdinAny.setRawMode(enabled3);
|
|
751822
751840
|
}
|
|
751823
751841
|
} catch {
|
|
751824
751842
|
}
|
|
@@ -762299,7 +762317,7 @@ async function chooseLiveCameraFps(ctx3, manager, deviceId) {
|
|
|
762299
762317
|
async function showLiveCameraMenu(ctx3, manager, device2) {
|
|
762300
762318
|
while (true) {
|
|
762301
762319
|
const selected = manager.getConfig().selectedCamera === device2.id;
|
|
762302
|
-
const
|
|
762320
|
+
const enabled3 = manager.isCameraStreamEnabled(device2.id);
|
|
762303
762321
|
const resolution = manager.getCameraStreamResolution(device2.id);
|
|
762304
762322
|
const fps = manager.getCameraStreamFps(device2.id);
|
|
762305
762323
|
const items = [
|
|
@@ -762315,7 +762333,7 @@ async function showLiveCameraMenu(ctx3, manager, device2) {
|
|
|
762315
762333
|
},
|
|
762316
762334
|
{
|
|
762317
762335
|
key: "toggle",
|
|
762318
|
-
label:
|
|
762336
|
+
label: enabled3 ? "Disable This Camera Stream" : "Enable This Camera Stream",
|
|
762319
762337
|
detail: "disabled cameras stay available but do not consume ffmpeg/vision resources"
|
|
762320
762338
|
},
|
|
762321
762339
|
{
|
|
@@ -762356,7 +762374,7 @@ async function showLiveCameraMenu(ctx3, manager, device2) {
|
|
|
762356
762374
|
const result = await tuiSelect({
|
|
762357
762375
|
items,
|
|
762358
762376
|
title: `Live Camera — ${device2.id}`,
|
|
762359
|
-
activeKey: selected ? "select" :
|
|
762377
|
+
activeKey: selected ? "select" : enabled3 ? "toggle" : void 0,
|
|
762360
762378
|
rl: ctx3.rl,
|
|
762361
762379
|
availableRows: ctx3.availableContentRows?.(),
|
|
762362
762380
|
skipKeys: liveSkipKeys(items)
|
|
@@ -762369,8 +762387,8 @@ async function showLiveCameraMenu(ctx3, manager, device2) {
|
|
|
762369
762387
|
renderInfo(`Selected camera ${device2.id}.`);
|
|
762370
762388
|
continue;
|
|
762371
762389
|
case "toggle":
|
|
762372
|
-
manager.setCameraStreamEnabled(device2.id, !
|
|
762373
|
-
renderInfo(`${!
|
|
762390
|
+
manager.setCameraStreamEnabled(device2.id, !enabled3);
|
|
762391
|
+
renderInfo(`${!enabled3 ? "Enabled" : "Disabled"} camera stream ${device2.id}.`);
|
|
762374
762392
|
continue;
|
|
762375
762393
|
case "resolution": {
|
|
762376
762394
|
const next = await chooseLiveCameraResolution(ctx3, manager, device2.id);
|
|
@@ -762542,9 +762560,9 @@ async function handleLiveCommand(ctx3, arg) {
|
|
|
762542
762560
|
renderWarning("No camera selected. Use /live camera <device> first.");
|
|
762543
762561
|
return;
|
|
762544
762562
|
}
|
|
762545
|
-
const
|
|
762546
|
-
manager.setCameraStreamEnabled(device2,
|
|
762547
|
-
renderInfo(`${
|
|
762563
|
+
const enabled3 = sub2 === "camera-on" || sub2 === "camera-enable";
|
|
762564
|
+
manager.setCameraStreamEnabled(device2, enabled3);
|
|
762565
|
+
renderInfo(`${enabled3 ? "Enabled" : "Disabled"} camera stream ${device2}.`);
|
|
762548
762566
|
return;
|
|
762549
762567
|
}
|
|
762550
762568
|
if (sub2 === "video") {
|
|
@@ -762561,8 +762579,8 @@ async function handleLiveCommand(ctx3, arg) {
|
|
|
762561
762579
|
}
|
|
762562
762580
|
if (sub2 === "asr") {
|
|
762563
762581
|
const cfg = manager.getConfig();
|
|
762564
|
-
const
|
|
762565
|
-
if (
|
|
762582
|
+
const enabled3 = setBool(value2, !cfg.asrEnabled);
|
|
762583
|
+
if (enabled3) {
|
|
762566
762584
|
manager.configure({ audioEnabled: true, asrEnabled: false });
|
|
762567
762585
|
const asrStarted = await ensureLiveStreamingAsr(ctx3, manager, true);
|
|
762568
762586
|
manager.configure({ asrEnabled: asrStarted });
|
|
@@ -762782,9 +762800,9 @@ async function handleCameraCommand(ctx3, arg) {
|
|
|
762782
762800
|
renderWarning("No camera selected. Use /camera select <device> first.");
|
|
762783
762801
|
return;
|
|
762784
762802
|
}
|
|
762785
|
-
const
|
|
762786
|
-
manager.setCameraStreamEnabled(device2,
|
|
762787
|
-
renderInfo(`${
|
|
762803
|
+
const enabled3 = sub2 === "on" || sub2 === "enable";
|
|
762804
|
+
manager.setCameraStreamEnabled(device2, enabled3);
|
|
762805
|
+
renderInfo(`${enabled3 ? "Enabled" : "Disabled"} camera stream ${device2}.`);
|
|
762788
762806
|
return;
|
|
762789
762807
|
}
|
|
762790
762808
|
if (sub2 === "resolution" || sub2 === "res" || sub2 === "size") {
|
|
@@ -778904,9 +778922,9 @@ function setInferenceThinkingVisible(state5, visible) {
|
|
|
778904
778922
|
state5.showThinking = visible;
|
|
778905
778923
|
state5.version++;
|
|
778906
778924
|
}
|
|
778907
|
-
function setInferenceReadMode(state5,
|
|
778908
|
-
if (state5.readMode ===
|
|
778909
|
-
state5.readMode =
|
|
778925
|
+
function setInferenceReadMode(state5, enabled3) {
|
|
778926
|
+
if (state5.readMode === enabled3) return;
|
|
778927
|
+
state5.readMode = enabled3;
|
|
778910
778928
|
state5.version++;
|
|
778911
778929
|
}
|
|
778912
778930
|
function setInferenceReportedCompletionTokens(state5, completionTokens) {
|
|
@@ -809932,7 +809950,7 @@ ${this.quoteTelegramContextBlock(msg.text, 800)}`,
|
|
|
809932
809950
|
telegramToolPolicy: this.cloneTelegramToolPolicy(this.telegramToolPolicy)
|
|
809933
809951
|
});
|
|
809934
809952
|
}
|
|
809935
|
-
setTelegramToolGroupPolicy(args,
|
|
809953
|
+
setTelegramToolGroupPolicy(args, enabled3, targetChatId) {
|
|
809936
809954
|
const group = String(args["group"] || "").trim().toLowerCase();
|
|
809937
809955
|
if (!TELEGRAM_TOOL_ACTION_GROUPS.includes(group))
|
|
809938
809956
|
throw new Error(`Unknown Telegram action group: ${group || "(missing)"}`);
|
|
@@ -809943,26 +809961,26 @@ ${this.quoteTelegramContextBlock(msg.text, 800)}`,
|
|
|
809943
809961
|
const override = this.telegramToolPolicy.chatOverrides[key2] ?? {};
|
|
809944
809962
|
override.enabledActionGroups = {
|
|
809945
809963
|
...override.enabledActionGroups ?? {},
|
|
809946
|
-
[group]:
|
|
809964
|
+
[group]: enabled3
|
|
809947
809965
|
};
|
|
809948
809966
|
this.telegramToolPolicy.chatOverrides[key2] = override;
|
|
809949
809967
|
} else {
|
|
809950
809968
|
this.telegramToolPolicy.enabledActionGroups = {
|
|
809951
809969
|
...this.telegramToolPolicy.enabledActionGroups ?? {},
|
|
809952
|
-
[group]:
|
|
809970
|
+
[group]: enabled3
|
|
809953
809971
|
};
|
|
809954
809972
|
}
|
|
809955
809973
|
this.persistTelegramToolPolicy();
|
|
809956
809974
|
return {
|
|
809957
809975
|
ok: true,
|
|
809958
|
-
action:
|
|
809976
|
+
action: enabled3 ? "enable_group" : "disable_group",
|
|
809959
809977
|
group,
|
|
809960
809978
|
scope: target.scope,
|
|
809961
809979
|
chat_id: target.chatId,
|
|
809962
|
-
enabled:
|
|
809980
|
+
enabled: enabled3
|
|
809963
809981
|
};
|
|
809964
809982
|
}
|
|
809965
|
-
setTelegramToolActionPolicy(args,
|
|
809983
|
+
setTelegramToolActionPolicy(args, enabled3, targetChatId) {
|
|
809966
809984
|
const toolAction = String(
|
|
809967
809985
|
args["tool_action"] ?? args["telegram_action"] ?? ""
|
|
809968
809986
|
).trim().toLowerCase();
|
|
@@ -809975,23 +809993,23 @@ ${this.quoteTelegramContextBlock(msg.text, 800)}`,
|
|
|
809975
809993
|
const override = this.telegramToolPolicy.chatOverrides[key2] ?? {};
|
|
809976
809994
|
override.enabledActions = {
|
|
809977
809995
|
...override.enabledActions ?? {},
|
|
809978
|
-
[toolAction]:
|
|
809996
|
+
[toolAction]: enabled3
|
|
809979
809997
|
};
|
|
809980
809998
|
this.telegramToolPolicy.chatOverrides[key2] = override;
|
|
809981
809999
|
} else {
|
|
809982
810000
|
this.telegramToolPolicy.enabledActions = {
|
|
809983
810001
|
...this.telegramToolPolicy.enabledActions ?? {},
|
|
809984
|
-
[toolAction]:
|
|
810002
|
+
[toolAction]: enabled3
|
|
809985
810003
|
};
|
|
809986
810004
|
}
|
|
809987
810005
|
this.persistTelegramToolPolicy();
|
|
809988
810006
|
return {
|
|
809989
810007
|
ok: true,
|
|
809990
|
-
action:
|
|
810008
|
+
action: enabled3 ? "enable_action" : "disable_action",
|
|
809991
810009
|
tool_action: toolAction,
|
|
809992
810010
|
scope: target.scope,
|
|
809993
810011
|
chat_id: target.chatId,
|
|
809994
|
-
enabled:
|
|
810012
|
+
enabled: enabled3
|
|
809995
810013
|
};
|
|
809996
810014
|
}
|
|
809997
810015
|
telegramToolButtonPath(nonce) {
|
|
@@ -810021,9 +810039,9 @@ ${this.quoteTelegramContextBlock(msg.text, 800)}`,
|
|
|
810021
810039
|
const policyChatId = state5.policyScope === "chat" ? state5.policyChatId : void 0;
|
|
810022
810040
|
const effective = this.effectiveTelegramToolPolicy(policyChatId);
|
|
810023
810041
|
const rows = TELEGRAM_TOOL_ACTION_GROUPS.map((group) => {
|
|
810024
|
-
const
|
|
810042
|
+
const enabled3 = effective.enabledActionGroups?.[group] ?? DEFAULT_TELEGRAM_TOOL_GROUP_POLICY[group];
|
|
810025
810043
|
return {
|
|
810026
|
-
text: `${
|
|
810044
|
+
text: `${enabled3 ? "[x]" : "[ ]"} ${TELEGRAM_TOOL_BUTTON_LABELS[group]}`,
|
|
810027
810045
|
callback_data: `omni:v1:tgtool:${state5.nonce}:group:${group}`
|
|
810028
810046
|
};
|
|
810029
810047
|
});
|
|
@@ -810480,17 +810498,17 @@ ${this.quoteTelegramContextBlock(msg.text, 800)}`,
|
|
|
810480
810498
|
if (!TELEGRAM_TOOL_ACTION_GROUPS.includes(group))
|
|
810481
810499
|
throw new Error(`Unknown group: ${value2}`);
|
|
810482
810500
|
const policy = this.effectiveTelegramToolPolicy(state5.policyChatId);
|
|
810483
|
-
const
|
|
810501
|
+
const enabled3 = !(policy.enabledActionGroups?.[group] ?? DEFAULT_TELEGRAM_TOOL_GROUP_POLICY[group]);
|
|
810484
810502
|
this.setTelegramToolGroupPolicy(
|
|
810485
810503
|
{
|
|
810486
810504
|
group,
|
|
810487
810505
|
scope: state5.policyScope,
|
|
810488
810506
|
...state5.policyChatId !== void 0 ? { target: String(state5.policyChatId) } : {}
|
|
810489
810507
|
},
|
|
810490
|
-
|
|
810508
|
+
enabled3,
|
|
810491
810509
|
state5.policyChatId
|
|
810492
810510
|
);
|
|
810493
|
-
answerText = `${TELEGRAM_TOOL_BUTTON_LABELS[group]} ${
|
|
810511
|
+
answerText = `${TELEGRAM_TOOL_BUTTON_LABELS[group]} ${enabled3 ? "enabled" : "disabled"}.`;
|
|
810494
810512
|
} else if (kind === "flag" && value2 === "dryrun") {
|
|
810495
810513
|
this.setTelegramToolBooleanPolicy(
|
|
810496
810514
|
state5,
|
|
@@ -815120,12 +815138,12 @@ function buildSyntheticContext(config, repoRoot) {
|
|
|
815120
815138
|
return mode === "auto" ? "Auto mode: transcriptions auto-submit after 3s silence" : "Manual mode: press Enter to submit transcriptions (auto-submit off)";
|
|
815121
815139
|
},
|
|
815122
815140
|
getColors: () => colorsEnabled,
|
|
815123
|
-
setColors: (
|
|
815124
|
-
colorsEnabled =
|
|
815141
|
+
setColors: (enabled3) => {
|
|
815142
|
+
colorsEnabled = enabled3;
|
|
815125
815143
|
},
|
|
815126
815144
|
getSelfModify: () => selfModifyEnabled,
|
|
815127
|
-
setSelfModify: (
|
|
815128
|
-
selfModifyEnabled =
|
|
815145
|
+
setSelfModify: (enabled3) => {
|
|
815146
|
+
selfModifyEnabled = enabled3;
|
|
815129
815147
|
},
|
|
815130
815148
|
saveSettings: (settings) => {
|
|
815131
815149
|
saveProjectSettings(root, settings);
|
|
@@ -823948,8 +823966,8 @@ The user pasted a clipboard image saved at ${relPath}. Use the OCR, vision analy
|
|
|
823948
823966
|
getRealtime() {
|
|
823949
823967
|
return realtimeEnabled;
|
|
823950
823968
|
},
|
|
823951
|
-
setRealtime(
|
|
823952
|
-
realtimeEnabled =
|
|
823969
|
+
setRealtime(enabled3) {
|
|
823970
|
+
realtimeEnabled = enabled3;
|
|
823953
823971
|
},
|
|
823954
823972
|
thinkToggle() {
|
|
823955
823973
|
thinkingEnabled = !thinkingEnabled;
|
|
@@ -824023,8 +824041,8 @@ The user pasted a clipboard image saved at ${relPath}. Use the OCR, vision analy
|
|
|
824023
824041
|
getSelfModify() {
|
|
824024
824042
|
return selfModifyEnabled;
|
|
824025
824043
|
},
|
|
824026
|
-
setSelfModify(
|
|
824027
|
-
selfModifyEnabled =
|
|
824044
|
+
setSelfModify(enabled3) {
|
|
824045
|
+
selfModifyEnabled = enabled3;
|
|
824028
824046
|
},
|
|
824029
824047
|
setStyle(preset) {
|
|
824030
824048
|
currentStyle = preset;
|
|
@@ -825669,9 +825687,9 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
825669
825687
|
}
|
|
825670
825688
|
},
|
|
825671
825689
|
getEmojis: () => getEmojisEnabled(),
|
|
825672
|
-
setEmojis: (
|
|
825690
|
+
setEmojis: (enabled3) => setEmojisEnabled(enabled3),
|
|
825673
825691
|
getColors: () => getColorsEnabled(),
|
|
825674
|
-
setColors: (
|
|
825692
|
+
setColors: (enabled3) => setColorsEnabled(enabled3),
|
|
825675
825693
|
setContextWindowSize: (size) => {
|
|
825676
825694
|
resolvedContextWindowSize = size;
|
|
825677
825695
|
statusBar.setContextWindowSize(size);
|
|
@@ -861936,22 +861954,22 @@ data: ${JSON.stringify(data)}
|
|
|
861936
861954
|
const parts = pathname.split("/");
|
|
861937
861955
|
const id2 = parts[3] ?? "";
|
|
861938
861956
|
const body = await parseJsonBody(req3);
|
|
861939
|
-
const
|
|
861940
|
-
if (!id2 || typeof
|
|
861957
|
+
const enabled3 = typeof body?.enabled === "boolean" ? body.enabled : void 0;
|
|
861958
|
+
if (!id2 || typeof enabled3 === "undefined") {
|
|
861941
861959
|
jsonResponse(res, 400, { error: "Missing id or enabled flag" });
|
|
861942
861960
|
return;
|
|
861943
861961
|
}
|
|
861944
861962
|
let ok3 = false;
|
|
861945
861963
|
if (id2.startsWith("timer:")) {
|
|
861946
861964
|
const name10 = id2.slice("timer:".length);
|
|
861947
|
-
ok3 = setTimerEnabled(name10,
|
|
861965
|
+
ok3 = setTimerEnabled(name10, enabled3);
|
|
861948
861966
|
} else {
|
|
861949
|
-
ok3 = setScheduledEnabled(id2,
|
|
861967
|
+
ok3 = setScheduledEnabled(id2, enabled3);
|
|
861950
861968
|
}
|
|
861951
861969
|
jsonResponse(
|
|
861952
861970
|
res,
|
|
861953
861971
|
ok3 ? 200 : 404,
|
|
861954
|
-
ok3 ? { id: id2, enabled:
|
|
861972
|
+
ok3 ? { id: id2, enabled: enabled3 } : { error: "Not found" }
|
|
861955
861973
|
);
|
|
861956
861974
|
return;
|
|
861957
861975
|
}
|
|
@@ -863759,7 +863777,7 @@ function listScheduledTasks() {
|
|
|
863759
863777
|
const schedule = String(
|
|
863760
863778
|
t2?.schedule || t2?.cron || t2?.when || ""
|
|
863761
863779
|
);
|
|
863762
|
-
const
|
|
863780
|
+
const enabled3 = typeof t2?.enabled === "boolean" ? t2.enabled : true;
|
|
863763
863781
|
const realId = typeof t2?.id === "string" && t2.id ? t2.id : null;
|
|
863764
863782
|
const fallbackId = createHash86("sha1").update(`${file}#${i2}`).digest("hex").slice(0, 16);
|
|
863765
863783
|
const uid = realId || fallbackId;
|
|
@@ -863772,7 +863790,7 @@ function listScheduledTasks() {
|
|
|
863772
863790
|
index: i2,
|
|
863773
863791
|
name: name10,
|
|
863774
863792
|
schedule,
|
|
863775
|
-
enabled:
|
|
863793
|
+
enabled: enabled3
|
|
863776
863794
|
});
|
|
863777
863795
|
});
|
|
863778
863796
|
} catch {
|
|
@@ -863842,7 +863860,7 @@ function walk(dir, depth, onDir, maxDepth) {
|
|
|
863842
863860
|
walk(child2, depth + 1, onDir, maxDepth);
|
|
863843
863861
|
}
|
|
863844
863862
|
}
|
|
863845
|
-
function setScheduledEnabled(id2,
|
|
863863
|
+
function setScheduledEnabled(id2, enabled3) {
|
|
863846
863864
|
const tasks = listScheduledTasks();
|
|
863847
863865
|
const target = tasks.find((t2) => t2.id === id2);
|
|
863848
863866
|
if (!target) return false;
|
|
@@ -863851,7 +863869,7 @@ function setScheduledEnabled(id2, enabled2) {
|
|
|
863851
863869
|
const json2 = JSON.parse(raw);
|
|
863852
863870
|
const arr = Array.isArray(json2?.tasks) ? json2.tasks : Array.isArray(json2) ? json2 : [];
|
|
863853
863871
|
if (!arr[target.index]) return false;
|
|
863854
|
-
arr[target.index].enabled =
|
|
863872
|
+
arr[target.index].enabled = enabled3;
|
|
863855
863873
|
if (Array.isArray(json2?.tasks)) {
|
|
863856
863874
|
json2.tasks = arr;
|
|
863857
863875
|
writeFileSync114(target.file, JSON.stringify(json2, null, 2));
|
|
@@ -863860,7 +863878,7 @@ function setScheduledEnabled(id2, enabled2) {
|
|
|
863860
863878
|
} else {
|
|
863861
863879
|
writeFileSync114(target.file, JSON.stringify({ tasks: arr }, null, 2));
|
|
863862
863880
|
}
|
|
863863
|
-
if (!
|
|
863881
|
+
if (!enabled3) {
|
|
863864
863882
|
try {
|
|
863865
863883
|
removeCronByMarker(id2);
|
|
863866
863884
|
} catch {
|
|
@@ -865937,11 +865955,11 @@ function disableUserTimerById(id2) {
|
|
|
865937
865955
|
} catch {
|
|
865938
865956
|
}
|
|
865939
865957
|
}
|
|
865940
|
-
function setTimerEnabled(name10,
|
|
865958
|
+
function setTimerEnabled(name10, enabled3) {
|
|
865941
865959
|
try {
|
|
865942
865960
|
const unit = `${name10}.timer`;
|
|
865943
865961
|
const { execSync: es } = require4("node:child_process");
|
|
865944
|
-
if (
|
|
865962
|
+
if (enabled3) es(`systemctl --user enable --now ${unit}`, { stdio: "pipe" });
|
|
865945
865963
|
else es(`systemctl --user disable --now ${unit}`, { stdio: "pipe" });
|
|
865946
865964
|
return true;
|
|
865947
865965
|
} catch {
|
|
@@ -25,6 +25,12 @@ Shift+Enter inserts a newline in the prompt box and expands the input area. Ente
|
|
|
25
25
|
|
|
26
26
|
The input box should preserve Unicode line boundaries and avoid overwriting previous lower entries.
|
|
27
27
|
|
|
28
|
+
## Terminal Compatibility
|
|
29
|
+
|
|
30
|
+
Header controls use background-filled square padding instead of rare ornamental Unicode edge glyphs. This prevents replacement-character boxes when the client font lacks Symbols for Legacy Computing coverage.
|
|
31
|
+
|
|
32
|
+
Animated border colors are disabled on macOS, Windows, limited terminals, and SSH sessions. An SSH host cannot reliably detect the client operating system or font. A known-good Linux or Unix SSH client can opt back in with `OMNIUS_TUI_ANIMATED_CHROME=1`. Set `OMNIUS_TUI_STATIC_CHROME=1` to force stable single-color borders on any platform.
|
|
33
|
+
|
|
28
34
|
## Shell Output
|
|
29
35
|
|
|
30
36
|
Shell command output is rendered inside bounded Unicode cards. Dynamic installer output should update inside the shell block with a mini-scroll effect instead of corrupting adjacent UI.
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.683",
|
|
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.683",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED