@jiggai/recipes 0.4.54 → 0.4.56

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.
@@ -2,7 +2,7 @@
2
2
  "id": "recipes",
3
3
  "name": "Recipes",
4
4
  "description": "Markdown recipes that scaffold agents and teams (workspace-local).",
5
- "version": "0.4.54",
5
+ "version": "0.4.56",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiggai/recipes",
3
- "version": "0.4.54",
3
+ "version": "0.4.56",
4
4
  "description": "ClawRecipes plugin for OpenClaw (markdown recipes -> scaffold agents/teams)",
5
5
  "main": "index.ts",
6
6
  "type": "commonjs",
@@ -213,7 +213,8 @@ export async function executeWorkflowNodes(opts: {
213
213
  const llmRec = asRecord(llmRes);
214
214
  const details = asRecord(llmRec['details']);
215
215
  const payload = details['json'] ?? (Object.keys(details).length ? details : llmRes) ?? null;
216
- text = JSON.stringify(payload, null, 2);
216
+ // Store string payloads (e.g. markdown) as-is — see workflow-worker.ts for rationale.
217
+ text = typeof payload === 'string' ? payload : JSON.stringify(payload, null, 2);
217
218
  } catch (e) {
218
219
  throw new Error(`LLM execution failed for node ${nodeLabel(node)}: ${e instanceof Error ? e.message : String(e)}`);
219
220
  }
@@ -889,7 +889,11 @@ export async function runWorkflowWorkerTick(api: OpenClawPluginApi, opts: {
889
889
  const llmRec = asRecord(llmRes);
890
890
  const details = asRecord(llmRec['details']);
891
891
  const payload = details['json'] ?? (Object.keys(details).length ? details : llmRes) ?? null;
892
- text = JSON.stringify(payload, null, 2);
892
+ // Store string payloads (e.g. markdown) as-is so `{{node.text}}` substitutes
893
+ // the original content. JSON.stringify(string) would wrap it in quotes and
894
+ // escape newlines, which breaks downstream fs.write consumers that expect
895
+ // plain text. Object/array payloads still get pretty-printed.
896
+ text = typeof payload === 'string' ? payload : JSON.stringify(payload, null, 2);
893
897
  } catch (e) {
894
898
  const eRec = asRecord(e);
895
899
  const errorCategory = classifyError(e);