omnius 1.0.163 โ 1.0.164
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 +261 -67
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -572836,6 +572836,7 @@ __export(render_exports, {
|
|
|
572836
572836
|
renderAssistantText: () => renderAssistantText,
|
|
572837
572837
|
renderCompactHeader: () => renderCompactHeader,
|
|
572838
572838
|
renderConfig: () => renderConfig,
|
|
572839
|
+
renderContextIntakeBox: () => renderContextIntakeBox,
|
|
572839
572840
|
renderError: () => renderError,
|
|
572840
572841
|
renderHeader: () => renderHeader,
|
|
572841
572842
|
renderImageAsciiPreview: () => renderImageAsciiPreview,
|
|
@@ -573247,6 +573248,54 @@ function renderToolDynamicBlock(kind, render2, opts) {
|
|
|
573247
573248
|
}
|
|
573248
573249
|
process.stdout.write(text);
|
|
573249
573250
|
}
|
|
573251
|
+
function appendContextBoxSection(body, label, value2) {
|
|
573252
|
+
const text = String(value2 ?? "").trim();
|
|
573253
|
+
if (!text) return;
|
|
573254
|
+
if (body.length > 0) body.push({ text: "", mode: "wrap", kind: "plain" });
|
|
573255
|
+
body.push({ text: label, mode: "wrap", kind: "dim" });
|
|
573256
|
+
for (const line of text.split("\n")) {
|
|
573257
|
+
body.push({ text: line, mode: "wrap", kind: "markdown" });
|
|
573258
|
+
}
|
|
573259
|
+
}
|
|
573260
|
+
function appendContextBoxList(body, label, values) {
|
|
573261
|
+
const items = (values ?? []).map((item) => item.trim()).filter(Boolean);
|
|
573262
|
+
if (items.length === 0) return;
|
|
573263
|
+
if (body.length > 0) body.push({ text: "", mode: "wrap", kind: "plain" });
|
|
573264
|
+
body.push({ text: label, mode: "wrap", kind: "dim" });
|
|
573265
|
+
for (const item of items) {
|
|
573266
|
+
body.push({ text: `- ${item}`, mode: "wrap", kind: "markdown" });
|
|
573267
|
+
}
|
|
573268
|
+
}
|
|
573269
|
+
function renderContextIntakeBox(opts) {
|
|
573270
|
+
const body = [];
|
|
573271
|
+
appendContextBoxSection(body, "Added context:", opts.rawText);
|
|
573272
|
+
appendContextBoxSection(body, "Triage:", opts.inference);
|
|
573273
|
+
appendContextBoxSection(body, "Runner instruction:", opts.runnerInstruction);
|
|
573274
|
+
appendContextBoxList(body, "Conflicts:", opts.conflicts);
|
|
573275
|
+
appendContextBoxList(body, "Alternative interpretations:", opts.alternatives);
|
|
573276
|
+
if (body.length === 0) {
|
|
573277
|
+
body.push({
|
|
573278
|
+
text: "No context content recorded.",
|
|
573279
|
+
mode: "wrap",
|
|
573280
|
+
kind: "dim"
|
|
573281
|
+
});
|
|
573282
|
+
}
|
|
573283
|
+
const metrics2 = [
|
|
573284
|
+
...opts.metadata ?? [],
|
|
573285
|
+
opts.packetId ? `id ${opts.packetId.slice(0, 8)}` : ""
|
|
573286
|
+
].filter(Boolean).join(" ยท ");
|
|
573287
|
+
renderToolDynamicBlock(
|
|
573288
|
+
"tool-result",
|
|
573289
|
+
(width) => buildToolBoxLines({
|
|
573290
|
+
title: opts.title,
|
|
573291
|
+
metrics: metrics2,
|
|
573292
|
+
body,
|
|
573293
|
+
colorCode: 226,
|
|
573294
|
+
metricsColorCode: 222
|
|
573295
|
+
}, width),
|
|
573296
|
+
opts.host === void 0 ? {} : { host: opts.host }
|
|
573297
|
+
);
|
|
573298
|
+
}
|
|
573250
573299
|
function buildToolCallBoxLines(toolName, args, verbose, width) {
|
|
573251
573300
|
const icon = _emojisEnabled ? `${TOOL_ICONS[toolName] ?? "๐ง"} ` : "";
|
|
573252
573301
|
const label = TOOL_LABELS[toolName] ?? toolName;
|
|
@@ -582641,11 +582690,13 @@ var init_status_bar = __esm({
|
|
|
582641
582690
|
stdinHooked = false;
|
|
582642
582691
|
/** COHERE distributed cognitive commons active flag */
|
|
582643
582692
|
_cohereActive = false;
|
|
582644
|
-
/** Mouse tracking state
|
|
582645
|
-
_mouseTrackingEnabled =
|
|
582646
|
-
/**
|
|
582693
|
+
/** Mouse tracking state for header buttons + scroll wheel. */
|
|
582694
|
+
_mouseTrackingEnabled = false;
|
|
582695
|
+
/** Enabled automatically once MouseFilterStream is installed; /mouse off is an emergency escape hatch. */
|
|
582696
|
+
_mouseTrackingPreferred = false;
|
|
582697
|
+
/** Legacy keyboard-selection guard; mouse drag selection is terminal-native. */
|
|
582647
582698
|
_mouseSelecting = false;
|
|
582648
|
-
/** Text selection state
|
|
582699
|
+
/** Text selection state for keyboard/explicit copy paths; mouse drag is not owned by the TUI. */
|
|
582649
582700
|
_textSelection = new TextSelection({
|
|
582650
582701
|
getContentLines: () => this._contentLines,
|
|
582651
582702
|
getScrollOffset: () => this._contentScrollOffset,
|
|
@@ -584180,12 +584231,11 @@ var init_status_bar = __esm({
|
|
|
584180
584231
|
return this._cohereActive;
|
|
584181
584232
|
}
|
|
584182
584233
|
// โโ Mouse tracking management โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
584183
|
-
//
|
|
584184
|
-
//
|
|
584185
|
-
//
|
|
584186
|
-
//
|
|
584187
|
-
//
|
|
584188
|
-
// All mode transitions check neovim focus to avoid conflicts.
|
|
584234
|
+
// Mouse reporting is required for header buttons and scroll-wheel routing.
|
|
584235
|
+
// Use click-only reporting (?1000h) instead of drag-motion reporting (?1002h)
|
|
584236
|
+
// so Omnius does not own click-drag selection or paint fake highlights while
|
|
584237
|
+
// tokens are streaming. Overlay/select UIs may temporarily suspend mouse mode
|
|
584238
|
+
// and then call restoreMouseTracking() on return.
|
|
584189
584239
|
/** Callback to check if neovim has focus (set by interactive.ts to avoid circular import) */
|
|
584190
584240
|
_isNeovimFocused = null;
|
|
584191
584241
|
/** Register neovim focus checker โ called from interactive.ts after neovim-mode imports */
|
|
@@ -584196,27 +584246,38 @@ var init_status_bar = __esm({
|
|
|
584196
584246
|
isMouseTrackingEnabled() {
|
|
584197
584247
|
return this._mouseTrackingEnabled;
|
|
584198
584248
|
}
|
|
584199
|
-
/** Enable mouse tracking
|
|
584249
|
+
/** Enable mouse tracking for header buttons + scroll wheel. */
|
|
584200
584250
|
enableMouseTracking() {
|
|
584251
|
+
this._mouseTrackingPreferred = true;
|
|
584252
|
+
this.restoreMouseTracking();
|
|
584253
|
+
}
|
|
584254
|
+
/** Temporarily turn off terminal mouse reporting without changing user preference. */
|
|
584255
|
+
suspendMouseTracking() {
|
|
584256
|
+
if (!this._mouseTrackingEnabled) return;
|
|
584257
|
+
this._mouseTrackingEnabled = false;
|
|
584258
|
+
if (process.stdout.isTTY) {
|
|
584259
|
+
this._trueStdoutWrite.call(process.stdout, "\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l");
|
|
584260
|
+
}
|
|
584261
|
+
}
|
|
584262
|
+
/** Re-apply the current mouse preference after overlays, password prompts, or redraws. */
|
|
584263
|
+
restoreMouseTracking() {
|
|
584264
|
+
if (!this._mouseTrackingPreferred) {
|
|
584265
|
+
this.suspendMouseTracking();
|
|
584266
|
+
return;
|
|
584267
|
+
}
|
|
584201
584268
|
if (this._mouseTrackingEnabled || isOverlayActive()) return;
|
|
584202
584269
|
if (this._isNeovimFocused?.()) return;
|
|
584203
584270
|
this._mouseTrackingEnabled = true;
|
|
584204
584271
|
if (process.stdout.isTTY) {
|
|
584205
|
-
this._trueStdoutWrite.call(process.stdout, "\x1B[?
|
|
584272
|
+
this._trueStdoutWrite.call(process.stdout, "\x1B[?1000h\x1B[?1006h");
|
|
584206
584273
|
}
|
|
584207
584274
|
}
|
|
584208
584275
|
/** Disable mouse tracking entirely (overlay transitions + exit). */
|
|
584209
584276
|
disableMouseTracking() {
|
|
584210
|
-
|
|
584211
|
-
this.
|
|
584212
|
-
if (process.stdout.isTTY) {
|
|
584213
|
-
this._trueStdoutWrite.call(process.stdout, "\x1B[?1002l\x1B[?1006l");
|
|
584214
|
-
}
|
|
584277
|
+
this._mouseTrackingPreferred = false;
|
|
584278
|
+
this.suspendMouseTracking();
|
|
584215
584279
|
}
|
|
584216
|
-
/**
|
|
584217
|
-
* because mouse tracking stays active at all times. Disabling tracking would
|
|
584218
|
-
* break scroll wheel and in-app selection highlighting. */
|
|
584219
|
-
/** Cancel mouse idle timer (user is actively scrolling or streaming started) */
|
|
584280
|
+
/** Cancel mouse idle timer (legacy hook; mouse tracking is preference-driven). */
|
|
584220
584281
|
cancelMouseIdle() {
|
|
584221
584282
|
}
|
|
584222
584283
|
// โโ Text Selection + Header Buttons โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
@@ -584235,7 +584296,8 @@ var init_status_bar = __esm({
|
|
|
584235
584296
|
/**
|
|
584236
584297
|
* Handle a mouse pointer event (press/drag/release).
|
|
584237
584298
|
* Called by MouseFilterStream's pointer handler.
|
|
584238
|
-
* Routes to
|
|
584299
|
+
* Routes to header/footer/tab clicks and scroll affordances. Content-area
|
|
584300
|
+
* drag selection is deliberately left to the terminal.
|
|
584239
584301
|
*/
|
|
584240
584302
|
handlePointerEvent(type, col, row) {
|
|
584241
584303
|
if (!this.active) return;
|
|
@@ -584313,26 +584375,7 @@ var init_status_bar = __esm({
|
|
|
584313
584375
|
const L = layout();
|
|
584314
584376
|
const inContent = row >= this.scrollRegionTop && row <= L.contentBottom;
|
|
584315
584377
|
if (inContent) {
|
|
584316
|
-
|
|
584317
|
-
this._mouseSelecting = true;
|
|
584318
|
-
this._autoScroll = false;
|
|
584319
|
-
this._textSelection.onMousePress(row, col);
|
|
584320
|
-
return;
|
|
584321
|
-
}
|
|
584322
|
-
if (type === "drag") {
|
|
584323
|
-
this._textSelection.onMouseDrag(row, col);
|
|
584324
|
-
this.repaintContent();
|
|
584325
|
-
return;
|
|
584326
|
-
}
|
|
584327
|
-
if (type === "release") {
|
|
584328
|
-
this._mouseSelecting = false;
|
|
584329
|
-
this._textSelection.onMouseRelease(row, col);
|
|
584330
|
-
if (this._textSelection.hasSelection) {
|
|
584331
|
-
this._textSelection.copyToClipboard();
|
|
584332
|
-
this.repaintContent();
|
|
584333
|
-
}
|
|
584334
|
-
return;
|
|
584335
|
-
}
|
|
584378
|
+
return;
|
|
584336
584379
|
}
|
|
584337
584380
|
}
|
|
584338
584381
|
/** Copy current selection to clipboard. Returns true if copied. */
|
|
@@ -584739,7 +584782,7 @@ var init_status_bar = __esm({
|
|
|
584739
584782
|
setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
|
|
584740
584783
|
setFooterHeight(this._currentFooterHeight);
|
|
584741
584784
|
this.cancelMouseIdle();
|
|
584742
|
-
this.
|
|
584785
|
+
this.restoreMouseTracking();
|
|
584743
584786
|
const L = layout();
|
|
584744
584787
|
const scrollEnd = L.scrollRegionBottom;
|
|
584745
584788
|
if (this.writeDepth === 1 && !this._origWrite) {
|
|
@@ -585119,7 +585162,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
585119
585162
|
scrollContentUp(lines = 1) {
|
|
585120
585163
|
if (!this.active) return;
|
|
585121
585164
|
this.cancelMouseIdle();
|
|
585122
|
-
this.
|
|
585165
|
+
this.restoreMouseTracking();
|
|
585123
585166
|
this._autoScroll = false;
|
|
585124
585167
|
const maxOffset = this.maxContentScrollOffset();
|
|
585125
585168
|
this._contentScrollOffset = Math.min(
|
|
@@ -585133,7 +585176,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
585133
585176
|
scrollContentDown(lines = 1) {
|
|
585134
585177
|
if (!this.active) return;
|
|
585135
585178
|
this.cancelMouseIdle();
|
|
585136
|
-
this.
|
|
585179
|
+
this.restoreMouseTracking();
|
|
585137
585180
|
this._contentScrollOffset = Math.min(
|
|
585138
585181
|
this.maxContentScrollOffset(),
|
|
585139
585182
|
Math.max(0, this._contentScrollOffset - lines)
|
|
@@ -599470,7 +599513,7 @@ Error: ${err2 instanceof Error ? err2.message : String(err2)}`
|
|
|
599470
599513
|
}
|
|
599471
599514
|
}
|
|
599472
599515
|
if (process.stdout.isTTY) {
|
|
599473
|
-
process.stdout.write("\x1B[?
|
|
599516
|
+
process.stdout.write("\x1B[?1000h\x1B[?1006h");
|
|
599474
599517
|
}
|
|
599475
599518
|
if (process.stdout.isTTY) {
|
|
599476
599519
|
process.stdout.write("\x1B[?1003l");
|
|
@@ -600703,9 +600746,9 @@ ${reason}
|
|
|
600703
600746
|
try {
|
|
600704
600747
|
if (hadMouse) {
|
|
600705
600748
|
ctx3.enableMouse?.();
|
|
600706
|
-
writeDirectTerminal("\x1B[?
|
|
600749
|
+
writeDirectTerminal("\x1B[?1000h\x1B[?1006h");
|
|
600707
600750
|
} else {
|
|
600708
|
-
writeDirectTerminal("\x1B[?1002l\x1B[?1006l");
|
|
600751
|
+
writeDirectTerminal("\x1B[?1000l\x1B[?1002l\x1B[?1006l");
|
|
600709
600752
|
}
|
|
600710
600753
|
} catch {
|
|
600711
600754
|
}
|
|
@@ -603854,14 +603897,14 @@ Clone a new voice: /voice clone <wav-file> [name]`);
|
|
|
603854
603897
|
if (t2 === "off" || t2 === "0" || t2 === "false" || t2 === "no") {
|
|
603855
603898
|
ctx3.disableMouse?.();
|
|
603856
603899
|
renderInfo(
|
|
603857
|
-
"Mouse tracking: off โ
|
|
603900
|
+
"Mouse tracking: off โ app header buttons and scroll wheel are paused. Re-enable with /mouse on."
|
|
603858
603901
|
);
|
|
603859
603902
|
return "handled";
|
|
603860
603903
|
}
|
|
603861
603904
|
if (t2 === "on" || t2 === "1" || t2 === "true" || t2 === "yes") {
|
|
603862
603905
|
ctx3.enableMouse?.();
|
|
603863
603906
|
renderInfo(
|
|
603864
|
-
"Mouse tracking: on โ header buttons + scroll wheel active
|
|
603907
|
+
"Mouse tracking: on โ header buttons + scroll wheel active; drag-motion capture remains disabled."
|
|
603865
603908
|
);
|
|
603866
603909
|
return "handled";
|
|
603867
603910
|
}
|
|
@@ -603872,7 +603915,7 @@ Clone a new voice: /voice clone <wav-file> [name]`);
|
|
|
603872
603915
|
if (isOnNow) {
|
|
603873
603916
|
ctx3.disableMouse?.();
|
|
603874
603917
|
renderInfo(
|
|
603875
|
-
"Mouse tracking: off โ
|
|
603918
|
+
"Mouse tracking: off โ app header buttons and scroll wheel are paused. Re-enable with /mouse on."
|
|
603876
603919
|
);
|
|
603877
603920
|
} else {
|
|
603878
603921
|
ctx3.enableMouse?.();
|
|
@@ -613902,7 +613945,7 @@ async function showExposeDashboard(gateway, rl, ctx3) {
|
|
|
613902
613945
|
stopped = true;
|
|
613903
613946
|
process.stdin.removeListener("data", onData);
|
|
613904
613947
|
if (process.stdout.isTTY) {
|
|
613905
|
-
process.stdout.write("\x1B[?
|
|
613948
|
+
process.stdout.write("\x1B[?1000h\x1B[?1006h");
|
|
613906
613949
|
}
|
|
613907
613950
|
};
|
|
613908
613951
|
const origResolve = resolve57;
|
|
@@ -638988,7 +639031,6 @@ var init_mouse_filter = __esm({
|
|
|
638988
639031
|
const hasShift = (btn & 4) !== 0 && btn < 32;
|
|
638989
639032
|
if (btn === 2) {
|
|
638990
639033
|
} else if (hasShift) {
|
|
638991
|
-
process.stdout.write("\x1B[?1002l\x1B[?1006l");
|
|
638992
639034
|
} else if ((btn === 0 || btn === 1) && suffix === "M") {
|
|
638993
639035
|
this.onPointer("press", col, row);
|
|
638994
639036
|
} else if (btn >= 32 && btn <= 35 && suffix === "M") {
|
|
@@ -664269,6 +664311,70 @@ async function createSteeringIntakeBackend(config, repoRoot) {
|
|
|
664269
664311
|
false
|
|
664270
664312
|
);
|
|
664271
664313
|
}
|
|
664314
|
+
function formatTaskCompletionMeta(meta) {
|
|
664315
|
+
if (!meta) return "no prior task metrics recorded";
|
|
664316
|
+
const dur = meta.durationMs < 6e4 ? `${(meta.durationMs / 1e3).toFixed(1)}s` : `${Math.floor(meta.durationMs / 6e4)}m ${Math.floor(meta.durationMs % 6e4 / 1e3)}s`;
|
|
664317
|
+
return `${meta.turns} turns, ${meta.toolCalls} tool calls, ${dur}, ${meta.model}`;
|
|
664318
|
+
}
|
|
664319
|
+
function buildNewTaskIntakePacket(ingress, interpretation, previousPrompt, previousSummary, previousMeta) {
|
|
664320
|
+
const lines = [
|
|
664321
|
+
"[NEW_TASK_INTAKE v1]",
|
|
664322
|
+
`id: ${ingress.id}`,
|
|
664323
|
+
`sourceSurface: ${ingress.sourceSurface}`,
|
|
664324
|
+
`feedbackKind: next_user_task`,
|
|
664325
|
+
`authority: ${ingress.authority}`,
|
|
664326
|
+
`timestamp: ${ingress.timestamp}`,
|
|
664327
|
+
"",
|
|
664328
|
+
"Instruction hierarchy:",
|
|
664329
|
+
"- Treat this as user-level task intent, below system/developer/tool safety and above older task assumptions when they conflict.",
|
|
664330
|
+
"",
|
|
664331
|
+
"Previous task prompt:",
|
|
664332
|
+
previousPrompt.trim() || "(not recorded)",
|
|
664333
|
+
"",
|
|
664334
|
+
"Previous task completion:",
|
|
664335
|
+
previousSummary.trim() || "(not recorded)",
|
|
664336
|
+
"",
|
|
664337
|
+
"Previous task metrics:",
|
|
664338
|
+
formatTaskCompletionMeta(previousMeta),
|
|
664339
|
+
"",
|
|
664340
|
+
"New task:",
|
|
664341
|
+
ingress.rawText,
|
|
664342
|
+
""
|
|
664343
|
+
];
|
|
664344
|
+
if (interpretation) {
|
|
664345
|
+
lines.push(
|
|
664346
|
+
"Model-derived task transition assessment:",
|
|
664347
|
+
`inference: ${interpretation.inference}`,
|
|
664348
|
+
`runnerInstruction: ${interpretation.runnerInstruction}`
|
|
664349
|
+
);
|
|
664350
|
+
if (interpretation.conflicts?.length) {
|
|
664351
|
+
lines.push(
|
|
664352
|
+
"conflicts:",
|
|
664353
|
+
...interpretation.conflicts.map((item) => `- ${item}`)
|
|
664354
|
+
);
|
|
664355
|
+
}
|
|
664356
|
+
if (interpretation.alternatives?.length) {
|
|
664357
|
+
lines.push(
|
|
664358
|
+
"alternative interpretations:",
|
|
664359
|
+
...interpretation.alternatives.map((item) => `- ${item}`)
|
|
664360
|
+
);
|
|
664361
|
+
}
|
|
664362
|
+
if (interpretation.memoryNote) {
|
|
664363
|
+
lines.push(`memoryNote: ${interpretation.memoryNote}`);
|
|
664364
|
+
}
|
|
664365
|
+
lines.push("");
|
|
664366
|
+
} else {
|
|
664367
|
+
lines.push("Model-derived task transition assessment: unavailable", "");
|
|
664368
|
+
}
|
|
664369
|
+
lines.push(
|
|
664370
|
+
"Interleave contract:",
|
|
664371
|
+
"- Consume this before the first assistant/tool decision for the new task.",
|
|
664372
|
+
"- Decide whether the new task continues, corrects, or pivots away from the previous task.",
|
|
664373
|
+
"- Use the new task as the active objective; prior-task context is only relevant when it changes the next action.",
|
|
664374
|
+
"[/NEW_TASK_INTAKE]"
|
|
664375
|
+
);
|
|
664376
|
+
return lines.join("\n");
|
|
664377
|
+
}
|
|
664272
664378
|
function createDMNEventHandler(verbose, writeContent) {
|
|
664273
664379
|
return (event) => {
|
|
664274
664380
|
switch (event.type) {
|
|
@@ -666590,7 +666696,7 @@ async function startInteractive(config, repoPath) {
|
|
|
666590
666696
|
tuiBgSeq() + // theme bg for content area
|
|
666591
666697
|
`\x1B[2J\x1B[3J\x1B[H\x1B[1;${termRows()}r\x1B[?25l`
|
|
666592
666698
|
// hide cursor during setup
|
|
666593
|
-
// NOTE: mouse tracking (?
|
|
666699
|
+
// NOTE: mouse tracking (?1000h ?1006h) is deferred until AFTER setup
|
|
666594
666700
|
// wizard completes and MouseFilterStream is created. Enabling mouse
|
|
666595
666701
|
// here would leak SGR coordinate sequences into readline prompts.
|
|
666596
666702
|
);
|
|
@@ -667631,6 +667737,7 @@ This is an independent background session started from /background.`
|
|
|
667631
667737
|
let lastSteeringRetracted = false;
|
|
667632
667738
|
let _recallText = null;
|
|
667633
667739
|
let _recallTimer = null;
|
|
667740
|
+
let promptRecallCancelled = false;
|
|
667634
667741
|
const RECALL_WINDOW_MS = 1500;
|
|
667635
667742
|
let sessionSudoPassword = null;
|
|
667636
667743
|
let sudoPromptPending = false;
|
|
@@ -667828,12 +667935,7 @@ This is an independent background session started from /background.`
|
|
|
667828
667935
|
if (process.stdin.isTTY && typeof process.stdin.setRawMode === "function") {
|
|
667829
667936
|
process.stdin.setRawMode(true);
|
|
667830
667937
|
}
|
|
667831
|
-
|
|
667832
|
-
process.stdout.write(
|
|
667833
|
-
"\x1B[?1002h\x1B[?1006h"
|
|
667834
|
-
// enable SGR mouse mode
|
|
667835
|
-
);
|
|
667836
|
-
}
|
|
667938
|
+
statusBar.enableMouseTracking();
|
|
667837
667939
|
function persistHistoryLine(line) {
|
|
667838
667940
|
if (!line.trim()) return;
|
|
667839
667941
|
try {
|
|
@@ -668436,9 +668538,7 @@ Log: ${nexusLogPath}`)
|
|
|
668436
668538
|
return;
|
|
668437
668539
|
}
|
|
668438
668540
|
sudoPromptPending = true;
|
|
668439
|
-
|
|
668440
|
-
process.stdout.write("\x1B[?1000l\x1B[?1002l\x1B[?1006l");
|
|
668441
|
-
}
|
|
668541
|
+
statusBar.suspendMouseTracking();
|
|
668442
668542
|
writeContent(() => {
|
|
668443
668543
|
process.stdout.write(
|
|
668444
668544
|
`
|
|
@@ -670943,9 +671043,7 @@ ${result.content.slice(0, 2e3)}${result.content.length > 2e3 ? "\n[truncated]" :
|
|
|
670943
671043
|
passwordShowPlain = false;
|
|
670944
671044
|
sessionSudoPassword = input;
|
|
670945
671045
|
activeTask.runner.setSudoPassword(input);
|
|
670946
|
-
|
|
670947
|
-
process.stdout.write("\x1B[?1002h\x1B[?1006h");
|
|
670948
|
-
}
|
|
671046
|
+
statusBar.enableMouseTracking();
|
|
670949
671047
|
statusBar.setInputStateProvider(() => ({
|
|
670950
671048
|
line: rl.line ?? "",
|
|
670951
671049
|
cursor: rl.cursor ?? 0
|
|
@@ -671188,8 +671286,26 @@ ${result.text}`;
|
|
|
671188
671286
|
injected: true,
|
|
671189
671287
|
rawOnly: interpretation === null
|
|
671190
671288
|
});
|
|
671289
|
+
const activeToolCallCount = activeTask.toolCallCount;
|
|
671290
|
+
const activeFilesTouchedCount = activeTask.filesTouched.size;
|
|
671291
|
+
writeContent(
|
|
671292
|
+
() => renderContextIntakeBox({
|
|
671293
|
+
title: isReplacement ? "Context Intake (replacement)" : "Context Intake",
|
|
671294
|
+
rawText: input,
|
|
671295
|
+
inference: interpretation?.inference,
|
|
671296
|
+
runnerInstruction: interpretation?.runnerInstruction,
|
|
671297
|
+
conflicts: interpretation?.conflicts,
|
|
671298
|
+
alternatives: interpretation?.alternatives,
|
|
671299
|
+
packetId: ingress.id,
|
|
671300
|
+
metadata: [
|
|
671301
|
+
"mid-task",
|
|
671302
|
+
`${activeToolCallCount} calls`,
|
|
671303
|
+
`${activeFilesTouchedCount} files`,
|
|
671304
|
+
interpretation ? "triaged" : "raw"
|
|
671305
|
+
]
|
|
671306
|
+
})
|
|
671307
|
+
);
|
|
671191
671308
|
if (interpretation?.inference) {
|
|
671192
|
-
writeContent(() => renderSteeringIntake(interpretation.inference));
|
|
671193
671309
|
if (voiceEngine.enabled && voiceEngine.voiceMode === "verbose") {
|
|
671194
671310
|
const emoState = emotionEngine.getState();
|
|
671195
671311
|
const emoCtx = emoState ? {
|
|
@@ -671353,12 +671469,82 @@ Summarize or analyze this transcription as appropriate.`;
|
|
|
671353
671469
|
const inputLineCount = fullInput.split("\n").length;
|
|
671354
671470
|
const displayText = isImage ? `[Image: ${cleanPath}]` : inputLineCount > 1 ? `[pasted ${inputLineCount} lines]` : fullInput;
|
|
671355
671471
|
writeContent(() => renderUserMessage(displayText));
|
|
671472
|
+
promptRecallCancelled = false;
|
|
671356
671473
|
_recallText = input;
|
|
671357
671474
|
if (_recallTimer) clearTimeout(_recallTimer);
|
|
671358
671475
|
_recallTimer = setTimeout(() => {
|
|
671359
671476
|
_recallText = null;
|
|
671360
671477
|
_recallTimer = null;
|
|
671361
671478
|
}, RECALL_WINDOW_MS);
|
|
671479
|
+
const previousPromptForIntake = lastSubmittedPrompt;
|
|
671480
|
+
const previousSummaryForIntake = lastCompletedSummary;
|
|
671481
|
+
const previousMetaForIntake = lastTaskMeta;
|
|
671482
|
+
let taskIntakePacket = "";
|
|
671483
|
+
if (previousSummaryForIntake.trim()) {
|
|
671484
|
+
const priorContext = [
|
|
671485
|
+
previousPromptForIntake.trim() ? `Previous task prompt:
|
|
671486
|
+
${previousPromptForIntake.trim()}` : "",
|
|
671487
|
+
`Previous task completion:
|
|
671488
|
+
${previousSummaryForIntake.trim()}`,
|
|
671489
|
+
`Previous task metrics:
|
|
671490
|
+
${formatTaskCompletionMeta(previousMetaForIntake)}`
|
|
671491
|
+
].filter(Boolean).join("\n\n");
|
|
671492
|
+
const ingress = createSteeringIngress({
|
|
671493
|
+
rawText: fullInput,
|
|
671494
|
+
sourceSurface: "tui",
|
|
671495
|
+
currentTaskGoal: priorContext,
|
|
671496
|
+
recentActivity: previousMetaForIntake ? formatTaskCompletionMeta(previousMetaForIntake) : void 0,
|
|
671497
|
+
filesTouched: sessionFilesTouched,
|
|
671498
|
+
toolCallCount: previousMetaForIntake?.toolCalls ?? sessionToolCallCount
|
|
671499
|
+
});
|
|
671500
|
+
let interpretation = null;
|
|
671501
|
+
try {
|
|
671502
|
+
const intakeBackend = await createSteeringIntakeBackend(
|
|
671503
|
+
currentConfig,
|
|
671504
|
+
repoRoot
|
|
671505
|
+
);
|
|
671506
|
+
interpretation = await interpretSteeringIngress(
|
|
671507
|
+
intakeBackend,
|
|
671508
|
+
ingress,
|
|
671509
|
+
Math.min(currentConfig.timeoutMs || 15e3, 15e3)
|
|
671510
|
+
);
|
|
671511
|
+
} catch {
|
|
671512
|
+
interpretation = null;
|
|
671513
|
+
}
|
|
671514
|
+
taskIntakePacket = buildNewTaskIntakePacket(
|
|
671515
|
+
ingress,
|
|
671516
|
+
interpretation,
|
|
671517
|
+
previousPromptForIntake,
|
|
671518
|
+
previousSummaryForIntake,
|
|
671519
|
+
previousMetaForIntake
|
|
671520
|
+
);
|
|
671521
|
+
appendSteeringLedgerEntry(repoRoot, {
|
|
671522
|
+
type: "ingress",
|
|
671523
|
+
packetId: ingress.id,
|
|
671524
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
671525
|
+
ingress,
|
|
671526
|
+
interpretation,
|
|
671527
|
+
injected: true,
|
|
671528
|
+
rawOnly: interpretation === null
|
|
671529
|
+
});
|
|
671530
|
+
writeContent(
|
|
671531
|
+
() => renderContextIntakeBox({
|
|
671532
|
+
title: "Task Intake",
|
|
671533
|
+
rawText: fullInput,
|
|
671534
|
+
inference: interpretation?.inference,
|
|
671535
|
+
runnerInstruction: interpretation?.runnerInstruction,
|
|
671536
|
+
conflicts: interpretation?.conflicts,
|
|
671537
|
+
alternatives: interpretation?.alternatives,
|
|
671538
|
+
packetId: ingress.id,
|
|
671539
|
+
metadata: [
|
|
671540
|
+
"new task",
|
|
671541
|
+
previousMetaForIntake ? `${previousMetaForIntake.toolCalls} prior calls` : "prior task",
|
|
671542
|
+
interpretation ? "triaged" : "raw"
|
|
671543
|
+
]
|
|
671544
|
+
})
|
|
671545
|
+
);
|
|
671546
|
+
}
|
|
671547
|
+
if (promptRecallCancelled) return;
|
|
671362
671548
|
lastSubmittedPrompt = fullInput;
|
|
671363
671549
|
const taskPreview = fullInput.length > 100 ? fullInput.slice(0, 100) + "..." : fullInput;
|
|
671364
671550
|
emotionEngine.setCurrentTask(taskPreview);
|
|
@@ -671383,6 +671569,13 @@ Summarize or analyze this transcription as appropriate.`;
|
|
|
671383
671569
|
NEW TASK: ${fullInput}`;
|
|
671384
671570
|
restoredSessionContext = null;
|
|
671385
671571
|
}
|
|
671572
|
+
if (taskIntakePacket) {
|
|
671573
|
+
taskInput = `${taskIntakePacket}
|
|
671574
|
+
|
|
671575
|
+
---
|
|
671576
|
+
|
|
671577
|
+
${taskInput}`;
|
|
671578
|
+
}
|
|
671386
671579
|
try {
|
|
671387
671580
|
statusBar.setProcessing(true);
|
|
671388
671581
|
statusBar.recordSpeedTaskStart();
|
|
@@ -671691,6 +671884,7 @@ ${c3.dim("(Use /quit to exit)")}
|
|
|
671691
671884
|
if (_recallText !== null) {
|
|
671692
671885
|
const recalled = _recallText;
|
|
671693
671886
|
_recallText = null;
|
|
671887
|
+
promptRecallCancelled = true;
|
|
671694
671888
|
if (_recallTimer) {
|
|
671695
671889
|
clearTimeout(_recallTimer);
|
|
671696
671890
|
_recallTimer = null;
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnius",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.164",
|
|
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.164",
|
|
10
10
|
"bundleDependencies": [
|
|
11
11
|
"image-to-ascii"
|
|
12
12
|
],
|
package/package.json
CHANGED