agentnotify

package
v1.45.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2026 License: GPL-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package agentnotify orchestrates explicit notifications over injected ports. Composition owns opening the journal and delivery resources; constructors and replay never initialize, repair, collect, load configuration or probe the OS.

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigurationRequired = errors.New("configuration_required")

ErrConfigurationRequired marks absent operator configuration without leaking paths.

View Source
var ErrDependencies = errors.New("invalid_dependencies")

Functions

This section is empty.

Types

type AdmissionPort

AdmissionPort is configured by composition. Rates/capacity are atomic journal responsibilities, never a second service limiter. Each admission carries the validated authoritative policy snapshot for that request. FinalizeOutcome is required so adapters cannot silently discard terminal navigation; Store.Finalize remains available to legacy journal callers.

type Clock

type Clock interface{ Now() notification.Deadline }

Clock supplies qualified boot-continuous seconds (including suspend). Unavailable/changed epochs fail closed. Implementations must return promptly.

type ClockFunc

type ClockFunc func() notification.Deadline

func (ClockFunc) Now

type Dependencies

type Dependencies struct {
	Admission AdmissionPort
	Policy    PolicyPort
	Target    TargetPort
	Readiness notification.ReadinessPort
	Delivery  notification.DeliveryPort
	Clock     Clock
}

type Payload

type Payload struct {
	Title      string                  `json:"title"`
	Body       string                  `json:"body"`
	Category   string                  `json:"category"`
	RequestID  *string                 `json:"request_id"`
	Navigation notification.Navigation `json:"navigation"`
}

type Policy

type Policy struct {
	Rates    journal.RatePolicy
	Delivery notification.PolicySnapshot
	Route    origin.RoutePolicy
}

Policy is an immutable per-call value. The fixed delivery DTO has no policy generation field: composition must integrate authoritative generation fencing in Delivery before activation; readiness alone cannot fence disable/uninstall.

type PolicyFunc

type PolicyFunc func(context.Context, origin.Context) (Policy, error)

func (PolicyFunc) Load

type PolicyPort

type PolicyPort interface {
	Load(context.Context, origin.Context) (Policy, error)
}

type Receipt

type Receipt struct {
	RequestID  *string                       `json:"request_id"`
	TrackingID string                        `json:"tracking_id"`
	KeyKind    journal.KeyKind               `json:"key_kind"`
	Status     string                        `json:"status"`
	Reason     string                        `json:"reason"`
	Replayed   bool                          `json:"replayed"`
	Backend    string                        `json:"backend"`
	Navigation notification.NavigationResult `json:"navigation"`
	RetrySafe  bool                          `json:"retry_safe"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(d Dependencies) (*Service, error)

func (*Service) Close

func (s *Service) Close(ctx context.Context) error

Close prevents new submissions and drains admitted/preflight work. It is idempotent, does not cancel an accepted OS send, and never closes injected resources. A future transport owns those resources once per service lifetime.

func (*Service) Notify

func (s *Service) Notify(ctx context.Context, p Payload, o origin.Context, deadline notification.Deadline) Receipt

Notify accepts typed payload and a separately constructed origin. No future, goroutine, queue or retry is created; delivery is invoked at most once after durable admission. Ports must honor context cancellation and the boot deadline.

type TargetFunc

func (TargetFunc) Resolve

type TargetPort

type TargetPort interface {
	Resolve(context.Context, origin.Context, origin.RoutePolicy) (origin.Target, error)
}

Directories

Path Synopsis
Package cli implements the bounded, one-shot notify command, without global initialization.
Package cli implements the bounded, one-shot notify command, without global initialization.
Package clientsetup persists one managed MCP registration, without activation.
Package clientsetup persists one managed MCP registration, without activation.
Package journal implements durable admission only.
Package journal implements durable admission only.
Package mcp provides an independently composed, bounded SDK adapter.
Package mcp provides an independently composed, bounded SDK adapter.
Package origin contains transport-supplied identity and pure routing helpers.
Package origin contains transport-supplied identity and pure routing helpers.
Package portable selects an explicitly registered installed runtime.
Package portable selects an explicitly registered installed runtime.
Package portableasset builds and extracts the version-bound Agent Notify portable package.
Package portableasset builds and extracts the version-bound Agent Notify portable package.
Package portablesetup binds a UAP materialization to the existing-installer kernel and private locator.
Package portablesetup binds a UAP materialization to the existing-installer kernel and private locator.
Package registration performs pure, bounded managed MCP configuration edits.
Package registration performs pure, bounded managed MCP configuration edits.
Package runtime composes explicit notifications.
Package runtime composes explicit notifications.
Package setup is the trusted existing-installer opt-in use case.
Package setup is the trusted existing-installer opt-in use case.
Package setupwizard is the P6 application service for setup-notifications wizard.
Package setupwizard is the P6 application service for setup-notifications wizard.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL