Replace FakeActionOwner with QueryOwner+QueryGuard at the composition root; DispatchEligible reuses claim/execute/recover so confirm stays zero-write before dispatch and default tier remains legacy.
18 lines
852 B
Go
18 lines
852 B
Go
package intentflow
|
|
|
|
import "context"
|
|
|
|
// Service is the only surface chat/server may call. Implementations live in
|
|
// later units; U1 freezes the signature so HTTP and chat cannot grow a second
|
|
// plan owner.
|
|
type Service interface {
|
|
HandleTurn(ctx context.Context, in TurnInput) (*TurnResult, error)
|
|
DecidePlan(ctx context.Context, in DecisionCommand) (*PlanView, error)
|
|
GetPlan(ctx context.Context, principal Principal, planID string) (*PlanView, error)
|
|
// GetActivePlan returns (nil, nil) when the principal has no visible active plan.
|
|
GetActivePlan(ctx context.Context, principal Principal) (*PlanView, error)
|
|
// DispatchEligible claims and executes eligible steps on the existing
|
|
// intent_plan_steps ledger (ClaimStep / ExecuteClaimed / RecoverReceipt).
|
|
DispatchEligible(ctx context.Context, workerID, planID string) (*PlanView, error)
|
|
}
|