workflow-ai 1.0.29 → 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.
- package/package.json +1 -1
- package/src/runner.mjs +6 -2
package/package.json
CHANGED
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
|
-
|
|
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) {
|