Documentation
¶
Index ¶
- Constants
- func FanIn(ctx context.Context, git *gitx.Git, target, baseSHA string, worktrees []string) (bool, error)
- func RegisterTool(server *mcp.Server, root string, manager *verify.TaskManager)
- func RenderPanelMarkdown(opinions []Opinion) string
- func ScheduleWaves(flow Flow) ([][]string, error)
- type Edge
- type Finding
- type Flow
- type FlowResult
- type Input
- type Node
- type NodeExecutor
- type NodeResult
- type Opinion
- type ScheduleError
- type ToolData
- type TraceEvent
- type Validation
Constants ¶
const ( UseMission = "mission" UseWorkspace = "workspace" UseVerify = "verify" UseReview = "review" UseApply = "apply" )
const ToolName = "jacu_flow_run"
Variables ¶
This section is empty.
Functions ¶
func FanIn ¶
func FanIn(ctx context.Context, git *gitx.Git, target, baseSHA string, worktrees []string) (bool, error)
FanIn applies patches captured from agent worktrees to an owned target. A content collision returns (false, nil) after resetting the target to base; that is a governance escalation, not a mechanical failure. The caller owns the target and decides whether to preserve the source worktrees.
func RegisterTool ¶
func RegisterTool(server *mcp.Server, root string, manager *verify.TaskManager)
func RenderPanelMarkdown ¶
func ScheduleWaves ¶
ScheduleWaves is the inherited deterministic scheduler. It intentionally accepts duplicate node ids and keeps the first occurrence: validation is the submit-time contract, while this pure helper preserves the migrated behavior and remains useful to callers that already linted elsewhere.
Types ¶
type FlowResult ¶
type FlowResult struct {
Status string `json:"status"`
Summary string `json:"summary"`
Waves [][]string `json:"waves"`
Trace []TraceEvent `json:"trace"`
PanelMarkdown string `json:"panel_markdown,omitempty"`
Findings []Finding `json:"findings,omitempty"`
}
func Execute ¶
func Execute(ctx context.Context, flow Flow, initial map[string]any, executor NodeExecutor) (FlowResult, error)
type NodeExecutor ¶
type NodeExecutor func(context.Context, Node, map[string]NodeResult) (NodeResult, error)
NodeExecutor is the only effectful seam of the graph engine. The MCP tool supplies the capability-backed implementation; tests can supply a fake and prove path selection without processes or filesystem state.
type NodeResult ¶
type Opinion ¶
type Opinion struct {
SessionID string `json:"session_id"`
Model string `json:"model"`
Verdict string `json:"verdict"`
Reason string `json:"reason,omitempty"`
}
Opinion is structured untrusted review data. It never creates an apply receipt; it is only rendered into the flow trace.
type ScheduleError ¶
func (*ScheduleError) Error ¶
func (e *ScheduleError) Error() string
type ToolData ¶
type ToolData struct {
Task *verify.TaskInfo `json:"task,omitempty"`
Flow *FlowResult `json:"flow,omitempty"`
}
type TraceEvent ¶
type TraceEvent struct {
NodeID string `json:"node_id"`
Uses string `json:"uses"`
Wave int `json:"wave"`
Visit int `json:"visit"`
Status string `json:"status"`
Verdict string `json:"verdict,omitempty"`
Policy string `json:"policy,omitempty"`
Decision string `json:"decision"`
Reason string `json:"reason,omitempty"`
}
type Validation ¶
type Validation struct {
Findings []Finding `json:"findings"`
}
func Validate ¶
func Validate(flow Flow) Validation
Validate performs the submit-time, side-effect-free flow lint.
func (Validation) Blocked ¶
func (v Validation) Blocked() bool