@smithers-orchestrator/engine 0.19.0 → 0.20.1

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/src/engine.js CHANGED
@@ -20,6 +20,7 @@ import { buildPlanTree, scheduleTasks, buildStateKey, } from "./scheduler.js";
20
20
  import { getDefinedToolMetadata } from "./getDefinedToolMetadata.js";
21
21
  import { captureSnapshotEffect, loadLatestSnapshot, parseSnapshot, } from "@smithers-orchestrator/time-travel/snapshot";
22
22
  import { EventBus } from "./events.js";
23
+ import { AgentTraceCollector } from "./AgentTraceCollector.js";
23
24
  import { getJjPointer, runJj, workspaceAdd } from "@smithers-orchestrator/vcs/jj";
24
25
  import { findVcsRoot } from "@smithers-orchestrator/vcs/find-root";
25
26
  import * as BunContext from "@effect/platform-bun/BunContext";
@@ -117,6 +118,78 @@ function isAbortError(err) {
117
118
  }
118
119
  return false;
119
120
  }
121
+ /**
122
+ * @param {unknown} err
123
+ * @returns {string[]}
124
+ */
125
+ function collectErrorMessages(err) {
126
+ const messages = [];
127
+ let current = err;
128
+ const seen = new Set();
129
+ while (current && typeof current === "object" && !seen.has(current)) {
130
+ seen.add(current);
131
+ const record = /** @type {Record<string, unknown>} */ (current);
132
+ if (typeof record.name === "string")
133
+ messages.push(record.name);
134
+ if (typeof record.message === "string")
135
+ messages.push(record.message);
136
+ current = record.cause;
137
+ }
138
+ if (typeof err === "string") {
139
+ messages.push(err);
140
+ }
141
+ return messages;
142
+ }
143
+ /**
144
+ * @param {unknown} err
145
+ * @returns {boolean}
146
+ */
147
+ function isStructuredOutputParseFailure(err) {
148
+ // AI SDK 6.x names structured-output parse/validation failures with these
149
+ // stable error names. The message fallback catches errors after wrapping.
150
+ const aiSdkErrorName = /^AI_(NoObjectGeneratedError|NoOutputGeneratedError|JSONParseError|TypeValidationError)$/;
151
+ const aiSdkErrorMessage = /No output generated|No object generated|could not parse the response|structured output parse|response did not match schema/i;
152
+ return collectErrorMessages(err).some((message) => aiSdkErrorName.test(message) || aiSdkErrorMessage.test(message));
153
+ }
154
+ /**
155
+ * @param {string} nodeId
156
+ * @returns {string}
157
+ */
158
+ function depsTextAccessHint(nodeId) {
159
+ return /^[A-Za-z_$][\w$]*$/.test(nodeId)
160
+ ? `deps.${nodeId}.text`
161
+ : `deps[${JSON.stringify(nodeId)}].text`;
162
+ }
163
+ /**
164
+ * @param {Pick<TaskDescriptor, "nodeId" | "outputTableName">} desc
165
+ * @param {unknown} cause
166
+ * @param {Record<string, unknown>} [details]
167
+ * @returns {SmithersError}
168
+ */
169
+ function makeStructuredOutputCompatibilityError(desc, cause, details = {}) {
170
+ return new SmithersError("INVALID_OUTPUT", `Task "${desc.nodeId}" expected structured JSON output, but the agent/model did not return valid JSON for the declared output schema. This commonly happens with OpenAI-compatible local model servers such as llama.cpp that do not fully support JSON schema structured output. Use a model that supports structured output, or opt out with OpenAIAgent({ nativeStructuredOutput: false }) so Smithers can use prompt-based JSON extraction.`, {
171
+ nodeId: desc.nodeId,
172
+ outputTable: desc.outputTableName,
173
+ ...details,
174
+ hint: "For plain text, use an object-shaped schema such as z.object({ text: z.string() }) and read it downstream as deps.<task>.text.",
175
+ }, { cause });
176
+ }
177
+ /**
178
+ * @param {Pick<TaskDescriptor, "nodeId" | "outputTableName">} desc
179
+ * @param {string} text
180
+ * @param {unknown} [cause]
181
+ * @param {Record<string, unknown>} [details]
182
+ * @returns {SmithersError}
183
+ */
184
+ function makePlainTextOutputError(desc, text, cause, details = {}) {
185
+ const preview = text.slice(0, 120).replace(/\s+/g, " ").trim();
186
+ return new SmithersError("INVALID_OUTPUT", `Task "${desc.nodeId}" returned plain text, but Smithers task outputs must be JSON objects matching the declared output schema. Plain text cannot be passed through deps directly. Use z.object({ text: z.string() }), return {"text":"..."}, and read it downstream as ${depsTextAccessHint(desc.nodeId)}.`, {
187
+ nodeId: desc.nodeId,
188
+ outputTable: desc.outputTableName,
189
+ ...details,
190
+ textPreview: preview || undefined,
191
+ }, cause === undefined ? undefined : { cause });
192
+ }
120
193
  /**
121
194
  * @param {AbortSignal} [signal]
122
195
  * @returns {Promise<never> | null}
@@ -2582,6 +2655,7 @@ async function legacyExecuteTask(adapter, db, runId, desc, descriptorMap, inputT
2582
2655
  let responseText = null;
2583
2656
  let effectiveAgent = null;
2584
2657
  let supportsNativeStructuredOutput = false;
2658
+ let structuredOutputAccessError;
2585
2659
  // Resolve effective root once so both caching and execution share it.
2586
2660
  const taskRoot = desc.worktreePath ?? toolConfig.rootDir;
2587
2661
  const stepCacheEnabled = cacheEnabled || Boolean(desc.cachePolicy);
@@ -3053,54 +3127,95 @@ async function legacyExecuteTask(adapter, db, runId, desc, descriptorMap, inputT
3053
3127
  }, 100)
3054
3128
  : undefined;
3055
3129
  // Use fallback agent on retry attempts when available
3130
+ const traceCollector = toolConfig.traceContext && effectiveAgent
3131
+ ? new AgentTraceCollector({
3132
+ eventBus,
3133
+ runId,
3134
+ workflowPath: toolConfig.traceContext.workflowPath,
3135
+ workflowHash: toolConfig.traceContext.workflowHash,
3136
+ cwd: taskRoot,
3137
+ nodeId: desc.nodeId,
3138
+ iteration: desc.iteration,
3139
+ attempt: attemptNo,
3140
+ agent: effectiveAgent,
3141
+ agentId: attemptMeta.agentId ?? undefined,
3142
+ model: attemptMeta.agentModel ?? undefined,
3143
+ logDir: toolConfig.traceContext.logDir,
3144
+ annotations: toolConfig.traceContext.annotations,
3145
+ })
3146
+ : null;
3147
+ if (traceCollector) traceCollector.begin();
3056
3148
  let result;
3057
3149
  try {
3058
- result = await runPromisePreservingFailure(withSmithersSpan(smithersSpanNames.agent, Effect.tryPromise({
3059
- try: () => {
3060
- const agentCall = guidedResumeMessages?.length
3061
- ? {
3062
- messages: guidedResumeMessages,
3063
- }
3064
- : {
3065
- prompt: effectivePrompt,
3066
- };
3067
- return effectiveAgent.generate({
3068
- options: undefined,
3069
- abortSignal: taskSignal,
3070
- ...agentCall,
3071
- resumeSession,
3072
- lastHeartbeat: previousHeartbeat,
3073
- rootDir: taskRoot,
3074
- maxOutputBytes: toolConfig.maxOutputBytes,
3075
- timeout: desc.timeoutMs
3076
- ? { totalMs: desc.timeoutMs }
3077
- : undefined,
3078
- onStdout: (text) => {
3079
- recordInternalHeartbeat();
3080
- emitOutput(text, "stdout");
3081
- },
3082
- onStderr: (text) => {
3083
- recordInternalHeartbeat();
3084
- emitOutput(text, "stderr");
3085
- },
3086
- onEvent: handleAgentEvent,
3087
- onStepFinish: handleSdkStepFinish,
3088
- outputSchema: desc.outputSchema,
3089
- });
3090
- },
3091
- catch: (error) => error,
3092
- }), {
3093
- ...taskSpanContext,
3094
- agent: attemptMeta.agentId ??
3095
- attemptMeta.agentEngine ??
3096
- "unknown",
3097
- model: attemptMeta.agentModel,
3098
- }));
3150
+ try {
3151
+ result = await runPromisePreservingFailure(withSmithersSpan(smithersSpanNames.agent, Effect.tryPromise({
3152
+ try: () => {
3153
+ const agentCall = guidedResumeMessages?.length
3154
+ ? {
3155
+ messages: guidedResumeMessages,
3156
+ }
3157
+ : {
3158
+ prompt: effectivePrompt,
3159
+ };
3160
+ return effectiveAgent.generate({
3161
+ options: undefined,
3162
+ abortSignal: taskSignal,
3163
+ ...agentCall,
3164
+ resumeSession,
3165
+ lastHeartbeat: previousHeartbeat,
3166
+ rootDir: taskRoot,
3167
+ maxOutputBytes: toolConfig.maxOutputBytes,
3168
+ timeout: desc.timeoutMs
3169
+ ? { totalMs: desc.timeoutMs }
3170
+ : undefined,
3171
+ onStdout: (text) => {
3172
+ recordInternalHeartbeat();
3173
+ emitOutput(text, "stdout");
3174
+ traceCollector?.onStdout(text);
3175
+ },
3176
+ onStderr: (text) => {
3177
+ recordInternalHeartbeat();
3178
+ emitOutput(text, "stderr");
3179
+ traceCollector?.onStderr(text);
3180
+ },
3181
+ onEvent: handleAgentEvent,
3182
+ onStepFinish: handleSdkStepFinish,
3183
+ outputSchema: desc.outputSchema,
3184
+ });
3185
+ },
3186
+ catch: (error) => error,
3187
+ }), {
3188
+ ...taskSpanContext,
3189
+ agent: attemptMeta.agentId ??
3190
+ attemptMeta.agentEngine ??
3191
+ "unknown",
3192
+ model: attemptMeta.agentModel,
3193
+ }));
3194
+ }
3195
+ finally {
3196
+ if (hijackPollingInterval) {
3197
+ clearInterval(hijackPollingInterval);
3198
+ }
3199
+ }
3099
3200
  }
3100
- finally {
3101
- if (hijackPollingInterval) {
3102
- clearInterval(hijackPollingInterval);
3201
+ catch (error) {
3202
+ const errorDetails = {
3203
+ attempt: attemptNo,
3204
+ iteration: desc.iteration,
3205
+ };
3206
+ const effectiveError = supportsNativeStructuredOutput && desc.outputSchema && isStructuredOutputParseFailure(error)
3207
+ ? makeStructuredOutputCompatibilityError(desc, error, errorDetails)
3208
+ : error;
3209
+ if (traceCollector) {
3210
+ traceCollector.observeError(effectiveError);
3211
+ try { await traceCollector.flush(); }
3212
+ catch { /* trace flush failures must not mask the original error */ }
3103
3213
  }
3214
+ throw effectiveError;
3215
+ }
3216
+ if (traceCollector) {
3217
+ traceCollector.observeResult(result);
3218
+ await traceCollector.flush();
3104
3219
  }
3105
3220
  agentResult = result;
3106
3221
  if (!conversationMessages) {
@@ -3163,8 +3278,9 @@ async function legacyExecuteTask(adapter, db, runId, desc, descriptorMap, inputT
3163
3278
  output = result.output;
3164
3279
  }
3165
3280
  }
3166
- catch {
3167
- // Structured output access threw
3281
+ catch (error) {
3282
+ structuredOutputAccessError = error;
3283
+ // Structured output access threw; text parsing below may still recover.
3168
3284
  }
3169
3285
  // Fall back to parsing text/steps for JSON
3170
3286
  if (output === undefined) {
@@ -3389,6 +3505,7 @@ async function legacyExecuteTask(adapter, db, runId, desc, descriptorMap, inputT
3389
3505
  if (output === undefined) {
3390
3506
  // Debug: log what we have
3391
3507
  const finishReason = result.finishReason ?? "unknown";
3508
+ const debugSteps = result.steps ?? [];
3392
3509
  logDebug("agent response did not contain valid JSON output", {
3393
3510
  runId,
3394
3511
  nodeId: desc.nodeId,
@@ -3406,6 +3523,16 @@ async function legacyExecuteTask(adapter, db, runId, desc, descriptorMap, inputT
3406
3523
  const tailHint = tail
3407
3524
  ? ` Last 200 chars of response: ${JSON.stringify(tail)}`
3408
3525
  : " Agent returned an empty response.";
3526
+ const errorDetails = {
3527
+ attempt: attemptNo,
3528
+ iteration: desc.iteration,
3529
+ };
3530
+ if (supportsNativeStructuredOutput && structuredOutputAccessError) {
3531
+ throw makeStructuredOutputCompatibilityError(desc, structuredOutputAccessError, errorDetails);
3532
+ }
3533
+ if (text.trim()) {
3534
+ throw makePlainTextOutputError(desc, text, undefined, errorDetails);
3535
+ }
3409
3536
  throw new SmithersError("INVALID_OUTPUT", `No valid JSON output found in agent response (finishReason=${finishReason}, textLength=${text.length}).${tailHint}`);
3410
3537
  }
3411
3538
  }
@@ -3414,8 +3541,11 @@ async function legacyExecuteTask(adapter, db, runId, desc, descriptorMap, inputT
3414
3541
  try {
3415
3542
  payload = JSON.parse(output);
3416
3543
  }
3417
- catch {
3418
- throw new SmithersError("INVALID_OUTPUT", `Failed to parse agent output as JSON. Output starts with: "${output.slice(0, 100)}"`);
3544
+ catch (error) {
3545
+ throw makePlainTextOutputError(desc, output, error, {
3546
+ attempt: attemptNo,
3547
+ iteration: desc.iteration,
3548
+ });
3419
3549
  }
3420
3550
  }
3421
3551
  else {
@@ -3469,16 +3599,32 @@ async function legacyExecuteTask(adapter, db, runId, desc, descriptorMap, inputT
3469
3599
  * @param {unknown} cause
3470
3600
  * @param {number} schemaRetryAttempts
3471
3601
  */
3472
- const toInvalidOutputError = (cause, schemaRetryAttempts) => new SmithersError("INVALID_OUTPUT", `Task output failed validation for ${desc.outputTableName}`, {
3473
- attempt: attemptNo,
3474
- nodeId: desc.nodeId,
3475
- iteration: desc.iteration,
3476
- outputTable: desc.outputTableName,
3477
- schemaRetryAttempts,
3478
- issues: cause && typeof cause === "object" && "issues" in cause
3479
- ? cause.issues
3480
- : undefined,
3481
- }, { cause });
3602
+ const toInvalidOutputError = (cause, schemaRetryAttempts) => {
3603
+ if (supportsNativeStructuredOutput && structuredOutputAccessError) {
3604
+ return makeStructuredOutputCompatibilityError(desc, structuredOutputAccessError, {
3605
+ attempt: attemptNo,
3606
+ iteration: desc.iteration,
3607
+ schemaRetryAttempts,
3608
+ });
3609
+ }
3610
+ if (typeof payload === "string") {
3611
+ return makePlainTextOutputError(desc, payload, cause, {
3612
+ attempt: attemptNo,
3613
+ iteration: desc.iteration,
3614
+ schemaRetryAttempts,
3615
+ });
3616
+ }
3617
+ return new SmithersError("INVALID_OUTPUT", `Task output failed validation for ${desc.outputTableName}`, {
3618
+ attempt: attemptNo,
3619
+ nodeId: desc.nodeId,
3620
+ iteration: desc.iteration,
3621
+ outputTable: desc.outputTableName,
3622
+ schemaRetryAttempts,
3623
+ issues: cause && typeof cause === "object" && "issues" in cause
3624
+ ? cause.issues
3625
+ : undefined,
3626
+ }, { cause });
3627
+ };
3482
3628
  // Schema-validation retry: if the agent returned parseable JSON but it
3483
3629
  // doesn't match the Zod schema, resume the SAME agent conversation with
3484
3630
  // the validation error up to 3 times before giving up. These attempts
@@ -3511,6 +3657,7 @@ async function legacyExecuteTask(adapter, db, runId, desc, descriptorMap, inputT
3511
3657
  }
3512
3658
  while (!validation.ok && desc.agent && schemaRetry < MAX_SCHEMA_RETRIES) {
3513
3659
  schemaRetry++;
3660
+ structuredOutputAccessError = undefined;
3514
3661
  const schemaDesc = describeSchemaShape(desc.outputTable, desc.outputSchema);
3515
3662
  const zodIssues = validation.error?.issues
3516
3663
  ?.map((iss) => ` - ${(iss.path ?? []).join(".")}: ${iss.message}`)
@@ -3598,7 +3745,8 @@ async function legacyExecuteTask(adapter, db, runId, desc, descriptorMap, inputT
3598
3745
  retryOutput = schemaRetryResult.output;
3599
3746
  }
3600
3747
  }
3601
- catch {
3748
+ catch (error) {
3749
+ structuredOutputAccessError = error;
3602
3750
  // Structured output access threw; fall back to text parsing.
3603
3751
  }
3604
3752
  }
@@ -4280,6 +4428,12 @@ async function runWorkflowBodyDriver(workflow, opts) {
4280
4428
  allowNetwork,
4281
4429
  maxOutputBytes,
4282
4430
  toolTimeoutMs,
4431
+ traceContext: {
4432
+ workflowPath: resolvedWorkflowPath ?? opts.workflowPath ?? null,
4433
+ workflowHash: runMetadata.workflowHash ?? null,
4434
+ logDir: logDir ?? undefined,
4435
+ annotations: opts.annotations,
4436
+ },
4283
4437
  };
4284
4438
  let frameNo = ((await adapter.getLastFrame(runId))?.frameNo ?? 0);
4285
4439
  let defaultIteration = 0;
@@ -5665,6 +5819,12 @@ async function runWorkflowBodyLegacy(workflow, opts) {
5665
5819
  allowNetwork,
5666
5820
  maxOutputBytes,
5667
5821
  toolTimeoutMs,
5822
+ traceContext: {
5823
+ workflowPath: resolvedWorkflowPath ?? opts.workflowPath ?? null,
5824
+ workflowHash: runMetadata.workflowHash ?? null,
5825
+ logDir: logDir ?? undefined,
5826
+ annotations: opts.annotations,
5827
+ },
5668
5828
  };
5669
5829
  const schedulerExecutionConcurrency = Math.max(1, maxConcurrency);
5670
5830
  /**
package/src/index.d.ts CHANGED
@@ -1259,24 +1259,56 @@ type BuilderApi = {
1259
1259
  type BuiltSmithersWorkflow = {
1260
1260
  execute: (input: unknown, opts?: Omit<Parameters<typeof runWorkflow>[1], "input">) => Effect.Effect<unknown, unknown, unknown>;
1261
1261
  };
1262
- type WorkflowDefinitionBuilder = {
1263
- build: (buildGraph: ($: BuilderApi) => BuilderNode$1) => BuiltSmithersWorkflow;
1264
- };
1265
- type ComponentDefinitionBuilder = {
1266
- build: (buildGraph: ($: BuilderApi, params?: Record<string, unknown>) => BuilderNode$1) => ComponentDefinition;
1267
- };
1268
- declare function createWorkflow(options: {
1262
+ type WorkflowGraph<I = unknown, A = unknown> = {
1263
+ readonly _tag: "WorkflowGraph";
1264
+ readonly expr: unknown;
1265
+ pipe<B = A>(...fns: Array<(g: WorkflowGraph<I, any>) => WorkflowGraph<I, any>>): WorkflowGraph<I, B>;
1266
+ };
1267
+ type GraphFactory = {
1268
+ step: (id: string, options: StepOptions$1) => WorkflowGraph;
1269
+ approval: (id: string, options: ApprovalOptions$1) => WorkflowGraph;
1270
+ sequence: (...children: WorkflowGraph[]) => WorkflowGraph;
1271
+ parallel: (...nodesOrOptions: Array<WorkflowGraph | { maxConcurrency?: number }>) => WorkflowGraph;
1272
+ match: (source: WorkflowGraph, options: {
1273
+ when: (value: unknown) => boolean;
1274
+ then: WorkflowGraph;
1275
+ else?: WorkflowGraph;
1276
+ }) => WorkflowGraph;
1277
+ branch: (options: {
1278
+ condition: (ctx: Record<string, unknown>) => boolean;
1279
+ needs?: Record<string, WorkflowGraph>;
1280
+ then: WorkflowGraph;
1281
+ else?: WorkflowGraph;
1282
+ }) => WorkflowGraph;
1283
+ loop: (options: {
1284
+ id?: string;
1285
+ children: WorkflowGraph;
1286
+ until: (outputs: Record<string, unknown>) => boolean;
1287
+ maxIterations?: number;
1288
+ onMaxReached?: "fail" | "return-last";
1289
+ }) => WorkflowGraph;
1290
+ worktree: (options: {
1291
+ id?: string;
1292
+ path: string;
1293
+ branch?: string;
1294
+ skipIf?: (ctx: Record<string, unknown>) => boolean;
1295
+ needs?: Record<string, WorkflowGraph>;
1296
+ children: WorkflowGraph;
1297
+ }) => WorkflowGraph;
1298
+ scope: (instanceId: string, child: WorkflowGraph) => WorkflowGraph;
1299
+ };
1300
+ type WorkflowHandle = GraphFactory & {
1301
+ from(graph: WorkflowGraph): BuiltSmithersWorkflow & { node: BuilderNode$1 };
1302
+ };
1303
+ declare function workflow(options: {
1269
1304
  name: string;
1270
1305
  input: AnySchema$1;
1271
- }): WorkflowDefinitionBuilder;
1272
- declare function createComponent(options: {
1273
- name: string;
1274
- params?: Record<string, unknown>;
1275
- }): ComponentDefinitionBuilder;
1306
+ }): WorkflowHandle;
1307
+ declare function fragment(_inputSchema: AnySchema$1): GraphFactory;
1276
1308
  declare const Smithers: {
1277
1309
  sqlite: typeof sqlite;
1278
- createWorkflow: typeof createWorkflow;
1279
- createComponent: typeof createComponent;
1310
+ workflow: typeof workflow;
1311
+ fragment: typeof fragment;
1280
1312
  };
1281
1313
  type AnySchema = effect.Schema.Schema<unknown, unknown, never>;
1282
1314
  type ApprovalOptions = {
@@ -1289,10 +1321,7 @@ type ApprovalOptions = {
1289
1321
  };
1290
1322
  type BuiltSmithersWorkflow$1 = BuiltSmithersWorkflow;
1291
1323
  type BuilderApi$1 = BuilderApi;
1292
- type ComponentDefinition$1 = ComponentDefinition;
1293
- type ComponentDefinitionBuilder$1 = ComponentDefinitionBuilder;
1294
1324
  type StepOptions$1 = StepOptions;
1295
- type WorkflowDefinitionBuilder$1 = WorkflowDefinitionBuilder;
1296
1325
  type BuilderNode = BuilderNode$1;
1297
1326
  type BuilderStepContext = Record<string, unknown> & {
1298
1327
  input: unknown;
@@ -1653,4 +1682,4 @@ type SmithersWorkflow = any;
1653
1682
 
1654
1683
  type ChildWorkflowDefinition = ChildWorkflowDefinition$1;
1655
1684
 
1656
- export { type AlertHumanRequestOptions, AlertRuntime, type AlertRuntimeServices, type AnySchema, type ApprovalOptions, type ApprovalPayload, ApprovalPayloadSchema, type ApprovalResult, ApprovalResultSchema, type BridgeManagedTaskKind, type BuilderApi$1 as BuilderApi, type BuilderNode, type BuilderStepContext, type BuilderStepHandle, type BuiltSmithersWorkflow$1 as BuiltSmithersWorkflow, type CancelPayload, CancelPayloadSchema, type CancelResult, CancelResultSchema, type ChildWorkflowDefinition, type ChildWorkflowExecuteOptions, CodeplaneSandboxExecutorLive, type ComponentDefinition$1 as ComponentDefinition, type ComponentDefinitionBuilder$1 as ComponentDefinitionBuilder, type ComputeTaskBridgeToolConfig, type ContinuationRequest, type CorrelatedSmithersEvent, type CorrelationContext, type DiffBundle, DockerSandboxExecutorLive, EventBus, type ExecuteTaskActivityOptions, type FilePatch, type GetRunPayload, GetRunPayloadSchema, type GetRunResult, GetRunResultSchema, HUMAN_REQUEST_KINDS, HUMAN_REQUEST_STATUSES, type HijackState, type HotReloadEvent, HotWorkflowController, type HumanRequestKind, type HumanRequestSchemaValidation, type HumanRequestStatus, type JsonSchema, type LegacyExecuteTaskFn, type ListRunsPayload, ListRunsPayloadSchema, type OverlayOptions, type PlanNode, type RalphMeta, type RalphState, type RalphStateMap, type ReadonlyTaskStateMap, RetriableTaskFailure, type RetryPolicy, type RetryWaitMap, type RunResult$2 as RunResult, RunStatusSchema, type RunSummary, RunSummarySchema, type SQLiteTable, SandboxHttpRunner, type ScheduleResult, type ScheduleSnapshot, type SignalPayload, SignalPayloadSchema, type SignalResult, SignalResultSchema, type SignalRunOptions, Smithers, type SmithersAlertPolicy, type SmithersEvent, SmithersRpcGroup, type SmithersSqliteOptions, SqlMessageStorage, type StaticTaskBridgeToolConfig, type StepOptions$1 as StepOptions, type TaskActivityContext, type TaskActivityRetryOptions, type TaskBridgeToolConfig, type TaskRecord, TaskResult, type TaskState, type TaskStateMap, TaskWorkerEntity, WatchTree, type WatchTreeOptions, WorkerDispatchKind, WorkerTask$1 as WorkerTask, WorkerTaskKind, type WorkflowDefinitionBuilder$1 as WorkflowDefinitionBuilder, type WorkflowPatchDecisionRecord, type WorkflowPatchDecisions, type WorkflowVersioningRuntime, type WorkflowVersioningRuntimeOptions, type XmlNode, type _TaskActivityContext, applyDiffBundle, approve, approveNode, awaitApprovalDurableDeferred, awaitWaitForEventDurableDeferred, bridgeApprovalResolve, bridgeSignalResolve, bridgeWaitForEventResolve, buildHumanRequestId, buildOverlay, buildPlanTree, canExecuteBridgeManagedComputeTask, canExecuteBridgeManagedStaticTask, cancel, cancelPendingTimersBridge, cleanupGenerations, computeDiffBundle, computeDiffBundleBetweenRefs, createComponent, createSchedulerWakeQueue, createWorkflow, createWorkflowVersioningRuntime, denyNode, dispatchWorkerTask, ensureSqlMessageStorage, ensureSqlMessageStorageEffect, executeChildWorkflow, executeComputeTaskBridge, executeStaticTaskBridge, executeTaskActivity, executeTaskBridge, executeTaskBridgeEffect, getDefinedToolMetadata, getHumanTaskPrompt, getRun, getSqlMessageStorage, getWorkflowMakeBridgeRuntime, getWorkflowPatchDecisions, getWorkflowVersioningRuntime, isBridgeManagedTimerTask, isBridgeManagedWaitForEventTask, isHumanRequestPastTimeout, isHumanTaskMeta, isPidAlive, isRunHeartbeatFresh, isTaskResultFailure, jsonSchemaToZod, listRuns, makeAbortError, makeApprovalDurableDeferred, makeDurableDeferredBridgeExecutionId, makeTaskActivity, makeTaskBridgeKey, makeWaitForEventDurableDeferred, makeWorkerTask, parseAttemptMetaJson, parseRuntimeOwnerPid, renderFrame, resolveDeferredTaskStateBridge, resolveOverlayEntry, resolveSchema, runWorkflow, runWorkflowWithMakeBridge, scheduleTasks, signal, signalRun, subscribeTaskWorkerDispatches, usePatched, validateHumanRequestValue, wireAbortSignal, withWorkflowMakeBridgeRuntime, withWorkflowVersioningRuntime };
1685
+ export { type AlertHumanRequestOptions, AlertRuntime, type AlertRuntimeServices, type AnySchema, type ApprovalOptions, type ApprovalPayload, ApprovalPayloadSchema, type ApprovalResult, ApprovalResultSchema, type BridgeManagedTaskKind, type BuilderApi$1 as BuilderApi, type BuilderNode, type BuilderStepContext, type BuilderStepHandle, type BuiltSmithersWorkflow$1 as BuiltSmithersWorkflow, type CancelPayload, CancelPayloadSchema, type CancelResult, CancelResultSchema, type ChildWorkflowDefinition, type ChildWorkflowExecuteOptions, CodeplaneSandboxExecutorLive, type ComputeTaskBridgeToolConfig, type ContinuationRequest, type CorrelatedSmithersEvent, type CorrelationContext, type DiffBundle, DockerSandboxExecutorLive, EventBus, type ExecuteTaskActivityOptions, type FilePatch, type GetRunPayload, GetRunPayloadSchema, type GetRunResult, GetRunResultSchema, type GraphFactory, HUMAN_REQUEST_KINDS, HUMAN_REQUEST_STATUSES, type HijackState, type HotReloadEvent, HotWorkflowController, type HumanRequestKind, type HumanRequestSchemaValidation, type HumanRequestStatus, type JsonSchema, type LegacyExecuteTaskFn, type ListRunsPayload, ListRunsPayloadSchema, type OverlayOptions, type PlanNode, type RalphMeta, type RalphState, type RalphStateMap, type ReadonlyTaskStateMap, RetriableTaskFailure, type RetryPolicy, type RetryWaitMap, type RunResult$2 as RunResult, RunStatusSchema, type RunSummary, RunSummarySchema, type SQLiteTable, SandboxHttpRunner, type ScheduleResult, type ScheduleSnapshot, type SignalPayload, SignalPayloadSchema, type SignalResult, SignalResultSchema, type SignalRunOptions, Smithers, type SmithersAlertPolicy, type SmithersEvent, SmithersRpcGroup, type SmithersSqliteOptions, SqlMessageStorage, type StaticTaskBridgeToolConfig, type StepOptions$1 as StepOptions, type TaskActivityContext, type TaskActivityRetryOptions, type TaskBridgeToolConfig, type TaskRecord, TaskResult, type TaskState, type TaskStateMap, TaskWorkerEntity, WatchTree, type WatchTreeOptions, WorkerDispatchKind, WorkerTask$1 as WorkerTask, WorkerTaskKind, type WorkflowGraph, type WorkflowHandle, type WorkflowPatchDecisionRecord, type WorkflowPatchDecisions, type WorkflowVersioningRuntime, type WorkflowVersioningRuntimeOptions, type XmlNode, type _TaskActivityContext, applyDiffBundle, approve, approveNode, awaitApprovalDurableDeferred, awaitWaitForEventDurableDeferred, bridgeApprovalResolve, bridgeSignalResolve, bridgeWaitForEventResolve, buildHumanRequestId, buildOverlay, buildPlanTree, canExecuteBridgeManagedComputeTask, canExecuteBridgeManagedStaticTask, cancel, cancelPendingTimersBridge, cleanupGenerations, computeDiffBundle, computeDiffBundleBetweenRefs, createSchedulerWakeQueue, createWorkflowVersioningRuntime, denyNode, dispatchWorkerTask, ensureSqlMessageStorage, ensureSqlMessageStorageEffect, executeChildWorkflow, executeComputeTaskBridge, executeStaticTaskBridge, executeTaskActivity, executeTaskBridge, executeTaskBridgeEffect, fragment, getDefinedToolMetadata, getHumanTaskPrompt, getRun, getSqlMessageStorage, getWorkflowMakeBridgeRuntime, getWorkflowPatchDecisions, getWorkflowVersioningRuntime, isBridgeManagedTimerTask, isBridgeManagedWaitForEventTask, isHumanRequestPastTimeout, isHumanTaskMeta, isPidAlive, isRunHeartbeatFresh, isTaskResultFailure, jsonSchemaToZod, listRuns, makeAbortError, makeApprovalDurableDeferred, makeDurableDeferredBridgeExecutionId, makeTaskActivity, makeTaskBridgeKey, makeWaitForEventDurableDeferred, makeWorkerTask, parseAttemptMetaJson, parseRuntimeOwnerPid, renderFrame, resolveDeferredTaskStateBridge, resolveOverlayEntry, resolveSchema, runWorkflow, runWorkflowWithMakeBridge, scheduleTasks, signal, signalRun, subscribeTaskWorkerDispatches, usePatched, validateHumanRequestValue, wireAbortSignal, withWorkflowMakeBridgeRuntime, withWorkflowVersioningRuntime, workflow };