@jiggai/recipes 0.4.27 → 0.4.29
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.
|
@@ -765,7 +765,8 @@ See: [OUTBOUND_POSTING.md](OUTBOUND_POSTING.md)
|
|
|
765
765
|
If you rely on a controller-local custom posting patch:
|
|
766
766
|
- you may need to reapply that patch after install/update
|
|
767
767
|
- you may need to tell your assistant to turn workflow posting back on
|
|
768
|
-
- RJ's current public gist for the `marketing.post_all` patch is: <https://gist.github.com/rjdjohnston/
|
|
768
|
+
- RJ's current public gist for the `marketing.post_all` patch is: <https://gist.github.com/rjdjohnston/2440a776529829e7d1c0d5d949f6e631>
|
|
769
|
+
- Note: Updated for current file structure (`workflow-worker.ts` vs old `workflow-runner.ts`)
|
|
769
770
|
|
|
770
771
|
So if a workflow runs but does not actually post, check your posting path before blaming the runner.
|
|
771
772
|
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -19,21 +19,15 @@ import {
|
|
|
19
19
|
sanitizeDraftOnlyText, templateReplace,
|
|
20
20
|
} from './workflow-utils';
|
|
21
21
|
|
|
22
|
-
// Max depth for event-driven chaining to prevent runaway recursion.
|
|
23
|
-
const maxChainDepth = 20;
|
|
24
|
-
|
|
25
22
|
// eslint-disable-next-line complexity, max-lines-per-function
|
|
26
23
|
export async function runWorkflowWorkerTick(api: OpenClawPluginApi, opts: {
|
|
27
24
|
teamId: string;
|
|
28
25
|
agentId: string;
|
|
29
26
|
limit?: number;
|
|
30
27
|
workerId?: string;
|
|
31
|
-
|
|
32
|
-
noChain?: boolean;
|
|
33
|
-
}, chainDepth = 0) {
|
|
28
|
+
}) {
|
|
34
29
|
const teamId = String(opts.teamId);
|
|
35
30
|
const agentId = String(opts.agentId);
|
|
36
|
-
const noChain = !!opts.noChain;
|
|
37
31
|
if (!teamId) throw new Error('--team-id is required');
|
|
38
32
|
if (!agentId) throw new Error('--agent-id is required');
|
|
39
33
|
|
|
@@ -584,12 +578,6 @@ export async function runWorkflowWorkerTick(api: OpenClawPluginApi, opts: {
|
|
|
584
578
|
events: [...cur.events, { ts: new Date().toISOString(), type: 'node.enqueued', nodeId: nextNode.id, agentId: approvalAgentId }],
|
|
585
579
|
}));
|
|
586
580
|
|
|
587
|
-
// Event-driven chaining: immediately kick the next agent's worker
|
|
588
|
-
if (!noChain && approvalAgentId !== agentId && chainDepth < maxChainDepth) {
|
|
589
|
-
void runWorkflowWorkerTick(api, { teamId, agentId: approvalAgentId, limit: 1, workerId: `${workerId}:chain` }, chainDepth + 1)
|
|
590
|
-
.catch(() => { /* best-effort — cron workers are the safety net */ });
|
|
591
|
-
}
|
|
592
|
-
|
|
593
581
|
results.push({ taskId: task.id, runId: task.runId, nodeId: task.nodeId, status: 'ok' });
|
|
594
582
|
continue;
|
|
595
583
|
}
|
|
@@ -612,12 +600,6 @@ export async function runWorkflowWorkerTick(api: OpenClawPluginApi, opts: {
|
|
|
612
600
|
events: [...cur.events, { ts: new Date().toISOString(), type: 'node.enqueued', nodeId: nextNode.id, agentId: nextAgentId }],
|
|
613
601
|
}));
|
|
614
602
|
|
|
615
|
-
// Event-driven chaining: immediately kick the next agent's worker
|
|
616
|
-
if (!noChain && nextAgentId !== agentId && chainDepth < maxChainDepth) {
|
|
617
|
-
void runWorkflowWorkerTick(api, { teamId, agentId: nextAgentId, limit: 1, workerId: `${workerId}:chain` }, chainDepth + 1)
|
|
618
|
-
.catch(() => { /* best-effort — cron workers are the safety net */ });
|
|
619
|
-
}
|
|
620
|
-
|
|
621
603
|
results.push({ taskId: task.id, runId: task.runId, nodeId: task.nodeId, status: 'ok' });
|
|
622
604
|
} finally {
|
|
623
605
|
if (lockHeld) {
|