A small, typed foundation for actions, lazy streams, resilience, hooks, and dependable execution across local and distributed systems.
An action owns its request, response, execution, and lifecycle. Middleware, hooks, transports, and Flow can compose around it without duplicating business logic.
func BuildTransferAction(db *gorm.DB) action.AnyAction {
return action.New("billing.transfer", func(ctx context.Context, req TransferReq) (*MessageRes, error) {
// core business logic here
return &MessageRes{Message: "transferred"}, nil
}).
Node("gateway").
Description("Atomic transfer across service mesh").
Tag("billing", "transfers").
Route(thttp.POST("/api/v1/transfers")).
Build()
}A focused kernel surface for production execution, not a framework-shaped dependency maze.
Chain middleware, resilience, auth, caching, and audit directly on the action builder. No separate router, no middleware stack soup.
action.BuilderLazy typed streams with lifecycle hooks, cancellation, early stop, and composition boundaries for Flow and AI.
ai.agentA stable type-erased boundary for registries and transports while keeping typed execution inside the action.
net/transportCircuit breakers, adaptive timeouts, rate limiters, concurrency gates, dedup, coalescing, idempotency, and distributed locks.
resilienceLifecycle hooks, structured events, tracing, and testable behavior without forcing observability into business logic.
complianceKernel actions remain small; Flow, transports, AI, and domain packages build larger graphs on top.
action.SagaRace-tested contracts, deterministic synchronization helpers, allocation-sensitive benchmarks, and explicit lifecycle tests.
testkitAtomically replace action or stream implementations for new invocations without interrupting active work.
deploygenDependency-light primitives designed to be embedded by Flow, transport adapters, AI systems, and applications.
desktopStreams are lazy, cancellable, and composable. The consumer decides when work is pulled; the action owns lifecycle hooks and terminal behavior.
type Document struct {
ID string `json:"id"`
Score float64 `json:"score"`
}
search := action.NewStream("search.documents",
func(ctx context.Context, q Query) iter.Seq2[Document, error] {
return searchIndex(ctx, q)
}).
OnStart(func(ctx context.Context, q Query) { trace.Start(ctx, "search") }).
OnItem(func(ctx context.Context, d Document) { metrics.Observe(d.Score) }).
OnSuccess(func(ctx context.Context, q Query) { metrics.Completed() }).
Build()Timeouts, retries, idempotency, coalescing, caching, and concurrency controls remain explicit and testable at the action boundary.
act := action.New("fetch.data", coreHandler).
Resilient(action.ResilienceConfig{
MaxRetries: 3,
Backoff: action.ExponentialJitter(100*time.Millisecond, 2*time.Second),
Timeout: 2 * time.Second,
MaxConcurrent: 10,
Adaptive: &action.AdaptiveConfig{FailureThreshold: 10},
}).
Idempotent().
Cache(30*time.Second, keyFn, cacheStore).
Dedup(keyFn).
RateLimit(100, 50).
Build()Nexss is not a collection of unrelated packages. Each layer has one job and a precise boundary: the Kernel executes, Flow composes, and domain packages give the work meaning.
Start with a typed action. Add a stream when the work becomes incremental. Compose it in Flow when the graph becomes the product. Nexss gives every layer a place to live.