Documentation
ยถ
Overview ยถ
Package hotplex provides a production-ready execution environment for AI CLI agents.
Index ยถ
- Constants
- Variables
- type AssistantMessage
- type Callback
- type ClaudeCodeProvider
- type Config
- type ContentBlock
- type CronJob
- type CronManager
- type CronRun
- type Engine
- type EngineOptions
- type EventMeta
- type EventWithMeta
- type Executor
- type HotPlexClient
- type OpenCodeConfig
- type Provider
- type ProviderConfig
- type ProviderEvent
- type ProviderFeatures
- type ProviderMeta
- type ProviderSessionOptions
- type ProviderType
- type RelayBinding
- type RelayManager
- type RelayResponse
- type SafetyManager
- type SessionController
- type SessionStats
- type SessionStatsData
- type StreamMessage
- type UsageStats
Constants ยถ
const ( ProviderTypeClaudeCode = provider.ProviderTypeClaudeCode ProviderTypeOpenCode = provider.ProviderTypeOpenCode )
Provider constants
Variables ยถ
var ( // Version can be overridden via ldflags: -X github.com/hrygo/hotplex.Version=1.2.3 Version = "0.35.2" VersionMajor = 0 VersionMinor = 35 VersionPatch = 2 )
var ( // ErrDangerBlocked is returned when a dangerous operation is blocked by the WAF. ErrDangerBlocked = types.ErrDangerBlocked // ErrInvalidConfig is returned when the configuration is invalid. ErrInvalidConfig = types.ErrInvalidConfig // ErrSessionNotFound is returned when the requested session does not exist. ErrSessionNotFound = types.ErrSessionNotFound // ErrSessionDead is returned when the session is no longer alive. ErrSessionDead = types.ErrSessionDead // ErrTimeout is returned when an operation times out. ErrTimeout = types.ErrTimeout // ErrInputTooLarge is returned when input exceeds maximum size. ErrInputTooLarge = types.ErrInputTooLarge // ErrProcessStart is returned when the CLI process fails to start. ErrProcessStart = types.ErrProcessStart // ErrPipeClosed is returned when the pipe is closed. ErrPipeClosed = types.ErrPipeClosed )
var ( // NewEngine creates a new HotPlex Engine instance. NewEngine = engine.NewEngine // WrapSafe wraps a callback to make it safe for concurrent use. WrapSafe = event.WrapSafe // NewEventWithMeta creates a new EventWithMeta. NewEventWithMeta = event.NewEventWithMeta // TruncateString truncates a string to the given length. TruncateString = types.TruncateString // SummarizeInput creates a summary of input data. SummarizeInput = types.SummarizeInput // NewClaudeCodeProvider creates a new Claude Code provider instance. NewClaudeCodeProvider = provider.NewClaudeCodeProvider // NewOpenCodeProvider creates a new OpenCode provider instance. NewOpenCodeProvider = provider.NewOpenCodeProvider )
Functions ยถ
This section is empty.
Types ยถ
type AssistantMessage ยถ
type AssistantMessage = types.AssistantMessage
AssistantMessage represents a message from the assistant.
type ClaudeCodeProvider ยถ added in v0.7.0
type ClaudeCodeProvider = provider.ClaudeCodeProvider
ClaudeCodeProvider implements the Provider interface for Claude Code CLI.
type ContentBlock ยถ
type ContentBlock = types.ContentBlock
ContentBlock represents a content block in a message.
type CronManager ยถ added in v0.35.0
type CronManager interface {
// AddCronJob registers a new cron job.
AddCronJob(ctx context.Context, job *CronJob) error
// DeleteCronJob removes a cron job by ID.
DeleteCronJob(ctx context.Context, id string) error
// PauseCronJob suspends a cron job without removing it.
PauseCronJob(ctx context.Context, id string) error
// ResumeCronJob re-activates a paused cron job.
ResumeCronJob(ctx context.Context, id string) error
// ListCronJobs returns all registered cron jobs.
ListCronJobs(ctx context.Context) ([]*CronJob, error)
// GetCronRuns returns the run history for a specific job.
GetCronRuns(ctx context.Context, jobID string) ([]*CronRun, error)
}
CronManager defines the cron scheduling API for the HotPlex engine.
type EngineOptions ยถ
type EngineOptions = engine.EngineOptions
EngineOptions defines the configuration parameters for initializing a new HotPlex Engine.
type EventWithMeta ยถ
type EventWithMeta = event.EventWithMeta
EventWithMeta wraps event data with metadata.
type Executor ยถ added in v0.7.0
type Executor interface {
// Execute runs a command or prompt and streams normalized events.
Execute(ctx context.Context, cfg *types.Config, prompt string, callback event.Callback) error
// ValidateConfig checks if the session configuration is secure and valid.
ValidateConfig(cfg *types.Config) error
}
Executor handles the core execution logic and configuration validation.
type HotPlexClient ยถ
type HotPlexClient interface {
Executor
SessionController
SafetyManager
CronManager
RelayManager
// Close gracefully terminates all managed sessions and releases resources.
Close() error
}
HotPlexClient defines the comprehensive public API for the HotPlex engine. It integrates execution, session management, safety configuration, cron scheduling, and bot-to-bot relay.
type OpenCodeConfig ยถ added in v0.8.0
type OpenCodeConfig = provider.OpenCodeConfig
OpenCodeConfig contains OpenCode-specific configuration.
type ProviderConfig ยถ added in v0.7.0
type ProviderConfig = provider.ProviderConfig
ProviderConfig defines the configuration for a specific provider instance.
type ProviderEvent ยถ added in v0.7.0
type ProviderEvent = provider.ProviderEvent
ProviderEvent represents a normalized event from any AI CLI provider.
type ProviderFeatures ยถ added in v0.7.0
type ProviderFeatures = provider.ProviderFeatures
ProviderFeatures describes the capabilities of a provider.
type ProviderMeta ยถ added in v0.7.0
type ProviderMeta = provider.ProviderMeta
ProviderMeta contains metadata about a provider.
type ProviderSessionOptions ยถ added in v0.7.0
type ProviderSessionOptions = provider.ProviderSessionOptions
ProviderSessionOptions configures a provider session.
type ProviderType ยถ added in v0.7.0
type ProviderType = provider.ProviderType
ProviderType defines the type of AI CLI provider.
type RelayBinding ยถ added in v0.35.0
type RelayBinding = relay.RelayBinding
RelayBinding is an alias for the relay binding type.
type RelayManager ยถ added in v0.35.0
type RelayManager interface {
// SendRelay delivers a message to a named agent via the relay network.
SendRelay(ctx context.Context, to string, content string) (*RelayResponse, error)
// AddRelayBinding registers a chat-to-bots binding for relay routing.
AddRelayBinding(ctx context.Context, binding *RelayBinding) error
// RemoveRelayBinding deletes a relay binding by ChatID.
RemoveRelayBinding(ctx context.Context, chatID string) error
// ListRelayBindings returns all registered relay bindings.
ListRelayBindings(ctx context.Context) ([]*RelayBinding, error)
}
RelayManager defines the bot-to-bot relay API for the HotPlex engine.
type RelayResponse ยถ added in v0.35.0
type RelayResponse = relay.RelayResponse
RelayResponse is an alias for the relay response type.
type SafetyManager ยถ added in v0.7.0
type SafetyManager interface {
// SetDangerAllowPaths configures the whitelist of safe directories for file I/O.
SetDangerAllowPaths(paths []string)
// SetDangerBypassEnabled toggles the regex WAF (requires valid admin token).
SetDangerBypassEnabled(token string, enabled bool) error
}
SafetyManager controls the security boundaries and WAF settings.
type SessionController ยถ added in v0.7.0
type SessionController interface {
// GetSessionStats returns telemetry and token usage for the given sessionID.
// Note: Use the business-side sessionID provided during execution, not the internal
// CLI-level session identifier. This sessionID maps to a specific background process.
GetSessionStats(sessionID string) *SessionStats
// StopSession forcibly terminates a persistent session and its underlying OS process group.
// Note: Use the business-side sessionID (provided by the user) to identify which
// specific agent instance to terminate.
StopSession(sessionID string, reason string) error
// GetCLIVersion returns the version string of the underlying AI CLI tool.
GetCLIVersion() (string, error)
}
SessionController provides administrative control over persistent sessions.
type SessionStats ยถ
type SessionStats = engine.SessionStats
SessionStats collects session-level statistics.
type SessionStatsData ยถ
type SessionStatsData = event.SessionStatsData
SessionStatsData contains comprehensive session statistics.
type StreamMessage ยถ
type StreamMessage = types.StreamMessage
StreamMessage represents a message from the CLI stream.
Directories
ยถ
| Path | Synopsis |
|---|---|
|
_examples
|
|
|
chatapps_slack
command
|
|
|
go_claude_basic
command
|
|
|
go_claude_lifecycle
command
|
|
|
go_error_handling
command
|
|
|
go_opencode_basic
command
|
|
|
go_opencode_lifecycle
command
|
|
|
Package brain provides intelligent orchestration capabilities for HotPlex.
|
Package brain provides intelligent orchestration capabilities for HotPlex. |
|
Package cache provides a pluggable caching layer for HotPlex.
|
Package cache provides a pluggable caching layer for HotPlex. |
|
slack
Package slack provides a high-performance, AI-native Slack adapter for the HotPlex engine.
|
Package slack provides a high-performance, AI-native Slack adapter for the HotPlex engine. |
|
slack/apphome
Package apphome provides Slack App Home capability center functionality.
|
Package apphome provides Slack App Home capability center functionality. |
|
cmd
|
|
|
bridge-client
Package bridgeclient provides a Go SDK for connecting external platform adapters to HotPlex via the BridgeServer WebSocket gateway.
|
Package bridgeclient provides a Go SDK for connecting external platform adapters to HotPlex via the BridgeServer WebSocket gateway. |
|
hotplexd
command
Package main is the entry point for the hotplexd daemon.
|
Package main is the entry point for the hotplexd daemon. |
|
internal
|
|
|
adminapi
Package adminapi provides shared authentication middleware for admin APIs.
|
Package adminapi provides shared authentication middleware for admin APIs. |
|
agent
Package agent provides agent capability discovery via Agent Card.
|
Package agent provides agent capability discovery via Agent Card. |
|
brain
Package brain provides intent detection and routing for user messages.
|
Package brain provides intent detection and routing for user messages. |
|
bridgewire
Package bridgewire defines the shared Bridge Wire Protocol types and constants used by both BridgeServer (internal/server) and BridgeClient (cmd/bridge-client).
|
Package bridgewire defines the shared Bridge Wire Protocol types and constants used by both BridgeServer (internal/server) and BridgeClient (cmd/bridge-client). |
|
cron
Package cron provides the cron scheduling subsystem for HotPlex.
|
Package cron provides the cron scheduling subsystem for HotPlex. |
|
engine
Package engine provides the core session management and process pool for HotPlex.
|
Package engine provides the core session management and process pool for HotPlex. |
|
panicx
Package panicx provides panic recovery utilities for goroutine safety.
|
Package panicx provides panic recovery utilities for goroutine safety. |
|
persistence
Package persistence provides session marker storage abstractions.
|
Package persistence provides session marker storage abstractions. |
|
relay
Package relay provides bot-to-bot communication across HotPlex instances.
|
Package relay provides bot-to-bot communication across HotPlex instances. |
|
security
Package security provides WAF-like protection for the HotPlex engine.
|
Package security provides WAF-like protection for the HotPlex engine. |
|
server
Package server provides the BridgeServer for external platform adapters.
|
Package server provides the BridgeServer for external platform adapters. |
|
sys
Package sys provides cross-platform process management utilities.
|
Package sys provides cross-platform process management utilities. |
|
plugins
|
|