astrocode-workflow 0.1.6 → 0.1.8
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 +7 -4
- package/package.json +1 -1
- package/src/tools/workflow.ts +8 -4
package/dist/tools/workflow.js
CHANGED
|
@@ -125,14 +125,17 @@ export function createAstroWorkflowProceedTool(opts) {
|
|
|
125
125
|
const story = db.prepare("SELECT * FROM stories WHERE story_key=?").get(run.story_key);
|
|
126
126
|
// Mark stage started + set subagent_type to the stage agent.
|
|
127
127
|
let agentName = resolveAgentName(next.stage_key);
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
console.log(`[Astrocode] Resolving agent for ${next.stage_key}: ${agentName}`);
|
|
129
|
+
console.log(`[Astrocode] Available agents:`, Object.keys(config.agent || {}));
|
|
130
|
+
// Validate agent availability
|
|
131
|
+
const systemConfig = config;
|
|
130
132
|
if (!systemConfig.agent || !systemConfig.agent[agentName]) {
|
|
131
|
-
console.warn(`Agent ${agentName} not found in
|
|
133
|
+
console.warn(`[Astrocode] Agent ${agentName} not found in config. Falling back to General.`);
|
|
134
|
+
console.warn(`[Astrocode] Agent check: config.agent exists: ${!!systemConfig.agent}, agentName in config: ${systemConfig.agent ? agentName in systemConfig.agent : 'N/A'}`);
|
|
132
135
|
// Fallback to General
|
|
133
136
|
agentName = "General";
|
|
134
137
|
}
|
|
135
|
-
console.log(`Delegating stage ${next.stage_key} to agent: ${agentName}`);
|
|
138
|
+
console.log(`[Astrocode] Delegating stage ${next.stage_key} to agent: ${agentName}`);
|
|
136
139
|
withTx(db, () => {
|
|
137
140
|
startStage(db, active.run_id, next.stage_key, { subagent_type: agentName });
|
|
138
141
|
});
|
package/package.json
CHANGED
package/src/tools/workflow.ts
CHANGED
|
@@ -153,15 +153,19 @@ export function createAstroWorkflowProceedTool(opts: { ctx: any; config: Astroco
|
|
|
153
153
|
// Mark stage started + set subagent_type to the stage agent.
|
|
154
154
|
let agentName = resolveAgentName(next.stage_key);
|
|
155
155
|
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
console.log(`[Astrocode] Resolving agent for ${next.stage_key}: ${agentName}`);
|
|
157
|
+
console.log(`[Astrocode] Available agents:`, Object.keys((config as any).agent || {}));
|
|
158
|
+
|
|
159
|
+
// Validate agent availability
|
|
160
|
+
const systemConfig = config as any;
|
|
158
161
|
if (!systemConfig.agent || !systemConfig.agent[agentName]) {
|
|
159
|
-
console.warn(`Agent ${agentName} not found in
|
|
162
|
+
console.warn(`[Astrocode] Agent ${agentName} not found in config. Falling back to General.`);
|
|
163
|
+
console.warn(`[Astrocode] Agent check: config.agent exists: ${!!systemConfig.agent}, agentName in config: ${systemConfig.agent ? agentName in systemConfig.agent : 'N/A'}`);
|
|
160
164
|
// Fallback to General
|
|
161
165
|
agentName = "General";
|
|
162
166
|
}
|
|
163
167
|
|
|
164
|
-
console.log(`Delegating stage ${next.stage_key} to agent: ${agentName}`);
|
|
168
|
+
console.log(`[Astrocode] Delegating stage ${next.stage_key} to agent: ${agentName}`);
|
|
165
169
|
|
|
166
170
|
withTx(db, () => {
|
|
167
171
|
startStage(db, active.run_id, next.stage_key, { subagent_type: agentName });
|