MCPcopy Create free account
hub / github.com/The-Pocket/PocketFlow-Go / Post

Method Post

pocketflow.go:611–618  ·  view source on GitHub ↗

Post for the Flow runs after orchestration completes. Default returns the final action.

(ctx *PfContext, prepResult any, execResult any)

Source from the content-addressed store, hash-verified

609
610// Post for the Flow runs after orchestration completes. Default returns the final action.
611func (f *Flow) Post(ctx *PfContext, prepResult any, execResult any) (string, error) {
612 // prepResult is from Flow.Prep, execResult is the final action string from Exec/orchestrate.
613 finalAction, _ := execResult.(string) // Ignore error, default to "" if cast fails
614 if finalAction == "" {
615 finalAction = DefaultAction // Or maybe keep it empty? Let's default.
616 }
617 return finalAction, nil
618}
619
620// Run starts the flow execution.
621func (f *Flow) Run(ctx *PfContext) (string, error) {

Callers 1

InternalRunMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected