omnius 1.0.705 → 1.0.707
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 +395 -123
- package/dist/launcher.cjs +7 -2
- package/dist/update-worker.js +1 -1
- package/npm-shrinkwrap.json +36 -36
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1083,20 +1083,38 @@ async function fetchLatestVersion() {
|
|
|
1083
1083
|
return null;
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
1086
|
-
async function
|
|
1086
|
+
async function queryUpdateStatus(currentVersion, forceCheck = false) {
|
|
1087
1087
|
const cache8 = loadCache();
|
|
1088
1088
|
const now2 = Date.now();
|
|
1089
1089
|
let latest = cache8.latestVersion;
|
|
1090
|
-
if (forceCheck || now2 - cache8.lastCheck
|
|
1091
|
-
|
|
1092
|
-
|
|
1090
|
+
if (forceCheck || now2 - cache8.lastCheck >= UPDATE_CHECK_INTERVAL_MS) {
|
|
1091
|
+
const fetched = await fetchLatestVersion();
|
|
1092
|
+
if (fetched) {
|
|
1093
|
+
latest = fetched;
|
|
1094
|
+
saveCache({ lastCheck: now2, latestVersion: fetched });
|
|
1095
|
+
} else if (!latest || !isNewer(latest, currentVersion)) {
|
|
1096
|
+
return {
|
|
1097
|
+
status: "unavailable",
|
|
1098
|
+
currentVersion,
|
|
1099
|
+
latestVersion: latest
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1093
1102
|
}
|
|
1094
|
-
if (!latest)
|
|
1095
|
-
|
|
1103
|
+
if (!latest) {
|
|
1104
|
+
return { status: "unavailable", currentVersion, latestVersion: null };
|
|
1105
|
+
}
|
|
1106
|
+
if (!isNewer(latest, currentVersion)) {
|
|
1107
|
+
return { status: "current", currentVersion, latestVersion: latest };
|
|
1108
|
+
}
|
|
1109
|
+
return { status: "available", currentVersion, latestVersion: latest };
|
|
1110
|
+
}
|
|
1111
|
+
async function checkForUpdate(currentVersion, forceCheck = false) {
|
|
1112
|
+
const result = await queryUpdateStatus(currentVersion, forceCheck);
|
|
1113
|
+
if (result.status !== "available" || !result.latestVersion) return null;
|
|
1096
1114
|
return {
|
|
1097
1115
|
updateAvailable: true,
|
|
1098
1116
|
currentVersion,
|
|
1099
|
-
latestVersion:
|
|
1117
|
+
latestVersion: result.latestVersion
|
|
1100
1118
|
};
|
|
1101
1119
|
}
|
|
1102
1120
|
function formatUpdateBanner(info) {
|
|
@@ -1105,13 +1123,13 @@ function formatUpdateBanner(info) {
|
|
|
1105
1123
|
Run: npm i -g ${PACKAGE_NAME}@${info.latestVersion} or use /update in the REPL
|
|
1106
1124
|
`;
|
|
1107
1125
|
}
|
|
1108
|
-
var PACKAGE_NAME,
|
|
1126
|
+
var PACKAGE_NAME, UPDATE_CHECK_INTERVAL_MS, CACHE_DIR, CACHE_FILE;
|
|
1109
1127
|
var init_updater = __esm({
|
|
1110
1128
|
"packages/cli/src/updater.ts"() {
|
|
1111
1129
|
init_service_version();
|
|
1112
1130
|
init_update_service();
|
|
1113
1131
|
PACKAGE_NAME = "omnius";
|
|
1114
|
-
|
|
1132
|
+
UPDATE_CHECK_INTERVAL_MS = 60 * 1e3;
|
|
1115
1133
|
CACHE_DIR = resolveUpdatePaths().stateDir;
|
|
1116
1134
|
CACHE_FILE = join3(CACHE_DIR, "registry-check.json");
|
|
1117
1135
|
}
|
|
@@ -672621,13 +672639,30 @@ runtime_module_sha256=${record.runtimeProvenance.module.sha256 ?? "unknown"}`
|
|
|
672621
672639
|
_legacyModelVisibleCompactionAllowed() {
|
|
672622
672640
|
return this._memoryCompilationMode() !== "active";
|
|
672623
672641
|
}
|
|
672642
|
+
/**
|
|
672643
|
+
* Capacity used for compaction accounting. Provider/observed limits remain
|
|
672644
|
+
* authoritative when available. When metadata is absent, use the existing
|
|
672645
|
+
* tier ceiling as an explicitly labeled working budget; do not add it to the
|
|
672646
|
+
* backend request or pretend it was provider-reported.
|
|
672647
|
+
*/
|
|
672648
|
+
_contextBudget(request) {
|
|
672649
|
+
const known = this._contextAdmissionLimit(request);
|
|
672650
|
+
if (known.limit && known.source !== "unknown") {
|
|
672651
|
+
return { tokens: known.limit, source: known.source };
|
|
672652
|
+
}
|
|
672653
|
+
return {
|
|
672654
|
+
tokens: Math.max(1, this.effectiveContextWindow()),
|
|
672655
|
+
source: "tier_fallback"
|
|
672656
|
+
};
|
|
672657
|
+
}
|
|
672624
672658
|
/** Build the exact budget for the payload which will be sent to the backend. */
|
|
672625
672659
|
_outboundRequestBudget(request) {
|
|
672626
672660
|
const rawRequest = request;
|
|
672661
|
+
const contextBudget = this._contextBudget(request);
|
|
672627
672662
|
return compileOutboundRequestBudget({
|
|
672628
672663
|
messages: Array.isArray(rawRequest["messages"]) ? rawRequest["messages"] : [],
|
|
672629
672664
|
tools: Array.isArray(rawRequest["tools"]) ? rawRequest["tools"] : [],
|
|
672630
|
-
modelContextTokens: typeof rawRequest["numCtx"] === "number" ? rawRequest["numCtx"] : typeof rawRequest["num_ctx"] === "number" ? rawRequest["num_ctx"] :
|
|
672665
|
+
modelContextTokens: typeof rawRequest["numCtx"] === "number" ? rawRequest["numCtx"] : typeof rawRequest["num_ctx"] === "number" ? rawRequest["num_ctx"] : contextBudget.tokens,
|
|
672631
672666
|
outputReservationTokens: typeof rawRequest["maxTokens"] === "number" ? rawRequest["maxTokens"] : typeof rawRequest["max_tokens"] === "number" ? rawRequest["max_tokens"] : 0,
|
|
672632
672667
|
request: rawRequest
|
|
672633
672668
|
});
|
|
@@ -672976,6 +673011,54 @@ ${read3.content}`;
|
|
|
672976
673011
|
justification: "Inference-selected representations passed graph, artifact, and exact post-request budget validation."
|
|
672977
673012
|
});
|
|
672978
673013
|
}
|
|
673014
|
+
/** Publish a footer-only lifecycle around the active compiler boundary. */
|
|
673015
|
+
async _applyUnifiedMemoryCompilationWithLifecycle(request) {
|
|
673016
|
+
const preBudget = this._outboundRequestBudget(request);
|
|
673017
|
+
const shouldPublishLifecycle = this._memoryCompilationMode() === "active" && preBudget.compactionEligible;
|
|
673018
|
+
if (!shouldPublishLifecycle) {
|
|
673019
|
+
await this._applyUnifiedMemoryCompilation(request);
|
|
673020
|
+
return;
|
|
673021
|
+
}
|
|
673022
|
+
const contextBudget = this._contextBudget(request);
|
|
673023
|
+
this.emit({
|
|
673024
|
+
type: "status",
|
|
673025
|
+
content: "Compacting context",
|
|
673026
|
+
visibility: "user_progress",
|
|
673027
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
673028
|
+
compactionLifecycle: {
|
|
673029
|
+
state: "started",
|
|
673030
|
+
source: "unified",
|
|
673031
|
+
beforeTokens: preBudget.totalInputTokens,
|
|
673032
|
+
projectedTokens: preBudget.projectedTotalTokens,
|
|
673033
|
+
workingLimitTokens: contextBudget.tokens,
|
|
673034
|
+
limitSource: contextBudget.source
|
|
673035
|
+
}
|
|
673036
|
+
});
|
|
673037
|
+
let failed = true;
|
|
673038
|
+
try {
|
|
673039
|
+
await this._applyUnifiedMemoryCompilation(request);
|
|
673040
|
+
failed = false;
|
|
673041
|
+
} finally {
|
|
673042
|
+
const auditState = this._lastMemoryCompilationPlanAudit?.state;
|
|
673043
|
+
const state5 = failed ? "failed" : auditState === "applied" ? "applied" : auditState === "hold" ? "held" : auditState === "rejected" ? "rejected" : "failed";
|
|
673044
|
+
const afterTokens = state5 === "applied" ? this._outboundRequestBudget(request).totalInputTokens : void 0;
|
|
673045
|
+
this.emit({
|
|
673046
|
+
type: "status",
|
|
673047
|
+
content: `Context compaction ${state5}`,
|
|
673048
|
+
visibility: "user_progress",
|
|
673049
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
673050
|
+
compactionLifecycle: {
|
|
673051
|
+
state: state5,
|
|
673052
|
+
source: "unified",
|
|
673053
|
+
beforeTokens: preBudget.totalInputTokens,
|
|
673054
|
+
projectedTokens: preBudget.projectedTotalTokens,
|
|
673055
|
+
...afterTokens !== void 0 ? { afterTokens } : {},
|
|
673056
|
+
workingLimitTokens: contextBudget.tokens,
|
|
673057
|
+
limitSource: contextBudget.source
|
|
673058
|
+
}
|
|
673059
|
+
});
|
|
673060
|
+
}
|
|
673061
|
+
}
|
|
672979
673062
|
/**
|
|
672980
673063
|
* Evaluate the graph compiler against an exact, already-rendered request.
|
|
672981
673064
|
* This is shadow-only: it records a validated proposal but deliberately does
|
|
@@ -673888,19 +673971,13 @@ ${workflowStatus}` } : {}
|
|
|
673888
673971
|
return result;
|
|
673889
673972
|
}
|
|
673890
673973
|
async _recordContextWindowDump(stage3, request, turn, attempt) {
|
|
673891
|
-
await this.
|
|
673974
|
+
await this._applyUnifiedMemoryCompilationWithLifecycle(request);
|
|
673892
673975
|
const compilationAudit = this._lastMemoryCompilationPlanAudit;
|
|
673893
673976
|
this._applyContextAdmission(request);
|
|
673894
673977
|
this._applyCanonicalOutboundProjection(request, turn);
|
|
673895
673978
|
const agentType = this.options.artifactMode === "internal" ? "internal" : this.options.subAgent || this.options.recursionDepth > 0 ? "sub-agent" : "main";
|
|
673896
673979
|
const rawRequest = snapshotOutboundRequest(request);
|
|
673897
|
-
const exactBudget =
|
|
673898
|
-
messages: Array.isArray(rawRequest["messages"]) ? rawRequest["messages"] : [],
|
|
673899
|
-
tools: Array.isArray(rawRequest["tools"]) ? rawRequest["tools"] : [],
|
|
673900
|
-
modelContextTokens: typeof rawRequest["numCtx"] === "number" ? rawRequest["numCtx"] : typeof rawRequest["num_ctx"] === "number" ? rawRequest["num_ctx"] : 0,
|
|
673901
|
-
outputReservationTokens: typeof rawRequest["maxTokens"] === "number" ? rawRequest["maxTokens"] : typeof rawRequest["max_tokens"] === "number" ? rawRequest["max_tokens"] : 0,
|
|
673902
|
-
request: rawRequest
|
|
673903
|
-
});
|
|
673980
|
+
const exactBudget = this._outboundRequestBudget(rawRequest);
|
|
673904
673981
|
const memoryCompilerShadow = await this._runMemoryCompilerShadow(exactBudget);
|
|
673905
673982
|
const planAuditApplies = compilationAudit ? {
|
|
673906
673983
|
...compilationAudit,
|
|
@@ -673939,6 +674016,7 @@ ${workflowStatus}` } : {}
|
|
|
673939
674016
|
this.emit({
|
|
673940
674017
|
type: "status",
|
|
673941
674018
|
content: `Memory compiler shadow ${memoryCompilerShadow.decision}: ${memoryCompilerShadow.reason}`,
|
|
674019
|
+
visibility: "telemetry",
|
|
673942
674020
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
673943
674021
|
});
|
|
673944
674022
|
}
|
|
@@ -673956,6 +674034,7 @@ ${workflowStatus}` } : {}
|
|
|
673956
674034
|
this.emit({
|
|
673957
674035
|
type: "status",
|
|
673958
674036
|
content: `Memory compiler v2 ${planAuditApplies.state}: ${planAuditApplies.justification ?? "no additional detail"}`,
|
|
674037
|
+
visibility: "telemetry",
|
|
673959
674038
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
673960
674039
|
});
|
|
673961
674040
|
}
|
|
@@ -688479,6 +688558,8 @@ ${memoryLines.join("\n")}`
|
|
|
688479
688558
|
}
|
|
688480
688559
|
return sum2 + chars + imageCount * IMAGE_TOKEN_ESTIMATE * 4;
|
|
688481
688560
|
}, 0) / 4);
|
|
688561
|
+
const trackedContextTokens = turnPromptTokens > 0 ? turnPromptTokens : this._lastOutboundRequestBudget?.totalInputTokens ?? estimatedContextTokens;
|
|
688562
|
+
const contextBudget = this._contextBudget(chatRequest);
|
|
688482
688563
|
this.emit({
|
|
688483
688564
|
type: "token_usage",
|
|
688484
688565
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -688486,18 +688567,21 @@ ${memoryLines.join("\n")}`
|
|
|
688486
688567
|
promptTokens,
|
|
688487
688568
|
completionTokens,
|
|
688488
688569
|
totalTokens,
|
|
688489
|
-
estimatedContextTokens,
|
|
688570
|
+
estimatedContextTokens: trackedContextTokens,
|
|
688490
688571
|
lastPromptTokens: turnPromptTokens,
|
|
688491
|
-
lastCompletionTokens: turnCompletionTokens
|
|
688572
|
+
lastCompletionTokens: turnCompletionTokens,
|
|
688573
|
+
contextBudgetTokens: contextBudget.tokens,
|
|
688574
|
+
contextBudgetSource: contextBudget.source
|
|
688492
688575
|
}
|
|
688493
688576
|
});
|
|
688494
688577
|
{
|
|
688495
|
-
const
|
|
688496
|
-
const utilPct =
|
|
688578
|
+
const ctxBudgetTokens = contextBudget.tokens;
|
|
688579
|
+
const utilPct = ctxBudgetTokens > 0 ? Math.round(trackedContextTokens / ctxBudgetTokens * 100) : 0;
|
|
688497
688580
|
if (utilPct > 50) {
|
|
688498
688581
|
this.emit({
|
|
688499
688582
|
type: "status",
|
|
688500
|
-
content: `Context: ~${
|
|
688583
|
+
content: `Context budget: ~${trackedContextTokens}t / ${ctxBudgetTokens}t (${utilPct}% used)`,
|
|
688584
|
+
visibility: "telemetry",
|
|
688501
688585
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
688502
688586
|
});
|
|
688503
688587
|
}
|
|
@@ -692814,6 +692898,8 @@ ${this.options.maxTurns && this.options.maxTurns > 0 ? `You have ${this.options.
|
|
|
692814
692898
|
}
|
|
692815
692899
|
return sum2 + chars + imgCount * 1500 * 4;
|
|
692816
692900
|
}, 0) / 4);
|
|
692901
|
+
const trackedBfContextTokens = bfTurnPrompt > 0 ? bfTurnPrompt : this._lastOutboundRequestBudget?.totalInputTokens ?? bfEstCtx;
|
|
692902
|
+
const bfContextBudget = this._contextBudget(chatRequest);
|
|
692817
692903
|
this.emit({
|
|
692818
692904
|
type: "token_usage",
|
|
692819
692905
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -692821,9 +692907,11 @@ ${this.options.maxTurns && this.options.maxTurns > 0 ? `You have ${this.options.
|
|
|
692821
692907
|
promptTokens,
|
|
692822
692908
|
completionTokens,
|
|
692823
692909
|
totalTokens,
|
|
692824
|
-
estimatedContextTokens:
|
|
692910
|
+
estimatedContextTokens: trackedBfContextTokens,
|
|
692825
692911
|
lastPromptTokens: bfTurnPrompt,
|
|
692826
|
-
lastCompletionTokens: bfTurnCompletion
|
|
692912
|
+
lastCompletionTokens: bfTurnCompletion,
|
|
692913
|
+
contextBudgetTokens: bfContextBudget.tokens,
|
|
692914
|
+
contextBudgetSource: bfContextBudget.source
|
|
692827
692915
|
}
|
|
692828
692916
|
});
|
|
692829
692917
|
const choice = response.choices[0];
|
|
@@ -733577,12 +733665,15 @@ function findModel(models, query) {
|
|
|
733577
733665
|
const fuzzy = models.find((m2) => m2.name.includes(query));
|
|
733578
733666
|
return fuzzy;
|
|
733579
733667
|
}
|
|
733580
|
-
async function queryModelContextSize(baseUrl3, modelName) {
|
|
733668
|
+
async function queryModelContextSize(baseUrl3, modelName, apiKey) {
|
|
733581
733669
|
try {
|
|
733582
733670
|
const normalized4 = normalizeBaseUrl(baseUrl3);
|
|
733583
733671
|
const res = await fetch(`${normalized4}/api/show`, {
|
|
733584
733672
|
method: "POST",
|
|
733585
|
-
headers: {
|
|
733673
|
+
headers: {
|
|
733674
|
+
"Content-Type": "application/json",
|
|
733675
|
+
...apiKey ? { Authorization: `Bearer ${apiKey}` } : {}
|
|
733676
|
+
},
|
|
733586
733677
|
body: JSON.stringify({ name: modelName }),
|
|
733587
733678
|
signal: AbortSignal.timeout(1e4)
|
|
733588
733679
|
});
|
|
@@ -733769,7 +733860,7 @@ async function queryContextTelemetry(baseUrl3, modelName, apiKey) {
|
|
|
733769
733860
|
capacitySource: "peer_default"
|
|
733770
733861
|
};
|
|
733771
733862
|
}
|
|
733772
|
-
const ollamaSize = await queryModelContextSize(baseUrl3, modelName);
|
|
733863
|
+
const ollamaSize = await queryModelContextSize(baseUrl3, modelName, apiKey);
|
|
733773
733864
|
if (ollamaSize) {
|
|
733774
733865
|
return { endpoint, model: modelName, capacityTokens: ollamaSize, capacitySource: "ollama_show" };
|
|
733775
733866
|
}
|
|
@@ -745615,10 +745706,10 @@ function contrastTextColor(colorIndex) {
|
|
|
745615
745706
|
return luma >= 140 ? 16 : 231;
|
|
745616
745707
|
}
|
|
745617
745708
|
function lockFooterRedraws() {
|
|
745618
|
-
|
|
745709
|
+
_globalFooterLockDepth += 1;
|
|
745619
745710
|
}
|
|
745620
745711
|
function unlockFooterRedraws() {
|
|
745621
|
-
|
|
745712
|
+
_globalFooterLockDepth = Math.max(0, _globalFooterLockDepth - 1);
|
|
745622
745713
|
}
|
|
745623
745714
|
function refreshThemeVars() {
|
|
745624
745715
|
PANEL_BG_SEQ = tuiBgSeq();
|
|
@@ -745665,7 +745756,7 @@ function setTerminalTitle(task, version5) {
|
|
|
745665
745756
|
process.stdout.write(data);
|
|
745666
745757
|
}
|
|
745667
745758
|
}
|
|
745668
|
-
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_GLYPH_FG, HEADER_BUTTON_BG, HEADER_BUTTON_FG, HEADER_ACCENT_BOLD_FG, HEADER_BUTTON_HOVER_BG, HEADER_BUTTON_HOVER_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,
|
|
745759
|
+
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_GLYPH_FG, HEADER_BUTTON_BG, HEADER_BUTTON_FG, HEADER_ACCENT_BOLD_FG, HEADER_BUTTON_HOVER_BG, HEADER_BUTTON_HOVER_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, _globalFooterLockDepth, RESET4, CURSOR_BLINK_BLOCK, HEADER_BUTTON_LEFT, HEADER_BUTTON_RIGHT, HEADER_BUTTON_SQUARE_PAD, SPONSOR_HEADER_LABEL_MAX, _termTitleWriter, StatusBar;
|
|
745669
745760
|
var init_status_bar = __esm({
|
|
745670
745761
|
"packages/cli/src/tui/status-bar.ts"() {
|
|
745671
745762
|
init_render();
|
|
@@ -745869,7 +745960,7 @@ var init_status_bar = __esm({
|
|
|
745869
745960
|
BOX_TJ = "┬";
|
|
745870
745961
|
ENHANCE_SEG_INNER = 11;
|
|
745871
745962
|
ENHANCE_SPIN_FRAMES = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
745872
|
-
|
|
745963
|
+
_globalFooterLockDepth = 0;
|
|
745873
745964
|
RESET4 = "\x1B[0m";
|
|
745874
745965
|
CURSOR_BLINK_BLOCK = "\x1B[1 q";
|
|
745875
745966
|
HEADER_BUTTON_LEFT = "🭁";
|
|
@@ -745888,6 +745979,7 @@ var init_status_bar = __esm({
|
|
|
745888
745979
|
contextWindowSize: 0
|
|
745889
745980
|
};
|
|
745890
745981
|
_contextCapacity = { status: "unknown" };
|
|
745982
|
+
_contextCompaction = null;
|
|
745891
745983
|
// ── Metrics tracking for Telegram stats ──
|
|
745892
745984
|
_backend = "ollama";
|
|
745893
745985
|
_inferenceCount = 0;
|
|
@@ -746010,6 +746102,8 @@ var init_status_bar = __esm({
|
|
|
746010
746102
|
_mouseTrackingEnabled = false;
|
|
746011
746103
|
/** Enabled automatically once MouseFilterStream is installed; /mouse off is an emergency escape hatch. */
|
|
746012
746104
|
_mouseTrackingPreferred = false;
|
|
746105
|
+
/** Prevent every redraw/activity path from re-enabling mouse reports while an inherited child owns the TTY. */
|
|
746106
|
+
_terminalPassthroughDepth = 0;
|
|
746013
746107
|
/** Legacy keyboard-selection guard; mouse drag selection is terminal-native. */
|
|
746014
746108
|
_mouseSelecting = false;
|
|
746015
746109
|
/** Text selection state for keyboard/explicit copy paths; mouse drag is not owned by the TUI. */
|
|
@@ -746131,13 +746225,16 @@ var init_status_bar = __esm({
|
|
|
746131
746225
|
_inputRedrawScheduled = false;
|
|
746132
746226
|
/** Suppress hookStdin redraws during Enter processing or overlay operations */
|
|
746133
746227
|
_suppressStdinRedraw = false;
|
|
746228
|
+
_footerLockDepth = 0;
|
|
746134
746229
|
/** Lock footer redraws entirely (during install overlay, loading screens, etc.) */
|
|
746135
746230
|
lockFooter() {
|
|
746231
|
+
this._footerLockDepth += 1;
|
|
746136
746232
|
this._suppressStdinRedraw = true;
|
|
746137
746233
|
}
|
|
746138
746234
|
/** Unlock footer redraws */
|
|
746139
746235
|
unlockFooter() {
|
|
746140
|
-
this.
|
|
746236
|
+
this._footerLockDepth = Math.max(0, this._footerLockDepth - 1);
|
|
746237
|
+
this._suppressStdinRedraw = this._footerLockDepth > 0;
|
|
746141
746238
|
}
|
|
746142
746239
|
/** Begin DEC 2026 synchronized output — terminal buffers all writes */
|
|
746143
746240
|
syncBegin() {
|
|
@@ -747267,7 +747364,7 @@ var init_status_bar = __esm({
|
|
|
747267
747364
|
if (this._footerAnimationTimer) return;
|
|
747268
747365
|
const intervalMs = this._pacing.remote ? this._pacing.footerAnimationIntervalMs : _StatusBar.FOOTER_ANIMATION_INTERVAL_MS;
|
|
747269
747366
|
this._footerAnimationTimer = setInterval(() => {
|
|
747270
|
-
if (!this.active || this._resizing ||
|
|
747367
|
+
if (!this.active || this._resizing || _globalFooterLockDepth > 0 || isOverlayActive()) {
|
|
747271
747368
|
this._footerPaintCache = null;
|
|
747272
747369
|
return;
|
|
747273
747370
|
}
|
|
@@ -747336,6 +747433,11 @@ var init_status_bar = __esm({
|
|
|
747336
747433
|
this.pushSpinnerContextMetrics();
|
|
747337
747434
|
if (this.active) this.renderFooterPreserveCursor();
|
|
747338
747435
|
}
|
|
747436
|
+
/** Show context-compaction progress in the footer without adding scrollback noise. */
|
|
747437
|
+
setContextCompaction(state5) {
|
|
747438
|
+
this._contextCompaction = state5;
|
|
747439
|
+
if (this.active) this.renderFooterPreserveCursor();
|
|
747440
|
+
}
|
|
747339
747441
|
/** Set the current package version for display in the metrics row */
|
|
747340
747442
|
setVersion(version5) {
|
|
747341
747443
|
this._version = version5;
|
|
@@ -747842,10 +747944,17 @@ var init_status_bar = __esm({
|
|
|
747842
747944
|
this.metrics.estimatedContextTokens = update2.estimatedContextTokens;
|
|
747843
747945
|
if (update2.contextOutputReservationTokens !== void 0)
|
|
747844
747946
|
this.metrics.contextOutputReservationTokens = update2.contextOutputReservationTokens;
|
|
747947
|
+
if (update2.contextBudgetTokens !== void 0)
|
|
747948
|
+
this.metrics.contextBudgetTokens = update2.contextBudgetTokens;
|
|
747949
|
+
if (update2.contextBudgetSource !== void 0)
|
|
747950
|
+
this.metrics.contextBudgetSource = update2.contextBudgetSource;
|
|
747845
747951
|
if (update2.lastPromptTokens !== void 0)
|
|
747846
747952
|
this.metrics.lastPromptTokens = update2.lastPromptTokens;
|
|
747847
747953
|
if (update2.lastCompletionTokens !== void 0)
|
|
747848
747954
|
this.metrics.lastCompletionTokens = update2.lastCompletionTokens;
|
|
747955
|
+
if (update2.estimatedContextTokens !== void 0 && this._contextCompaction?.state !== "started") {
|
|
747956
|
+
this._contextCompaction = null;
|
|
747957
|
+
}
|
|
747849
747958
|
this._streamingTokens = 0;
|
|
747850
747959
|
this._streamStartTime = 0;
|
|
747851
747960
|
this.pushSpinnerContextMetrics();
|
|
@@ -747882,6 +747991,7 @@ var init_status_bar = __esm({
|
|
|
747882
747991
|
this.metrics.estimatedContextTokens = 0;
|
|
747883
747992
|
this.metrics.lastPromptTokens = 0;
|
|
747884
747993
|
this.metrics.lastCompletionTokens = 0;
|
|
747994
|
+
this._contextCompaction = null;
|
|
747885
747995
|
this._tokensPerSecond = 0;
|
|
747886
747996
|
this.pushSpinnerContextMetrics();
|
|
747887
747997
|
if (this.active) this.renderFooterPreserveCursor();
|
|
@@ -748279,19 +748389,47 @@ var init_status_bar = __esm({
|
|
|
748279
748389
|
this._mouseTrackingPreferred = true;
|
|
748280
748390
|
this.restoreMouseTracking();
|
|
748281
748391
|
}
|
|
748392
|
+
/** Unconditionally disable every terminal mouse protocol Omnius may inherit or enable. */
|
|
748393
|
+
writeMouseTrackingOff() {
|
|
748394
|
+
this._mouseTrackingEnabled = false;
|
|
748395
|
+
if (!process.stdout.isTTY) return;
|
|
748396
|
+
this._trueStdoutWrite.call(
|
|
748397
|
+
process.stdout,
|
|
748398
|
+
"\x1B[?9l\x1B[?1000l\x1B[?1001l\x1B[?1002l\x1B[?1003l\x1B[?1005l\x1B[?1006l\x1B[?1015l\x1B[?1016l"
|
|
748399
|
+
);
|
|
748400
|
+
}
|
|
748282
748401
|
/** Temporarily turn off terminal mouse reporting without changing user preference. */
|
|
748283
748402
|
suspendMouseTracking() {
|
|
748284
748403
|
if (!this._mouseTrackingEnabled) return;
|
|
748285
|
-
this.
|
|
748286
|
-
|
|
748287
|
-
|
|
748288
|
-
|
|
748289
|
-
|
|
748404
|
+
this.writeMouseTrackingOff();
|
|
748405
|
+
}
|
|
748406
|
+
/**
|
|
748407
|
+
* Give an inherited terminal process exclusive ownership of the TTY.
|
|
748408
|
+
* The lease is idempotent and nestable; no redraw, overlay, or queued mouse
|
|
748409
|
+
* activity can restore reporting until the outermost owner releases it.
|
|
748410
|
+
*/
|
|
748411
|
+
acquireTerminalPassthrough() {
|
|
748412
|
+
this._terminalPassthroughDepth += 1;
|
|
748413
|
+
this.writeMouseTrackingOff();
|
|
748414
|
+
let released = false;
|
|
748415
|
+
return () => {
|
|
748416
|
+
if (released) return;
|
|
748417
|
+
released = true;
|
|
748418
|
+
this._terminalPassthroughDepth = Math.max(
|
|
748419
|
+
0,
|
|
748420
|
+
this._terminalPassthroughDepth - 1
|
|
748290
748421
|
);
|
|
748291
|
-
|
|
748422
|
+
if (this._terminalPassthroughDepth > 0) return;
|
|
748423
|
+
this.writeMouseTrackingOff();
|
|
748424
|
+
this.restoreMouseTracking();
|
|
748425
|
+
};
|
|
748292
748426
|
}
|
|
748293
748427
|
/** Re-apply the current mouse preference after overlays, password prompts, or redraws. */
|
|
748294
748428
|
restoreMouseTracking() {
|
|
748429
|
+
if (this._terminalPassthroughDepth > 0) {
|
|
748430
|
+
this._mouseTrackingEnabled = false;
|
|
748431
|
+
return;
|
|
748432
|
+
}
|
|
748295
748433
|
if (!this._mouseTrackingPreferred) {
|
|
748296
748434
|
this.suspendMouseTracking();
|
|
748297
748435
|
return;
|
|
@@ -750060,16 +750198,21 @@ ${CONTENT_BG_SEQ}`);
|
|
|
750060
750198
|
const circleChar = isPaused ? "●" : "◖";
|
|
750061
750199
|
const circleColor = isPaused ? 120 : 183;
|
|
750062
750200
|
const uptimeStr = `\x1B[38;5;${circleColor}m${circleChar} ${uptime2}\x1B[0m`;
|
|
750063
|
-
const
|
|
750201
|
+
const lifecycle = this._contextCompaction;
|
|
750202
|
+
const ctxUsed = lifecycle?.afterTokens ?? lifecycle?.beforeTokens ?? m2.estimatedContextTokens;
|
|
750064
750203
|
const ctxTotal = this.reportedContextTotal(
|
|
750065
750204
|
m2.contextWindowSize,
|
|
750066
750205
|
this.effectiveContextTotal(m2.contextWindowSize)
|
|
750067
750206
|
);
|
|
750207
|
+
const fallbackTotal = lifecycle?.workingLimitTokens ?? m2.contextBudgetTokens ?? 0;
|
|
750208
|
+
const providerCapacityKnown = this._contextCapacity.status === "known" && ctxTotal > 0;
|
|
750209
|
+
const displayTotal = providerCapacityKnown ? ctxTotal : fallbackTotal;
|
|
750210
|
+
const estimatedCapacity = !providerCapacityKnown && displayTotal > 0;
|
|
750068
750211
|
let ctxStr = "";
|
|
750069
|
-
if (
|
|
750212
|
+
if (displayTotal > 0) {
|
|
750070
750213
|
const pct2 = Math.max(
|
|
750071
750214
|
0,
|
|
750072
|
-
Math.min(100, Math.round((1 - ctxUsed /
|
|
750215
|
+
Math.min(100, Math.round((1 - ctxUsed / displayTotal) * 100))
|
|
750073
750216
|
);
|
|
750074
750217
|
const barLen = 10;
|
|
750075
750218
|
const filled = Math.round(pct2 / 100 * barLen);
|
|
@@ -750077,11 +750220,13 @@ ${CONTENT_BG_SEQ}`);
|
|
|
750077
750220
|
const barColor = pct2 > 50 ? 120 : pct2 > 20 ? 222 : 210;
|
|
750078
750221
|
const bar = `\x1B[38;5;${barColor}m${"█".repeat(filled)}\x1B[0m\x1B[38;5;240m${"░".repeat(empty2)}\x1B[0m`;
|
|
750079
750222
|
const pctColor = pct2 > 50 ? 120 : pct2 > 20 ? 222 : 210;
|
|
750080
|
-
|
|
750223
|
+
const lifecycleLabel = lifecycle?.state === "started" ? "\x1B[38;5;222m⟳ compacting\x1B[0m " : lifecycle?.state === "applied" ? "\x1B[38;5;120m✓ compacted\x1B[0m " : lifecycle ? "\x1B[38;5;210m◇ compact held\x1B[0m " : estimatedCapacity ? "\x1B[38;5;245mCTX~\x1B[0m " : "";
|
|
750224
|
+
const estimateMark = estimatedCapacity ? "~" : "";
|
|
750225
|
+
ctxStr = `${lifecycleLabel}${bar} \x1B[38;5;${pctColor}m${estimateMark}${pct2}%\x1B[0m`;
|
|
750081
750226
|
} else {
|
|
750082
750227
|
const usage = ctxUsed >= 1024 ? `${(ctxUsed / 1024).toFixed(ctxUsed >= 1e4 ? 0 : 1)}K` : String(Math.max(0, Math.round(ctxUsed)));
|
|
750083
750228
|
const reservation = m2.contextOutputReservationTokens && m2.contextOutputReservationTokens > 0 ? ` +${m2.contextOutputReservationTokens >= 1024 ? `${Math.round(m2.contextOutputReservationTokens / 1024)}K` : m2.contextOutputReservationTokens} rsv` : "";
|
|
750084
|
-
ctxStr = `\x1B[38;5;245mCTX
|
|
750229
|
+
ctxStr = `\x1B[38;5;245mCTX measuring | ~${usage} used${reservation}\x1B[0m`;
|
|
750085
750230
|
}
|
|
750086
750231
|
const arrow = `\x1B[38;5;240m▶\x1B[0m`;
|
|
750087
750232
|
let rightSide;
|
|
@@ -750196,10 +750341,11 @@ ${CONTENT_BG_SEQ}`);
|
|
|
750196
750341
|
/** Push current context window usage to the braille spinner */
|
|
750197
750342
|
pushSpinnerContextMetrics() {
|
|
750198
750343
|
const ctxUsed = this.metrics.estimatedContextTokens;
|
|
750199
|
-
const
|
|
750344
|
+
const reportedTotal = this.reportedContextTotal(
|
|
750200
750345
|
this.metrics.contextWindowSize,
|
|
750201
750346
|
this.effectiveContextTotal(this.metrics.contextWindowSize)
|
|
750202
750347
|
);
|
|
750348
|
+
const ctxTotal = this._contextCapacity.status === "known" ? reportedTotal : this.metrics.contextBudgetTokens ?? 0;
|
|
750203
750349
|
const contextPct = ctxTotal > 0 ? Math.round(ctxUsed / ctxTotal * 100) : 0;
|
|
750204
750350
|
this._brailleSpinner.setMetrics({ contextPct });
|
|
750205
750351
|
}
|
|
@@ -751245,13 +751391,13 @@ ${CONTENT_BG_SEQ}`);
|
|
|
751245
751391
|
}
|
|
751246
751392
|
scheduleInputRedraw() {
|
|
751247
751393
|
if (!this.active || this._resizing) return;
|
|
751248
|
-
if (this._suppressStdinRedraw ||
|
|
751394
|
+
if (this._suppressStdinRedraw || _globalFooterLockDepth > 0) return;
|
|
751249
751395
|
if (this._inputRedrawScheduled) return;
|
|
751250
751396
|
this._inputRedrawScheduled = true;
|
|
751251
751397
|
setImmediate(() => {
|
|
751252
751398
|
this._inputRedrawScheduled = false;
|
|
751253
751399
|
if (!this.active || this._resizing) return;
|
|
751254
|
-
if (this._suppressStdinRedraw ||
|
|
751400
|
+
if (this._suppressStdinRedraw || _globalFooterLockDepth > 0) return;
|
|
751255
751401
|
if (this.writeDepth > 0) {
|
|
751256
751402
|
this.renderInputRowDuringStream();
|
|
751257
751403
|
} else {
|
|
@@ -753757,19 +753903,36 @@ function runShellCommandAsync(command, opts = {}) {
|
|
|
753757
753903
|
if (opts.input !== void 0) {
|
|
753758
753904
|
child2.stdin?.end(opts.input);
|
|
753759
753905
|
}
|
|
753760
|
-
|
|
753906
|
+
let timedOut = false;
|
|
753907
|
+
let killTimer = null;
|
|
753908
|
+
const killChild = (signal) => {
|
|
753761
753909
|
try {
|
|
753762
|
-
child2.kill(
|
|
753910
|
+
child2.kill(signal);
|
|
753763
753911
|
} catch {
|
|
753764
753912
|
}
|
|
753765
|
-
|
|
753913
|
+
};
|
|
753914
|
+
const timer = setTimeout(() => {
|
|
753915
|
+
timedOut = true;
|
|
753916
|
+
killChild("SIGTERM");
|
|
753917
|
+
killTimer = setTimeout(() => killChild("SIGKILL"), 2e3);
|
|
753918
|
+
killTimer.unref?.();
|
|
753766
753919
|
}, opts.timeoutMs ?? 6e4);
|
|
753767
753920
|
child2.on("error", (err) => {
|
|
753768
753921
|
clearTimeout(timer);
|
|
753922
|
+
if (killTimer) clearTimeout(killTimer);
|
|
753769
753923
|
reject(err);
|
|
753770
753924
|
});
|
|
753771
753925
|
child2.on("close", (code8, signal) => {
|
|
753772
753926
|
clearTimeout(timer);
|
|
753927
|
+
if (killTimer) clearTimeout(killTimer);
|
|
753928
|
+
if (timedOut) {
|
|
753929
|
+
reject(
|
|
753930
|
+
new Error(
|
|
753931
|
+
`Command timed out after ${opts.timeoutMs ?? 6e4}ms: ${command}`
|
|
753932
|
+
)
|
|
753933
|
+
);
|
|
753934
|
+
return;
|
|
753935
|
+
}
|
|
753773
753936
|
if (code8 === 0) {
|
|
753774
753937
|
resolve110();
|
|
753775
753938
|
return;
|
|
@@ -760243,7 +760406,12 @@ async function startNeovimMode(opts) {
|
|
|
760243
760406
|
nvimPath = (await execFileText5("sh", ["-lc", "command -v nvim"], { timeout: 3e3 })).trim();
|
|
760244
760407
|
if (!nvimPath) throw new Error();
|
|
760245
760408
|
} catch {
|
|
760246
|
-
const
|
|
760409
|
+
const install = () => ensureNeovim();
|
|
760410
|
+
const installed = opts.withTerminalPassthrough ? await opts.withTerminalPassthrough(
|
|
760411
|
+
"Neovim setup",
|
|
760412
|
+
"The system package manager needs terminal access.",
|
|
760413
|
+
install
|
|
760414
|
+
) : await install();
|
|
760247
760415
|
if (!installed) {
|
|
760248
760416
|
return "nvim not found and auto-install failed. Install Neovim: https://neovim.io";
|
|
760249
760417
|
}
|
|
@@ -760670,6 +760838,10 @@ function doCleanup(state5) {
|
|
|
760670
760838
|
stdin.removeListener(event, fn);
|
|
760671
760839
|
}
|
|
760672
760840
|
state5.installedFilteredListeners = [];
|
|
760841
|
+
process.stdout.write(
|
|
760842
|
+
`\x1B[?9l\x1B[?1000l\x1B[?1001l\x1B[?1002l\x1B[?1003l\x1B[?1005l\x1B[?1006l\x1B[?1015l\x1B[?1016l\x1B[?1004l\x1B[?2004l\x1B[1;${termRows()}r`
|
|
760843
|
+
// reset scroll region to full terminal
|
|
760844
|
+
);
|
|
760673
760845
|
if (typeof stdin.setRawMode === "function") {
|
|
760674
760846
|
try {
|
|
760675
760847
|
stdin.setRawMode(false);
|
|
@@ -760687,10 +760859,6 @@ function doCleanup(state5) {
|
|
|
760687
760859
|
}
|
|
760688
760860
|
}
|
|
760689
760861
|
_state2 = null;
|
|
760690
|
-
process.stdout.write(
|
|
760691
|
-
`\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1004l\x1B[?2004l\x1B[1;${termRows()}r`
|
|
760692
|
-
// reset scroll region to full terminal
|
|
760693
|
-
);
|
|
760694
760862
|
try {
|
|
760695
760863
|
stdin.resume();
|
|
760696
760864
|
stdin.read();
|
|
@@ -769890,7 +770058,7 @@ function setRawInputMode(enabled3) {
|
|
|
769890
770058
|
} catch {
|
|
769891
770059
|
}
|
|
769892
770060
|
}
|
|
769893
|
-
async function
|
|
770061
|
+
async function withTransientTerminalSession(ctx3, heading, reason, terminalElevation, run4) {
|
|
769894
770062
|
const hasInteractiveTty = Boolean(
|
|
769895
770063
|
process.stdin.isTTY && process.stdout.isTTY
|
|
769896
770064
|
);
|
|
@@ -769903,6 +770071,7 @@ async function withTransientTerminalPrivilegePrompt(ctx3, reason, run4) {
|
|
|
769903
770071
|
"OMNIUS_ELEVATION_MODE"
|
|
769904
770072
|
);
|
|
769905
770073
|
const previousElevationMode = process.env["OMNIUS_ELEVATION_MODE"];
|
|
770074
|
+
let releaseTerminal = null;
|
|
769906
770075
|
try {
|
|
769907
770076
|
ctx3.lockFooter?.();
|
|
769908
770077
|
} catch {
|
|
@@ -769912,30 +770081,51 @@ async function withTransientTerminalPrivilegePrompt(ctx3, reason, run4) {
|
|
|
769912
770081
|
} catch {
|
|
769913
770082
|
}
|
|
769914
770083
|
try {
|
|
769915
|
-
ctx3.
|
|
770084
|
+
releaseTerminal = ctx3.acquireTerminalPassthrough?.() ?? null;
|
|
769916
770085
|
} catch {
|
|
770086
|
+
releaseTerminal = null;
|
|
770087
|
+
}
|
|
770088
|
+
if (!releaseTerminal) {
|
|
770089
|
+
try {
|
|
770090
|
+
ctx3.disableMouse?.();
|
|
770091
|
+
} catch {
|
|
770092
|
+
}
|
|
769917
770093
|
}
|
|
769918
|
-
setRawInputMode(false);
|
|
769919
|
-
process.env["OMNIUS_ELEVATION_MODE"] = "terminal";
|
|
769920
770094
|
writeDirectTerminal(
|
|
769921
|
-
|
|
770095
|
+
`\x1B[?2026l\x1B[?25h${TERMINAL_MOUSE_OFF}\x1B[r\x1B[0m\x1B[2J\x1B[H`
|
|
769922
770096
|
);
|
|
769923
|
-
|
|
769924
|
-
|
|
770097
|
+
setRawInputMode(false);
|
|
770098
|
+
if (terminalElevation) {
|
|
770099
|
+
process.env["OMNIUS_ELEVATION_MODE"] = "terminal";
|
|
770100
|
+
}
|
|
770101
|
+
writeDirectTerminal(`${c3.bold(heading)}
|
|
769925
770102
|
${reason}
|
|
769926
770103
|
|
|
769927
|
-
`
|
|
769928
|
-
);
|
|
770104
|
+
`);
|
|
769929
770105
|
try {
|
|
769930
770106
|
return await run4();
|
|
769931
770107
|
} finally {
|
|
769932
|
-
if (
|
|
769933
|
-
|
|
769934
|
-
|
|
769935
|
-
|
|
770108
|
+
if (terminalElevation) {
|
|
770109
|
+
if (hadElevationMode) {
|
|
770110
|
+
process.env["OMNIUS_ELEVATION_MODE"] = previousElevationMode;
|
|
770111
|
+
} else {
|
|
770112
|
+
delete process.env["OMNIUS_ELEVATION_MODE"];
|
|
770113
|
+
}
|
|
769936
770114
|
}
|
|
770115
|
+
writeDirectTerminal(TERMINAL_MOUSE_OFF);
|
|
769937
770116
|
setRawInputMode(hadRaw);
|
|
769938
770117
|
writeDirectTerminal("\x1B[?2026l\x1B[?25h\x1B[r\x1B[0m\x1B[2J\x1B[H");
|
|
770118
|
+
if (releaseTerminal) {
|
|
770119
|
+
try {
|
|
770120
|
+
releaseTerminal();
|
|
770121
|
+
} catch {
|
|
770122
|
+
}
|
|
770123
|
+
} else if (hadMouse) {
|
|
770124
|
+
try {
|
|
770125
|
+
ctx3.enableMouse?.();
|
|
770126
|
+
} catch {
|
|
770127
|
+
}
|
|
770128
|
+
}
|
|
769939
770129
|
try {
|
|
769940
770130
|
ctx3.unlockFooter?.();
|
|
769941
770131
|
} catch {
|
|
@@ -769948,21 +770138,21 @@ ${reason}
|
|
|
769948
770138
|
ctx3.refreshDisplay?.();
|
|
769949
770139
|
} catch {
|
|
769950
770140
|
}
|
|
769951
|
-
try {
|
|
769952
|
-
if (hadMouse) {
|
|
769953
|
-
ctx3.enableMouse?.();
|
|
769954
|
-
writeDirectTerminal("\x1B[?1000h\x1B[?1006h");
|
|
769955
|
-
} else {
|
|
769956
|
-
writeDirectTerminal("\x1B[?1000l\x1B[?1002l\x1B[?1006l");
|
|
769957
|
-
}
|
|
769958
|
-
} catch {
|
|
769959
|
-
}
|
|
769960
770141
|
try {
|
|
769961
770142
|
ctx3.showPrompt?.();
|
|
769962
770143
|
} catch {
|
|
769963
770144
|
}
|
|
769964
770145
|
}
|
|
769965
770146
|
}
|
|
770147
|
+
async function withTransientTerminalPrivilegePrompt(ctx3, reason, run4) {
|
|
770148
|
+
return await withTransientTerminalSession(
|
|
770149
|
+
ctx3,
|
|
770150
|
+
"Omnius needs administrator privileges",
|
|
770151
|
+
reason,
|
|
770152
|
+
true,
|
|
770153
|
+
run4
|
|
770154
|
+
);
|
|
770155
|
+
}
|
|
769966
770156
|
async function acquireSudoCredentials(ctx3, reason) {
|
|
769967
770157
|
const isRoot = typeof process.getuid === "function" && process.getuid() === 0;
|
|
769968
770158
|
if (isRoot) return true;
|
|
@@ -769978,19 +770168,28 @@ async function acquireSudoCredentials(ctx3, reason) {
|
|
|
769978
770168
|
stdio: hasInteractiveTty ? "inherit" : "pipe"
|
|
769979
770169
|
}
|
|
769980
770170
|
);
|
|
770171
|
+
let forceTimer = null;
|
|
769981
770172
|
const timer = setTimeout(() => {
|
|
769982
770173
|
try {
|
|
769983
770174
|
child2.kill("SIGTERM");
|
|
769984
770175
|
} catch {
|
|
769985
770176
|
}
|
|
769986
|
-
|
|
770177
|
+
forceTimer = setTimeout(() => {
|
|
770178
|
+
try {
|
|
770179
|
+
child2.kill("SIGKILL");
|
|
770180
|
+
} catch {
|
|
770181
|
+
}
|
|
770182
|
+
}, 2e3);
|
|
770183
|
+
forceTimer.unref?.();
|
|
769987
770184
|
}, 6e4);
|
|
769988
770185
|
onChildExit(child2, (code8) => {
|
|
769989
770186
|
clearTimeout(timer);
|
|
770187
|
+
if (forceTimer) clearTimeout(forceTimer);
|
|
769990
770188
|
resolve110(code8 === 0);
|
|
769991
770189
|
});
|
|
769992
770190
|
onChildError(child2, () => {
|
|
769993
770191
|
clearTimeout(timer);
|
|
770192
|
+
if (forceTimer) clearTimeout(forceTimer);
|
|
769994
770193
|
resolve110(false);
|
|
769995
770194
|
});
|
|
769996
770195
|
});
|
|
@@ -773936,7 +774135,8 @@ Clone a new voice: /voice clone <wav-file> [name]`);
|
|
|
773936
774135
|
onExit: () => {
|
|
773937
774136
|
renderInfo("Neovim mode exited.");
|
|
773938
774137
|
},
|
|
773939
|
-
onFocusToTUI: ctx3.showPrompt
|
|
774138
|
+
onFocusToTUI: ctx3.showPrompt,
|
|
774139
|
+
withTerminalPassthrough: (heading, reason, run4) => withTransientTerminalSession(ctx3, heading, reason, true, run4)
|
|
773940
774140
|
});
|
|
773941
774141
|
if (err) {
|
|
773942
774142
|
renderError(err);
|
|
@@ -774108,12 +774308,22 @@ systemctl --user enable --now omnius-daemon.service || true
|
|
|
774108
774308
|
sleep 1
|
|
774109
774309
|
`;
|
|
774110
774310
|
const { spawn: spawn48 } = await import("node:child_process");
|
|
774111
|
-
await
|
|
774112
|
-
|
|
774113
|
-
|
|
774114
|
-
|
|
774115
|
-
|
|
774116
|
-
|
|
774311
|
+
await withTransientTerminalSession(
|
|
774312
|
+
ctx3,
|
|
774313
|
+
"Daemon ownership migration",
|
|
774314
|
+
"The migration may request administrator privileges.",
|
|
774315
|
+
true,
|
|
774316
|
+
() => new Promise((resolve110, reject) => {
|
|
774317
|
+
const child2 = spawn48("bash", ["-lc", takeover], {
|
|
774318
|
+
stdio: "inherit"
|
|
774319
|
+
});
|
|
774320
|
+
onChildExit(child2, (code8) => {
|
|
774321
|
+
if (code8 === 0) resolve110();
|
|
774322
|
+
else reject(new Error(`migration exited with ${code8}`));
|
|
774323
|
+
});
|
|
774324
|
+
onChildError(child2, reject);
|
|
774325
|
+
})
|
|
774326
|
+
);
|
|
774117
774327
|
renderInfo("Daemon takeover complete.");
|
|
774118
774328
|
} catch (e2) {
|
|
774119
774329
|
renderError(`Takeover failed: ${e2?.message || e2}`);
|
|
@@ -782993,7 +783203,13 @@ async function handleEndpoint(arg, ctx3, local = false) {
|
|
|
782993
783203
|
process.stdout.write(`${c3.yellow("⚠")} Could not verify
|
|
782994
783204
|
`);
|
|
782995
783205
|
if (provider.id === "ollama" && ctx3.rl) {
|
|
782996
|
-
const running = await
|
|
783206
|
+
const running = await withTransientTerminalSession(
|
|
783207
|
+
ctx3,
|
|
783208
|
+
"Ollama setup",
|
|
783209
|
+
"Installing or starting Ollama may need terminal access.",
|
|
783210
|
+
true,
|
|
783211
|
+
() => ensureOllamaRunning(normalizedUrl, ctx3.rl)
|
|
783212
|
+
);
|
|
782997
783213
|
if (running) {
|
|
782998
783214
|
try {
|
|
782999
783215
|
const retryResp = await fetch(providerUrl(transport, "models"), {
|
|
@@ -785427,8 +785643,8 @@ async function handleUpdate(subcommand, ctx3) {
|
|
|
785427
785643
|
)
|
|
785428
785644
|
);
|
|
785429
785645
|
renderInfo("Checking for updates...");
|
|
785430
|
-
const [
|
|
785431
|
-
|
|
785646
|
+
const [updateCheck, sudoInfo] = await Promise.all([
|
|
785647
|
+
queryUpdateStatus(currentVersion, true),
|
|
785432
785648
|
(async () => {
|
|
785433
785649
|
try {
|
|
785434
785650
|
const prefix = await execA("npm prefix -g", { timeout: 5e3 });
|
|
@@ -785444,10 +785660,23 @@ async function handleUpdate(subcommand, ctx3) {
|
|
|
785444
785660
|
}
|
|
785445
785661
|
})()
|
|
785446
785662
|
]);
|
|
785663
|
+
const info = updateCheck.status === "available" && updateCheck.latestVersion ? {
|
|
785664
|
+
updateAvailable: true,
|
|
785665
|
+
currentVersion,
|
|
785666
|
+
latestVersion: updateCheck.latestVersion
|
|
785667
|
+
} : null;
|
|
785447
785668
|
const needsSudo = sudoInfo;
|
|
785448
|
-
|
|
785449
|
-
`v${currentVersion} —
|
|
785450
|
-
)
|
|
785669
|
+
if (info) {
|
|
785670
|
+
renderInfo(`v${currentVersion} — update available → v${info.latestVersion}`);
|
|
785671
|
+
} else if (updateCheck.status === "current") {
|
|
785672
|
+
renderInfo(
|
|
785673
|
+
`v${currentVersion} — npm registry latest is v${updateCheck.latestVersion ?? currentVersion} (no newer release visible yet)`
|
|
785674
|
+
);
|
|
785675
|
+
} else {
|
|
785676
|
+
renderWarning(
|
|
785677
|
+
`v${currentVersion} — npm registry check unavailable; Quick Update status is unknown`
|
|
785678
|
+
);
|
|
785679
|
+
}
|
|
785451
785680
|
let ollamaUpdate = null;
|
|
785452
785681
|
try {
|
|
785453
785682
|
const { checkOllamaUpdate: checkOllamaUpdate2 } = await Promise.resolve().then(() => (init_setup(), setup_exports));
|
|
@@ -785501,7 +785730,9 @@ async function handleUpdate(subcommand, ctx3) {
|
|
|
785501
785730
|
} else {
|
|
785502
785731
|
items.push({
|
|
785503
785732
|
key: "info_avail",
|
|
785504
|
-
label: c3.dim(
|
|
785733
|
+
label: c3.dim(
|
|
785734
|
+
updateCheck.status === "unavailable" ? "Primary package registry status unavailable" : `Registry latest: v${updateCheck.latestVersion ?? currentVersion} (no newer release visible yet)`
|
|
785735
|
+
),
|
|
785505
785736
|
kind: "info"
|
|
785506
785737
|
});
|
|
785507
785738
|
}
|
|
@@ -785741,7 +785972,13 @@ async function handleUpdate(subcommand, ctx3) {
|
|
|
785741
785972
|
}
|
|
785742
785973
|
if (menuResult.key === "quick") {
|
|
785743
785974
|
if (!info) {
|
|
785744
|
-
|
|
785975
|
+
if (updateCheck.status === "unavailable") {
|
|
785976
|
+
renderWarning("Quick Update cannot verify npm right now; retry /update quick.");
|
|
785977
|
+
} else {
|
|
785978
|
+
renderInfo(
|
|
785979
|
+
`No newer release is visible on npm yet (registry latest: v${updateCheck.latestVersion ?? currentVersion}).`
|
|
785980
|
+
);
|
|
785981
|
+
}
|
|
785745
785982
|
return;
|
|
785746
785983
|
}
|
|
785747
785984
|
const updateOverlay = startInstallOverlay(info.latestVersion);
|
|
@@ -786431,7 +786668,13 @@ async function switchModel(query, ctx3, local = false) {
|
|
|
786431
786668
|
`Model "${query}" not found locally. Pulling from Ollama registry...`
|
|
786432
786669
|
);
|
|
786433
786670
|
try {
|
|
786434
|
-
await
|
|
786671
|
+
await withTransientTerminalSession(
|
|
786672
|
+
ctx3,
|
|
786673
|
+
"Ollama model download",
|
|
786674
|
+
`Pulling ${query}; an older Ollama installation may need an update first.`,
|
|
786675
|
+
true,
|
|
786676
|
+
() => pullModelWithAutoUpdate(query)
|
|
786677
|
+
);
|
|
786435
786678
|
const refreshedModels = await fetchModels(
|
|
786436
786679
|
ctx3.config.backendUrl,
|
|
786437
786680
|
ctx3.config.apiKey
|
|
@@ -786819,6 +787062,8 @@ async function showExposeDashboard(gateway, rl, ctx3) {
|
|
|
786819
787062
|
process.stdin.setRawMode(true);
|
|
786820
787063
|
}
|
|
786821
787064
|
process.stdin.resume();
|
|
787065
|
+
ctx3?.suspendMouse?.();
|
|
787066
|
+
writeDirectTerminal(TERMINAL_MOUSE_OFF);
|
|
786822
787067
|
enterOverlay();
|
|
786823
787068
|
overlayWrite("\x1B[?1049h\x1B[?25l");
|
|
786824
787069
|
renderDashboard();
|
|
@@ -786857,16 +787102,10 @@ async function showExposeDashboard(gateway, rl, ctx3) {
|
|
|
786857
787102
|
}
|
|
786858
787103
|
}
|
|
786859
787104
|
};
|
|
786860
|
-
if (process.stdout.isTTY) {
|
|
786861
|
-
process.stdout.write("\x1B[?1000l\x1B[?1002l\x1B[?1006l");
|
|
786862
|
-
}
|
|
786863
787105
|
process.stdin.on("data", onData);
|
|
786864
787106
|
const cleanup = () => {
|
|
786865
787107
|
stopped = true;
|
|
786866
787108
|
process.stdin.removeListener("data", onData);
|
|
786867
|
-
if (process.stdout.isTTY) {
|
|
786868
|
-
process.stdout.write("\x1B[?1000h\x1B[?1006h");
|
|
786869
|
-
}
|
|
786870
787109
|
};
|
|
786871
787110
|
const origResolve = resolve110;
|
|
786872
787111
|
resolve110 = (() => {
|
|
@@ -786900,7 +787139,7 @@ async function showExposeDashboard(gateway, rl, ctx3) {
|
|
|
786900
787139
|
renderInfo("Expose gateway stopped.");
|
|
786901
787140
|
}
|
|
786902
787141
|
}
|
|
786903
|
-
var OMNIUS_PINNED_DEPENDENCY_SPECS, NEXUS_DIRECTORY_ORIGIN, NEXUS_SPONSORS_URL, _sponsorHeartbeatTimer, _lastRegisteredSponsorPayload, __COMMAND_REGISTRY, liveDashboardBlocks, DASH_INTERNAL, localGpuMetricsCache, localGpuMetricsProbeAt, localGpuMetricsProbeInFlight;
|
|
787142
|
+
var OMNIUS_PINNED_DEPENDENCY_SPECS, NEXUS_DIRECTORY_ORIGIN, NEXUS_SPONSORS_URL, _sponsorHeartbeatTimer, _lastRegisteredSponsorPayload, __COMMAND_REGISTRY, TERMINAL_MOUSE_OFF, liveDashboardBlocks, DASH_INTERNAL, localGpuMetricsCache, localGpuMetricsProbeAt, localGpuMetricsProbeInFlight;
|
|
786904
787143
|
var init_commands = __esm({
|
|
786905
787144
|
"packages/cli/src/tui/commands.ts"() {
|
|
786906
787145
|
init_model_picker();
|
|
@@ -786950,6 +787189,7 @@ var init_commands = __esm({
|
|
|
786950
787189
|
_sponsorHeartbeatTimer = null;
|
|
786951
787190
|
_lastRegisteredSponsorPayload = null;
|
|
786952
787191
|
__COMMAND_REGISTRY = /* @__PURE__ */ new Map();
|
|
787192
|
+
TERMINAL_MOUSE_OFF = "\x1B[?9l\x1B[?1000l\x1B[?1001l\x1B[?1002l\x1B[?1003l\x1B[?1005l\x1B[?1006l\x1B[?1015l\x1B[?1016l";
|
|
786953
787193
|
(function registerNetworkCommandsOnce() {
|
|
786954
787194
|
if (findSlashCommand("access")) return;
|
|
786955
787195
|
registerSlashCommand({
|
|
@@ -843646,7 +843886,14 @@ ${entry.fullContent}`
|
|
|
843646
843886
|
case "status":
|
|
843647
843887
|
if (_apiCallbacks?.onStatus)
|
|
843648
843888
|
_apiCallbacks.onStatus(event.content ?? "");
|
|
843649
|
-
if (event.
|
|
843889
|
+
if (event.compactionLifecycle) {
|
|
843890
|
+
statusBar?.setContextCompaction(event.compactionLifecycle);
|
|
843891
|
+
if (event.compactionLifecycle.state === "applied") {
|
|
843892
|
+
statusBar?.recordCompaction();
|
|
843893
|
+
}
|
|
843894
|
+
break;
|
|
843895
|
+
}
|
|
843896
|
+
if (event.content && event.visibility !== "telemetry" && event.toolName !== "shell" && inferenceBlocks?.has(mainInferenceBlockKey)) {
|
|
843650
843897
|
inferenceBlocks.handling(
|
|
843651
843898
|
mainInferenceBlockKey,
|
|
843652
843899
|
getSecretRedactor().redactText(event.content)
|
|
@@ -845173,8 +845420,7 @@ ${result.summary}`
|
|
|
845173
845420
|
statusBar.suspendContentLayer();
|
|
845174
845421
|
banner.renderCurrentFrame();
|
|
845175
845422
|
statusBar.resumeContentLayer();
|
|
845176
|
-
statusBar.
|
|
845177
|
-
statusBar.enableMouseTracking();
|
|
845423
|
+
statusBar.restoreMouseTracking();
|
|
845178
845424
|
if (statusBar.isActive) {
|
|
845179
845425
|
statusBar.refreshDisplay();
|
|
845180
845426
|
}
|
|
@@ -845339,11 +845585,12 @@ ${result.summary}`
|
|
|
845339
845585
|
let setupReady = false;
|
|
845340
845586
|
const setupTasks = [];
|
|
845341
845587
|
let updateNotified = false;
|
|
845342
|
-
|
|
845343
|
-
if (
|
|
845344
|
-
|
|
845588
|
+
queryUpdateStatus(version5).then((updateCheck) => {
|
|
845589
|
+
if (updateCheck.status === "available" && updateCheck.latestVersion) {
|
|
845590
|
+
const latestVersion = updateCheck.latestVersion;
|
|
845591
|
+
banner.setUpdateAvailable(latestVersion);
|
|
845345
845592
|
try {
|
|
845346
|
-
statusBar.setUpdateAvailable(
|
|
845593
|
+
statusBar.setUpdateAvailable(latestVersion);
|
|
845347
845594
|
} catch {
|
|
845348
845595
|
}
|
|
845349
845596
|
const vTextLen = ` Omnius v${version5}`.length;
|
|
@@ -845358,12 +845605,12 @@ ${result.summary}`
|
|
|
845358
845605
|
updateNotified = true;
|
|
845359
845606
|
if (statusBar?.isActive) statusBar.beginContentWrite();
|
|
845360
845607
|
renderInfo(
|
|
845361
|
-
`Update available: v${
|
|
845608
|
+
`Update available: v${updateCheck.currentVersion} → v${c3.bold(c3.green(latestVersion))}. Click version ↑ or run /update.`
|
|
845362
845609
|
);
|
|
845363
845610
|
if (statusBar?.isActive) statusBar.endContentWrite();
|
|
845364
845611
|
};
|
|
845365
845612
|
if (!isResumed) writeMsg();
|
|
845366
|
-
} else {
|
|
845613
|
+
} else if (updateCheck.status === "current") {
|
|
845367
845614
|
try {
|
|
845368
845615
|
statusBar.setUpdateAvailable(null);
|
|
845369
845616
|
} catch {
|
|
@@ -845371,26 +845618,27 @@ ${result.summary}`
|
|
|
845371
845618
|
}
|
|
845372
845619
|
}).catch(() => {
|
|
845373
845620
|
});
|
|
845374
|
-
const AUTO_UPDATE_INTERVAL_MS =
|
|
845621
|
+
const AUTO_UPDATE_INTERVAL_MS = UPDATE_CHECK_INTERVAL_MS;
|
|
845375
845622
|
const autoUpdateTimer = setInterval(() => {
|
|
845376
845623
|
const updateMode = savedSettings.updateMode ?? "auto";
|
|
845377
845624
|
if (updateMode === "manual") return;
|
|
845378
|
-
|
|
845379
|
-
if (
|
|
845625
|
+
queryUpdateStatus(version5).then((updateCheck) => {
|
|
845626
|
+
if (updateCheck.status === "available" && updateCheck.latestVersion) {
|
|
845627
|
+
const latestVersion = updateCheck.latestVersion;
|
|
845380
845628
|
try {
|
|
845381
|
-
statusBar.setUpdateAvailable(
|
|
845629
|
+
statusBar.setUpdateAvailable(latestVersion);
|
|
845382
845630
|
} catch {
|
|
845383
845631
|
}
|
|
845384
|
-
banner.setUpdateAvailable(
|
|
845632
|
+
banner.setUpdateAvailable(latestVersion);
|
|
845385
845633
|
if (statusBar?.isActive && !statusBar.isStreaming && !updateNotified) {
|
|
845386
845634
|
updateNotified = true;
|
|
845387
845635
|
statusBar.beginContentWrite();
|
|
845388
845636
|
renderInfo(
|
|
845389
|
-
`Update available: v${version5} → v${
|
|
845637
|
+
`Update available: v${version5} → v${latestVersion}. Run /update to install.`
|
|
845390
845638
|
);
|
|
845391
845639
|
statusBar.endContentWrite();
|
|
845392
845640
|
}
|
|
845393
|
-
} else {
|
|
845641
|
+
} else if (updateCheck.status === "current") {
|
|
845394
845642
|
try {
|
|
845395
845643
|
statusBar.setUpdateAvailable(null);
|
|
845396
845644
|
} catch {
|
|
@@ -846107,7 +846355,7 @@ This is an independent background session started from /background.`
|
|
|
846107
846355
|
},
|
|
846108
846356
|
() => {
|
|
846109
846357
|
statusBar.cancelMouseIdle();
|
|
846110
|
-
statusBar.
|
|
846358
|
+
statusBar.restoreMouseTracking();
|
|
846111
846359
|
},
|
|
846112
846360
|
(type, col, row2) => {
|
|
846113
846361
|
statusBar.handlePointerEvent(type, col, row2);
|
|
@@ -846167,7 +846415,7 @@ This is an independent background session started from /background.`
|
|
|
846167
846415
|
statusBar.endContentWrite();
|
|
846168
846416
|
}
|
|
846169
846417
|
statusBar.cancelMouseIdle();
|
|
846170
|
-
statusBar.
|
|
846418
|
+
statusBar.restoreMouseTracking();
|
|
846171
846419
|
statusBar.refreshHeaderContent();
|
|
846172
846420
|
}
|
|
846173
846421
|
},
|
|
@@ -846225,8 +846473,7 @@ This is an independent background session started from /background.`
|
|
|
846225
846473
|
}
|
|
846226
846474
|
headerBtnActive = null;
|
|
846227
846475
|
if (statusBar.isActive) {
|
|
846228
|
-
statusBar.
|
|
846229
|
-
statusBar.enableMouseTracking();
|
|
846476
|
+
statusBar.restoreMouseTracking();
|
|
846230
846477
|
banner.renderCurrentFrame();
|
|
846231
846478
|
statusBar.refreshDisplay();
|
|
846232
846479
|
}
|
|
@@ -847136,12 +847383,37 @@ This is an independent background session started from /background.`
|
|
|
847136
847383
|
disableMouse() {
|
|
847137
847384
|
statusBar.disableMouseTracking();
|
|
847138
847385
|
},
|
|
847386
|
+
suspendMouse() {
|
|
847387
|
+
statusBar.suspendMouseTracking();
|
|
847388
|
+
},
|
|
847139
847389
|
enableMouse() {
|
|
847140
847390
|
statusBar.enableMouseTracking();
|
|
847141
847391
|
},
|
|
847142
847392
|
isMouseEnabled() {
|
|
847143
847393
|
return statusBar.isMouseTrackingEnabled?.() ?? true;
|
|
847144
847394
|
},
|
|
847395
|
+
acquireTerminalPassthrough() {
|
|
847396
|
+
const stdinWasPaused = process.stdin.isPaused();
|
|
847397
|
+
const releaseMouse = statusBar.acquireTerminalPassthrough();
|
|
847398
|
+
try {
|
|
847399
|
+
rl.pause?.();
|
|
847400
|
+
process.stdin.pause();
|
|
847401
|
+
} catch {
|
|
847402
|
+
}
|
|
847403
|
+
let released = false;
|
|
847404
|
+
return () => {
|
|
847405
|
+
if (released) return;
|
|
847406
|
+
released = true;
|
|
847407
|
+
releaseMouse();
|
|
847408
|
+
if (!stdinWasPaused) {
|
|
847409
|
+
try {
|
|
847410
|
+
rl.resume?.();
|
|
847411
|
+
process.stdin.resume();
|
|
847412
|
+
} catch {
|
|
847413
|
+
}
|
|
847414
|
+
}
|
|
847415
|
+
};
|
|
847416
|
+
},
|
|
847145
847417
|
stopBanner() {
|
|
847146
847418
|
banner.stop();
|
|
847147
847419
|
if (carousel.isRunning) carousel.stop();
|
|
@@ -849795,7 +850067,7 @@ ${result.content.slice(0, 2e3)}${result.content.length > 2e3 ? "\n[truncated]" :
|
|
|
849795
850067
|
passwordShowPlain = false;
|
|
849796
850068
|
sessionSudoPassword = input;
|
|
849797
850069
|
activeTask.runner.setSudoPassword(input);
|
|
849798
|
-
statusBar.
|
|
850070
|
+
statusBar.restoreMouseTracking();
|
|
849799
850071
|
statusBar.setInputStateProvider(() => ({
|
|
849800
850072
|
line: rl.line ?? "",
|
|
849801
850073
|
cursor: rl.cursor ?? 0
|
package/dist/launcher.cjs
CHANGED
|
@@ -8,22 +8,27 @@ const { spawn, spawnSync } = require('node:child_process');
|
|
|
8
8
|
const { resolve } = require('node:path');
|
|
9
9
|
|
|
10
10
|
function resetTerminal() {
|
|
11
|
-
|
|
12
|
-
//
|
|
11
|
+
// Disable reporting before canonical/ECHO mode returns. Reversing this order
|
|
12
|
+
// lets buffered pointer reports appear as literal ESC[<35;x;yM text.
|
|
13
13
|
const ESC = '\x1B';
|
|
14
14
|
try {
|
|
15
15
|
process.stdout.write(
|
|
16
16
|
ESC + '[?25h' + // show cursor
|
|
17
|
+
ESC + '[?9l' + // legacy X10 mouse off
|
|
17
18
|
ESC + '[?1000l' + // X10 mouse off
|
|
19
|
+
ESC + '[?1001l' + // highlight tracking off
|
|
18
20
|
ESC + '[?1002l' + // button-event mouse off
|
|
19
21
|
ESC + '[?1003l' + // any-event mouse off
|
|
22
|
+
ESC + '[?1005l' + // UTF-8 mouse encoding off
|
|
20
23
|
ESC + '[?1006l' + // SGR mouse off
|
|
21
24
|
ESC + '[?1015l' + // urxvt mouse off
|
|
25
|
+
ESC + '[?1016l' + // SGR pixel mouse off
|
|
22
26
|
ESC + '[?2004l' + // bracketed paste off
|
|
23
27
|
ESC + '[?1049l' + // exit alt screen
|
|
24
28
|
ESC + '[0m' // reset attributes
|
|
25
29
|
);
|
|
26
30
|
} catch {}
|
|
31
|
+
try { if (process.stdin.isTTY && typeof process.stdin.setRawMode === 'function') process.stdin.setRawMode(false); } catch {}
|
|
27
32
|
// stty sane (POSIX)
|
|
28
33
|
if (process.platform !== 'win32' && process.stdin.isTTY) {
|
|
29
34
|
try { spawnSync('stty', ['sane'], { stdio: 'inherit' }); } catch {}
|
package/dist/update-worker.js
CHANGED
|
@@ -296726,7 +296726,7 @@ import { basename as basename8, dirname as dirname9, join as join17 } from "node
|
|
|
296726
296726
|
|
|
296727
296727
|
// packages/cli/src/updater.ts
|
|
296728
296728
|
import { join as join16 } from "node:path";
|
|
296729
|
-
var
|
|
296729
|
+
var UPDATE_CHECK_INTERVAL_MS = 60 * 1e3;
|
|
296730
296730
|
var CACHE_DIR = resolveUpdatePaths().stateDir;
|
|
296731
296731
|
var CACHE_FILE = join16(CACHE_DIR, "registry-check.json");
|
|
296732
296732
|
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.707",
|
|
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.707",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
|
@@ -1081,9 +1081,9 @@
|
|
|
1081
1081
|
"license": "Apache-2.0 OR MIT"
|
|
1082
1082
|
},
|
|
1083
1083
|
"node_modules/@libp2p/noise/node_modules/protons-runtime": {
|
|
1084
|
-
"version": "7.
|
|
1085
|
-
"resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-7.
|
|
1086
|
-
"integrity": "sha512-
|
|
1084
|
+
"version": "7.1.0",
|
|
1085
|
+
"resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-7.1.0.tgz",
|
|
1086
|
+
"integrity": "sha512-TAL8CpKEUK+k0KKZIQrDTBgyH86zZAjz3ZULcCjxrb9zvkTVEGJyVbATmTV4KpZmFFEH7ERWDNWxfiE+N3bOUQ==",
|
|
1087
1087
|
"license": "Apache-2.0 OR MIT",
|
|
1088
1088
|
"dependencies": {
|
|
1089
1089
|
"uint8-varint": "^3.0.0",
|
|
@@ -1167,9 +1167,9 @@
|
|
|
1167
1167
|
"license": "Apache-2.0 OR MIT"
|
|
1168
1168
|
},
|
|
1169
1169
|
"node_modules/@libp2p/peer-record/node_modules/protons-runtime": {
|
|
1170
|
-
"version": "7.
|
|
1171
|
-
"resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-7.
|
|
1172
|
-
"integrity": "sha512-
|
|
1170
|
+
"version": "7.1.0",
|
|
1171
|
+
"resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-7.1.0.tgz",
|
|
1172
|
+
"integrity": "sha512-TAL8CpKEUK+k0KKZIQrDTBgyH86zZAjz3ZULcCjxrb9zvkTVEGJyVbATmTV4KpZmFFEH7ERWDNWxfiE+N3bOUQ==",
|
|
1173
1173
|
"license": "Apache-2.0 OR MIT",
|
|
1174
1174
|
"dependencies": {
|
|
1175
1175
|
"uint8-varint": "^3.0.0",
|
|
@@ -1277,9 +1277,9 @@
|
|
|
1277
1277
|
"license": "Apache-2.0 OR MIT"
|
|
1278
1278
|
},
|
|
1279
1279
|
"node_modules/@libp2p/record/node_modules/protons-runtime": {
|
|
1280
|
-
"version": "7.
|
|
1281
|
-
"resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-7.
|
|
1282
|
-
"integrity": "sha512-
|
|
1280
|
+
"version": "7.1.0",
|
|
1281
|
+
"resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-7.1.0.tgz",
|
|
1282
|
+
"integrity": "sha512-TAL8CpKEUK+k0KKZIQrDTBgyH86zZAjz3ZULcCjxrb9zvkTVEGJyVbATmTV4KpZmFFEH7ERWDNWxfiE+N3bOUQ==",
|
|
1283
1283
|
"license": "Apache-2.0 OR MIT",
|
|
1284
1284
|
"dependencies": {
|
|
1285
1285
|
"uint8-varint": "^3.0.0",
|
|
@@ -1515,9 +1515,9 @@
|
|
|
1515
1515
|
"license": "Apache-2.0 OR MIT"
|
|
1516
1516
|
},
|
|
1517
1517
|
"node_modules/@libp2p/webrtc/node_modules/node-datachannel": {
|
|
1518
|
-
"version": "0.33.
|
|
1519
|
-
"resolved": "https://registry.npmjs.org/node-datachannel/-/node-datachannel-0.33.
|
|
1520
|
-
"integrity": "sha512-
|
|
1518
|
+
"version": "0.33.3",
|
|
1519
|
+
"resolved": "https://registry.npmjs.org/node-datachannel/-/node-datachannel-0.33.3.tgz",
|
|
1520
|
+
"integrity": "sha512-Tf7bbOjUXh7gPiWKTFpMDZXpippya6pdsEz3tgxsIJiW+BMLWSaX7O6F9kDjHu0GCan4vSmXlfA8l21O4D+K9Q==",
|
|
1521
1521
|
"license": "MPL 2.0",
|
|
1522
1522
|
"dependencies": {
|
|
1523
1523
|
"detect-libc": "^2.0.4"
|
|
@@ -1538,9 +1538,9 @@
|
|
|
1538
1538
|
}
|
|
1539
1539
|
},
|
|
1540
1540
|
"node_modules/@libp2p/webrtc/node_modules/protons-runtime": {
|
|
1541
|
-
"version": "7.
|
|
1542
|
-
"resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-7.
|
|
1543
|
-
"integrity": "sha512-
|
|
1541
|
+
"version": "7.1.0",
|
|
1542
|
+
"resolved": "https://registry.npmjs.org/protons-runtime/-/protons-runtime-7.1.0.tgz",
|
|
1543
|
+
"integrity": "sha512-TAL8CpKEUK+k0KKZIQrDTBgyH86zZAjz3ZULcCjxrb9zvkTVEGJyVbATmTV4KpZmFFEH7ERWDNWxfiE+N3bOUQ==",
|
|
1544
1544
|
"license": "Apache-2.0 OR MIT",
|
|
1545
1545
|
"dependencies": {
|
|
1546
1546
|
"uint8-varint": "^3.0.0",
|
|
@@ -1636,13 +1636,13 @@
|
|
|
1636
1636
|
}
|
|
1637
1637
|
},
|
|
1638
1638
|
"node_modules/@msgpack/msgpack": {
|
|
1639
|
-
"version": "
|
|
1640
|
-
"resolved": "https://registry.npmjs.org/@msgpack/msgpack/-/msgpack-
|
|
1641
|
-
"integrity": "sha512-
|
|
1639
|
+
"version": "3.1.3",
|
|
1640
|
+
"resolved": "https://registry.npmjs.org/@msgpack/msgpack/-/msgpack-3.1.3.tgz",
|
|
1641
|
+
"integrity": "sha512-47XIizs9XZXvuJgoaJUIE2lFoID8ugvc0jzSHP+Ptfk8nTbnR8g788wv48N03Kx0UkAv559HWRQ3yzOgzlRNUA==",
|
|
1642
1642
|
"license": "ISC",
|
|
1643
1643
|
"optional": true,
|
|
1644
1644
|
"engines": {
|
|
1645
|
-
"node": ">=
|
|
1645
|
+
"node": ">= 18"
|
|
1646
1646
|
}
|
|
1647
1647
|
},
|
|
1648
1648
|
"node_modules/@multiformats/dns": {
|
|
@@ -2426,12 +2426,12 @@
|
|
|
2426
2426
|
}
|
|
2427
2427
|
},
|
|
2428
2428
|
"node_modules/@types/node": {
|
|
2429
|
-
"version": "
|
|
2430
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-
|
|
2431
|
-
"integrity": "sha512-
|
|
2429
|
+
"version": "22.20.2",
|
|
2430
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.2.tgz",
|
|
2431
|
+
"integrity": "sha512-xlvWf4Vs9n1PEVYwP1n4vvG07M6y8WgvJ2t0vbrWTmijsIHp1cS+uJ2kMIRdY3nHZK0nCYKrPeD171+SzF4/zw==",
|
|
2432
2432
|
"license": "MIT",
|
|
2433
2433
|
"dependencies": {
|
|
2434
|
-
"undici-types": "~
|
|
2434
|
+
"undici-types": "~6.21.0"
|
|
2435
2435
|
}
|
|
2436
2436
|
},
|
|
2437
2437
|
"node_modules/@types/sinon": {
|
|
@@ -5717,20 +5717,20 @@
|
|
|
5717
5717
|
}
|
|
5718
5718
|
},
|
|
5719
5719
|
"node_modules/neovim": {
|
|
5720
|
-
"version": "5.
|
|
5721
|
-
"resolved": "https://registry.npmjs.org/neovim/-/neovim-5.
|
|
5722
|
-
"integrity": "sha512-
|
|
5720
|
+
"version": "5.5.0",
|
|
5721
|
+
"resolved": "https://registry.npmjs.org/neovim/-/neovim-5.5.0.tgz",
|
|
5722
|
+
"integrity": "sha512-B68xdr5OUwLuUgD73aDa3yCg10Lg7gqroIDrSadvDpCJFC52pOD22iOI+omzQi+sgixTl5UyOHqnAd73E5RlEA==",
|
|
5723
5723
|
"license": "MIT",
|
|
5724
5724
|
"optional": true,
|
|
5725
5725
|
"dependencies": {
|
|
5726
|
-
"@msgpack/msgpack": "^
|
|
5726
|
+
"@msgpack/msgpack": "^3.1.3",
|
|
5727
5727
|
"winston": "3.15.0"
|
|
5728
5728
|
},
|
|
5729
5729
|
"bin": {
|
|
5730
5730
|
"neovim-node-host": "bin/cli.js"
|
|
5731
5731
|
},
|
|
5732
5732
|
"engines": {
|
|
5733
|
-
"node": ">=
|
|
5733
|
+
"node": ">=14"
|
|
5734
5734
|
}
|
|
5735
5735
|
},
|
|
5736
5736
|
"node_modules/netmask": {
|
|
@@ -7643,9 +7643,9 @@
|
|
|
7643
7643
|
}
|
|
7644
7644
|
},
|
|
7645
7645
|
"node_modules/undici-types": {
|
|
7646
|
-
"version": "
|
|
7647
|
-
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-
|
|
7648
|
-
"integrity": "sha512-
|
|
7646
|
+
"version": "6.21.0",
|
|
7647
|
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
|
7648
|
+
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
|
7649
7649
|
"license": "MIT"
|
|
7650
7650
|
},
|
|
7651
7651
|
"node_modules/universalify": {
|
|
@@ -8049,9 +8049,9 @@
|
|
|
8049
8049
|
}
|
|
8050
8050
|
},
|
|
8051
8051
|
"node_modules/zod": {
|
|
8052
|
-
"version": "4.
|
|
8053
|
-
"resolved": "https://registry.npmjs.org/zod/-/zod-4.
|
|
8054
|
-
"integrity": "sha512-
|
|
8052
|
+
"version": "4.6.2",
|
|
8053
|
+
"resolved": "https://registry.npmjs.org/zod/-/zod-4.6.2.tgz",
|
|
8054
|
+
"integrity": "sha512-lh5RCAGFa1Cm2hjtNwLQhSs/AsqdWnTQaBER9fEwN/88pSh7KOtJavtBx/0VlkN/uFd61SwYmljLMDAsHlvzBQ==",
|
|
8055
8055
|
"license": "MIT",
|
|
8056
8056
|
"funding": {
|
|
8057
8057
|
"url": "https://github.com/sponsors/colinhacks"
|
package/package.json
CHANGED