@oooooooooo/ch0de 1.9.58 → 1.9.60
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 +19 -38
- package/package.json +2 -2
package/chode.js
CHANGED
|
@@ -3840,7 +3840,12 @@ async function runAgentLoop(prompt, sessionId, force, callOptions, aiCall, onToo
|
|
|
3840
3840
|
mutating.push(executable[mi].args.file);
|
|
3841
3841
|
}
|
|
3842
3842
|
}
|
|
3843
|
-
if (mutating.length)
|
|
3843
|
+
if (mutating.length) {
|
|
3844
|
+
// Auto-commit checkpoint before mutating agent turn so work can be rolled back.
|
|
3845
|
+
try { run('git add -A', { silent: true, cwd: ROOT }); } catch (e) {}
|
|
3846
|
+
try { run('git commit --allow-empty -m "chode checkpoint: agent turn ' + steps + '"', { silent: true, cwd: ROOT }); } catch (e) {}
|
|
3847
|
+
takeSnapshot('agent turn ' + steps, mutating, sessionId);
|
|
3848
|
+
}
|
|
3844
3849
|
var toolCtx = { yolo:callOptions.yolo===true,onChildAuthors:ids=>{for(const id of ids)draftAuthors.add(String(id).toLowerCase());},taskGroup,mode:callOptions.mode,acceptanceTest:callOptions.acceptanceTest,sessionId: sessionId, actions: actions, aiCall: aiCall, onTool: onTool, onAsk: onAsk, planTargets: effTargets, overwriteTargets: effOverwrites, scopeTargets: callOptions.scopeTargets || null, inspectedUrls: taskContext.inspectedUrls };
|
|
3845
3850
|
var acceptanceChangedThisTurn=false;
|
|
3846
3851
|
async function execOne(call) {
|
|
@@ -5903,7 +5908,7 @@ async function cmdAI(rawArgs, invocationOptions) {
|
|
|
5903
5908
|
if(!args.noMemory&&(args.noTools||htmlArtifact))prompt+=projectMemory().context();
|
|
5904
5909
|
if (!htmlArtifact) callOptions.v2 = true; // v2 agent stages (classify/plan/verify/repair); HTML build mode stays legacy-bounded.
|
|
5905
5910
|
if (!htmlArtifact) callOptions.orchestrate = String(process.env.CHODE_ORCHESTRATOR || '').toLowerCase() !== '0' && args.orchestrate !== false; // delegate independent plan steps to bounded parallel workers.
|
|
5906
|
-
if (
|
|
5911
|
+
if (htmlArtifact) callOptions.browserCheck = browserCheckEligible; // exercise generated HTML sites in a real Chromium and keep screenshots.
|
|
5907
5912
|
if (typeof args.onToken === 'function') callOptions.onToken = args.onToken;
|
|
5908
5913
|
if (typeof args.onNarrate === 'function') callOptions.onNarrate = args.onNarrate;
|
|
5909
5914
|
else if (!fromRepl && !args.json) callOptions.onNarrate = function (text) { info(' ' + String(text || '').replace(/\s+/g, ' ').slice(0, 240) + '\n', 'dim'); };
|
|
@@ -6199,38 +6204,13 @@ function clearCheckpoint(taskId) {
|
|
|
6199
6204
|
} catch (e) {}
|
|
6200
6205
|
}
|
|
6201
6206
|
|
|
6202
|
-
async function cmdProject(spec) {
|
|
6203
|
-
info('\n chode project —
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
if (!steps) {
|
|
6210
|
-
info(' Scanning providers...\n');
|
|
6211
|
-
var scored = await runFullScan(false); showQuickScore();
|
|
6212
|
-
info('\n Decomposing: "' + spec + '"\n');
|
|
6213
|
-
var planResult = await callWithBestProvider('Break into numbered steps (one per line, no explanations): ' + spec, null, null);
|
|
6214
|
-
if (!planResult) { warn('Planning failed. Using defaults.'); steps = [{desc:'Analyze:'+spec},{desc:'Plan'},{desc:'Execute'}]; }
|
|
6215
|
-
else {
|
|
6216
|
-
var lines = planResult.result.split('\n').filter(function(l){return l.trim();});
|
|
6217
|
-
steps = lines.map(function(l,i){return {desc:l.trim(),index:i+1};});
|
|
6218
|
-
}
|
|
6219
|
-
} else if (Array.isArray(steps)) {
|
|
6220
|
-
steps = steps.map(function(s,i){ return (typeof s === 'string') ? {desc:s,index:i+1} : s; });
|
|
6221
|
-
} else {
|
|
6222
|
-
// Parsed JSON but not an array (e.g. a bare number) — treat as one step.
|
|
6223
|
-
steps = [{ desc: (steps && steps.desc) || spec, index: 1 }];
|
|
6224
|
-
}
|
|
6225
|
-
|
|
6226
|
-
var qid = 'proj_' + Date.now();
|
|
6227
|
-
var q = loadWorkQueue(qid);
|
|
6228
|
-
if (!q) {
|
|
6229
|
-
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() };
|
|
6230
|
-
saveWorkQueue(q);
|
|
6231
|
-
}
|
|
6232
|
-
|
|
6233
|
-
return await runProjectSteps(q);
|
|
6207
|
+
async function cmdProject(spec) {
|
|
6208
|
+
info('\n chode project — Build with agentic tool execution\n');
|
|
6209
|
+
info(' Spec: ' + spec + '\n');
|
|
6210
|
+
// Delegate to cmdAI which has full tool access (write, edit, exec, mkdir, etc.)
|
|
6211
|
+
// and actually creates project files instead of just describing shell steps.
|
|
6212
|
+
await cmdAI(spec ? [spec] : [], { cli: true, project: true });
|
|
6213
|
+
ok('\n Project complete.\n');
|
|
6234
6214
|
}
|
|
6235
6215
|
|
|
6236
6216
|
async function runProjectSteps(q) {
|
|
@@ -6297,10 +6277,10 @@ async function cmdProjectResume(qid) {
|
|
|
6297
6277
|
if (!/^[A-Za-z0-9_-]{1,80}$/.test(qid || '')) { fail('Not found: ' + qid); return; }
|
|
6298
6278
|
var q = loadWorkQueue(qid);
|
|
6299
6279
|
if (!q) { fail('Not found: ' + qid); return; }
|
|
6300
|
-
|
|
6301
|
-
info('
|
|
6302
|
-
|
|
6303
|
-
|
|
6280
|
+
info('\n Resuming: ' + qid + '\n');
|
|
6281
|
+
info(' Note: project resume now re-runs via agentic execution. Re-running spec: ' + (q.spec||'') + '\n');
|
|
6282
|
+
await cmdAI(q.spec ? [q.spec] : [], { cli: true, project: true });
|
|
6283
|
+
ok('\n Project resumed.\n');
|
|
6304
6284
|
}
|
|
6305
6285
|
|
|
6306
6286
|
async function cmdTask(argv) {
|
|
@@ -7485,6 +7465,7 @@ function cmdServe(argv) {
|
|
|
7485
7465
|
});
|
|
7486
7466
|
} catch(e) {}
|
|
7487
7467
|
json(res, 200, {ok: true, providers: out});
|
|
7468
|
+
return;
|
|
7488
7469
|
}
|
|
7489
7470
|
|
|
7490
7471
|
var keyM = pathname.match(/^\/api\/provider\/([^\/]+)\/key(\/test)?$/);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oooooooooo/ch0de",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.60",
|
|
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,7 @@
|
|
|
151
151
|
},
|
|
152
152
|
"dependencies": {
|
|
153
153
|
"@modelcontextprotocol/sdk": "1.32.2",
|
|
154
|
-
"@oooooooooo/ch0de": "^1.9.
|
|
154
|
+
"@oooooooooo/ch0de": "^1.9.58",
|
|
155
155
|
"lean": "^0.1.1"
|
|
156
156
|
},
|
|
157
157
|
"devDependencies": {
|