astrocode-workflow 0.1.23 → 0.1.24
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/dist/tools/workflow.js +4 -8
- package/package.json +1 -1
- package/src/tools/workflow.ts +9 -13
package/dist/tools/workflow.js
CHANGED
|
@@ -154,16 +154,12 @@ export function createAstroWorkflowProceedTool(opts) {
|
|
|
154
154
|
return false;
|
|
155
155
|
};
|
|
156
156
|
if (!agentExists(agentName)) {
|
|
157
|
-
console.warn(`[Astrocode] Agent ${agentName} not found in config. Falling back to General.`);
|
|
157
|
+
console.warn(`[Astrocode] Agent ${agentName} not found in config. Falling back to orchestrator instead of General.`);
|
|
158
158
|
console.warn(`[Astrocode] Agent check: config.agent exists: ${!!systemConfig.agent}, agentName in config: ${systemConfig.agent ? agentName in systemConfig.agent : 'N/A'}`);
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
// Skip General fallback for stage agents to avoid malformed output
|
|
160
|
+
agentName = config.agents?.orchestrator_name || "Astro";
|
|
161
161
|
if (!agentExists(agentName)) {
|
|
162
|
-
|
|
163
|
-
agentName = config.agents?.orchestrator_name || "Astro";
|
|
164
|
-
if (!agentExists(agentName)) {
|
|
165
|
-
throw new Error(`Critical: No agents available for delegation. Primary: ${resolveAgentName(next.stage_key, config)}, General, Orchestrator: ${agentName}`);
|
|
166
|
-
}
|
|
162
|
+
throw new Error(`Critical: No agents available for delegation. Primary: ${resolveAgentName(next.stage_key, config)}, Orchestrator: ${agentName}`);
|
|
167
163
|
}
|
|
168
164
|
}
|
|
169
165
|
console.log(`[Astrocode] Delegating stage ${next.stage_key} to agent: ${agentName}`);
|
package/package.json
CHANGED
package/src/tools/workflow.ts
CHANGED
|
@@ -187,19 +187,15 @@ export function createAstroWorkflowProceedTool(opts: { ctx: any; config: Astroco
|
|
|
187
187
|
return false;
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
throw new Error(`Critical: No agents available for delegation. Primary: ${resolveAgentName(next.stage_key, config)}, General, Orchestrator: ${agentName}`);
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
190
|
+
if (!agentExists(agentName)) {
|
|
191
|
+
console.warn(`[Astrocode] Agent ${agentName} not found in config. Falling back to orchestrator instead of General.`);
|
|
192
|
+
console.warn(`[Astrocode] Agent check: config.agent exists: ${!!systemConfig.agent}, agentName in config: ${systemConfig.agent ? agentName in systemConfig.agent : 'N/A'}`);
|
|
193
|
+
// Skip General fallback for stage agents to avoid malformed output
|
|
194
|
+
agentName = config.agents?.orchestrator_name || "Astro";
|
|
195
|
+
if (!agentExists(agentName)) {
|
|
196
|
+
throw new Error(`Critical: No agents available for delegation. Primary: ${resolveAgentName(next.stage_key, config)}, Orchestrator: ${agentName}`);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
203
199
|
|
|
204
200
|
console.log(`[Astrocode] Delegating stage ${next.stage_key} to agent: ${agentName}`);
|
|
205
201
|
|