opencode-orchestrator 0.5.24 → 0.5.25

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
@@ -15308,22 +15308,27 @@ function formatElapsedTime(startMs, endMs = Date.now()) {
15308
15308
  }
15309
15309
 
15310
15310
  // src/utils/sanity.ts
15311
+ var SEVERITY = {
15312
+ OK: "ok",
15313
+ WARNING: "warning",
15314
+ CRITICAL: "critical"
15315
+ };
15311
15316
  function checkOutputSanity(text) {
15312
15317
  if (!text || text.length < 50) {
15313
- return { isHealthy: true, severity: "ok" };
15318
+ return { isHealthy: true, severity: SEVERITY.OK };
15314
15319
  }
15315
15320
  if (/(.)\1{15,}/.test(text)) {
15316
15321
  return {
15317
15322
  isHealthy: false,
15318
15323
  reason: "Single character repetition detected",
15319
- severity: "critical"
15324
+ severity: SEVERITY.CRITICAL
15320
15325
  };
15321
15326
  }
15322
15327
  if (/(.{2,6})\1{8,}/.test(text)) {
15323
15328
  return {
15324
15329
  isHealthy: false,
15325
15330
  reason: "Pattern loop detected",
15326
- severity: "critical"
15331
+ severity: SEVERITY.CRITICAL
15327
15332
  };
15328
15333
  }
15329
15334
  if (text.length > 200) {
@@ -15335,7 +15340,7 @@ function checkOutputSanity(text) {
15335
15340
  return {
15336
15341
  isHealthy: false,
15337
15342
  reason: "Low information density",
15338
- severity: "critical"
15343
+ severity: SEVERITY.CRITICAL
15339
15344
  };
15340
15345
  }
15341
15346
  }
@@ -15345,7 +15350,7 @@ function checkOutputSanity(text) {
15345
15350
  return {
15346
15351
  isHealthy: false,
15347
15352
  reason: "Visual gibberish detected",
15348
- severity: "critical"
15353
+ severity: SEVERITY.CRITICAL
15349
15354
  };
15350
15355
  }
15351
15356
  const lines = text.split("\n").filter((l) => l.trim().length > 10);
@@ -15355,7 +15360,7 @@ function checkOutputSanity(text) {
15355
15360
  return {
15356
15361
  isHealthy: false,
15357
15362
  reason: "Excessive line repetition",
15358
- severity: "warning"
15363
+ severity: SEVERITY.WARNING
15359
15364
  };
15360
15365
  }
15361
15366
  }
@@ -15368,11 +15373,11 @@ function checkOutputSanity(text) {
15368
15373
  return {
15369
15374
  isHealthy: false,
15370
15375
  reason: "CJK character spam detected",
15371
- severity: "critical"
15376
+ severity: SEVERITY.CRITICAL
15372
15377
  };
15373
15378
  }
15374
15379
  }
15375
- return { isHealthy: true, severity: "ok" };
15380
+ return { isHealthy: true, severity: SEVERITY.OK };
15376
15381
  }
15377
15382
  var RECOVERY_PROMPT = `<anomaly_recovery>
15378
15383
  \u26A0\uFE0F SYSTEM NOTICE: Previous output was malformed (gibberish/loop detected).
@@ -8,10 +8,16 @@
8
8
  * - Visual gibberish (box drawing characters)
9
9
  * - Line repetition
10
10
  */
11
+ export declare const SEVERITY: {
12
+ readonly OK: "ok";
13
+ readonly WARNING: "warning";
14
+ readonly CRITICAL: "critical";
15
+ };
16
+ export type Severity = (typeof SEVERITY)[keyof typeof SEVERITY];
11
17
  export interface SanityResult {
12
18
  isHealthy: boolean;
13
19
  reason?: string;
14
- severity: "ok" | "warning" | "critical";
20
+ severity: Severity;
15
21
  }
16
22
  /**
17
23
  * Check if LLM output shows signs of degeneration
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "opencode-orchestrator",
3
3
  "displayName": "OpenCode Orchestrator",
4
4
  "description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
5
- "version": "0.5.24",
5
+ "version": "0.5.25",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {