Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/olive-ears-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@voltagent/core": patch
---

fix(workflow): improve typing for state parameter
2 changes: 1 addition & 1 deletion packages/core/src/workflow/internal/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type WorkflowState<INPUT, RESULT> = {
/** the initial input data to the workflow */
input: InternalExtractWorkflowInputData<INPUT>;
/** current data being processed */
data: DangerouslyAllowAny;
data: unknown;
/** shared workflow state across steps */
workflowState: WorkflowStateStore;
/** the result of workflow execution, null until execution is complete */
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/workflow/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ export interface UpdateWorkflowStepOptions {
* The state parameter passed to workflow steps
*/
export type WorkflowStepState<INPUT> = Omit<
WorkflowState<INPUT, DangerouslyAllowAny>,
WorkflowState<INPUT, unknown>,
"data" | "result"
> & {
/** Workflow execution context for event tracking */
Expand Down