workflow-ai 1.0.28 → 1.0.30

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.
@@ -31,10 +31,7 @@ rules:
31
31
  - condition: skipped
32
32
  to_dir: done
33
33
  reason: "review skipped"
34
- - condition: failed
35
- to_dir: backlog
36
- reason: "review failed"
37
- # null (нет ревью) — не перемещаем
34
+ # failed и null — не перемещаем
38
35
 
39
36
  # Правила для done/
40
37
  done:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workflow-ai",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "AI Agent Workflow Coordinator — kanban-based pipeline for AI coding agents",
5
5
  "type": "module",
6
6
  "bin": {
package/src/runner.mjs CHANGED
@@ -765,9 +765,13 @@ class StageExecutor {
765
765
  let agentId = stage.agent || this.pipeline.default_agent;
766
766
  const attempt = (stage.counter && this.counters[stage.counter]) || 0;
767
767
 
768
- if (attempt <= 1 && stage.agent_by_type && this.context.task_type) {
768
+ // Фоллбэк: если task_type не задан, вычисляем из префикса ticket_id (PMA-005 → pma)
769
+ const taskType = this.context.task_type
770
+ || (this.context.ticket_id && this.context.ticket_id.split('-')[0].toLowerCase())
771
+ || null;
772
+
773
+ if (attempt <= 1 && stage.agent_by_type && taskType) {
769
774
  // Первая попытка: выбор по типу задачи
770
- const taskType = this.context.task_type;
771
775
  if (stage.agent_by_type[taskType]) {
772
776
  agentId = stage.agent_by_type[taskType];
773
777
  if (this.logger) {
@@ -940,8 +944,14 @@ class StageExecutor {
940
944
  const err = new Error(`Agent exited with code ${code}`);
941
945
  err.code = 'NON_ZERO_EXIT';
942
946
  err.exitCode = code;
947
+ err.stderr = stderr;
943
948
  if (this.logger) {
944
949
  this.logger.error(`Agent exited with code ${code}`, stageId);
950
+ if (stderr.trim()) {
951
+ for (const line of stderr.trim().split('\n')) {
952
+ this.logger.error(` stderr: ${line}`, stageId);
953
+ }
954
+ }
945
955
  }
946
956
  reject(err);
947
957
  return;