Skip to content

Conversation

a-fatah
Copy link

@a-fatah a-fatah commented Oct 3, 2025

Adds missing resume mutation in journal.ts and method in workflow manager client and other improvements:

  1. Schema Changes (schema.ts)
  • introduces a discriminated union ExecutionStep | PauseStep
  • Each step has a type field execution or pause
  • Execution steps now only have functionType (query/mutation/action) and handle meaning 'pause' is no longer modeled as an execution type
  • Pause steps have optional onPauseHandle
  1. Step Request Types split into ExecutionStepRequest and PauseStepRequest (step.ts)

  2. Step Context (stepContext.ts)

    • Refactored pause() to use PauseStepRequest
    • Removed polluted FunctionType | "pause" types
    • Clean separation of execution and pause logic
  3. Journal Handler (journal.ts)

    • Updated to handle discriminated union
    • Clean type narrowing with step.type === "execution"
    • Changed pause filter from functionType === "pause" to type === "pause"
  4. Pool Handler (pool.ts)

    • Updated pause detection to use step.type === "pause"

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

ianmacartney and others added 6 commits September 30, 2025 17:40
- Replace FunctionType | 'pause' with proper discriminated union
- Separate ExecutionStep and PauseStep types with 'type' discriminator
- Remove nullable function references - execution steps always have functions
- Clean separation between control flow (pause) and execution (query/mutation/action)
- Improved type safety with explicit step type checking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants