a03675113a
- .claude/agents/fn-orquestador/SKILL.md - .claude/commands/fn_claude.md - .claude/rules/INDEX.md - .claude/rules/cpp_apps.md - .claude/rules/ids_naming.md - CHANGELOG.md - apps/dag_engine/README.md - apps/dag_engine/api.go - apps/dag_engine/dags_migrated/example.yaml - apps/dag_engine/dags_migrated/example_lineage_tracking.yaml - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
67 lines
1.6 KiB
Go
67 lines
1.6 KiB
Go
package core
|
|
|
|
// DagContinueOn controls whether a step continues on failure/skip.
|
|
type DagContinueOn struct {
|
|
Failure bool
|
|
Skipped bool
|
|
}
|
|
|
|
// DagRetryPolicy configures automatic retries for a step.
|
|
type DagRetryPolicy struct {
|
|
Limit int
|
|
IntervalSec int
|
|
}
|
|
|
|
// DagStep represents a single step in a DAG workflow.
|
|
type DagStep struct {
|
|
Name string
|
|
ID string
|
|
Description string
|
|
Command string
|
|
Script string
|
|
Args []string
|
|
Function string `json:"function,omitempty"` // ID de funcion del registry (ej "audit_capability_groups_go_infra"). Si set, Command/Script se ignoran; el executor construye "fn run <Function> <Args...>".
|
|
Shell string
|
|
Dir string
|
|
Depends []string
|
|
Env map[string]string
|
|
ContinueOn DagContinueOn
|
|
RetryPolicy DagRetryPolicy
|
|
TimeoutSec int
|
|
Output string
|
|
Tags []string
|
|
}
|
|
|
|
// DagHandlers contains lifecycle handler steps.
|
|
type DagHandlers struct {
|
|
Init []DagStep
|
|
Success []DagStep
|
|
Failure []DagStep
|
|
Exit []DagStep
|
|
}
|
|
|
|
// DagDefinition is a complete DAG workflow parsed from YAML.
|
|
type DagDefinition struct {
|
|
Name string
|
|
Description string
|
|
Group string
|
|
Type string // "graph" or "" (chain/sequential)
|
|
WorkingDir string
|
|
Shell string
|
|
Env map[string]string
|
|
Schedule []string
|
|
Steps []DagStep
|
|
HandlerOn DagHandlers
|
|
Tags []string
|
|
TimeoutSec int
|
|
FilePath string
|
|
}
|
|
|
|
// DagValidationResult contains validation output.
|
|
type DagValidationResult struct {
|
|
Valid bool
|
|
Errors []string
|
|
Warnings []string
|
|
Levels [][]string // topological levels (step names/IDs)
|
|
}
|