Documentation
¶
Overview ¶
Package astraengine exposes the public convenience API for building bots and automation apps on top of the AstraEngine runtime.
Most concrete implementations still live in subpackages such as core/app, platform/telegram, storage/postgres and plugin. The root package intentionally stays small so application code can start from astraengine.New while importing only the adapters and storage backends it actually needs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler = middleware.Handler
Handler processes a single normalized engine event.
type Middleware ¶
type Middleware = middleware.Middleware
Middleware wraps a Handler with cross-cutting behavior.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package admin exposes convenient constructors for the extensible Admin API.
|
Package admin exposes convenient constructors for the extensible Admin API. |
|
api
Package api provides the extensible HTTP Admin API server.
|
Package api provides the extensible HTTP Admin API server. |
|
auth
Package auth defines Admin API authentication claims and verification.
|
Package auth defines Admin API authentication claims and verification. |
|
control
Package control implements Astra Admin Control WebSocket protocol v1.
|
Package control implements Astra Admin Control WebSocket protocol v1. |
|
observability
Package observability records handler events, audits and basic runtime metrics.
|
Package observability records handler events, audits and basic runtime metrics. |
|
resources
Package resources defines declarative Admin API resource metadata.
|
Package resources defines declarative Admin API resource metadata. |
|
ui
Package ui defines the declarative Astra Admin UI protocol.
|
Package ui defines the declarative Astra Admin UI protocol. |
|
Package attachments provides a shared attachment model and lightweight helpers.
|
Package attachments provides a shared attachment model and lightweight helpers. |
|
Package cache defines the storage-independent cache contract used by the engine.
|
Package cache defines the storage-independent cache contract used by the engine. |
|
memory
Package memory implements an in-process cache for tests and single-instance bots.
|
Package memory implements an in-process cache for tests and single-instance bots. |
|
nop
Package nop implements a cache that never stores values.
|
Package nop implements a cache that never stores values. |
|
cmd
|
|
|
astrabot
command
|
|
|
configs
|
|
|
runtime
Package runtime loads example and CLI configuration from environment variables.
|
Package runtime loads example and CLI configuration from environment variables. |
|
core
|
|
|
app
Package app wires platforms, routing, middleware, plugins and storage into a runtime.
|
Package app wires platforms, routing, middleware, plugins and storage into a runtime. |
|
botcmd
Package botcmd parses commands and provides alias-aware command middleware.
|
Package botcmd parses commands and provides alias-aware command middleware. |
|
capability
Package capability describes optional features supported by platform adapters.
|
Package capability describes optional features supported by platform adapters. |
|
command
Package command contains shared command parsing for platform adapters.
|
Package command contains shared command parsing for platform adapters. |
|
context
Package context provides the handler context and cross-platform message helpers.
|
Package context provides the handler context and cross-platform message helpers. |
|
errors
Package errors defines machine-readable AstraEngine errors.
|
Package errors defines machine-readable AstraEngine errors. |
|
event
Package event contains the platform-neutral event model dispatched by AstraEngine.
|
Package event contains the platform-neutral event model dispatched by AstraEngine. |
|
fsm
Package fsm provides lightweight mode-and-step state injection.
|
Package fsm provides lightweight mode-and-step state injection. |
|
middleware
Package middleware defines handlers and composable event middleware.
|
Package middleware defines handlers and composable event middleware. |
|
platform
Package platform defines adapter contracts and platform-neutral outbound messages.
|
Package platform defines adapter contracts and platform-neutral outbound messages. |
|
ratelimit
Package ratelimit provides in-memory fixed-window limits and routing middleware.
|
Package ratelimit provides in-memory fixed-window limits and routing middleware. |
|
router
Package router dispatches commands, callbacks and text events to handlers.
|
Package router dispatches commands, callbacks and text events to handlers. |
|
examples
|
|
|
echo-bot
command
|
|
|
multi-platform
command
|
|
|
Package input normalizes message, command and callback input for handlers.
|
Package input normalizes message, command and callback input for handlers. |
|
Package keyboard builds platform-neutral inline and reply keyboards.
|
Package keyboard builds platform-neutral inline and reply keyboards. |
|
Package logging configures the standard library's structured slog logger.
|
Package logging configures the standard library's structured slog logger. |
|
Package mentions extracts common Telegram, VK and Discord mention formats.
|
Package mentions extracts common Telegram, VK and Discord mention formats. |
|
Package navigation provides callback-based pagination helpers.
|
Package navigation provides callback-based pagination helpers. |
|
Package payload encodes portable callback button data.
|
Package payload encodes portable callback button data. |
|
platform
|
|
|
discord
Package discord provides the experimental Discord adapter.
|
Package discord provides the experimental Discord adapter. |
|
telegram
Package telegram implements AstraEngine's Telegram Bot API adapter.
|
Package telegram implements AstraEngine's Telegram Bot API adapter. |
|
vk
Package vk implements AstraEngine's VK community bot adapter.
|
Package vk implements AstraEngine's VK community bot adapter. |
|
Package plugin implements compile-time plugins, settings and migration metadata.
|
Package plugin implements compile-time plugins, settings and migration metadata. |
|
plugins
|
|
|
auth
Package auth contains the baseline compile-time auth plugin.
|
Package auth contains the baseline compile-time auth plugin. |
|
broadcast
Package broadcast contains the baseline compile-time broadcast plugin.
|
Package broadcast contains the baseline compile-time broadcast plugin. |
|
roles
Package roles contains the baseline compile-time roles plugin.
|
Package roles contains the baseline compile-time roles plugin. |
|
Package runtime contains optional lifecycle, scheduling and worker helpers.
|
Package runtime contains optional lifecycle, scheduling and worker helpers. |
|
Package state provides persistent sessions and conversational FSM scenes.
|
Package state provides persistent sessions and conversational FSM scenes. |
|
Package storage defines persistent models and repository contracts.
|
Package storage defines persistent models and repository contracts. |
|
memory
Package memory implements process-local AstraEngine repositories.
|
Package memory implements process-local AstraEngine repositories. |
|
postgres
Package postgres implements AstraEngine repositories using pgx and PostgreSQL.
|
Package postgres implements AstraEngine repositories using pgx and PostgreSQL. |
Click to show internal directories.
Click to hide internal directories.