@oooooooooo/ch0de 1.9.59 → 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 +12 -37
- package/package.json +1 -1
package/chode.js
CHANGED
|
@@ -5908,7 +5908,7 @@ async function cmdAI(rawArgs, invocationOptions) {
|
|
|
5908
5908
|
if(!args.noMemory&&(args.noTools||htmlArtifact))prompt+=projectMemory().context();
|
|
5909
5909
|
if (!htmlArtifact) callOptions.v2 = true; // v2 agent stages (classify/plan/verify/repair); HTML build mode stays legacy-bounded.
|
|
5910
5910
|
if (!htmlArtifact) callOptions.orchestrate = String(process.env.CHODE_ORCHESTRATOR || '').toLowerCase() !== '0' && args.orchestrate !== false; // delegate independent plan steps to bounded parallel workers.
|
|
5911
|
-
if (
|
|
5911
|
+
if (htmlArtifact) callOptions.browserCheck = browserCheckEligible; // exercise generated HTML sites in a real Chromium and keep screenshots.
|
|
5912
5912
|
if (typeof args.onToken === 'function') callOptions.onToken = args.onToken;
|
|
5913
5913
|
if (typeof args.onNarrate === 'function') callOptions.onNarrate = args.onNarrate;
|
|
5914
5914
|
else if (!fromRepl && !args.json) callOptions.onNarrate = function (text) { info(' ' + String(text || '').replace(/\s+/g, ' ').slice(0, 240) + '\n', 'dim'); };
|
|
@@ -6204,38 +6204,13 @@ function clearCheckpoint(taskId) {
|
|
|
6204
6204
|
} catch (e) {}
|
|
6205
6205
|
}
|
|
6206
6206
|
|
|
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);
|
|
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');
|
|
6239
6214
|
}
|
|
6240
6215
|
|
|
6241
6216
|
async function runProjectSteps(q) {
|
|
@@ -6302,10 +6277,10 @@ async function cmdProjectResume(qid) {
|
|
|
6302
6277
|
if (!/^[A-Za-z0-9_-]{1,80}$/.test(qid || '')) { fail('Not found: ' + qid); return; }
|
|
6303
6278
|
var q = loadWorkQueue(qid);
|
|
6304
6279
|
if (!q) { fail('Not found: ' + qid); return; }
|
|
6305
|
-
|
|
6306
|
-
info('
|
|
6307
|
-
|
|
6308
|
-
|
|
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');
|
|
6309
6284
|
}
|
|
6310
6285
|
|
|
6311
6286
|
async function cmdTask(argv) {
|
package/package.json
CHANGED