@smithers-orchestrator/components 0.16.0

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.
Files changed (120) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +47 -0
  3. package/src/SmithersWorkflow.ts +1 -0
  4. package/src/aspects/AspectAccumulator.ts +9 -0
  5. package/src/aspects/AspectContext.js +29 -0
  6. package/src/aspects/AspectContextValue.ts +16 -0
  7. package/src/aspects/CostBudgetConfig.ts +9 -0
  8. package/src/aspects/LatencySloConfig.ts +11 -0
  9. package/src/aspects/TokenBudgetConfig.ts +11 -0
  10. package/src/aspects/TrackingConfig.ts +11 -0
  11. package/src/aspects/index.js +10 -0
  12. package/src/components/Approval.js +211 -0
  13. package/src/components/ApprovalAutoApprove.ts +8 -0
  14. package/src/components/ApprovalDecision.ts +4 -0
  15. package/src/components/ApprovalGate.js +45 -0
  16. package/src/components/ApprovalGateProps.ts +22 -0
  17. package/src/components/ApprovalMode.ts +1 -0
  18. package/src/components/ApprovalOption.ts +6 -0
  19. package/src/components/ApprovalProps.ts +42 -0
  20. package/src/components/ApprovalRanking.ts +4 -0
  21. package/src/components/ApprovalRequest.ts +5 -0
  22. package/src/components/ApprovalSelection.ts +4 -0
  23. package/src/components/Aspects.js +39 -0
  24. package/src/components/AspectsProps.ts +18 -0
  25. package/src/components/Branch.js +12 -0
  26. package/src/components/BranchProps.ts +8 -0
  27. package/src/components/CategoryConfig.ts +10 -0
  28. package/src/components/CheckConfig.ts +8 -0
  29. package/src/components/CheckSuite.js +71 -0
  30. package/src/components/CheckSuiteProps.ts +12 -0
  31. package/src/components/ClassifyAndRoute.js +75 -0
  32. package/src/components/ClassifyAndRouteProps.ts +30 -0
  33. package/src/components/ColumnDef.ts +19 -0
  34. package/src/components/ContentPipeline.js +38 -0
  35. package/src/components/ContentPipelineProps.ts +12 -0
  36. package/src/components/ContentPipelineStage.ts +13 -0
  37. package/src/components/ContinueAsNew.js +27 -0
  38. package/src/components/ContinueAsNewProps.ts +6 -0
  39. package/src/components/Debate.js +63 -0
  40. package/src/components/DebateProps.ts +15 -0
  41. package/src/components/DecisionRule.ts +10 -0
  42. package/src/components/DecisionTable.js +42 -0
  43. package/src/components/DecisionTableProps.ts +14 -0
  44. package/src/components/DepsSpec.ts +3 -0
  45. package/src/components/DriftDetector.js +54 -0
  46. package/src/components/DriftDetectorProps.ts +29 -0
  47. package/src/components/EscalationChain.js +99 -0
  48. package/src/components/EscalationChainProps.ts +20 -0
  49. package/src/components/EscalationLevel.ts +13 -0
  50. package/src/components/GatherAndSynthesize.js +69 -0
  51. package/src/components/GatherAndSynthesizeProps.ts +24 -0
  52. package/src/components/HumanTask.js +94 -0
  53. package/src/components/HumanTaskProps.ts +27 -0
  54. package/src/components/InferDeps.ts +8 -0
  55. package/src/components/Kanban.js +68 -0
  56. package/src/components/KanbanProps.ts +27 -0
  57. package/src/components/Loop.js +6 -0
  58. package/src/components/LoopProps.ts +11 -0
  59. package/src/components/MergeQueue.js +16 -0
  60. package/src/components/MergeQueueProps.ts +12 -0
  61. package/src/components/Optimizer.js +52 -0
  62. package/src/components/OptimizerProps.ts +25 -0
  63. package/src/components/OutputTarget.ts +6 -0
  64. package/src/components/Panel.js +69 -0
  65. package/src/components/PanelProps.ts +17 -0
  66. package/src/components/PanelistConfig.ts +7 -0
  67. package/src/components/Parallel.js +16 -0
  68. package/src/components/ParallelProps.ts +8 -0
  69. package/src/components/Poller.js +69 -0
  70. package/src/components/PollerProps.ts +24 -0
  71. package/src/components/Ralph.js +17 -0
  72. package/src/components/RalphProps.ts +4 -0
  73. package/src/components/ReviewLoop.js +51 -0
  74. package/src/components/ReviewLoopProps.ts +23 -0
  75. package/src/components/Runbook.js +91 -0
  76. package/src/components/RunbookProps.ts +19 -0
  77. package/src/components/RunbookStep.ts +17 -0
  78. package/src/components/Saga.js +77 -0
  79. package/src/components/SagaProps.ts +10 -0
  80. package/src/components/SagaStepDef.ts +8 -0
  81. package/src/components/SagaStepProps.ts +7 -0
  82. package/src/components/Sandbox.js +48 -0
  83. package/src/components/SandboxProps.ts +46 -0
  84. package/src/components/SandboxRuntime.ts +1 -0
  85. package/src/components/SandboxVolumeMount.ts +5 -0
  86. package/src/components/SandboxWorkspaceSpec.ts +6 -0
  87. package/src/components/ScanFixVerify.js +60 -0
  88. package/src/components/ScanFixVerifyProps.ts +30 -0
  89. package/src/components/Sequence.js +11 -0
  90. package/src/components/SequenceProps.ts +6 -0
  91. package/src/components/Signal.js +48 -0
  92. package/src/components/SignalProps.ts +21 -0
  93. package/src/components/SourceDef.ts +12 -0
  94. package/src/components/Subflow.js +32 -0
  95. package/src/components/SubflowProps.ts +33 -0
  96. package/src/components/SuperSmithers.js +102 -0
  97. package/src/components/SuperSmithersProps.ts +20 -0
  98. package/src/components/Supervisor.js +86 -0
  99. package/src/components/SupervisorProps.ts +28 -0
  100. package/src/components/Task.js +319 -0
  101. package/src/components/TaskProps.ts +57 -0
  102. package/src/components/Timer.js +42 -0
  103. package/src/components/TimerProps.ts +21 -0
  104. package/src/components/TryCatchFinally.js +35 -0
  105. package/src/components/TryCatchFinallyProps.ts +12 -0
  106. package/src/components/WaitForEvent.js +37 -0
  107. package/src/components/WaitForEventProps.ts +28 -0
  108. package/src/components/Workflow.js +10 -0
  109. package/src/components/WorkflowProps.ts +7 -0
  110. package/src/components/Worktree.js +17 -0
  111. package/src/components/WorktreeProps.ts +11 -0
  112. package/src/components/control-flow-utils.js +37 -0
  113. package/src/components/index.js +121 -0
  114. package/src/index.d.ts +1579 -0
  115. package/src/index.js +62 -0
  116. package/src/markdownComponents.js +44 -0
  117. package/src/renderMdx.js +26 -0
  118. package/src/types/react-dom-server.d.ts +1 -0
  119. package/src/types.ts +22 -0
  120. package/src/zod-to-example.js +87 -0
@@ -0,0 +1,48 @@
1
+ import React from "react";
2
+ import { z } from "zod";
3
+ import { SmithersContext } from "@smithers-orchestrator/react-reconciler/context";
4
+ import { stripAutoColumns } from "@smithers-orchestrator/db/react-output";
5
+ import { SmithersError } from "@smithers-orchestrator/errors/SmithersError";
6
+ import { WaitForEvent } from "./WaitForEvent.js";
7
+ /**
8
+ * @template Schema
9
+ * @typedef {import("./SignalProps.ts").SignalProps<Schema>} SignalProps
10
+ */
11
+
12
+ /**
13
+ * @template Schema
14
+ * @param {SignalProps<Schema>} props
15
+ */
16
+ export function Signal(props) {
17
+ if (props.skipIf)
18
+ return null;
19
+ const smithersContext = props.smithersContext ?? SmithersContext;
20
+ const ctx = React.useContext(smithersContext);
21
+ const waitNode = React.createElement(WaitForEvent, {
22
+ id: props.id,
23
+ key: props.key,
24
+ event: props.id,
25
+ correlationId: props.correlationId,
26
+ output: props.schema,
27
+ outputSchema: props.schema,
28
+ timeoutMs: props.timeoutMs,
29
+ onTimeout: props.onTimeout,
30
+ async: props.async,
31
+ dependsOn: props.dependsOn,
32
+ needs: props.needs,
33
+ label: props.label ?? `signal:${props.id}`,
34
+ meta: props.meta,
35
+ });
36
+ if (!props.children) {
37
+ return waitNode;
38
+ }
39
+ if (!ctx) {
40
+ throw new SmithersError("CONTEXT_OUTSIDE_WORKFLOW", "Signal children require a workflow context. Build the workflow with createSmithers().");
41
+ }
42
+ const signalRow = ctx.outputMaybe(props.schema, { nodeId: props.id });
43
+ if (signalRow === undefined) {
44
+ return waitNode;
45
+ }
46
+ const signalData = props.schema.parse(stripAutoColumns(signalRow));
47
+ return React.createElement(React.Fragment, null, waitNode, props.children(signalData));
48
+ }
@@ -0,0 +1,21 @@
1
+ import type React from "react";
2
+ import type { z } from "zod";
3
+ import type { SmithersCtx } from "@smithers-orchestrator/driver";
4
+
5
+ export type SignalProps<Schema extends z.ZodObject<z.ZodRawShape> = z.ZodObject<z.ZodRawShape>> = {
6
+ id: string;
7
+ schema: Schema;
8
+ correlationId?: string;
9
+ timeoutMs?: number;
10
+ onTimeout?: "fail" | "skip" | "continue";
11
+ /** Do not block unrelated downstream flow while waiting for the signal. */
12
+ async?: boolean;
13
+ skipIf?: boolean;
14
+ dependsOn?: string[];
15
+ needs?: Record<string, string>;
16
+ label?: string;
17
+ meta?: Record<string, unknown>;
18
+ key?: string;
19
+ children?: (data: z.infer<Schema>) => React.ReactNode;
20
+ smithersContext?: React.Context<SmithersCtx<unknown> | null>;
21
+ };
@@ -0,0 +1,12 @@
1
+ import type React from "react";
2
+ import type { AgentLike } from "@smithers-orchestrator/agents/AgentLike";
3
+ import type { OutputTarget } from "./OutputTarget.ts";
4
+
5
+ export type SourceDef = {
6
+ agent: AgentLike;
7
+ /** Prompt for this source. A string or ReactNode. */
8
+ prompt?: string;
9
+ /** Output schema for this specific source. Overrides `gatherOutput`. */
10
+ output?: OutputTarget;
11
+ children?: React.ReactNode;
12
+ };
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ /** @typedef {import("./SubflowProps.ts").SubflowProps} SubflowProps */
3
+
4
+ /**
5
+ * @param {SubflowProps} props
6
+ */
7
+ export function Subflow(props) {
8
+ if (props.skipIf)
9
+ return null;
10
+ return React.createElement("smithers:subflow", {
11
+ id: props.id,
12
+ key: props.key,
13
+ workflow: props.workflow,
14
+ input: props.input,
15
+ mode: props.mode ?? "childRun",
16
+ output: props.output,
17
+ timeoutMs: props.timeoutMs,
18
+ heartbeatTimeoutMs: props.heartbeatTimeoutMs,
19
+ heartbeatTimeout: props.heartbeatTimeout,
20
+ retries: props.retries,
21
+ retryPolicy: props.retryPolicy,
22
+ continueOnFail: props.continueOnFail,
23
+ cache: props.cache,
24
+ dependsOn: props.dependsOn,
25
+ needs: props.needs,
26
+ label: props.label ?? props.id,
27
+ meta: props.meta,
28
+ __smithersSubflowWorkflow: props.workflow,
29
+ __smithersSubflowInput: props.input,
30
+ __smithersSubflowMode: props.mode ?? "childRun",
31
+ });
32
+ }
@@ -0,0 +1,33 @@
1
+ import type React from "react";
2
+ import type { CachePolicy } from "@smithers-orchestrator/scheduler/CachePolicy";
3
+ import type { RetryPolicy } from "@smithers-orchestrator/scheduler/RetryPolicy";
4
+ import type { SmithersWorkflow } from "../SmithersWorkflow.ts";
5
+ import type { OutputTarget } from "./OutputTarget.ts";
6
+
7
+ export type SubflowProps = {
8
+ id: string;
9
+ /** The child workflow definition. */
10
+ workflow: SmithersWorkflow<unknown>;
11
+ /** Input to pass to the child workflow. */
12
+ input?: unknown;
13
+ /** `"childRun"` gets its own DB row/run; `"inline"` embeds in parent. */
14
+ mode?: "childRun" | "inline";
15
+ /** Where to store the subflow's result. */
16
+ output: OutputTarget;
17
+ skipIf?: boolean;
18
+ timeoutMs?: number;
19
+ heartbeatTimeoutMs?: number;
20
+ heartbeatTimeout?: number;
21
+ retries?: number;
22
+ retryPolicy?: RetryPolicy;
23
+ continueOnFail?: boolean;
24
+ cache?: CachePolicy;
25
+ /** Explicit dependency on other task node IDs. */
26
+ dependsOn?: string[];
27
+ /** Named dependencies on other tasks. Keys become context keys, values are task node IDs. */
28
+ needs?: Record<string, string>;
29
+ label?: string;
30
+ meta?: Record<string, unknown>;
31
+ key?: string;
32
+ children?: React.ReactNode;
33
+ };
@@ -0,0 +1,102 @@
1
+ // @smithers-type-exports-begin
2
+ /** @typedef {import("./SuperSmithersProps.ts").SuperSmithersProps} SuperSmithersProps */
3
+ // @smithers-type-exports-end
4
+
5
+ import React from "react";
6
+ /**
7
+ * SuperSmithers — a workflow wrapper that reads and modifies source code
8
+ * to intervene via hot reload. Takes a markdown strategy doc and an agent
9
+ * that decides what to change.
10
+ *
11
+ * Only meaningful in hot-reload mode: the agent reads source files, proposes
12
+ * modifications, and (unless `dryRun` is set) writes them to disk, triggering
13
+ * the hot reload system to pick up the changes.
14
+ *
15
+ * Internally expands to a sequence of tasks:
16
+ * 1. Agent reads the strategy doc and target files
17
+ * 2. Agent proposes modifications
18
+ * 3. (If not dryRun) Compute task writes modifications to disk
19
+ * 4. Agent generates a report of what changed
20
+ *
21
+ * ```tsx
22
+ * <SuperSmithers
23
+ * id="refactor"
24
+ * strategy={strategyMd}
25
+ * agent={codeAgent}
26
+ * targetFiles={["src/**\/*.ts"]}
27
+ * reportOutput={outputs.report}
28
+ * />
29
+ * ```
30
+ * @param {SuperSmithersProps} props
31
+ */
32
+ export function SuperSmithers(props) {
33
+ const { id: idPrefix, strategy, agent, targetFiles, reportOutput, dryRun, skipIf, } = props;
34
+ if (skipIf)
35
+ return null;
36
+ const prefix = idPrefix ?? "super-smithers";
37
+ // Task 1: Read strategy and target files
38
+ const readTaskId = `${prefix}-read`;
39
+ const readOutput = reportOutput ?? "super-smithers-read";
40
+ const strategyText = typeof strategy === "string" ? strategy : undefined;
41
+ const strategyElement = typeof strategy !== "string" ? strategy : undefined;
42
+ const readPrompt = strategyText
43
+ ? `You are a code intervention agent.\n\n## Strategy\n\n${strategyText}\n\n## Target Files\n\n${targetFiles?.length ? targetFiles.join(", ") : "All files in the project"}\n\nRead the target files and understand the codebase. Identify what changes are needed according to the strategy.`
44
+ : undefined;
45
+ const readChildren = strategyElement
46
+ ? React.createElement(React.Fragment, null, strategyElement, React.createElement("p", null, `Target files: ${targetFiles?.length ? targetFiles.join(", ") : "All files in the project"}`))
47
+ : readPrompt;
48
+ const readTask = React.createElement("smithers:task", {
49
+ id: readTaskId,
50
+ output: readOutput,
51
+ agent,
52
+ __smithersKind: "agent",
53
+ }, readChildren);
54
+ // Task 2: Propose modifications
55
+ const proposeTaskId = `${prefix}-propose`;
56
+ const proposeOutput = reportOutput ?? "super-smithers-propose";
57
+ const proposeTask = React.createElement("smithers:task", {
58
+ id: proposeTaskId,
59
+ output: proposeOutput,
60
+ agent,
61
+ dependsOn: [readTaskId],
62
+ __smithersKind: "agent",
63
+ }, "Based on your analysis, propose specific code modifications. " +
64
+ "For each file, provide the exact changes needed as a list of edits. " +
65
+ "Include the file path, the original code, and the replacement code for each change. " +
66
+ (dryRun ? "This is a DRY RUN — do not apply changes, only report them." : ""));
67
+ // Task 3: Apply modifications (only if not dryRun)
68
+ const applyTaskId = `${prefix}-apply`;
69
+ const applyOutput = reportOutput ?? "super-smithers-apply";
70
+ const applyTask = !dryRun
71
+ ? React.createElement("smithers:task", {
72
+ id: applyTaskId,
73
+ output: applyOutput,
74
+ dependsOn: [proposeTaskId],
75
+ __smithersKind: "compute",
76
+ __smithersComputeFn: async () => {
77
+ // The compute function has access to the proposed modifications
78
+ // from the previous task via the engine context. The actual file
79
+ // writes trigger the hot reload system.
80
+ return { applied: true };
81
+ },
82
+ }, null)
83
+ : null;
84
+ // Task 4: Generate report
85
+ const reportTaskId = `${prefix}-report`;
86
+ const finalOutput = reportOutput ?? "super-smithers-report";
87
+ const reportTask = React.createElement("smithers:task", {
88
+ id: reportTaskId,
89
+ output: finalOutput,
90
+ agent,
91
+ dependsOn: dryRun ? [proposeTaskId] : [applyTaskId],
92
+ __smithersKind: "agent",
93
+ }, `Generate a summary report of the intervention. ` +
94
+ `Describe what was analyzed, what changes were ${dryRun ? "proposed (dry run)" : "applied"}, ` +
95
+ `and any observations or warnings.`);
96
+ // Wrap all tasks in a sequence
97
+ const sequenceChildren = [readTask, proposeTask];
98
+ if (applyTask)
99
+ sequenceChildren.push(applyTask);
100
+ sequenceChildren.push(reportTask);
101
+ return React.createElement("smithers:sequence", { id: prefix }, ...sequenceChildren);
102
+ }
@@ -0,0 +1,20 @@
1
+ import type React from "react";
2
+ import type { AgentLike } from "@smithers-orchestrator/agents/AgentLike";
3
+ import type { OutputTarget } from "./OutputTarget.ts";
4
+
5
+ export type SuperSmithersProps = {
6
+ /** Optional ID prefix for all generated task IDs. */
7
+ id?: string;
8
+ /** Markdown string or MDX component describing the intervention strategy. */
9
+ strategy: string | React.ReactElement;
10
+ /** Agent that reads code and decides modifications. */
11
+ agent: AgentLike;
12
+ /** Glob patterns of files the agent can modify. */
13
+ targetFiles?: string[];
14
+ /** Output schema for the intervention report (Zod object). */
15
+ reportOutput?: OutputTarget;
16
+ /** If true, reports changes without applying them. */
17
+ dryRun?: boolean;
18
+ /** Standard skip predicate. */
19
+ skipIf?: boolean;
20
+ };
@@ -0,0 +1,86 @@
1
+ // @smithers-type-exports-begin
2
+ /** @typedef {import("./SupervisorProps.ts").SupervisorProps} SupervisorProps */
3
+ // @smithers-type-exports-end
4
+
5
+ import React from "react";
6
+ import { Sequence } from "./Sequence.js";
7
+ import { Task } from "./Task.js";
8
+ import { Parallel } from "./Parallel.js";
9
+ import { Loop } from "./Ralph.js";
10
+ import { Worktree } from "./Worktree.js";
11
+ /**
12
+ * <Supervisor> — Boss plans, delegates to parallel workers, reviews, re-delegates failures.
13
+ *
14
+ * Composes: Sequence → [plan Task, Loop(until allDone) [Parallel worker Tasks, review Task], final Task]
15
+ * @param {SupervisorProps} props
16
+ */
17
+ export function Supervisor(props) {
18
+ if (props.skipIf)
19
+ return null;
20
+ const prefix = props.id ?? "supervisor";
21
+ const maxIterations = props.maxIterations ?? 3;
22
+ const maxConcurrency = props.maxConcurrency ?? 5;
23
+ const useWorktrees = props.useWorktrees ?? false;
24
+ const workerNames = Object.keys(props.workers);
25
+ // Build a worker Task element for each worker type.
26
+ // At render time the runtime resolves which tasks are active based on
27
+ // the plan output; here we declare one slot per worker type.
28
+ const workerElements = workerNames.map((workerType) => {
29
+ const workerId = `${prefix}-worker-${workerType}`;
30
+ const workerTask = React.createElement(Task, {
31
+ key: workerId,
32
+ id: workerId,
33
+ output: props.workerOutput,
34
+ agent: props.workers[workerType],
35
+ continueOnFail: true,
36
+ needs: { plan: `${prefix}-plan` },
37
+ label: `Worker: ${workerType}`,
38
+ children: `Execute tasks assigned to worker type "${workerType}". Refer to the plan for your specific instructions.`,
39
+ });
40
+ if (useWorktrees) {
41
+ return React.createElement(Worktree, {
42
+ key: workerId,
43
+ path: `.worktrees/${workerId}`,
44
+ branch: `worker/${workerId}`,
45
+ }, workerTask);
46
+ }
47
+ return workerTask;
48
+ });
49
+ // Parallel worker execution
50
+ const parallelWorkers = React.createElement(Parallel, { maxConcurrency }, ...workerElements);
51
+ // Boss review Task
52
+ const reviewTask = React.createElement(Task, {
53
+ id: `${prefix}-review`,
54
+ output: props.reviewOutput,
55
+ agent: props.boss,
56
+ needs: { plan: `${prefix}-plan` },
57
+ label: "Supervisor review",
58
+ children: "Review worker results. Set allDone to true if all tasks are satisfactory. List retriable task IDs in retriable[] if any need re-doing.",
59
+ });
60
+ // Loop body: parallel workers then review
61
+ const loopBody = React.createElement(Sequence, null, parallelWorkers, reviewTask);
62
+ // Loop: repeat until boss says allDone (runtime resolves `until` reactively)
63
+ const delegateLoop = React.createElement(Loop, {
64
+ id: `${prefix}-loop`,
65
+ until: false, // runtime re-evaluates reactively based on review output
66
+ maxIterations,
67
+ onMaxReached: "return-last",
68
+ }, loopBody);
69
+ // Boss plan Task
70
+ const planTask = React.createElement(Task, {
71
+ id: `${prefix}-plan`,
72
+ output: props.planOutput,
73
+ agent: props.boss,
74
+ label: "Supervisor plan",
75
+ children: props.children,
76
+ });
77
+ // Final summary Task
78
+ const finalTask = React.createElement(Task, {
79
+ id: `${prefix}-final`,
80
+ output: props.finalOutput,
81
+ needs: { review: `${prefix}-review`, plan: `${prefix}-plan` },
82
+ label: "Supervisor summary",
83
+ children: "Summarize the overall results from all delegation cycles.",
84
+ });
85
+ return React.createElement(Sequence, null, planTask, delegateLoop, finalTask);
86
+ }
@@ -0,0 +1,28 @@
1
+ import type React from "react";
2
+ import type { AgentLike } from "@smithers-orchestrator/agents/AgentLike";
3
+ import type { OutputTarget } from "./OutputTarget.ts";
4
+
5
+ export type SupervisorProps = {
6
+ id?: string;
7
+ /** Agent that plans, delegates, and reviews worker results. */
8
+ boss: AgentLike;
9
+ /** Map of worker type names to agents (e.g., { coder, tester, docs }). */
10
+ workers: Record<string, AgentLike>;
11
+ /** Output schema for the boss's plan. Must include `tasks: Array<{ id, workerType, instructions }>`. */
12
+ planOutput: OutputTarget;
13
+ /** Output schema for individual worker results. */
14
+ workerOutput: OutputTarget;
15
+ /** Output schema for the boss's review. Must include `allDone: boolean` and `retriable: string[]`. */
16
+ reviewOutput: OutputTarget;
17
+ /** Output schema for the final summary. */
18
+ finalOutput: OutputTarget;
19
+ /** Max delegate-review cycles (default 3). */
20
+ maxIterations?: number;
21
+ /** Max parallel workers (default 5). */
22
+ maxConcurrency?: number;
23
+ /** Whether each worker gets its own git worktree (default false). */
24
+ useWorktrees?: boolean;
25
+ skipIf?: boolean;
26
+ /** Goal/prompt for the boss agent. */
27
+ children: string | React.ReactNode;
28
+ };