@jiggai/recipes 0.4.55 → 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.
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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);
|