Files
WeiCHEN ad96f67442 refactor(workflowdef): make definition/runtime deps unidirectional
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.
2026-09-22 21:44:57 +08:00

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)
}