Versions in this module Expand all Collapse all v0 v0.2.1 Oct 31, 2026 Changes in this version + type DenyTexts struct + Canceled string + HumanDenied func(call ToolCall) string + PersistFailed string + TierDisabled func(toolName string) string + Unavailable func(toolName, detail string) string type Option + func WithDenyTexts(t DenyTexts) Option v0.2.0 Oct 29, 2026 Changes in this version + const EventName + const PathLive + const PathRecovery + const StateKey + const StatusApproved + const StatusDenied + const StatusPending + var ErrNotBound = errors.New("ack: resume runner not bound") + var ErrNotFound = errors.New("ack: confirmation not found") + var ErrRunActive = errors.New("ack: run active on session") + type Basis string + const BasisCanceled + const BasisDuplicate + const BasisEndorsement + const BasisGrant + const BasisPersistFailed + const BasisTier + const BasisVerdict + type DecideResult struct + Path string + type Decision struct + Approved bool + ConfirmationID string + DecidedBy string + Remember Scope + SessionID string + type Gateway struct + func New(svc session.Service, opts ...Option) *Gateway + func (g *Gateway) Bind(r ResumeRunner) error + func (g *Gateway) Decide(ctx context.Context, d Decision) (DecideResult, error) + func (g *Gateway) Pending(ctx context.Context, sessionID string) ([]PendingItem, error) + func (g *Gateway) PolicyFor(sessionID string) tool.PermissionPolicyFunc + func (g *Gateway) RunOptionResolver() ... + type Grant struct + CreatedAt int64 + CreatedBy string + SessionID string + ToolName string + UserID string + type GrantQuery struct + SessionID string + ToolName string + UserID string + type GrantSource interface + Lookup func(ctx context.Context, q GrantQuery) (Grant, bool) + Save func(ctx context.Context, g Grant) error + func MemoryGrants() GrantSource + type NamedPolicy struct + Name string + Source PolicySource + type Option func(*options) + func WithApp(name string) Option + func WithDefaultTier(t Tier) Option + func WithDenyText(fn func(call ToolCall) string) Option + func WithGrants(gs GrantSource) Option + func WithLogger(l *slog.Logger) Option + func WithNamedPolicies(ps ...NamedPolicy) Option + func WithPermissionObserver(ob PermissionObserver) Option + func WithPolicies(src ...PolicySource) Option + func WithStaticTools(tools ...tool.Tool) Option + func WithTierFunc(fn func(ctx context.Context, call ToolCall) Tier) Option + func WithTiers(m map[string]Tier) Option + func WithTools(res ToolResolver) Option + func WithUser(id string) Option + func WithUserFunc(fn func(ctx context.Context, threadID string) string) Option + type Payload struct + Arguments json.RawMessage + ConfirmationID string + CreatedAt int64 + DecidedBy string + SessionID string + Status string + ToolCallID string + ToolName string + func (p Payload) CustomEvent() *aguievents.CustomEvent + type PendingItem struct + Live bool + type PermissionEvent struct + Allowed bool + Basis Basis + Call ToolCall + Source string + type PermissionObserver func(ctx context.Context, event PermissionEvent) + type PolicySource interface + Consult func(ctx context.Context, call ToolCall) (Verdict, error) + type ResumeRunner interface + Run func(ctx context.Context, runAgentInput *adapter.RunAgentInput) (<-chan aguievents.Event, error) + type Scope string + const ScopeGlobal + const ScopeSession + type Tier string + const TierAllow + const TierConfirm + const TierDeny + type ToolCall struct + Arguments json.RawMessage + SessionID string + ToolCallID string + ToolName string + type ToolResolver func(ctx context.Context) map[string]tool.CallableTool + type Verdict string + const VerdictAbstain + const VerdictAllow + const VerdictConfirm + const VerdictDeny