Skip to content

feat(sdk/workflow): add WithBoard RunOption for resume-from-snapshot#17

Merged
lIang70 merged 1 commit into
mainfrom
feat/sdk-runtime-resume-board
Apr 17, 2026
Merged

feat(sdk/workflow): add WithBoard RunOption for resume-from-snapshot#17
lIang70 merged 1 commit into
mainfrom
feat/sdk-runtime-resume-board

Conversation

@lIang70

@lIang70 lIang70 commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add WithBoard(b *Board) RunOption that injects a pre-built Board into Runtime.Run, skipping prepareBoard. This enables resume-from-snapshot flows to reuse the standard finishRun pipeline (status/message/usage assembly) instead of reimplementing it on the platform side.
  • Add Board *Board field to RunConfig so that WithBoard takes priority over both the default prepareBoard and any custom prepareBoardFn.
  • Add json struct tags to Request and Result for direct API serialization.

Test plan

  • TestRuntime_WithBoard_SkipsPrepareBoard — verifies injected board is used and default prepareBoard is skipped
  • TestRuntime_WithBoard_OverridesCustomPrepareBoard — verifies WithBoard takes priority over WithPrepareBoard
  • TestRuntime_WithBoard_PreservesExistingChannelMessages — verifies finishRun correctly extracts only new messages from a restored board
  • TestRuntime_WithBoard_MemorySessionStillSaves — verifies memory session save still works in resume path
  • All existing sdk/workflow tests pass with no regressions

Made with Cursor

Runtime.Run now accepts WithBoard(board) to inject a pre-built Board,
skipping the normal prepareBoard phase. This allows resume flows to
restore a BoardSnapshot and pass it directly into the standard Run
pipeline, reusing finishRun's status/message/usage assembly instead of
reimplementing it on the platform side.

Also adds json tags to Request and Result for direct API serialization.

Made-with: Cursor
@lIang70
lIang70 merged commit 4dcb054 into main Apr 17, 2026
8 checks passed
@lIang70
lIang70 deleted the feat/sdk-runtime-resume-board branch April 17, 2026 08:01
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.

1 participant