Keep registry key validation local to workflowdef with composition-root injection, adapt FlatCatalog for projectworkflow, and drive the orchestrator through LiveInstancePort views instead of projectinstance.
17 lines
611 B
Go
17 lines
611 B
Go
package projectinstance
|
|
|
|
import (
|
|
"context"
|
|
|
|
"chat-agent-system/internal/workflowdef"
|
|
)
|
|
|
|
// VersionResolver is the projectinstance-owned port for reading published workflow definitions.
|
|
// Concrete workflowdef.Store is injected at the composition root; production code must not
|
|
// construct workflowdef services directly.
|
|
type VersionResolver interface {
|
|
GetDefinitionByKey(ctx context.Context, key string) (*workflowdef.Definition, error)
|
|
GetVersion(ctx context.Context, workflowID int64, version int) (*workflowdef.Version, error)
|
|
ListDefinitions(ctx context.Context) ([]workflowdef.Definition, error)
|
|
}
|