omnius 1.0.273 → 1.0.274

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 CHANGED
@@ -551999,22 +551999,48 @@ var init_VllmBackend = __esm({
551999
551999
  // -------------------------------------------------------------------------
552000
552000
  // LLMBackend — healthCheck
552001
552001
  // -------------------------------------------------------------------------
552002
+ /**
552003
+ * Health check with retry + circuit breaker.
552004
+ * Retries up to 3 times with exponential backoff (1s, 2s, 4s).
552005
+ * After 3 consecutive failures, enters "degraded" state for 30s before retrying.
552006
+ */
552007
+ consecutiveFailures = 0;
552008
+ degradedUntil = 0;
552002
552009
  async healthCheck() {
552010
+ if (this.consecutiveFailures >= 3 && Date.now() < this.degradedUntil) {
552011
+ return false;
552012
+ }
552013
+ if (this.consecutiveFailures >= 3 && Date.now() >= this.degradedUntil) {
552014
+ this.consecutiveFailures = 0;
552015
+ }
552003
552016
  const url = `${this.baseUrl}/health`;
552004
552017
  const controller = new AbortController();
552005
552018
  const timer = setTimeout(() => controller.abort(), 5e3);
552006
- try {
552007
- const response = await fetch(url, {
552008
- method: "GET",
552009
- signal: controller.signal,
552010
- headers: this.authHeaders()
552011
- });
552012
- return response.ok;
552013
- } catch {
552014
- return false;
552015
- } finally {
552016
- clearTimeout(timer);
552019
+ const maxRetries = 3;
552020
+ for (let attempt = 0; attempt <= maxRetries; attempt++) {
552021
+ if (attempt > 0) {
552022
+ const backoff = Math.min(1e3 * Math.pow(2, attempt - 1), 4e3);
552023
+ await new Promise((r2) => setTimeout(r2, backoff));
552024
+ }
552025
+ try {
552026
+ const response = await fetch(url, {
552027
+ method: "GET",
552028
+ signal: controller.signal,
552029
+ headers: this.authHeaders()
552030
+ });
552031
+ if (response.ok) {
552032
+ this.consecutiveFailures = 0;
552033
+ return true;
552034
+ }
552035
+ } catch {
552036
+ }
552017
552037
  }
552038
+ clearTimeout(timer);
552039
+ this.consecutiveFailures++;
552040
+ if (this.consecutiveFailures >= 3) {
552041
+ this.degradedUntil = Date.now() + 3e4;
552042
+ }
552043
+ return false;
552018
552044
  }
552019
552045
  // -------------------------------------------------------------------------
552020
552046
  // LLMBackend — complete
@@ -552186,21 +552212,47 @@ var init_OllamaBackend = __esm({
552186
552212
  // -------------------------------------------------------------------------
552187
552213
  // LLMBackend — healthCheck
552188
552214
  // -------------------------------------------------------------------------
552215
+ /**
552216
+ * Health check with retry + circuit breaker.
552217
+ * Retries up to 3 times with exponential backoff (1s, 2s, 4s).
552218
+ * After 3 consecutive failures, enters "degraded" state for 30s before retrying.
552219
+ */
552220
+ consecutiveFailures = 0;
552221
+ degradedUntil = 0;
552189
552222
  async healthCheck() {
552223
+ if (this.consecutiveFailures >= 3 && Date.now() < this.degradedUntil) {
552224
+ return false;
552225
+ }
552226
+ if (this.consecutiveFailures >= 3 && Date.now() >= this.degradedUntil) {
552227
+ this.consecutiveFailures = 0;
552228
+ }
552190
552229
  const url = `${this.baseUrl}/api/tags`;
552191
552230
  const controller = new AbortController();
552192
552231
  const timer = setTimeout(() => controller.abort(), 5e3);
552193
- try {
552194
- const response = await fetch(url, {
552195
- method: "GET",
552196
- signal: controller.signal
552197
- });
552198
- return response.ok;
552199
- } catch {
552200
- return false;
552201
- } finally {
552202
- clearTimeout(timer);
552232
+ const maxRetries = 3;
552233
+ for (let attempt = 0; attempt <= maxRetries; attempt++) {
552234
+ if (attempt > 0) {
552235
+ const backoff = Math.min(1e3 * Math.pow(2, attempt - 1), 4e3);
552236
+ await new Promise((r2) => setTimeout(r2, backoff));
552237
+ }
552238
+ try {
552239
+ const response = await fetch(url, {
552240
+ method: "GET",
552241
+ signal: controller.signal
552242
+ });
552243
+ if (response.ok) {
552244
+ this.consecutiveFailures = 0;
552245
+ return true;
552246
+ }
552247
+ } catch {
552248
+ }
552203
552249
  }
552250
+ clearTimeout(timer);
552251
+ this.consecutiveFailures++;
552252
+ if (this.consecutiveFailures >= 3) {
552253
+ this.degradedUntil = Date.now() + 3e4;
552254
+ }
552255
+ return false;
552204
552256
  }
552205
552257
  // -------------------------------------------------------------------------
552206
552258
  // LLMBackend — complete
@@ -563763,10 +563815,26 @@ function signalFromBlock(kind, source, content, options2 = {}) {
563763
563815
  metadata: options2.metadata
563764
563816
  };
563765
563817
  }
563766
- var KIND_ORDER, KIND_LABELS, DEFAULT_KIND_CHAR_BUDGET, URL_RE2, CONTEXT_FABRIC_TRUNCATION_SUFFIX, ContextLedger, ContextFrameBuilder;
563818
+ var PRIORITY, KIND_ORDER, KIND_LABELS, DEFAULT_KIND_CHAR_BUDGET, URL_RE2, CONTEXT_FABRIC_TRUNCATION_SUFFIX, ContextLedger, ContextFrameBuilder;
563767
563819
  var init_context_fabric = __esm({
563768
563820
  "packages/orchestrator/dist/context-fabric.js"() {
563769
563821
  "use strict";
563822
+ PRIORITY = {
563823
+ GOAL: 100,
563824
+ USER_STEERING: 95,
563825
+ TASK_STATE: 80,
563826
+ KNOWN_FILES: 70,
563827
+ RECENT_FAILURE: 65,
563828
+ TOOL_CACHE: 60,
563829
+ SKILL_MANIFEST: 55,
563830
+ MEMORY: 50,
563831
+ SEMANTIC_CHUNK: 45,
563832
+ SESSION_HISTORY: 40,
563833
+ ANCHOR: 35,
563834
+ HANDOFF: 30,
563835
+ ENVIRONMENT: 25,
563836
+ COMPACTION_SUMMARY: 20
563837
+ };
563770
563838
  KIND_ORDER = [
563771
563839
  "goal",
563772
563840
  "user_steering",
@@ -563946,7 +564014,7 @@ var init_context_fabric = __esm({
563946
564014
  const label = KIND_LABELS[kind];
563947
564015
  sectionLines.push(`## ${label}`);
563948
564016
  sectionLines.push(body.join("\n"));
563949
- sectionDiagnostics.push({ kind, label, signals: used, chars });
564017
+ sectionDiagnostics.push({ kind, label, signals: used, chars, dropped: dropped.length });
563950
564018
  }
563951
564019
  const header = [
563952
564020
  "[ACTIVE CONTEXT FRAME]",
@@ -569683,7 +569751,10 @@ ${this._lastPprMemoryLines.slice(0, 5).join("\n")}` : null;
569683
569751
  signalFromBlock("user_steering", "turn.recentSteering", buildRecentSteeringContext(this._workingDirectory || process.cwd()), {
569684
569752
  id: "recentSteering",
569685
569753
  dedupeKey: "turn.recentSteering",
569686
- priority: 40,
569754
+ // PRIORITY.USER_STEERING (95) keeps steering above all non-goal
569755
+ // signals so mid-turn user feedback is never buried under budget
569756
+ // pressure. See context-fabric.ts PRIORITY tier map.
569757
+ priority: PRIORITY.USER_STEERING,
569687
569758
  createdTurn: turn,
569688
569759
  ttlTurns: 1
569689
569760
  })
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.273",
3
+ "version": "1.0.274",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.273",
9
+ "version": "1.0.274",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.273",
3
+ "version": "1.0.274",
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/index.js",