osborn 0.9.220 → 0.9.221

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.
Files changed (2) hide show
  1. package/dist/claude-llm.js +33 -2
  2. package/package.json +1 -1
@@ -86,13 +86,13 @@ async function buildRecallInjection(sessionId, workingDir, prompt) {
86
86
  return ''; // recall is best-effort — never break the turn
87
87
  }
88
88
  }
89
- // ≤3 direct tool call budget per turn. Reset on every UserPromptSubmit (new user message).
89
+ // ≤5 direct tool call budget per turn. Reset on every UserPromptSubmit (new user message).
90
90
  // Enforced mechanically in PreToolUse — the model CANNOT exceed this regardless of JSONL history.
91
91
  // Task/Agent delegations are exempt (delegation is what we WANT). Sub-agent tool calls
92
92
  // (agent_type !== null) are exempt (they're inside a delegation). Only the main orchestrator
93
93
  // agent's direct tool calls count against the budget.
94
94
  let turnToolCallCount = 0;
95
- const TOOL_CALL_BUDGET = 3;
95
+ const TOOL_CALL_BUDGET = 5;
96
96
  /**
97
97
  * Strip markdown formatting for TTS (text-to-speech)
98
98
  * Removes **bold**, ##headers, ```code```, etc. so TTS doesn't read them literally
@@ -1704,6 +1704,17 @@ export class ClaudeLLM extends llm.LLM {
1704
1704
  return {};
1705
1705
  }],
1706
1706
  }],
1707
+ // Self-review gate — block ONCE (stop_hook_active-guarded) so the reviewer
1708
+ // re-checks its own verdict before returning, instead of stopping on a
1709
+ // first-pass judgment.
1710
+ Stop: [{
1711
+ matcher: '.*',
1712
+ hooks: [async (input) => {
1713
+ if (input?.stop_hook_active)
1714
+ return {};
1715
+ return { decision: 'block', reason: 'Before you finalize: re-read your findings against the diff once. Confirm each BLOCKER/MAJOR is real and reproducible (not a style nit or a false positive), and that your verdict matches the severity of what you actually found. Then end with exactly `VERDICT: ACCEPT` or `VERDICT: REJECT`.' };
1716
+ }],
1717
+ }],
1707
1718
  },
1708
1719
  };
1709
1720
  console.log(`[DISPATCH] spawning reviewer for agentId=${agentId.slice(0, 8)}`);
@@ -1793,6 +1804,16 @@ export class ClaudeLLM extends llm.LLM {
1793
1804
  return {};
1794
1805
  }],
1795
1806
  }],
1807
+ // Self-review gate — block ONCE (stop_hook_active-guarded) so the tester
1808
+ // re-checks its own conclusion before returning.
1809
+ Stop: [{
1810
+ matcher: '.*',
1811
+ hooks: [async (input) => {
1812
+ if (input?.stop_hook_active)
1813
+ return {};
1814
+ return { decision: 'block', reason: 'Before you finalize: re-check your conclusion once. Did you actually RUN the commands (not assume the outcome)? Does your result match the real output, and did you distinguish a genuine regression from a flaky/environment failure? Then end with exactly `RESULT: PASS` or `RESULT: FAIL` followed by a brief summary.' };
1815
+ }],
1816
+ }],
1796
1817
  },
1797
1818
  };
1798
1819
  console.log(`[DISPATCH] spawning tester for agentId=${agentId.slice(0, 8)}`);
@@ -1879,6 +1900,16 @@ export class ClaudeLLM extends llm.LLM {
1879
1900
  return {};
1880
1901
  }],
1881
1902
  }],
1903
+ // Self-review gate — block ONCE (stop_hook_active-guarded) so the gate
1904
+ // re-checks its own PASS/NEEDS-MORE call before returning.
1905
+ Stop: [{
1906
+ matcher: '.*',
1907
+ hooks: [async (input) => {
1908
+ if (input?.stop_hook_active)
1909
+ return {};
1910
+ return { decision: 'block', reason: 'Before you finalize: re-check your gate decision once. Is the research genuinely complete and well-sourced for the original question — not passing thin work, nor failing solid work? Then end with exactly `GATE: PASS` or `GATE: NEEDS-MORE`.' };
1911
+ }],
1912
+ }],
1882
1913
  },
1883
1914
  };
1884
1915
  console.log(`[DISPATCH] spawning research-gate for agentId=${agentId.slice(0, 8)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "osborn",
3
- "version": "0.9.220",
3
+ "version": "0.9.221",
4
4
  "description": "Voice AI coding assistant - local agent that connects to Osborn frontend",
5
5
  "type": "module",
6
6
  "bin": {