@oooooooooo/ch0de 1.9.59 → 1.9.62
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/chode.js +15 -39
- 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');
|
|
@@ -4146,6 +4146,7 @@ async function callWithBestProvider(prompt, sessionId, forceProvider, opts) {
|
|
|
4146
4146
|
viable.sort(function(a, b){
|
|
4147
4147
|
var aAuth = isAuthFailed(a) ? 1 : 0, bAuth = isAuthFailed(b) ? 1 : 0;
|
|
4148
4148
|
if (aAuth !== bAuth) return aAuth - bAuth;
|
|
4149
|
+
if (!opts.freeOnly) return 0; // Provider ranking disabled outside free mode — keep registry order
|
|
4149
4150
|
var ra = (rankPos[a] !== undefined) ? rankPos[a] : 1e9;
|
|
4150
4151
|
var rb = (rankPos[b] !== undefined) ? rankPos[b] : 1e9;
|
|
4151
4152
|
if (ra !== rb) return ra - rb;
|
|
@@ -5908,7 +5909,7 @@ async function cmdAI(rawArgs, invocationOptions) {
|
|
|
5908
5909
|
if(!args.noMemory&&(args.noTools||htmlArtifact))prompt+=projectMemory().context();
|
|
5909
5910
|
if (!htmlArtifact) callOptions.v2 = true; // v2 agent stages (classify/plan/verify/repair); HTML build mode stays legacy-bounded.
|
|
5910
5911
|
if (!htmlArtifact) callOptions.orchestrate = String(process.env.CHODE_ORCHESTRATOR || '').toLowerCase() !== '0' && args.orchestrate !== false; // delegate independent plan steps to bounded parallel workers.
|
|
5911
|
-
if (
|
|
5912
|
+
if (htmlArtifact) callOptions.browserCheck = browserCheckEligible; // exercise generated HTML sites in a real Chromium and keep screenshots.
|
|
5912
5913
|
if (typeof args.onToken === 'function') callOptions.onToken = args.onToken;
|
|
5913
5914
|
if (typeof args.onNarrate === 'function') callOptions.onNarrate = args.onNarrate;
|
|
5914
5915
|
else if (!fromRepl && !args.json) callOptions.onNarrate = function (text) { info(' ' + String(text || '').replace(/\s+/g, ' ').slice(0, 240) + '\n', 'dim'); };
|
|
@@ -6204,38 +6205,13 @@ function clearCheckpoint(taskId) {
|
|
|
6204
6205
|
} catch (e) {}
|
|
6205
6206
|
}
|
|
6206
6207
|
|
|
6207
|
-
async function cmdProject(spec) {
|
|
6208
|
-
info('\n chode project —
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
if (!steps) {
|
|
6215
|
-
info(' Scanning providers...\n');
|
|
6216
|
-
var scored = await runFullScan(false); showQuickScore();
|
|
6217
|
-
info('\n Decomposing: "' + spec + '"\n');
|
|
6218
|
-
var planResult = await callWithBestProvider('Break into numbered steps (one per line, no explanations): ' + spec, null, null);
|
|
6219
|
-
if (!planResult) { warn('Planning failed. Using defaults.'); steps = [{desc:'Analyze:'+spec},{desc:'Plan'},{desc:'Execute'}]; }
|
|
6220
|
-
else {
|
|
6221
|
-
var lines = planResult.result.split('\n').filter(function(l){return l.trim();});
|
|
6222
|
-
steps = lines.map(function(l,i){return {desc:l.trim(),index:i+1};});
|
|
6223
|
-
}
|
|
6224
|
-
} else if (Array.isArray(steps)) {
|
|
6225
|
-
steps = steps.map(function(s,i){ return (typeof s === 'string') ? {desc:s,index:i+1} : s; });
|
|
6226
|
-
} else {
|
|
6227
|
-
// Parsed JSON but not an array (e.g. a bare number) — treat as one step.
|
|
6228
|
-
steps = [{ desc: (steps && steps.desc) || spec, index: 1 }];
|
|
6229
|
-
}
|
|
6230
|
-
|
|
6231
|
-
var qid = 'proj_' + Date.now();
|
|
6232
|
-
var q = loadWorkQueue(qid);
|
|
6233
|
-
if (!q) {
|
|
6234
|
-
q = { id: qid, spec: spec, steps: steps.map(function(s){ return {desc:s.desc,done:false,result:null,provider:null,error:null}; }), startedAt: Date.now() };
|
|
6235
|
-
saveWorkQueue(q);
|
|
6236
|
-
}
|
|
6237
|
-
|
|
6238
|
-
return await runProjectSteps(q);
|
|
6208
|
+
async function cmdProject(spec) {
|
|
6209
|
+
info('\n chode project — Build with agentic tool execution\n');
|
|
6210
|
+
info(' Spec: ' + spec + '\n');
|
|
6211
|
+
// Delegate to cmdAI which has full tool access (write, edit, exec, mkdir, etc.)
|
|
6212
|
+
// and actually creates project files instead of just describing shell steps.
|
|
6213
|
+
await cmdAI(spec ? [spec] : [], { cli: true, project: true });
|
|
6214
|
+
ok('\n Project complete.\n');
|
|
6239
6215
|
}
|
|
6240
6216
|
|
|
6241
6217
|
async function runProjectSteps(q) {
|
|
@@ -6302,10 +6278,10 @@ async function cmdProjectResume(qid) {
|
|
|
6302
6278
|
if (!/^[A-Za-z0-9_-]{1,80}$/.test(qid || '')) { fail('Not found: ' + qid); return; }
|
|
6303
6279
|
var q = loadWorkQueue(qid);
|
|
6304
6280
|
if (!q) { fail('Not found: ' + qid); return; }
|
|
6305
|
-
|
|
6306
|
-
info('
|
|
6307
|
-
|
|
6308
|
-
|
|
6281
|
+
info('\n Resuming: ' + qid + '\n');
|
|
6282
|
+
info(' Note: project resume now re-runs via agentic execution. Re-running spec: ' + (q.spec||'') + '\n');
|
|
6283
|
+
await cmdAI(q.spec ? [q.spec] : [], { cli: true, project: true });
|
|
6284
|
+
ok('\n Project resumed.\n');
|
|
6309
6285
|
}
|
|
6310
6286
|
|
|
6311
6287
|
async function cmdTask(argv) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oooooooooo/ch0de",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.62",
|
|
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": {
|