omnius 1.0.978 → 1.0.979

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.
@@ -177,6 +177,25 @@ export declare class InterruptionLifecycle {
177
177
  interruptionEffect?: InterruptionEffectClass;
178
178
  };
179
179
  }): number;
180
+ /** Settle an interrupted task_complete from the caller's write-ahead delivery
181
+ * evidence. task_complete's only external effect is delivering its reply
182
+ * (and selected artifacts); the caller's ledgers record every delivery
183
+ * before dispatch. "absent" means nothing was prepared after the call was
184
+ * admitted, so finishing again cannot duplicate a message; "applied" means
185
+ * every prepared delivery was acknowledged by the provider. Any other
186
+ * evidence (a prepared, started or ambiguous send) keeps the fence. */
187
+ reconcileInterruptedCompletionDelivery(input: {
188
+ expected: Pick<InterruptionRunIdentity, "sessionId" | "runId" | "taskEpoch" | "owner">;
189
+ /** `endedAt` is when the interrupted call stopped (its acknowledgement time); no delivery after it belongs to the call. */
190
+ outcome: (effect: {
191
+ operationId: string;
192
+ admittedAt: string;
193
+ endedAt: string;
194
+ }) => {
195
+ state: "absent" | "applied";
196
+ evidenceId: string;
197
+ } | undefined;
198
+ }): number;
180
199
  /** Settle interrupted shell calls whose exact admitted command the current
181
200
  * registered native classifier proves read-only. A read-only command has no
182
201
  * external effect to be absent or applied, so this never authorizes replay
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/dist/index.js
3
- size: 43172391 bytes
4
- sha256: 206c43a092066ac085756e4007757da714b21b87675d5c09729e010fb105f2ec
3
+ size: 43180366 bytes
4
+ sha256: b2bad7922272d2354dc7729ea660faec726e80e8990171d06360410891c234e9
package/dist/library.js CHANGED
@@ -383876,6 +383876,52 @@ var InterruptionLifecycle = class {
383876
383876
  }
383877
383877
  return matches.length;
383878
383878
  }
383879
+ /** Settle an interrupted task_complete from the caller's write-ahead delivery
383880
+ * evidence. task_complete's only external effect is delivering its reply
383881
+ * (and selected artifacts); the caller's ledgers record every delivery
383882
+ * before dispatch. "absent" means nothing was prepared after the call was
383883
+ * admitted, so finishing again cannot duplicate a message; "applied" means
383884
+ * every prepared delivery was acknowledged by the provider. Any other
383885
+ * evidence (a prepared, started or ambiguous send) keeps the fence. */
383886
+ reconcileInterruptedCompletionDelivery(input2) {
383887
+ if (this.durabilityUncertain || !this.persistEnabled || !this.state.recovered || !["paused", "stopped", "failed"].includes(this.state.phase))
383888
+ return 0;
383889
+ const expected = input2.expected;
383890
+ if (this.state.sessionId !== expected.sessionId || this.state.runId !== expected.runId || this.state.taskEpoch !== expected.taskEpoch || this.state.owner.kind !== expected.owner.kind || this.state.owner.id !== expected.owner.id || this.state.owner.generation !== expected.owner.generation)
383891
+ return 0;
383892
+ const matches = this.state.ambiguousEffects.flatMap((effect) => {
383893
+ if (effect.state !== "unknown_after_interrupt" || effect.ownerId !== "tool:task_complete" || effect.kind !== "mutating_tool" || effect.generation > this.state.owner.generation)
383894
+ return [];
383895
+ const acknowledgement = this.state.pendingAcknowledgements.find((item) => item.id === effect.operationId && item.ownerId === effect.ownerId && item.generation === effect.generation && item.kind === effect.kind && item.effect === "external_effect" && item.status !== "pending" && item.acknowledgedAt);
383896
+ if (!acknowledgement)
383897
+ return [];
383898
+ let verdict3;
383899
+ try {
383900
+ verdict3 = input2.outcome({ operationId: effect.operationId, admittedAt: acknowledgement.admittedAt, endedAt: acknowledgement.acknowledgedAt });
383901
+ } catch {
383902
+ return [];
383903
+ }
383904
+ if (!verdict3 || !verdict3.evidenceId.trim() || verdict3.state !== "absent" && verdict3.state !== "applied")
383905
+ return [];
383906
+ return [{ effect, verdict: verdict3 }];
383907
+ });
383908
+ if (!matches.length)
383909
+ return 0;
383910
+ const previousState = cloneSnapshot(this.state), at = this.timestamp();
383911
+ try {
383912
+ for (const { effect, verdict: verdict3 } of matches) {
383913
+ effect.state = verdict3.state === "absent" ? "confirmed_absent" : "confirmed_applied";
383914
+ effect.resolvedAt = at;
383915
+ effect.evidenceId = verdict3.evidenceId;
383916
+ }
383917
+ this.persist();
383918
+ } catch (error) {
383919
+ if (!persistenceMayHaveCommitted(error))
383920
+ this.state = previousState;
383921
+ throw error;
383922
+ }
383923
+ return matches.length;
383924
+ }
383879
383925
  /** Settle interrupted shell calls whose exact admitted command the current
383880
383926
  * registered native classifier proves read-only. A read-only command has no
383881
383927
  * external effect to be absent or applied, so this never authorizes replay
@@ -1729,7 +1729,7 @@ var NativeBlockView = class {
1729
1729
  return this.spec;
1730
1730
  }
1731
1731
  get trailingSpace() {
1732
- return this.spec.presentation === "final-answer" || this.spec.presentation === "action" && !this.spec.streaming ? 1 : 0;
1732
+ return this.spec.presentation === "final-answer" || this.spec.presentation === "user-message" || this.spec.presentation === "action" && !this.spec.streaming ? 1 : 0;
1733
1733
  }
1734
1734
  get hasVisibleContent() {
1735
1735
  return this.spec.kind !== "column" && this.spec.kind !== "row" || Boolean(this.spec.title || this.spec.text !== void 0 || this.spec.actions?.length || [...this.children?.views.values() ?? []].some((view) => view.hasVisibleContent));
@@ -3421,15 +3421,6 @@ import {
3421
3421
 
3422
3422
  // packages/cli/src/tui/native/components/instrument-format.ts
3423
3423
  var graphemes2 = new Intl.Segmenter(void 0, { granularity: "grapheme" });
3424
- function formatSignalDivider(width, geometry = { direction: "top" }) {
3425
- const cells = Math.max(0, Math.floor(width));
3426
- const column3 = Math.floor(geometry.sidebarColumn ?? -1);
3427
- if (!Number.isFinite(column3) || column3 < 0 || column3 >= cells) return "─".repeat(cells);
3428
- const left = "─".repeat(column3);
3429
- const rightWidth = cells - column3 - 1;
3430
- if (rightWidth === 0) return left + (geometry.direction === "top" ? "┐" : "┘");
3431
- return left + (geometry.direction === "top" ? "┬" : "┴") + "─".repeat(rightWidth);
3432
- }
3433
3424
  function fitInstrumentText(value, cells, marker = "~") {
3434
3425
  const text = stripTerminalSequences(normalizeTerminalLine(value));
3435
3426
  const width = Math.max(0, Math.floor(cells));
@@ -3479,7 +3470,7 @@ function formatSectionBanner(title, width, expanded = true) {
3479
3470
  `${expanded ? "-" : "+"} ${title.toUpperCase()} `,
3480
3471
  cells
3481
3472
  );
3482
- return label3 + "─".repeat(Math.max(0, cells - terminalCellWidth(label3)));
3473
+ return label3 + " ".repeat(Math.max(0, cells - terminalCellWidth(label3)));
3483
3474
  }
3484
3475
  function instrumentStatus(value) {
3485
3476
  const status = (value || "unknown").toLowerCase();
@@ -3996,13 +3987,10 @@ var NativeTaskStrip = class extends BoxRenderable6 {
3996
3987
  id: "omnius-task-strip",
3997
3988
  width: "100%",
3998
3989
  minWidth: 0,
3999
- height: 3,
4000
- minHeight: 3,
4001
- maxHeight: 3,
3990
+ height: 1,
3991
+ minHeight: 1,
3992
+ maxHeight: 1,
4002
3993
  flexShrink: 0,
4003
- border: true,
4004
- borderStyle: "single",
4005
- borderColor: colors.border,
4006
3994
  flexDirection: "row",
4007
3995
  visible: false
4008
3996
  });
@@ -4168,7 +4156,6 @@ var NativeTaskStrip = class extends BoxRenderable6 {
4168
4156
  }
4169
4157
  applyTheme(colors) {
4170
4158
  this.colors = colors;
4171
- this.borderColor = colors.border;
4172
4159
  this.label.fg = colors.foreground;
4173
4160
  this.label.bg = colors.background;
4174
4161
  for (const chip of this.chips.values()) {
@@ -5250,7 +5237,7 @@ var InstrumentDivider = class extends TextRenderable8 {
5250
5237
  this.refresh();
5251
5238
  }
5252
5239
  refresh() {
5253
- const rows = Array.from({ length: Math.max(0, this.height) }, (_, row) => row === Math.floor(this.height / 2) ? this.collapsed ? "‹" : "›" : "│");
5240
+ const rows = Array.from({ length: Math.max(0, this.height) }, (_, row) => row === Math.floor(this.height / 2) ? this.collapsed ? "‹" : "›" : " ");
5254
5241
  const text = rows.join("\n");
5255
5242
  if (this.plainText !== text) this.content = text;
5256
5243
  }
@@ -8211,24 +8198,10 @@ var NativeFrontend = class {
8211
8198
  minWidth: 0,
8212
8199
  flexDirection: "column",
8213
8200
  flexShrink: 0,
8214
- border: ["bottom"],
8215
- borderStyle: "single",
8216
- borderColor: colors.border
8201
+ // A blank row, not a rule, separates the header from the transcript.
8202
+ paddingBottom: 1
8217
8203
  });
8218
8204
  this.root.add(this.header);
8219
- this.header.renderAfter = (buffer) => {
8220
- if (this.header.height > 0) buffer.drawText(
8221
- formatSignalDivider(this.header.width, {
8222
- direction: "top",
8223
- sidebarColumn: this.instrumentDivider.visible ? this.instrumentDivider.x - this.header.x : void 0
8224
- }),
8225
- this.header.x,
8226
- this.header.y + this.header.height - 1,
8227
- this.context.colors.foreground,
8228
- this.context.colors.background,
8229
- TextAttributes11.DIM
8230
- );
8231
- };
8232
8205
  const headerRow = new BoxRenderable12(renderer2, { id: "omnius-header-row", width: "100%", minWidth: 0, minHeight: 1, flexDirection: "row", gap: 1 });
8233
8206
  this.header.add(headerRow);
8234
8207
  this.identityMarker = new TextRenderable11(renderer2, {
@@ -8502,13 +8475,12 @@ var NativeFrontend = class {
8502
8475
  });
8503
8476
  this.body.add(this.instruments);
8504
8477
  this.embeddedPane = new BoxRenderable12(renderer2, {
8478
+ // Set off from the transcript by spacing, not a frame.
8505
8479
  id: "omnius-editor-pane",
8506
8480
  width: "50%",
8507
8481
  flexShrink: 0,
8508
8482
  flexDirection: "column",
8509
- border: true,
8510
- borderStyle: "single",
8511
- borderColor: colors.border,
8483
+ paddingLeft: 2,
8512
8484
  visible: false
8513
8485
  });
8514
8486
  this.body.add(this.embeddedPane);
@@ -8588,16 +8560,6 @@ var NativeFrontend = class {
8588
8560
  this.tabs.flexShrink = 0;
8589
8561
  this.tabs.visible = false;
8590
8562
  this.viewTabsRow.add(this.tabs);
8591
- this.viewTabsRow.renderBefore = (buffer) => {
8592
- if (this.instrumentDivider.visible) buffer.drawText(
8593
- "│",
8594
- this.instrumentDivider.x,
8595
- this.viewTabsRow.y,
8596
- this.context.colors.foreground,
8597
- this.context.colors.background,
8598
- TextAttributes11.DIM
8599
- );
8600
- };
8601
8563
  this.footerRule = new BoxRenderable12(renderer2, {
8602
8564
  id: "omnius-input-rule",
8603
8565
  width: "100%",
@@ -8608,12 +8570,6 @@ var NativeFrontend = class {
8608
8570
  shouldFill: false
8609
8571
  });
8610
8572
  this.footer.add(this.footerRule);
8611
- this.footerRule.renderBefore = (buffer) => {
8612
- buffer.drawText(formatSignalDivider(this.footerRule.width, {
8613
- direction: "bottom",
8614
- sidebarColumn: this.instrumentDivider.visible ? this.instrumentDivider.x - this.footerRule.x : void 0
8615
- }), this.footerRule.x, this.footerRule.y, this.context.colors.foreground, this.context.colors.background, TextAttributes11.DIM);
8616
- };
8617
8573
  this.workspaceReferences = new NativeWorkspaceReferenceRow(renderer2, colors, (event) => {
8618
8574
  this.flushLatestInput();
8619
8575
  this.emit(event);
@@ -8980,7 +8936,7 @@ var NativeFrontend = class {
8980
8936
  installNativeSyntax(this.context.syntax, colors, nativeColor);
8981
8937
  this.root.backgroundColor = colors.background;
8982
8938
  this.header.backgroundColor = this.footer.backgroundColor = colors.background;
8983
- this.header.borderColor = this.footer.borderColor = this.embeddedPane.borderColor = colors.border;
8939
+ this.footer.borderColor = colors.border;
8984
8940
  this.identity.fg = colors.foreground;
8985
8941
  this.identityMarker.fg = colors.foreground;
8986
8942
  this.headerPanel.fg = colors.foreground;
@@ -9065,9 +9021,8 @@ var NativeFrontend = class {
9065
9021
  this.instruments.minHeight = wide ? 1 : inspectorHeight;
9066
9022
  this.instruments.flexGrow = 0;
9067
9023
  this.instruments.flexShrink = 0;
9068
- this.instruments.border = wide ? [] : ["top"];
9069
- this.instruments.borderStyle = "single";
9070
- this.instruments.borderColor = this.context.colors.border;
9024
+ this.instruments.border = false;
9025
+ this.instruments.paddingTop = wide ? 0 : 1;
9071
9026
  this.instruments.paddingLeft = wide ? 1 : 0;
9072
9027
  this.embeddedPane.width = width >= 80 ? "50%" : "100%";
9073
9028
  this.embeddedPane.maxHeight = width >= 80 ? "100%" : "50%";
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.978",
3
+ "version": "1.0.979",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.978",
9
+ "version": "1.0.979",
10
10
  "hasInstallScript": true,
11
11
  "license": "CC-BY-NC-4.0",
12
12
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.978",
3
+ "version": "1.0.979",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/library.js",