@workermill/agent 0.2.0 → 0.2.1

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/dist/planner.js +20 -3
  2. package/package.json +1 -1
package/dist/planner.js CHANGED
@@ -330,7 +330,13 @@ export async function planTask(task, config) {
330
330
  if (criticResult.approved || criticResult.score >= AUTO_APPROVAL_THRESHOLD) {
331
331
  // Approved! Post the file-capped plan
332
332
  const msg = `${PREFIX} Critic approved (score: ${criticResult.score}/100)`;
333
+ console.log(`${ts()} ${taskLabel} ${chalk.green("✓")} ${msg}`);
333
334
  await postLog(task.id, msg);
335
+ if (criticResult.risks.length > 0) {
336
+ const risksMsg = `${PREFIX} Critic risks (non-blocking): ${criticResult.risks.join("; ")}`;
337
+ console.log(`${ts()} ${taskLabel} ${chalk.dim(risksMsg)}`);
338
+ await postLog(task.id, risksMsg);
339
+ }
334
340
  return await postValidatedPlan(task.id, plan, config.agentId, taskLabel, elapsed);
335
341
  }
336
342
  // 2f. Rejected — append critic feedback for next iteration
@@ -341,7 +347,14 @@ export async function planTask(task, config) {
341
347
  console.log(`${ts()} ${taskLabel} ${chalk.yellow("⚠")} ${msg}`);
342
348
  await postLog(task.id, msg);
343
349
  if (criticResult.risks.length > 0) {
344
- await postLog(task.id, `${PREFIX} Critic risks: ${criticResult.risks.join("; ")}`);
350
+ const risksMsg = `${PREFIX} Critic risks: ${criticResult.risks.join("; ")}`;
351
+ console.log(`${ts()} ${taskLabel} ${chalk.dim(risksMsg)}`);
352
+ await postLog(task.id, risksMsg);
353
+ }
354
+ if (criticResult.suggestions && criticResult.suggestions.length > 0) {
355
+ const sugMsg = `${PREFIX} Critic suggestions: ${criticResult.suggestions.join("; ")}`;
356
+ console.log(`${ts()} ${taskLabel} ${chalk.dim(sugMsg)}`);
357
+ await postLog(task.id, sugMsg);
345
358
  }
346
359
  }
347
360
  else {
@@ -350,10 +363,14 @@ export async function planTask(task, config) {
350
363
  console.error(`${ts()} ${taskLabel} ${chalk.red("✗")} ${msg}`);
351
364
  await postLog(task.id, msg, "error", "error");
352
365
  if (criticResult.risks.length > 0) {
353
- await postLog(task.id, `${PREFIX} Final risks: ${criticResult.risks.join("; ")}`, "error", "error");
366
+ const risksMsg = `${PREFIX} Final risks: ${criticResult.risks.join("; ")}`;
367
+ console.error(`${ts()} ${taskLabel} ${risksMsg}`);
368
+ await postLog(task.id, risksMsg, "error", "error");
354
369
  }
355
370
  if (criticResult.suggestions && criticResult.suggestions.length > 0) {
356
- await postLog(task.id, `${PREFIX} Suggestions: ${criticResult.suggestions.join("; ")}`, "error", "error");
371
+ const sugMsg = `${PREFIX} Suggestions: ${criticResult.suggestions.join("; ")}`;
372
+ console.error(`${ts()} ${taskLabel} ${sugMsg}`);
373
+ await postLog(task.id, sugMsg, "error", "error");
357
374
  }
358
375
  }
359
376
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workermill/agent",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "WorkerMill Remote Agent - Run AI workers locally with your Claude Max subscription",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",