@oooooooooo/ch0de 1.9.60 → 1.9.63

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/chode.js +4 -2
  2. package/package.json +1 -2
package/chode.js CHANGED
@@ -3906,10 +3906,10 @@ async function runAgentLoop(prompt, sessionId, force, callOptions, aiCall, onToo
3906
3906
  }
3907
3907
  saveProgress();
3908
3908
  overBudget.forEach(function (call) {
3909
- outputs.push('[Tool ' + call.tool + ' ' + JSON.stringify(call.args).slice(0, 200) + ']\n{ "ok": false, "error": "budget exceeded: turn allows ' + turnCap + ' tool calls (' + (turnMutating ? 'mutating' : 'read-only') + ' step)" }\n[end tool]');
3909
+ outputs.push('[Tool ' + call.tool + ' ' + JSON.stringify(call.args).slice(0, 200) + ']\n' + wrapChodecode('{ "ok": false, "error": "budget exceeded: turn allows ' + turnCap + ' tool calls (' + (turnMutating ? 'mutating' : 'read-only') + ' step)" }') + '\n[end tool]');
3910
3910
  });
3911
3911
  skippedForCap.forEach(function (call) {
3912
- outputs.push('[Tool ' + call.tool + ' ' + JSON.stringify(call.args).slice(0, 200) + ']\n{ "ok": false, "error": "budget exhausted: run cap ' + runCap + ' reached" }\n[end tool]');
3912
+ outputs.push('[Tool ' + call.tool + ' ' + JSON.stringify(call.args).slice(0, 200) + ']\n' + wrapChodecode('{ "ok": false, "error": "budget exhausted: run cap ' + runCap + ' reached" }') + '\n[end tool]');
3913
3913
  });
3914
3914
  // Double consecutive output-limit finishes = step failure.
3915
3915
  const observedCalls=executable.concat(overBudget,skippedForCap);if(classification.mutating)for(let index=0;index<outputs.length;index++)toolHistory.add(observedCalls[index],outputs[index]);if(classification.mutating&&callOptions.acceptanceTest&&acceptanceChangedThisTurn&&acceptanceFeedbackBudget.runs<3){acceptanceFeedbackBudget.runs++;var feedback=require('./acceptance-check').run(ROOT,callOptions);if(feedback)toolHistory.add({tool:'exec',args:{cmd:'immutable acceptance check '+callOptions.acceptanceTest}},'[ACCEPTANCE FEEDBACK — observed after this edit; not a final completion verdict]\n'+JSON.stringify(feedback)+'\n[END ACCEPTANCE FEEDBACK]');}const recentObservations=classification.mutating?toolHistory.text():outputs.join('\n');
@@ -4115,6 +4115,7 @@ async function callWithBestProvider(prompt, sessionId, forceProvider, opts) {
4115
4115
  } else if (p.category === 'free_local') {
4116
4116
  if (pid === 'ollama' && (!localHealth || !localHealth.ok || !localHealth.models.length)) return false;
4117
4117
  } else if (p.category === 'keyless') {
4118
+ if (!opts.freeOnly) return false; // keyless/free providers only in free mode — paid mode uses keyed/local only
4118
4119
  // Remote keyless entries auto-route in rank order (Ollama-first rule
4119
4120
  // still applies above). Rate limits + circuit breaker below bound them;
4120
4121
  // the zero-key path falls back to ranked key guidance if all fail.
@@ -4146,6 +4147,7 @@ async function callWithBestProvider(prompt, sessionId, forceProvider, opts) {
4146
4147
  viable.sort(function(a, b){
4147
4148
  var aAuth = isAuthFailed(a) ? 1 : 0, bAuth = isAuthFailed(b) ? 1 : 0;
4148
4149
  if (aAuth !== bAuth) return aAuth - bAuth;
4150
+ if (!opts.freeOnly) return 0; // Provider ranking disabled outside free mode — keep registry order
4149
4151
  var ra = (rankPos[a] !== undefined) ? rankPos[a] : 1e9;
4150
4152
  var rb = (rankPos[b] !== undefined) ? rankPos[b] : 1e9;
4151
4153
  if (ra !== rb) return ra - rb;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oooooooooo/ch0de",
3
- "version": "1.9.60",
3
+ "version": "1.9.63",
4
4
  "description": "The self-healing AI coding harness. Free tiers. HEMO auto-provisioning. Zero lock-in. Canonical brand: ch0de.",
5
5
  "main": "chode.js",
6
6
  "bin": {
@@ -151,7 +151,6 @@
151
151
  },
152
152
  "dependencies": {
153
153
  "@modelcontextprotocol/sdk": "1.32.2",
154
- "@oooooooooo/ch0de": "^1.9.58",
155
154
  "lean": "^0.1.1"
156
155
  },
157
156
  "devDependencies": {