@gobing-ai/ts-dual-workflow-engine 0.4.28 → 0.4.30

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/types.ts CHANGED
@@ -178,6 +178,13 @@ export interface WorkflowRunOptions {
178
178
  readonly events?: EventBus<WorkflowEngineEvents>;
179
179
  /** Run-level error policy override. Lowest precedence; action-level wins. */
180
180
  readonly onError?: OnErrorPolicy;
181
+ /**
182
+ * Optional result redaction hook applied before an action row is finalized.
183
+ * When omitted, the built-in default scrubs shell stdout/stderr so raw command
184
+ * output never lands in the audit table. Callers that need raw output in
185
+ * `action_runs.result_json` must supply their own redactor (task 0060 F4).
186
+ */
187
+ readonly redactor?: ActionRedactor;
181
188
  /** Validate the definition and walk the transition graph without executing actions. */
182
189
  readonly dryRun?: boolean;
183
190
  /** Optional caller-supplied external key, unique per workflow definition. */
@@ -287,12 +294,13 @@ export interface WorkflowPersistenceAdapter {
287
294
  * persistence implementations ignore it (mirror-only — no new column, no alter, no redaction).
288
295
  */
289
296
  saveActionStart(runId: string, node: string, kind: string, options?: Record<string, unknown>): Promise<string>;
290
- /** Finalize an action row with duration, ok, result. */
297
+ /** Finalize an action row with duration, ok, result. `kind` names the action for the redactor. */
291
298
  saveActionFinalize(
292
299
  actionId: string,
293
300
  status: WorkflowStatus,
294
301
  durationMs: number,
295
302
  ok: boolean,
303
+ kind: string,
296
304
  result?: unknown,
297
305
  redactor?: ActionRedactor,
298
306
  ): Promise<void>;