agentstate

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package agentstate defines the configuration-epoch and runtime-sync guards used by process-local external runtimes. Native conversation files belong to the Agent.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrRuntimeConfigStale means the runtime process was created from an older
	// bot configuration generation. Retrying the write from that process would
	// let stale credentials or configuration replace the current generation.
	ErrRuntimeConfigStale = errors.New("runtime configuration generation is stale")
	// ErrRuntimeConfigResetInProgress is transient: a bot-scoped reset owns the
	// workspace configuration publication lock. Session-scoped history resets
	// deliberately do not block bot-global configuration synchronization.
	ErrRuntimeConfigResetInProgress = errors.New("bot runtime reset is in progress")
)

Functions

This section is empty.

Types

type RuntimeConfigEpoch

type RuntimeConfigEpoch struct {
	Bot     int64
	Session int64
}

RuntimeConfigEpoch is the durable generation of process-affecting bot and session configuration. Credentials and workspace config may change while canonical chat history does not, so a warm process compares the epoch it started from to tell whether it is still current.

type RuntimeStateStore added in v0.21.0

type RuntimeStateStore interface {
	RuntimeConfigEpoch(ctx context.Context, botID, sessionID string) (RuntimeConfigEpoch, error)
}

RuntimeStateStore fences warm processes against configuration changes. It does not store or restore native conversation files.

Jump to

Keyboard shortcuts

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