(
normalizedCommand: OrchestrationCommand,
)
| 882 | }); |
| 883 | |
| 884 | const dispatchNormalizedCommand = ( |
| 885 | normalizedCommand: OrchestrationCommand, |
| 886 | ): Effect.Effect<{ readonly sequence: number }, OrchestrationDispatchCommandError> => { |
| 887 | const dispatchEffect = |
| 888 | normalizedCommand.type === "thread.turn.start" && normalizedCommand.bootstrap |
| 889 | ? dispatchBootstrapTurnStart(normalizedCommand) |
| 890 | : orchestrationEngine |
| 891 | .dispatch(normalizedCommand) |
| 892 | .pipe( |
| 893 | Effect.mapError((cause) => |
| 894 | toDispatchCommandError(cause, "Failed to dispatch orchestration command"), |
| 895 | ), |
| 896 | ); |
| 897 | |
| 898 | return startup |
| 899 | .enqueueCommand(dispatchEffect) |
| 900 | .pipe( |
| 901 | Effect.mapError((cause) => |
| 902 | toDispatchCommandError(cause, "Failed to dispatch orchestration command"), |
| 903 | ), |
| 904 | ); |
| 905 | }; |
| 906 | |
| 907 | const loadServerConfig = Effect.gen(function* () { |
| 908 | const keybindingsConfig = yield* keybindings.loadConfigState; |
no test coverage detected