@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.
Files changed (2) hide show
  1. package/chode.js +12 -37
  2. 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 (!htmlArtifact) callOptions.browserCheck = browserCheckEligible; // exercise generated sites in a real Chromium and keep screenshots.
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 — Multi-provider orchestration\n');
6209
-
6210
- var steps;
6211
- try { steps = JSON.parse(spec); }
6212
- catch { steps = null; }
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
- var done = (q.steps || []).filter(function(s){return s.done;}).length;
6306
- info('\n Resuming: ' + qid + ' (' + done + '/' + q.steps.length + ' done)\n');
6307
- if (q.completed || (q.steps.length > 0 && done === q.steps.length)) { ok(' Project already complete. Nothing to resume.\n'); return; }
6308
- await runProjectSteps(q);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oooooooooo/ch0de",
3
- "version": "1.9.59",
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": {