@jiggai/recipes 0.4.27 → 0.4.28

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.27",
5
+ "version": "0.4.28",
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.27",
3
+ "version": "0.4.28",
4
4
  "description": "ClawRecipes plugin for OpenClaw (markdown recipes -> scaffold agents/teams)",
5
5
  "main": "index.ts",
6
6
  "type": "commonjs",
@@ -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
- /** Disable event-driven chaining (used in tests to control execution order). */
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) {