astrocode-workflow 0.1.39 → 0.1.40

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.
@@ -137,9 +137,8 @@ Expected format:
137
137
 
138
138
  Ensure JSON has required fields (stage_key, status) and valid syntax.`;
139
139
  }
140
- if (parsed.astro_json.stage_key !== sk) {
141
- return `❌ Stage Key Mismatch: ASTRO JSON has stage_key="${parsed.astro_json.stage_key}" but expected "${sk}". Update the JSON to match the current stage.`;
142
- }
140
+ // Override stage_key to match the expected stage (agents sometimes get this wrong)
141
+ parsed.astro_json.stage_key = sk;
143
142
  // Context validation (warnings, not errors)
144
143
  if (parsed.astro_json.run_id && parsed.astro_json.run_id !== rid) {
145
144
  console.warn(`[Astrocode] ⚠️ Run ID mismatch in baton: expected "${rid}", got "${parsed.astro_json.run_id}". Proceeding anyway.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astrocode-workflow",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -174,9 +174,8 @@ Expected format:
174
174
  Ensure JSON has required fields (stage_key, status) and valid syntax.`;
175
175
  }
176
176
 
177
- if (parsed.astro_json.stage_key !== sk) {
178
- return `❌ Stage Key Mismatch: ASTRO JSON has stage_key="${parsed.astro_json.stage_key}" but expected "${sk}". Update the JSON to match the current stage.`;
179
- }
177
+ // Override stage_key to match the expected stage (agents sometimes get this wrong)
178
+ parsed.astro_json.stage_key = sk;
180
179
 
181
180
  // Context validation (warnings, not errors)
182
181
  if (parsed.astro_json.run_id && parsed.astro_json.run_id !== rid) {