Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyMigration(ctx context.Context, w io.Writer, plan *MigrationPlan, ...) (bool, error)
- func AutoMigrationBlockers(plan *MigrationPlan) []string
- func AutoMigrationOptedOut(ctx context.Context, defaultHome string) (bool, error)
- func BootstrapAtExit()
- func CmdMigrate(ctx context.Context, w io.Writer, ns map[string]any) error
- func DispatchGatewayRunModuleEntry(ctx context.Context, exit func(int))
- func DuplicateCredentialFindings(ctx context.Context) ([]string, error)
- func DuplicateCredentialLines(ctx context.Context, configs []ProfileGatewayConfig) []string
- func ExitAfterGracefulShutdown(ctx context.Context, exitCode int)
- func FormatPlan(plan *MigrationPlan, dryRun bool) []string
- func FormatUpdateWarning(plan *MigrationPlan, autoBlockers []string) []string
- func HomeEnv(ctx context.Context, h string) (context.Context, func())
- func ImplicitMultiplexBlocker(ctx context.Context) (string, error)
- func ImportRunModule(ctx context.Context) error
- func Main(ctx context.Context, argv []string, stdout, stderr io.Writer) int
- func MaskedDefaultUnit(ctx context.Context, defaultHome string) (string, error)
- func MaybeAutoMigrateAfterUpdate(ctx context.Context, w io.Writer) error
- func ProfileAdaptersAndConfig(ctx context.Context, runner any, profile string) (*gateway.AdapterMap, *gateway.GatewayConfig, error)
- func RegisterAtExit(fn func())
- func ResolutionFailureReply(ctx context.Context, err error, platform gateway.Platform) (string, string, bool)
- func ResolveMultiplexMode(ctx context.Context, cfg *gateway.GatewayConfig) (gateway.MultiplexDecision, error)
- func RollbackMigration(ctx context.Context, w io.Writer, defaultHome string) (bool, error)
- func RunGateway(ctx context.Context, o StartGatewayOptions) (bool, error)
- func StartGateway(ctx context.Context, o StartGatewayOptions) (bool, error)
- type CommentAgentRun
- type CommentAgentRuntime
- type ConversationState
- type DeliveryQueueWatch
- type GatewayRunner
- func (r *GatewayRunner) ActiveProfileName(ctx context.Context) string
- func (r *GatewayRunner) AdapterCredentialFingerprint(adapter gateway.PlatformAdapter) *string
- func (r *GatewayRunner) AdapterFlag(ctx context.Context, platform gateway.Platform, name string, profile *string) bool
- func (r *GatewayRunner) AdapterForSource(ctx context.Context, source *gateway.SessionSource) (gateway.PlatformAdapter, error)
- func (r *GatewayRunner) AdapterProfileForSource(source *gateway.SessionSource) *string
- func (r *GatewayRunner) Adapters() *orderedutil.Map[gateway.Platform, gateway.PlatformAdapter]
- func (r *GatewayRunner) AdaptersForProfile(profile *string) *orderedutil.Map[gateway.Platform, gateway.PlatformAdapter]
- func (r *GatewayRunner) AdmitPrimarySource(ctx context.Context, source *gateway.SessionSource, defaultHome string) (string, bool)
- func (r *GatewayRunner) ApplyReasoningSelection(ctx context.Context, sessionKey, platformKey, value string, persistGlobal bool) string
- func (r *GatewayRunner) AsyncSessionStore() *gateway.AsyncSessionStore
- func (r *GatewayRunner) AttachClient() (release func())
- func (r *GatewayRunner) AuthorizationAdapter(ctx context.Context, platform gateway.Platform, profile *string) gateway.PlatformAdapter
- func (r *GatewayRunner) CachedAgentFor(sessionKey string) any
- func (r *GatewayRunner) Canonicalize(ctx context.Context, source *gateway.SessionSource, ...) *gateway.RoutingIdentity
- func (r *GatewayRunner) ChannelOverrideFor(source *gateway.SessionSource) *gateway.ChannelOverride
- func (r *GatewayRunner) ClassifyCompletionOwner(ctx context.Context, parentSessionID, sessionKey string) (string, string, string, error)
- func (r *GatewayRunner) ClearDurableActiveTurn(ctx context.Context, event *gateway.MessageEvent) error
- func (r *GatewayRunner) CompletionDeliveryIdentity(_ context.Context, event map[string]any) []any
- func (r *GatewayRunner) DeliveryAdapterFor(ctx context.Context, source *gateway.SessionSource) (gateway.PlatformAdapter, error)
- func (r *GatewayRunner) Draining() bool
- func (r *GatewayRunner) EffectiveBusyInputMode(ctx context.Context, source *gateway.SessionSource) string
- func (r *GatewayRunner) EvictCachedAgent(route string)
- func (r *GatewayRunner) EvictCachedAgentAtBoundary(route string)
- func (r *GatewayRunner) EvictIdleStaleAgent(ctx context.Context, route string)
- func (r *GatewayRunner) EvictReapedAgent(ctx context.Context, route string)
- func (r *GatewayRunner) ExitCode() *int
- func (r *GatewayRunner) ExitReason() *string
- func (r *GatewayRunner) ExpandInboundContextReferences(ctx context.Context, source *gateway.SessionSource, sessionKey, text string) (*string, error)
- func (r *GatewayRunner) FinalizeSessionOffLoop(ctx context.Context, sessionID, platform, reason, sessionKey string) ([]string, error)
- func (r *GatewayRunner) GatewayConfig() *gateway.GatewayConfig
- func (r *GatewayRunner) GatewayLoop() gateway.EventLoop
- func (r *GatewayRunner) GetUnauthorizedDMBehavior(ctx context.Context, platform gateway.Platform, profile *string) string
- func (r *GatewayRunner) GoalManagerForEvent(ctx context.Context, event *gateway.MessageEvent) (*goals.GoalManager, *gateway.SessionEntry)
- func (r *GatewayRunner) GoalMaxTurnsFromConfig(ctx context.Context) int64
- func (r *GatewayRunner) HMBusyPreempt(ctx context.Context, event *gateway.MessageEvent, ...) (bool, error)
- func (r *GatewayRunner) HMPendingReplyIntercepts(ctx context.Context, event *gateway.MessageEvent, ...) (*string, error)
- func (r *GatewayRunner) HMPreGatewayDispatchHook(ctx context.Context, event *gateway.MessageEvent, ...) *gateway.MessageEvent
- func (r *GatewayRunner) HandleMessage(ctx context.Context, event *gateway.MessageEvent) (any, error)
- func (r *GatewayRunner) HandleModelReset(ctx context.Context, event *gateway.MessageEvent, ...) (*string, error)
- func (r *GatewayRunner) HasPendingSlashConfirm(route string) bool
- func (r *GatewayRunner) InboundModelContextLength(ctx context.Context, source *gateway.SessionSource, sessionKey string) (int, error)
- func (r *GatewayRunner) InjectWatchNotification(ctx context.Context, text string, event map[string]any) (*bool, error)
- func (r *GatewayRunner) IsSessionRunning(route string) bool
- func (r *GatewayRunner) IsSharedBotSatellite(ctx context.Context, profileName string, platform gateway.Platform) bool
- func (r *GatewayRunner) IsUserAuthorized(ctx context.Context, source *gateway.SessionSource, ...) (bool, error)
- func (r *GatewayRunner) IsUserAuthorizedForSource(ctx context.Context, source *gateway.SessionSource, ...) (bool, error)
- func (r *GatewayRunner) JoinStartupRestore(ctx context.Context, name string, wait func(ctx context.Context) error)
- func (r *GatewayRunner) LegacyAdapterCredentialFingerprint(adapter gateway.PlatformAdapter) *string
- func (r *GatewayRunner) LocalBusySlashCommand(ctx context.Context, event *gateway.MessageEvent, def gateway.RegistryCommand, ...) (any, error)
- func (r *GatewayRunner) LocalCommandHandler(canonical string) func(ctx context.Context, event *gateway.MessageEvent) (any, error)
- func (r *GatewayRunner) LocalExecQuickCommand(ctx context.Context, command, shell, cwd string) (string, error)
- func (r *GatewayRunner) LocalPluginCommand(ctx context.Context, handler plugins.PluginCommandHandler, ...) (any, error)
- func (r *GatewayRunner) LocalPromptCommand(ctx context.Context, canonical string, event *gateway.MessageEvent, ...) (bool, any, error)
- func (r *GatewayRunner) LocalSlashAccess(ctx context.Context, source *gateway.SessionSource, canonical string) string
- func (r *GatewayRunner) MCPReloadRefreshCachedAgents(multiplex bool, profile string)
- func (r *GatewayRunner) MediaDeliveryScopeForSource(ctx context.Context, source *gateway.SessionSource) (context.Context, func(), error)
- func (r *GatewayRunner) ModelSwitchLock() *sync.Mutex
- func (r *GatewayRunner) MultiplexProfiles() bool
- func (r *GatewayRunner) OnGatewayLoop(ctx context.Context) bool
- func (r *GatewayRunner) OwningProfile(adapter gateway.PlatformAdapter, platform gateway.Platform) (bool, string)
- func (r *GatewayRunner) ParsePlatform(ctx context.Context, value string) (string, error)
- func (r *GatewayRunner) ParseReasoningCommandArgs(arg string) (string, bool)
- func (r *GatewayRunner) PeekSessionState(route string) gateway.PeekedSessionState
- func (r *GatewayRunner) PerformModelSwitch(ctx context.Context, sw *gateway.ModelSwitchContext, ...) (*provider.ModelSwitchResult, string, error)
- func (r *GatewayRunner) PersistActiveAgents()
- func (r *GatewayRunner) PluginLocalSession(ctx context.Context, source *gateway.SessionSource, ...) (*gateway.LiveSession, error)
- func (r *GatewayRunner) PluginMessagingSessionOwned(ctx context.Context, sessionKey, pluginHome, pluginID string) bool
- func (r *GatewayRunner) PrimaryProfileName() string
- func (r *GatewayRunner) ProfileAdapterMap(name string) *orderedutil.Map[gateway.Platform, gateway.PlatformAdapter]
- func (r *GatewayRunner) ProfileAdapters() ...
- func (r *GatewayRunner) ProfileConfigs() map[string]*gateway.GatewayConfig
- func (r *GatewayRunner) ProfileNameForSource(ctx context.Context, source *gateway.SessionSource, adapterProfile *string) (*string, error)
- func (r *GatewayRunner) RecordModelSwitch(ctx context.Context, result *provider.ModelSwitchResult, ...) string
- func (r *GatewayRunner) RedeliverFailedObligationsForPlatform(ctx context.Context, platform gateway.Platform, profile *string) int
- func (r *GatewayRunner) RefreshAgentCacheMessageCount(ctx context.Context, route, target string) error
- func (r *GatewayRunner) RefreshFallbackModel(ctx context.Context) []map[string]any
- func (r *GatewayRunner) RehydrateSessionModelOverride(ctx context.Context, sessionKey string)
- func (r *GatewayRunner) RequestRestart(detached, viaService bool) bool
- func (r *GatewayRunner) ResetSessionOffLoop(ctx context.Context, sessionKey string, sessionID *string, ...) error
- func (r *GatewayRunner) ResidentAgentFor(sessionKey string) any
- func (r *GatewayRunner) ResolvePolicyAgentRuntime(ctx context.Context, policy *gateway.LocalSessionPolicy, fallback bool) (string, map[string]any, error)
- func (r *GatewayRunner) ResolveProfileHomeForSource(ctx context.Context, source *gateway.SessionSource) (string, error)
- func (r *GatewayRunner) ResolveSessionAgentRuntime(ctx context.Context, source *gateway.SessionSource, sessionKey string, ...) (string, map[string]any, error)
- func (r *GatewayRunner) ResolveSessionReasoningConfig(ctx context.Context, source *gateway.SessionSource, sessionKey, model string) (map[string]any, error)
- func (r *GatewayRunner) ResolveSessionServiceTier(ctx context.Context, source *gateway.SessionSource, sessionKey string) (*string, error)
- func (r *GatewayRunner) RestoredSource(ctx context.Context, entry *gateway.SessionEntry) (*gateway.SessionSource, error)
- func (r *GatewayRunner) RoutePlaintextApprovalWhileBusy(ctx context.Context, event *gateway.MessageEvent, sessionKey string) bool
- func (r *GatewayRunner) RunPostAdmissionHook(ctx context.Context, event *gateway.MessageEvent, ...) (bool, *string, error)
- func (r *GatewayRunner) RunnerConfig() *gateway.GatewayConfig
- func (r *GatewayRunner) Running() bool
- func (r *GatewayRunner) RunningAgent(key string) (any, bool)
- func (r *GatewayRunner) ScheduleFloodRedelivery(ctx context.Context, platform gateway.Platform, profile *string)
- func (r *GatewayRunner) SessionAuthorities() *gateway.SessionAuthorities
- func (r *GatewayRunner) SessionAuthority() *gateway.SessionAuthority
- func (r *GatewayRunner) SessionControlServer() *gateway.GatewayControlServer
- func (r *GatewayRunner) SessionDB(ctx context.Context) *state.SessionDB
- func (r *GatewayRunner) SessionEnvScope(ctx context.Context, sc *gateway.SessionContext, ...) error
- func (r *GatewayRunner) SessionKeyForSource(ctx context.Context, source *gateway.SessionSource) (string, error)
- func (r *GatewayRunner) SessionModelOverride(sessionKey string) map[string]any
- func (r *GatewayRunner) SessionModelOverrideFor(ctx context.Context, sessionKey string) map[string]any
- func (r *GatewayRunner) SessionRuntimeDescriptor() map[string]any
- func (r *GatewayRunner) SessionStore() *gateway.SessionStore
- func (r *GatewayRunner) SessionTicketStore() *gateway.TicketStore
- func (r *GatewayRunner) SetRuntimeDescriptorField(key string, value any)
- func (r *GatewayRunner) SetSessionAuthority(a *gateway.SessionAuthority)
- func (r *GatewayRunner) SetSessionReasoningOverride(sessionKey string, reasoningConfig map[string]any)
- func (r *GatewayRunner) SetSessionServiceTierOverride(sessionKey string, serviceTier *string, clear bool)
- func (r *GatewayRunner) SetTeamsPipelineRuntime(runtime any)
- func (r *GatewayRunner) SetTeamsPipelineRuntimeError(message *string)
- func (r *GatewayRunner) ShouldExitCleanly() bool
- func (r *GatewayRunner) ShouldExitWithFailure() bool
- func (r *GatewayRunner) SideBackground(ctx context.Context, env *tools.Env, a *gateway.SessionAuthority, ...) (string, error)
- func (r *GatewayRunner) SideQuestion(ctx context.Context, a *gateway.SessionAuthority, ref gateway.SessionRef, ...) (string, error)
- func (r *GatewayRunner) Start(ctx context.Context) (bool, error)
- func (r *GatewayRunner) Stop(ctx context.Context, restart, detachedRestart, serviceRestart bool) error
- func (r *GatewayRunner) StopRequestedBySignal() bool
- func (r *GatewayRunner) StoreVoiceMode(source *gateway.SessionSource, mode string)
- func (r *GatewayRunner) SystemPromptForChannel(ctx context.Context, platform gateway.Platform, chatID string, ...) string
- func (r *GatewayRunner) TeamsPipelineRuntime() any
- func (r *GatewayRunner) ThreadMetadataForSource(source *gateway.SessionSource, replyToMessageID *string) map[string]any
- func (r *GatewayRunner) TransportOwner(source *gateway.SessionSource) (gateway.PlatformAdapter, string, bool)
- func (r *GatewayRunner) UpdatePromptPending(route string) bool
- func (r *GatewayRunner) VoiceModeFor(source *gateway.SessionSource) string
- func (r *GatewayRunner) WaitForShutdown(ctx context.Context) error
- type HookRegistry
- type MigrationPlan
- func (m *MigrationPlan) AlreadyMultiplexed() bool
- func (m *MigrationPlan) Blocked() bool
- func (m *MigrationPlan) Default() *ProfileGateway
- func (m *MigrationPlan) ExpectedServedNames() map[string]bool
- func (m *MigrationPlan) Secondaries() []*ProfileGateway
- func (m *MigrationPlan) StandaloneSecondaries() []*ProfileGateway
- func (m *MigrationPlan) TargetRunAsUser() string
- func (m *MigrationPlan) TargetServiceKind() *ServiceUnit
- type MultiplexConfigError
- type PersistentState
- type ProfileGateway
- type ProfileGatewayConfig
- type ProfileHookRegistries
- type ProfileOwnershipRetained
- type ServiceUnit
- type SessionFieldView
- func (v SessionFieldView[T]) Clear()
- func (v SessionFieldView[T]) Contains(key string) bool
- func (v SessionFieldView[T]) Delete(key string) bool
- func (v SessionFieldView[T]) Get(key string) (T, bool)
- func (v SessionFieldView[T]) Items() map[string]T
- func (v SessionFieldView[T]) Keys() []string
- func (v SessionFieldView[T]) Len() int
- func (v SessionFieldView[T]) Replace(mapping map[string]T)
- func (v SessionFieldView[T]) Set(key string, value T)
- func (v SessionFieldView[T]) String() string
- type SessionSocket
- type SessionSocketClosed
- type SessionState
- type SessionTurnLeaseRegistry
- type SlashCommandReply
- type StartGatewayOptions
- type TurnContext
- type TurnLeaseTimeoutError
- type TurnLeaseToken
- type TurnLeaseTokenView
- func (v TurnLeaseTokenView) Clear()
- func (v TurnLeaseTokenView) Contains(key leaseTokenKey) bool
- func (v TurnLeaseTokenView) Delete(key leaseTokenKey) bool
- func (v TurnLeaseTokenView) Get(key leaseTokenKey) (*TurnLeaseToken, bool)
- func (v TurnLeaseTokenView) Items() map[leaseTokenKey]*TurnLeaseToken
- func (v TurnLeaseTokenView) Keys() []leaseTokenKey
- func (v TurnLeaseTokenView) Len() int
- func (v TurnLeaseTokenView) Replace(mapping map[leaseTokenKey]*TurnLeaseToken)
- func (v TurnLeaseTokenView) Set(key leaseTokenKey, token *TurnLeaseToken)
- type TurnRunner
- type TurnState
- type UnauthorizedOwnerNotifier
Constants ¶
const ( // Idle window of a service started by a `go run` build, whose binary may be gone soon after ScratchIdleExitSeconds = 5.0 IdleExitReason = "idle_exit" IdleExitStopPrefix = "auto-started gateway idle" )
const MigrateCommand = gateway.HostMigrateCommand
Command that converges every per profile gateway onto the host gateway
const MigrationManifestName = "gateway_migration.json"
File in the default home recording the pre migration footprint
Variables ¶
var ( ActivateRuntime func(ctx context.Context) error MaybeRunBootBootstrap func(ctx context.Context, projectRoot string) ConfigureWindowsStdio func(ctx context.Context) bool )
Steps of packages above this one that the module entry runs, assigned by cmd/icebath, the update steps nil without the updater
var ( ActivePersonalityName func(cfg map[string]any) string AvailablePersonalities func(cfg map[string]any) map[string]any DescribePersonality func(value any, width int) string PersistPersonality func(ctx context.Context, value any) bool ResolvePersonality func(value any, cfg map[string]any) (string, string, error) )
Personality catalog operations of the commands package, assigned in cmd/icebath wiring
var BindTeamsPipelineRuntime func(ctx context.Context, runner *GatewayRunner) (bool, error)
Binds the Teams meeting pipeline to the Graph webhook ingress
var BuildInitPromptForCwd func(env *tools.Env, cwd, extra string, sessionKey *string) string
The init prompt for the session's active directory, its AGENTS.md read when present
var ErrKeyboardInterrupt error = &errorutil.Error{Kind: "KeyboardInterrupt"}
Error of a start an interrupt ended before the gateway routed its own signals, the KeyboardInterrupt of asyncio.run
var ExecuteSlashCommand func(ctx context.Context, name, surface, args string, options map[string]any) (SlashCommandReply, error)
Shared slash executor of pkg/commands run on a surface with its args and options, assigned in cmd/icebath wiring
var GatewayDebugLocalReport func(ctx context.Context) (string, error)
Redacted local debug report of the profile, assigned in cmd/icebath wiring
var GatewayDebugUploadReply func(ctx context.Context) (string, error)
Summary only debug upload and its chat reply, assigned in cmd/icebath wiring
var GatewayKnownCommand func(name string) bool
Whether a name is one of the builtin gateway commands
var IsGatewayKnownCommand func(name string) bool
Whether a name is a builtin or registered plugin gateway command
var MigrateS6 struct { Running func() bool Scandir func() string NamedSlotName func(profile string) string SlotIsUp func(profile string) bool ParkNamedSlot func(ctx context.Context, profile string) error BringRootSlotUp func() (string, error) }
s6 legs the migration drives, assigned in cmd/icebath/wiring.go from pkg/gatewaycli
var ParseServiceTierConfig func(raw string) string
Persisted /fast preference parsed like the CLI, empty when unset or unknown, assigned by the app package
var RandomTip func(ctx context.Context) string
Random tip in the active language, assigned in cmd/icebath wiring
var ResolveCommand func(name string) (string, bool)
Canonical command name of a typed slash name or alias, false when no command is registered under it
var ResolveCommandBusy func(name string) (canonical, busyPolicy, busyHandler string, ok bool)
Canonical name, busy policy and busy handler key of a registered command, false when none is registered
var ResolveEphemeralSystemPromptFromConfig func(cfg map[string]any) string
Ephemeral system prompt of a config from its personality or system prompt, assigned by the command package
var RunApprovalModeCommand func(ctx context.Context, h string, env *tools.Env, requestedMode string) (message string, err error)
Profile approval mode shown or persisted with its reply message, assigned in cmd/icebath wiring
var RunCuratorSlash func(ctx context.Context, env *tools.Env, argv []string, out io.Writer)
Curator CLI run on argv writing its report, help and errors to out, assigned in cmd/icebath wiring
var RunGatewayExecQuickCommand func(ctx context.Context, env *tools.Env, execCmd any, cwd string) (string, error)
Runs a type exec quick command as a host shell of the gateway with a sanitized env and redacted output
var SanitizeTelegramName func(raw string) string
Lowercased hyphen folded command name Telegram accepts, assigned in cmd/icebath wiring
Writes one dotted config key into config.yaml, false when the write did not land
var ServeSessionSocket func(ctx context.Context, sock SessionSocket, identity map[string]any, subprotocol *string, operator bool) error
Session handler an admitted socket runs, assigned by the command wiring
var SlashConfirmClear func(sessionKey string)
Clears a session's pending slash confirm, the tools slash_confirm module the command layer owns
var SlashConfirmClearIfStale func(sessionKey string) bool
Drops a pending slash confirm older than the default timeout, true when it did
var SlashConfirmGetPending func(sessionKey string) (string, bool)
Confirm id of the slash confirm pending for the session, false when none is
var SlashConfirmPending func(sessionKey string) bool
Whether a destructive slash command confirmation is pending for the session
var SlashConfirmRegister func(sessionKey, confirmID, command string, handler func(ctx context.Context, choice string) (string, error))
Records a pending slash confirm whose handler runs with the chosen answer, superseding any prior one
var SlashConfirmResolve func(ctx context.Context, sessionKey, confirmID, choice string) string
Runs the pending slash confirm handler with a choice, empty when stale, superseded or already resolved
var SweepExpiredPastes func(ctx context.Context, now *float64) (deleted, remaining int, err error)
Paste sweep of pkg/selfupdate deleting expired pending pastes, set by the command wiring
Functions ¶
func ApplyMigration ¶
func ApplyMigration(ctx context.Context, w io.Writer, plan *MigrationPlan, servedWait time.Duration) (bool, error)
Flips the flag, removes every secondary gateway, brings the multiplexer up and verifies it serves every profile
func AutoMigrationBlockers ¶
func AutoMigrationBlockers(plan *MigrationPlan) []string
Every boundary a standalone secondary sits behind, each distinct finding once in order
func AutoMigrationOptedOut ¶
Whether the default profile's effective config sets gateway.auto_multiplex_migration false
func BootstrapAtExit ¶
func BootstrapAtExit()
Runs and clears the exit functions the gateway bootstrap registered, newest first, a panic not stopping the rest
func CmdMigrate ¶
Prints the plan and applies it, exiting 1 on a refusal or failed apply and 0 on success
func DispatchGatewayRunModuleEntry ¶
Runs the gateway module entry and exits when argv carries its entry word
func DuplicateCredentialFindings ¶
Duplicate credential findings read straight from the local profile homes, unloadable configs skipped
func DuplicateCredentialLines ¶
func DuplicateCredentialLines(ctx context.Context, configs []ProfileGatewayConfig) []string
One finding per platform credential two profiles both hold, naming profiles and key names only
func ExitAfterGracefulShutdown ¶
Releases the pid file and lock, stamps the clean exit, flushes metrics and logs, then hard exits with code
func FormatPlan ¶
func FormatPlan(plan *MigrationPlan, dryRun bool) []string
Plan table, the steps apply takes and every process it will signal, then blockers and notices
func FormatUpdateWarning ¶
func FormatUpdateWarning(plan *MigrationPlan, autoBlockers []string) []string
Update hook block naming every blocker the automatic migration will not cross
func HomeEnv ¶
Runs service helpers as if h were the active home, the launch identity pinned while swapped
func ImplicitMultiplexBlocker ¶
Why this process must not multiplex right now, empty when it may
func ImportRunModule ¶
Runs once what importing the runner module does: the gateway marker, dotenv, the network preference and startup warnings
func Main ¶
Runs the gateway module entry and returns its exit status, hard exiting after a started gateway tore down
func MaskedDefaultUnit ¶
Default profile systemd unit the operator masked to dev null, empty when neither scope is masked
func MaybeAutoMigrateAfterUpdate ¶
Update hook folding per profile gateways into one multiplexer when unblocked, else printing the blockers
func ProfileAdaptersAndConfig ¶
func ProfileAdaptersAndConfig(ctx context.Context, runner any, profile string) (*gateway.AdapterMap, *gateway.GatewayConfig, error)
Adapter map and gateway config of an adapter's owning profile, the runner's own for the primary profile
func RegisterAtExit ¶
func RegisterAtExit(fn func())
Registers a function the process exit path runs, the atexit registration of the gateway command
func ResolutionFailureReply ¶
func ResolutionFailureReply(ctx context.Context, err error, platform gateway.Platform) (string, string, bool)
Chat text, failure reason and retryable flag a messaging turn answers a resolution failure with
func ResolveMultiplexMode ¶
func ResolveMultiplexMode(ctx context.Context, cfg *gateway.GatewayConfig) (gateway.MultiplexDecision, error)
Settles the config's multiplex flag for one boot in place, refusing while any blocker holds
func RollbackMigration ¶
Compensator of a failed apply, puts the default's one gateway back on the recorded flag
func RunGateway ¶
func RunGateway(ctx context.Context, o StartGatewayOptions) (bool, error)
Runs StartGateway as asyncio.run does, a first unrouted interrupt cancelling the start and a second ending the wait
func StartGateway ¶
func StartGateway(ctx context.Context, o StartGatewayOptions) (bool, error)
Starts the gateway and runs until interrupted, false when it failed to start so supervisors restart it
Types ¶
type CommentAgentRun ¶
Outcome of one comment agent turn
func RunCommentAgent ¶
func RunCommentAgent(ctx context.Context, prompt string, toolsets []any, onRuntime func(CommentAgentRuntime) []map[string]any, onRun func()) (*CommentAgentRun, error)
Runs one platform comment agent turn on toolsets, onRuntime returning the history and onRun marking the start
type CommentAgentRuntime ¶
Model and provider route a comment agent turn runs on
type ConversationState ¶
type ConversationState struct {
// contains filtered or unexported fields
}
State scoped to one conversation that survives turns but not boundaries
type DeliveryQueueWatch ¶
type DeliveryQueueWatch struct {
Drain func()
// contains filtered or unexported fields
}
Stamp comparison of every served profile's delivery queue file, draining when a stamp moved
func NewDeliveryQueueWatch ¶
func NewDeliveryQueueWatch(ctx context.Context, homes func() []*string, drain func()) *DeliveryQueueWatch
Watch over the served homes, a nil home standing for the active one, stamped once at creation
type GatewayRunner ¶
type GatewayRunner struct {
// contains filtered or unexported fields
}
Main gateway controller that manages adapter lifecycles and routes messages to and from the agent
func NewGatewayRunner ¶
func NewGatewayRunner(ctx context.Context, config *gateway.GatewayConfig) (*GatewayRunner, error)
Runner over an explicit config with the standalone opt out applied, else over the loaded runner config
func (*GatewayRunner) ActiveProfileName ¶
func (r *GatewayRunner) ActiveProfileName(ctx context.Context) string
Profile the home in scope belongs to, default for the root home
func (*GatewayRunner) AdapterCredentialFingerprint ¶
func (r *GatewayRunner) AdapterCredentialFingerprint(adapter gateway.PlatformAdapter) *string
Salted log safe hash of an adapter credential, nil when none is discoverable
func (*GatewayRunner) AdapterFlag ¶
func (r *GatewayRunner) AdapterFlag(ctx context.Context, platform gateway.Platform, name string, profile *string) bool
Truth of a named flag on the adapter that authorizes the platform for the profile
func (*GatewayRunner) AdapterForSource ¶
func (r *GatewayRunner) AdapterForSource(ctx context.Context, source *gateway.SessionSource) (gateway.PlatformAdapter, error)
Adapter owning the source for the session authority, the delivery seam under its historical name
func (*GatewayRunner) AdapterProfileForSource ¶
func (r *GatewayRunner) AdapterProfileForSource(source *gateway.SessionSource) *string
Profile whose adapter received the source, nil for the launch profile
func (*GatewayRunner) Adapters ¶
func (r *GatewayRunner) Adapters() *orderedutil.Map[gateway.Platform, gateway.PlatformAdapter]
Primary profile's live adapters by platform
func (*GatewayRunner) AdaptersForProfile ¶
func (r *GatewayRunner) AdaptersForProfile(profile *string) *orderedutil.Map[gateway.Platform, gateway.PlatformAdapter]
Live adapter map of the profile a source names, the profile adapters seam of the session authority
func (*GatewayRunner) AdmitPrimarySource ¶
func (r *GatewayRunner) AdmitPrimarySource(ctx context.Context, source *gateway.SessionSource, defaultHome string) (string, bool)
Runtime home of a primary adapter source, false for a route to an unserved profile
func (*GatewayRunner) ApplyReasoningSelection ¶
func (r *GatewayRunner) ApplyReasoningSelection(ctx context.Context, sessionKey, platformKey, value string, persistGlobal bool) string
Applies a reasoning pick to a route for the session controls, the reply text returned
func (*GatewayRunner) AsyncSessionStore ¶
func (r *GatewayRunner) AsyncSessionStore() *gateway.AsyncSessionStore
The one async facade over this runner's session store, rebuilt when the store was swapped
func (*GatewayRunner) AttachClient ¶
func (r *GatewayRunner) AttachClient() (release func())
Counts an attached native client until the returned release runs
func (*GatewayRunner) AuthorizationAdapter ¶
func (r *GatewayRunner) AuthorizationAdapter(ctx context.Context, platform gateway.Platform, profile *string) gateway.PlatformAdapter
Live adapter of a profile whose intake policy gates authorization, the API server platform callback target
func (*GatewayRunner) CachedAgentFor ¶
func (r *GatewayRunner) CachedAgentFor(sessionKey string) any
Cached agent of the session key peeked under the cache lock without evicting it, nil when absent
func (*GatewayRunner) Canonicalize ¶
func (r *GatewayRunner) Canonicalize(ctx context.Context, source *gateway.SessionSource, transportProfile, primaryHome string) *gateway.RoutingIdentity
Runner side identity seam of producer ingress
func (*GatewayRunner) ChannelOverrideFor ¶
func (r *GatewayRunner) ChannelOverrideFor(source *gateway.SessionSource) *gateway.ChannelOverride
Channel overrides entry of the chat a source arrived on, nil when none applies
func (*GatewayRunner) ClassifyCompletionOwner ¶
func (r *GatewayRunner) ClassifyCompletionOwner(ctx context.Context, parentSessionID, sessionKey string) (string, string, string, error)
Verdict, owner and target of the conversation a background result belongs to
func (*GatewayRunner) ClearDurableActiveTurn ¶
func (r *GatewayRunner) ClearDurableActiveTurn(ctx context.Context, event *gateway.MessageEvent) error
Clears the durable crash marker the event owns, a failed clear only logged
func (*GatewayRunner) CompletionDeliveryIdentity ¶
Producer stable identity of a background result as its three element tuple, nil when it carries none
func (*GatewayRunner) DeliveryAdapterFor ¶
func (r *GatewayRunner) DeliveryAdapterFor(ctx context.Context, source *gateway.SessionSource) (gateway.PlatformAdapter, error)
Adapter that answers the source, the receiving bot when known and else its unique owner
func (*GatewayRunner) Draining ¶
func (r *GatewayRunner) Draining() bool
Whether the runner is draining
func (*GatewayRunner) EffectiveBusyInputMode ¶
func (r *GatewayRunner) EffectiveBusyInputMode(ctx context.Context, source *gateway.SessionSource) string
Busy input mode of the routed profile startup snapshot for the session controls
func (*GatewayRunner) EvictCachedAgent ¶
func (r *GatewayRunner) EvictCachedAgent(route string)
Evicts the cached agent of a route, the session retirement surface
func (*GatewayRunner) EvictCachedAgentAtBoundary ¶
func (r *GatewayRunner) EvictCachedAgentAtBoundary(route string)
Evicts the cached agent of a route with its memory committed, the session boundary surface
func (*GatewayRunner) EvictIdleStaleAgent ¶
func (r *GatewayRunner) EvictIdleStaleAgent(ctx context.Context, route string)
Frees the running slot of a route whose agent went idle past its stale bound
func (*GatewayRunner) EvictReapedAgent ¶
func (r *GatewayRunner) EvictReapedAgent(ctx context.Context, route string)
Frees the running slot of a route whose stored session was reaped
func (*GatewayRunner) ExitCode ¶
func (r *GatewayRunner) ExitCode() *int
Exit status the gateway asked for, nil while it runs
func (*GatewayRunner) ExitReason ¶
func (r *GatewayRunner) ExitReason() *string
Reason the gateway gave for exiting, nil while it runs
func (*GatewayRunner) ExpandInboundContextReferences ¶
func (r *GatewayRunner) ExpandInboundContextReferences(ctx context.Context, source *gateway.SessionSource, sessionKey, text string) (*string, error)
Expanded inbound text, nil after a refused injection whose refusal went to the chat
func (*GatewayRunner) FinalizeSessionOffLoop ¶
func (r *GatewayRunner) FinalizeSessionOffLoop(ctx context.Context, sessionID, platform, reason, sessionKey string) ([]string, error)
Session finalize hooks off the loop for the session boundary surface of pkg/gateway
func (*GatewayRunner) GatewayConfig ¶
func (r *GatewayRunner) GatewayConfig() *gateway.GatewayConfig
Launch profile's gateway config the session key derivation reads
func (*GatewayRunner) GatewayLoop ¶
func (r *GatewayRunner) GatewayLoop() gateway.EventLoop
Event loop the runner serves on, nil until gateway startup binds one and after the runtime resets it
func (*GatewayRunner) GetUnauthorizedDMBehavior ¶
func (r *GatewayRunner) GetUnauthorizedDMBehavior(ctx context.Context, platform gateway.Platform, profile *string) string
Unauthorized DM behavior of the platform for the profile, pair, decline or ignore
func (*GatewayRunner) GoalManagerForEvent ¶
func (r *GatewayRunner) GoalManagerForEvent(ctx context.Context, event *gateway.MessageEvent) (*goals.GoalManager, *gateway.SessionEntry)
Goal manager and session entry of the event's session
func (*GatewayRunner) GoalMaxTurnsFromConfig ¶
func (r *GatewayRunner) GoalMaxTurnsFromConfig(ctx context.Context) int64
Goal turn budget of the user config, the default when unset or invalid
func (*GatewayRunner) HMBusyPreempt ¶
func (r *GatewayRunner) HMBusyPreempt(ctx context.Context, event *gateway.MessageEvent, source *gateway.SessionSource, sessionKey string) (bool, error)
Busy input mode of a producer delivery against the running turn, true when its text landed inside that turn
func (*GatewayRunner) HMPendingReplyIntercepts ¶
func (r *GatewayRunner) HMPendingReplyIntercepts(ctx context.Context, event *gateway.MessageEvent, source *gateway.SessionSource, sessionKey string) (*string, error)
Reply of a pending update prompt, clarify or slash confirm to a producer delivery, nil when none answers
func (*GatewayRunner) HMPreGatewayDispatchHook ¶
func (r *GatewayRunner) HMPreGatewayDispatchHook(ctx context.Context, event *gateway.MessageEvent, source *gateway.SessionSource) *gateway.MessageEvent
Producer path pre gateway dispatch hook, nil to drop the delivery, else the event or its rewrite
func (*GatewayRunner) HandleMessage ¶
func (r *GatewayRunner) HandleMessage(ctx context.Context, event *gateway.MessageEvent) (any, error)
Runs one inbound message through the gateway turn pipeline and returns its reply
func (*GatewayRunner) HandleModelReset ¶
func (r *GatewayRunner) HandleModelReset(ctx context.Context, event *gateway.MessageEvent, sw *gateway.ModelSwitchContext) (*string, error)
Drops the session model override so the next turn runs the channel or config route, the reply returned
func (*GatewayRunner) HasPendingSlashConfirm ¶
func (r *GatewayRunner) HasPendingSlashConfirm(route string) bool
Whether a slash confirm prompt awaits its answer under the session key
func (*GatewayRunner) InboundModelContextLength ¶
func (r *GatewayRunner) InboundModelContextLength(ctx context.Context, source *gateway.SessionSource, sessionKey string) (int, error)
Context window of the turn model, a global pin only for the configured route, custom limits winning
func (*GatewayRunner) InjectWatchNotification ¶
func (r *GatewayRunner) InjectWatchNotification(ctx context.Context, text string, event map[string]any) (*bool, error)
Injects a watch or completion notification as a synthetic event, true on acceptance, false to retry, nil with no route
func (*GatewayRunner) IsSessionRunning ¶
func (r *GatewayRunner) IsSessionRunning(route string) bool
Whether a turn holds the running slot of the session key
func (*GatewayRunner) IsSharedBotSatellite ¶
func (r *GatewayRunner) IsSharedBotSatellite(ctx context.Context, profileName string, platform gateway.Platform) bool
Whether a served profile rides the default bot through a profile route, owning no bot on the platform
func (*GatewayRunner) IsUserAuthorized ¶
func (r *GatewayRunner) IsUserAuthorized(ctx context.Context, source *gateway.SessionSource, allowAdapterDelegation bool) (bool, error)
Whether the sender of the source passes the full gateway authorization chain
func (*GatewayRunner) IsUserAuthorizedForSource ¶
func (r *GatewayRunner) IsUserAuthorizedForSource(ctx context.Context, source *gateway.SessionSource, allowAdapterDelegation bool) (bool, error)
Whether the sender of the source may talk to the agent, adapter delegation honoured when allowed
func (*GatewayRunner) JoinStartupRestore ¶
func (r *GatewayRunner) JoinStartupRestore(ctx context.Context, name string, wait func(ctx context.Context) error)
Holds the startup restore gate open for an adapter recovery task while startup restore runs
func (*GatewayRunner) LegacyAdapterCredentialFingerprint ¶
func (r *GatewayRunner) LegacyAdapterCredentialFingerprint(adapter gateway.PlatformAdapter) *string
Credential fingerprint under the salt an older icebath used, nil when none is discoverable
func (*GatewayRunner) LocalBusySlashCommand ¶
func (r *GatewayRunner) LocalBusySlashCommand(ctx context.Context, event *gateway.MessageEvent, def gateway.RegistryCommand, quickKey string, source *gateway.SessionSource) (any, error)
Mid run dispatch of a recognized command, its variant, its handler or the rejection text
func (*GatewayRunner) LocalCommandHandler ¶
func (r *GatewayRunner) LocalCommandHandler(canonical string) func(ctx context.Context, event *gateway.MessageEvent) (any, error)
Slash handler of a canonical name as the handler table resolves it, nil when the runner has none
func (*GatewayRunner) LocalExecQuickCommand ¶
func (r *GatewayRunner) LocalExecQuickCommand(ctx context.Context, command, shell, cwd string) (string, error)
Runs an exec quick command in a local session's folder with a sanitized env and redacted output
func (*GatewayRunner) LocalPluginCommand ¶
func (r *GatewayRunner) LocalPluginCommand(ctx context.Context, handler plugins.PluginCommandHandler, event *gateway.MessageEvent, source *gateway.SessionSource, entry *gateway.SessionEntry, args string) (any, error)
Runs a plugin command handler under the session env of the source with the argument as typed
func (*GatewayRunner) LocalPromptCommand ¶
func (r *GatewayRunner) LocalPromptCommand(ctx context.Context, canonical string, event *gateway.MessageEvent, source *gateway.SessionSource, quickKey string) (bool, any, error)
Idle path rewrite of a prompt command, false with the rewritten event text when it becomes a turn
func (*GatewayRunner) LocalSlashAccess ¶
func (r *GatewayRunner) LocalSlashAccess(ctx context.Context, source *gateway.SessionSource, canonical string) string
Operator slash access refusal text for the command, empty when allowed
func (*GatewayRunner) MCPReloadRefreshCachedAgents ¶
func (r *GatewayRunner) MCPReloadRefreshCachedAgents(multiplex bool, profile string)
Refreshes cached agents with the reloaded MCP tools, under multiplex only the profile's own sessions
func (*GatewayRunner) MediaDeliveryScopeForSource ¶
func (r *GatewayRunner) MediaDeliveryScopeForSource(ctx context.Context, source *gateway.SessionSource) (context.Context, func(), error)
Home and terminal policy scope the adapter validates a turn's media paths in, unscoped without multiplexing
func (*GatewayRunner) ModelSwitchLock ¶
func (r *GatewayRunner) ModelSwitchLock() *sync.Mutex
Runner wide lock over a model command's read, resolve and commit
func (*GatewayRunner) MultiplexProfiles ¶
func (r *GatewayRunner) MultiplexProfiles() bool
Whether the runner multiplexes every served profile
func (*GatewayRunner) OnGatewayLoop ¶
func (r *GatewayRunner) OnGatewayLoop(ctx context.Context) bool
Whether ctx runs as a task of the runner's gateway loop rather than on a worker thread
func (*GatewayRunner) OwningProfile ¶
func (r *GatewayRunner) OwningProfile(adapter gateway.PlatformAdapter, platform gateway.Platform) (bool, string)
Registered flag and owning secondary profile of a live adapter, empty for the primary
func (*GatewayRunner) ParsePlatform ¶
Enum value gateway.config.Platform accepts for the platform name, a ValueError for any other value given
func (*GatewayRunner) ParseReasoningCommandArgs ¶
func (r *GatewayRunner) ParseReasoningCommandArgs(arg string) (string, bool)
Value and global flag of reasoning command arguments
func (*GatewayRunner) PeekSessionState ¶
func (r *GatewayRunner) PeekSessionState(route string) gateway.PeekedSessionState
State of a route without creating one, nil when absent
func (*GatewayRunner) PerformModelSwitch ¶
func (r *GatewayRunner) PerformModelSwitch(ctx context.Context, sw *gateway.ModelSwitchContext, rawInput, explicitProvider string, source *gateway.SessionSource) (*provider.ModelSwitchResult, string, error)
Resolves a model switch to its result, or a nil result with the error reply text
func (*GatewayRunner) PersistActiveAgents ¶
func (r *GatewayRunner) PersistActiveAgents()
Republishes the in flight count once owner work the session authority counts ends
func (*GatewayRunner) PluginLocalSession ¶
func (r *GatewayRunner) PluginLocalSession(ctx context.Context, source *gateway.SessionSource, sessionKey, pluginHome, pluginID string) (*gateway.LiveSession, error)
Live local session the plugin profile's own authority holds under the key, nil when it holds none
func (*GatewayRunner) PluginMessagingSessionOwned ¶
func (r *GatewayRunner) PluginMessagingSessionOwned(ctx context.Context, sessionKey, pluginHome, pluginID string) bool
Whether a messaging session belongs to the plugin's own profile, true for a caller without a home
func (*GatewayRunner) PrimaryProfileName ¶
func (r *GatewayRunner) PrimaryProfileName() string
Profile that owns the primary adapter map, default under multiplexing
func (*GatewayRunner) ProfileAdapterMap ¶
func (r *GatewayRunner) ProfileAdapterMap(name string) *orderedutil.Map[gateway.Platform, gateway.PlatformAdapter]
Adapter map of a served profile, created on first use
func (*GatewayRunner) ProfileAdapters ¶
func (r *GatewayRunner) ProfileAdapters() *orderedutil.Map[string, *orderedutil.Map[gateway.Platform, gateway.PlatformAdapter]]
Adapter maps of the served secondary profiles by profile name
func (*GatewayRunner) ProfileConfigs ¶
func (r *GatewayRunner) ProfileConfigs() map[string]*gateway.GatewayConfig
Gateway config of every served profile as loaded once at startup
func (*GatewayRunner) ProfileNameForSource ¶
func (r *GatewayRunner) ProfileNameForSource(ctx context.Context, source *gateway.SessionSource, adapterProfile *string) (*string, error)
Profile a configured route sends the source to, nil without a match, a refused route raising ProfileRouteRejected
func (*GatewayRunner) RecordModelSwitch ¶
func (r *GatewayRunner) RecordModelSwitch(ctx context.Context, result *provider.ModelSwitchResult, sw *gateway.ModelSwitchContext, source *gateway.SessionSource, oneTurn, picker bool) string
Persists a committed switch as the session override, the global write warning when one failed
func (*GatewayRunner) RedeliverFailedObligationsForPlatform ¶
func (r *GatewayRunner) RedeliverFailedObligationsForPlatform(ctx context.Context, platform gateway.Platform, profile *string) int
Replays the failed obligations of one bot identity after its adapter reconnected, the count redelivered
func (*GatewayRunner) RefreshAgentCacheMessageCount ¶
func (r *GatewayRunner) RefreshAgentCacheMessageCount(ctx context.Context, route, target string) error
Rebaselines the cached agent of a route after a completion note wrote its rows
func (*GatewayRunner) RefreshFallbackModel ¶
func (r *GatewayRunner) RefreshFallbackModel(ctx context.Context) []map[string]any
Fallback model chain read again from the config, nil when none is configured
func (*GatewayRunner) RehydrateSessionModelOverride ¶
func (r *GatewayRunner) RehydrateSessionModelOverride(ctx context.Context, sessionKey string)
Restores a persisted model override after a restart unless one is already in memory
func (*GatewayRunner) RequestRestart ¶
func (r *GatewayRunner) RequestRestart(detached, viaService bool) bool
Starts the restart orchestration once, refusing new turns while the requesting turn can still deliver
func (*GatewayRunner) ResetSessionOffLoop ¶
func (r *GatewayRunner) ResetSessionOffLoop(ctx context.Context, sessionKey string, sessionID *string, reason, platform string, oldSessionID, newSessionID *string) error
Plugin on_session_reset hooks off the loop under the profile owning the session key, bounded like finalize
func (*GatewayRunner) ResidentAgentFor ¶
func (r *GatewayRunner) ResidentAgentFor(sessionKey string) any
Live running agent of the session key, else its cached one, nil when neither is held
func (*GatewayRunner) ResolvePolicyAgentRuntime ¶
func (r *GatewayRunner) ResolvePolicyAgentRuntime(ctx context.Context, policy *gateway.LocalSessionPolicy, fallback bool) (string, map[string]any, error)
Model and agent kwargs of a policy's route, its fallback chain walked only when asked
func (*GatewayRunner) ResolveProfileHomeForSource ¶
func (r *GatewayRunner) ResolveProfileHomeForSource(ctx context.Context, source *gateway.SessionSource) (string, error)
Runtime home of a routed source with its missing profile fallback
func (*GatewayRunner) ResolveSessionAgentRuntime ¶
func (r *GatewayRunner) ResolveSessionAgentRuntime(ctx context.Context, source *gateway.SessionSource, sessionKey string, userConfig map[string]any, fallback bool) (string, map[string]any, error)
Model and runtime of a session, its model override first, then channel overrides, then the config
func (*GatewayRunner) ResolveSessionReasoningConfig ¶
func (r *GatewayRunner) ResolveSessionReasoningConfig(ctx context.Context, source *gateway.SessionSource, sessionKey, model string) (map[string]any, error)
Reasoning of a session, its override, a local policy level, else the per model or global config
func (*GatewayRunner) ResolveSessionServiceTier ¶
func (r *GatewayRunner) ResolveSessionServiceTier(ctx context.Context, source *gateway.SessionSource, sessionKey string) (*string, error)
Service tier the session's next turn runs, its fast pick else the routed profile's
func (*GatewayRunner) RestoredSource ¶
func (r *GatewayRunner) RestoredSource(ctx context.Context, entry *gateway.SessionEntry) (*gateway.SessionSource, error)
Origin of a routing entry with its identity pinned again from the persisted receiving bot
func (*GatewayRunner) RoutePlaintextApprovalWhileBusy ¶
func (r *GatewayRunner) RoutePlaintextApprovalWhileBusy(ctx context.Context, event *gateway.MessageEvent, sessionKey string) bool
Routes a bare approval word of a producer delivery to the running turn's blocking approval, true when it was one
func (*GatewayRunner) RunPostAdmissionHook ¶
func (r *GatewayRunner) RunPostAdmissionHook(ctx context.Context, event *gateway.MessageEvent, source *gateway.SessionSource, sessionKey string) (bool, *string, error)
Post admission plugin hook of a producer delivery, whether a plugin consumed it and the reply it gave
func (*GatewayRunner) RunnerConfig ¶
func (r *GatewayRunner) RunnerConfig() *gateway.GatewayConfig
Launch profile's gateway config, the runner config attribute
func (*GatewayRunner) Running ¶
func (r *GatewayRunner) Running() bool
Whether the runner is running
func (*GatewayRunner) RunningAgent ¶
func (r *GatewayRunner) RunningAgent(key string) (any, bool)
Agent the running slot of a key holds and whether it is the pending claim sentinel
func (*GatewayRunner) ScheduleFloodRedelivery ¶
func (r *GatewayRunner) ScheduleFloodRedelivery(ctx context.Context, platform gateway.Platform, profile *string)
Wakes or starts the deadline driven ledger worker of one bot identity after a refused final
func (*GatewayRunner) SessionAuthorities ¶
func (r *GatewayRunner) SessionAuthorities() *gateway.SessionAuthorities
Registry of every profile authority the runtime serves, nil before the runtime initializes
func (*GatewayRunner) SessionAuthority ¶
func (r *GatewayRunner) SessionAuthority() *gateway.SessionAuthority
Launch session authority bound by its initialization, nil before it is
func (*GatewayRunner) SessionControlServer ¶
func (r *GatewayRunner) SessionControlServer() *gateway.GatewayControlServer
Private control listener the hosted room transport registers its attest and producer verbs on
func (*GatewayRunner) SessionDB ¶
func (r *GatewayRunner) SessionDB(ctx context.Context) *state.SessionDB
Store wrapped by the session database of the active scope, nil when it is unavailable
func (*GatewayRunner) SessionEnvScope ¶
func (r *GatewayRunner) SessionEnvScope(ctx context.Context, sc *gateway.SessionContext, body func(env *tools.Env) error) error
Runs body with a session's turn variables bound, for owner verbs that act as that session's caller
func (*GatewayRunner) SessionKeyForSource ¶
func (r *GatewayRunner) SessionKeyForSource(ctx context.Context, source *gateway.SessionSource) (string, error)
Current session key of the source, the store derivation first and the configured fallback after
func (*GatewayRunner) SessionModelOverride ¶
func (r *GatewayRunner) SessionModelOverride(sessionKey string) map[string]any
In memory model override of a session, nil when it holds none
func (*GatewayRunner) SessionModelOverrideFor ¶
func (r *GatewayRunner) SessionModelOverrideFor(ctx context.Context, sessionKey string) map[string]any
Session model override of a key after rehydrating a persisted one, a copy the caller may keep
func (*GatewayRunner) SessionRuntimeDescriptor ¶
func (r *GatewayRunner) SessionRuntimeDescriptor() map[string]any
Session runtime descriptor the drain checks read and stamp
func (*GatewayRunner) SessionStore ¶
func (r *GatewayRunner) SessionStore() *gateway.SessionStore
Store routing sessions and their transcripts
func (*GatewayRunner) SessionTicketStore ¶
func (r *GatewayRunner) SessionTicketStore() *gateway.TicketStore
Private bootstrap ticket store of the session runtime, nil before the runtime starts
func (*GatewayRunner) SetRuntimeDescriptorField ¶
func (r *GatewayRunner) SetRuntimeDescriptorField(key string, value any)
Sets one descriptor field, the write a holder outside this package makes through the runner
func (*GatewayRunner) SetSessionAuthority ¶
func (r *GatewayRunner) SetSessionAuthority(a *gateway.SessionAuthority)
Binds the launch session authority
func (*GatewayRunner) SetSessionReasoningOverride ¶
func (r *GatewayRunner) SetSessionReasoningOverride(sessionKey string, reasoningConfig map[string]any)
Sets the session scoped reasoning override, a nil config clearing it
func (*GatewayRunner) SetSessionServiceTierOverride ¶
func (r *GatewayRunner) SetSessionServiceTierOverride(sessionKey string, serviceTier *string, clear bool)
Sets or clears the session scoped fast tier pick for the session controls
func (*GatewayRunner) SetTeamsPipelineRuntime ¶
func (r *GatewayRunner) SetTeamsPipelineRuntime(runtime any)
Records the bound Teams meeting pipeline runtime
func (*GatewayRunner) SetTeamsPipelineRuntimeError ¶
func (r *GatewayRunner) SetTeamsPipelineRuntimeError(message *string)
Records why the Teams meeting pipeline runtime could not be built
func (*GatewayRunner) ShouldExitCleanly ¶
func (r *GatewayRunner) ShouldExitCleanly() bool
Whether the gateway asked to exit cleanly
func (*GatewayRunner) ShouldExitWithFailure ¶
func (r *GatewayRunner) ShouldExitWithFailure() bool
Whether the gateway asked to exit with a failure status
func (*GatewayRunner) SideBackground ¶
func (r *GatewayRunner) SideBackground(ctx context.Context, env *tools.Env, a *gateway.SessionAuthority, policy *gateway.LocalSessionPolicy, live *gateway.LiveSession, taskID, text string, hold func(agent any)) (string, error)
Background prompt run to completion by a fresh agent on the session's frozen route, closed afterwards
func (*GatewayRunner) SideQuestion ¶
func (r *GatewayRunner) SideQuestion(ctx context.Context, a *gateway.SessionAuthority, ref gateway.SessionRef, policy *gateway.LocalSessionPolicy, text string, parent any, history []map[string]any, onFork func(fork any), shouldStop func() bool) (string, error)
Side question answered over the history snapshot on the session's frozen route
func (*GatewayRunner) Start ¶
func (r *GatewayRunner) Start(ctx context.Context) (bool, error)
Starts the gateway and every configured platform adapter, flushing the runtime status on every path
func (*GatewayRunner) Stop ¶
func (r *GatewayRunner) Stop(ctx context.Context, restart, detachedRestart, serviceRestart bool) error
Stops the gateway and disconnects every adapter, a second call waiting on the first
func (*GatewayRunner) StopRequestedBySignal ¶
func (r *GatewayRunner) StopRequestedBySignal() bool
Whether a signal handler started this stop, read by adapters that tell shutdown exits from crashes
func (*GatewayRunner) StoreVoiceMode ¶
func (r *GatewayRunner) StoreVoiceMode(source *gateway.SessionSource, mode string)
Stores the voice mode of the chat a source arrived on
func (*GatewayRunner) SystemPromptForChannel ¶
func (r *GatewayRunner) SystemPromptForChannel(ctx context.Context, platform gateway.Platform, chatID string, threadID, parentID *string) string
Gateway prompt of a channel, the agent prompt, the personality and the channel override combined
func (*GatewayRunner) TeamsPipelineRuntime ¶
func (r *GatewayRunner) TeamsPipelineRuntime() any
Teams meeting pipeline runtime bound to the Graph webhook ingress, nil before binding
func (*GatewayRunner) ThreadMetadataForSource ¶
func (r *GatewayRunner) ThreadMetadataForSource(source *gateway.SessionSource, replyToMessageID *string) map[string]any
Metadata platforms need for a thread aware reply to the source, nil without thread or route state
func (*GatewayRunner) TransportOwner ¶
func (r *GatewayRunner) TransportOwner(source *gateway.SessionSource) (gateway.PlatformAdapter, string, bool)
Adapter that created source and its profile name, empty for the primary profile
func (*GatewayRunner) UpdatePromptPending ¶
func (r *GatewayRunner) UpdatePromptPending(route string) bool
Whether an /update prompt awaits its reply under the session key, read without building the session state
func (*GatewayRunner) VoiceModeFor ¶
func (r *GatewayRunner) VoiceModeFor(source *gateway.SessionSource) string
Voice mode of the chat a source arrived on, off when none was stored
func (*GatewayRunner) WaitForShutdown ¶
func (r *GatewayRunner) WaitForShutdown(ctx context.Context) error
Blocks until the shutdown event is set, the context's error when ctx ends first
type HookRegistry ¶
type HookRegistry struct {
// contains filtered or unexported fields
}
Discovers, loads and fires the event hooks of one home
func (*HookRegistry) LoadedHooks ¶
func (h *HookRegistry) LoadedHooks() []map[string]any
Metadata of every loaded hook
type MigrationPlan ¶
type MigrationPlan struct {
DefaultHome string
Profiles []*ProfileGateway
MultiplexFlagOn bool
LiveServed []string
LiveServedRecorded bool
Manifest *jsonutil.Object
Interrupted bool
Blockers []string
Notices []string
StandaloneByConfig []string
}
Profiles, their gateway footprints, the flag, the live served record and the preflight verdicts
func BuildMigrationPlan ¶
func BuildMigrationPlan(ctx context.Context) (*MigrationPlan, error)
Profiles and their own gateway footprints with every preflight check run against them
func (*MigrationPlan) AlreadyMultiplexed ¶
func (m *MigrationPlan) AlreadyMultiplexed() bool
Converged by topology, no secondary owning a gateway and the flag on or several profiles served
func (*MigrationPlan) Blocked ¶
func (m *MigrationPlan) Blocked() bool
func (*MigrationPlan) Default ¶
func (m *MigrationPlan) Default() *ProfileGateway
Default profile footprint, nil when the inventory has none
func (*MigrationPlan) ExpectedServedNames ¶
func (m *MigrationPlan) ExpectedServedNames() map[string]bool
Default plus every profile that is not parked
func (*MigrationPlan) Secondaries ¶
func (m *MigrationPlan) Secondaries() []*ProfileGateway
func (*MigrationPlan) StandaloneSecondaries ¶
func (m *MigrationPlan) StandaloneSecondaries() []*ProfileGateway
func (*MigrationPlan) TargetRunAsUser ¶
func (m *MigrationPlan) TargetRunAsUser() string
System unit User the default unit keeps, its own else the first a secondary recorded
func (*MigrationPlan) TargetServiceKind ¶
func (m *MigrationPlan) TargetServiceKind() *ServiceUnit
Service manager the default ends up on, its own else the first one a secondary used
type MultiplexConfigError ¶
type MultiplexConfigError struct {
// contains filtered or unexported fields
}
Invalid profile multiplexer config the operator must fix, propagated to the startup guard instead of retried
func (*MultiplexConfigError) Error ¶
func (e *MultiplexConfigError) Error() string
type PersistentState ¶
type PersistentState struct {
// contains filtered or unexported fields
}
State with its own lifecycle that turn and boundary resets leave in place
type ProfileGateway ¶
type ProfileGateway struct {
Name string
Home string
PID int
Services []ServiceUnit
RunAsUser string
UID *int
RuntimeHome string
}
One profile's own gateway footprint, live pid and every installed service unit
func (*ProfileGateway) HasGateway ¶
func (p *ProfileGateway) HasGateway() bool
func (*ProfileGateway) HasSystemUnit ¶
func (p *ProfileGateway) HasSystemUnit() bool
func (*ProfileGateway) IsDefault ¶
func (p *ProfileGateway) IsDefault() bool
func (*ProfileGateway) Service ¶
func (p *ProfileGateway) Service() *ServiceUnit
Unit the default gateway is restarted through, nil when nothing is installed
func (*ProfileGateway) ServiceLabel ¶
func (p *ProfileGateway) ServiceLabel() string
Every installed unit joined with a plus, none when nothing is installed
func (*ProfileGateway) ToDict ¶
func (p *ProfileGateway) ToDict() *jsonutil.Object
Manifest record of the footprint with None for every unknown field
type ProfileGatewayConfig ¶
type ProfileGatewayConfig struct {
Name string
Cfg *gateway.GatewayConfig
}
Profile name and its gateway config read the way the multiplexer reads it
type ProfileHookRegistries ¶
type ProfileHookRegistries struct {
// contains filtered or unexported fields
}
Hook registry per served profile home, picked at emit time from the active home
func NewProfileHookRegistries ¶
func NewProfileHookRegistries() *ProfileHookRegistries
Registries with no home loaded yet
func (*ProfileHookRegistries) LoadedHooks ¶
Metadata of every hook loaded for the active home
type ProfileOwnershipRetained ¶
type ProfileOwnershipRetained struct{ Msg string }
A retired attempt's writer is still live, so the profile keeps its reservation and authority
func (*ProfileOwnershipRetained) Error ¶
func (e *ProfileOwnershipRetained) Error() string
func (*ProfileOwnershipRetained) ErrorKind ¶
func (e *ProfileOwnershipRetained) ErrorKind() string
Python exception class of the retained ownership refusal
type ServiceUnit ¶
Service manager kind and scope of one installed gateway unit
type SessionFieldView ¶
type SessionFieldView[T any] struct { // contains filtered or unexported fields }
Live dict shaped view of one SessionState field across the sessions of a runner
func (SessionFieldView[T]) Clear ¶
func (v SessionFieldView[T]) Clear()
Resets the field on every session
func (SessionFieldView[T]) Contains ¶
func (v SessionFieldView[T]) Contains(key string) bool
Whether the field of key is present
func (SessionFieldView[T]) Delete ¶
func (v SessionFieldView[T]) Delete(key string) bool
Resets the field of key to its default in one hold of the lock, false when it was not present
func (SessionFieldView[T]) Get ¶
func (v SessionFieldView[T]) Get(key string) (T, bool)
Field value of key and whether it is present
func (SessionFieldView[T]) Items ¶
func (v SessionFieldView[T]) Items() map[string]T
Present fields as a plain map, each value read with its presence under one hold
func (SessionFieldView[T]) Keys ¶
func (v SessionFieldView[T]) Keys() []string
Session keys whose field is present, in session map order of a snapshot
func (SessionFieldView[T]) Len ¶
func (v SessionFieldView[T]) Len() int
Count of sessions whose field is present
func (SessionFieldView[T]) Replace ¶
func (v SessionFieldView[T]) Replace(mapping map[string]T)
Assigns the view from a plain map, clearing every session first
func (SessionFieldView[T]) Set ¶
func (v SessionFieldView[T]) Set(key string, value T)
Stores value on the session state of key under its lock, creating that state when absent
func (SessionFieldView[T]) String ¶
func (v SessionFieldView[T]) String() string
Debug text naming the viewed scope field with its present entries
type SessionSocket ¶
type SessionSocket interface {
SendText(ctx context.Context, text string) error
Close(code int) error
Accept(ctx context.Context, subprotocol *string) error
ReceiveText(ctx context.Context) (string, error)
Peer() (host string, port int, known bool)
RawConn() net.Conn
SessionAuthority() *gateway.SessionAuthority
}
Socket of one admitted session as the session handler drives it
type SessionSocketClosed ¶
Peer close a session socket read reports, with its close code and reason
func (*SessionSocketClosed) Error ¶
func (e *SessionSocketClosed) Error() string
type SessionState ¶
type SessionState struct {
// contains filtered or unexported fields
}
All per session gateway state grouped by lifecycle scope, every scope field read and written under mu
func (*SessionState) ReasoningOverride ¶
func (s *SessionState) ReasoningOverride() map[string]any
Reasoning override of the state as session info reads it, read under the state lock
func (*SessionState) ServiceTierOverride ¶
func (s *SessionState) ServiceTierOverride() (*string, bool)
The /fast override of the state and whether one is set, read together under the state lock
type SessionTurnLeaseRegistry ¶
type SessionTurnLeaseRegistry struct {
// contains filtered or unexported fields
}
Lease per resolved session id serializing the load history, run and flush region
func NewSessionTurnLeaseRegistry ¶
func NewSessionTurnLeaseRegistry(maxEntries int) *SessionTurnLeaseRegistry
Registry capped at maxEntries leases, never fewer than one
func (*SessionTurnLeaseRegistry) Acquire ¶
func (r *SessionTurnLeaseRegistry) Acquire(ctx context.Context, sessionID, ownerKey string, generation int, timeout *float64) (*TurnLeaseToken, error)
Acquires the lease of sessionID waiting while held, nil for an empty id, a timeout error when the budget expires
func (*SessionTurnLeaseRegistry) Rebind ¶
func (r *SessionTurnLeaseRegistry) Rebind(token *TurnLeaseToken, newSessionID string) bool
Aliases a held lease onto a rotated session id, false for a non holder or a live target
func (*SessionTurnLeaseRegistry) Release ¶
func (r *SessionTurnLeaseRegistry) Release(token *TurnLeaseToken) bool
Releases the lease of token, true only when this exact token was the current holder
type SlashCommandReply ¶
Canonical reply of a shared slash executor, its text and structured data
type StartGatewayOptions ¶
type StartGatewayOptions struct {
Config *gateway.GatewayConfig
Replace bool
Force bool
Verbosity *int
IdleExit bool
}
Arguments of start_gateway, a nil config loading the runner config and a nil verbosity meaning quiet
type TurnContext ¶
type TurnContext struct {
// contains filtered or unexported fields
}
Per turn context shared between the agent run and its TurnRunner, the message the one rebindable field
type TurnLeaseTimeoutError ¶
type TurnLeaseTimeoutError struct {
SessionID string
OwnerKey string
Generation int
WaitSeconds float64
}
Lease held for the whole wait budget, so the caller must not enter the turn region
func (*TurnLeaseTimeoutError) Error ¶
func (e *TurnLeaseTimeoutError) Error() string
Message naming the session, routing key, generation and the rounded wait
type TurnLeaseToken ¶
type TurnLeaseToken struct {
// contains filtered or unexported fields
}
Held lease handle whose released flag makes release idempotent
func (*TurnLeaseToken) String ¶
func (t *TurnLeaseToken) String() string
Debug text of the handle with its session, routing key, generation and released flag
type TurnLeaseTokenView ¶
type TurnLeaseTokenView struct {
// contains filtered or unexported fields
}
Legacy view of held turn lease tokens keyed by session key and generation
func (TurnLeaseTokenView) Contains ¶
func (v TurnLeaseTokenView) Contains(key leaseTokenKey) bool
Whether a token is held for key
func (TurnLeaseTokenView) Delete ¶
func (v TurnLeaseTokenView) Delete(key leaseTokenKey) bool
Drops the token of key in one hold of the state lock, false when none was held
func (TurnLeaseTokenView) Get ¶
func (v TurnLeaseTokenView) Get(key leaseTokenKey) (*TurnLeaseToken, bool)
Token held for key and whether one is held, both read under one hold of the state lock
func (TurnLeaseTokenView) Items ¶
func (v TurnLeaseTokenView) Items() map[leaseTokenKey]*TurnLeaseToken
Held tokens as a plain map keyed by session and generation, each session read under its own lock
func (TurnLeaseTokenView) Keys ¶
func (v TurnLeaseTokenView) Keys() []leaseTokenKey
Every held session key and generation pair
func (TurnLeaseTokenView) Replace ¶
func (v TurnLeaseTokenView) Replace(mapping map[leaseTokenKey]*TurnLeaseToken)
Assigns the view from a plain map, clearing every held token first
func (TurnLeaseTokenView) Set ¶
func (v TurnLeaseTokenView) Set(key leaseTokenKey, token *TurnLeaseToken)
Records token for key on the session state under its lock, creating that state when absent
type TurnRunner ¶
type TurnRunner struct {
// contains filtered or unexported fields
}
Per turn collaborator carrying the progress, status, approval and clarify callbacks of one agent run
type TurnState ¶
type TurnState struct {
// contains filtered or unexported fields
}
State scoped to one running gateway turn, lease tokens owned by the turn lease release
type UnauthorizedOwnerNotifier ¶
type UnauthorizedOwnerNotifier struct {
// contains filtered or unexported fields
}
Remembers which unrecognized senders the owner was already told about, bounded and least recent first
func NewUnauthorizedOwnerNotifier ¶
func NewUnauthorizedOwnerNotifier(maxSeen int) *UnauthorizedOwnerNotifier
Notifier remembering at most maxSeen senders, at least one
func (*UnauthorizedOwnerNotifier) FirstTime ¶
func (n *UnauthorizedOwnerNotifier) FirstTime(platformName, userID string) bool
True on the first drop of a platform user, evicting the oldest remembered sender past the bound
func (*UnauthorizedOwnerNotifier) Notify ¶
func (n *UnauthorizedOwnerNotifier) Notify(ctx context.Context, runner *GatewayRunner, source *gateway.SessionSource, hint string) error
Posts the hint to the home channel of the source platform unless that channel is the sender's DM
Source Files
¶
- api_server_runner.go
- asyncio_task.go
- authz_mixin.go
- authz_mixin_adapters.go
- authz_mixin_pairing_store.go
- authz_mixin_transport.go
- browser_link.go
- comment_agent.go
- cron_hooks.go
- cron_link.go
- cron_store_notices.go
- executor_future.go
- gateway_migrate_apply.go
- gateway_migrate_cmd.go
- gateway_migrate_credentials.go
- gateway_migrate_guards.go
- gateway_migrate_plan.go
- gateway_migrate_uid_unix.go
- gateway_multiplex_mode_resolve.go
- hooks.go
- kanban_hooks.go
- kanban_watchers.go
- kanban_watchers_common.go
- kanban_watchers_dispatcher.go
- kanban_watchers_notifier.go
- local_viewer_connections.go
- local_viewer_events.go
- log.go
- platform_notice_label.go
- plugin_command_choice.go
- plugin_keyless_inject.go
- run_active_work_verb.go
- run_adapters.go
- run_adapters_claim_owners.go
- run_adapters_claims.go
- run_adapters_create.go
- run_adapters_fatal.go
- run_adapters_handoff.go
- run_adapters_reconnect_state.go
- run_adapters_recovery_reconnect.go
- run_adapters_secondary.go
- run_adapters_supervise.go
- run_adapters_wire.go
- run_agent_cache.go
- run_agent_cache_evict.go
- run_agent_cache_release.go
- run_agent_cache_state.go
- run_agent_cache_turn.go
- run_api.go
- run_api_handle.go
- run_api_socket.go
- run_background_task.go
- run_bootstrap.go
- run_bootstrap_control.go
- run_bootstrap_interrupt.go
- run_bootstrap_logging.go
- run_bootstrap_signals_unix.go
- run_bootstrap_start.go
- run_busy.go
- run_busy_active_session_slot.go
- run_busy_chat_runs.go
- run_busy_command_turn.go
- run_busy_commands.go
- run_busy_destructive.go
- run_busy_dispatch.go
- run_busy_handler.go
- run_busy_overflow_queue.go
- run_busy_queue.go
- run_busy_steer.go
- run_busy_wiring.go
- run_class_accessors.go
- run_class_cached_agent.go
- run_class_core.go
- run_class_init.go
- run_class_sources.go
- run_class_status.go
- run_class_teams.go
- run_command_mentions.go
- run_config_loaders.go
- run_config_runner.go
- run_connect_timeouts.go
- run_cron_homes.go
- run_cron_homes_gate.go
- run_delivery_queue_watch.go
- run_event_media.go
- run_executor.go
- run_goals.go
- run_goals_heartbeat.go
- run_handoff_scopes.go
- run_handoff_watch_resolve.go
- run_health_export.go
- run_heartbeat_acceptance.go
- run_heartbeat_restore.go
- run_history_replay.go
- run_home_writers.go
- run_host_gateway.go
- run_hosted_service_access.go
- run_housekeeping.go
- run_housekeeping_disk_media.go
- run_housekeeping_disk_notice.go
- run_housekeeping_disk_prompt.go
- run_housekeeping_hooks.go
- run_hygiene.go
- run_idle_exit.go
- run_idle_exit_export.go
- run_idle_exit_kanban.go
- run_idle_gates.go
- run_inbound.go
- run_inbound_admit.go
- run_inbound_authority_admission.go
- run_inbound_busy.go
- run_inbound_commands.go
- run_inbound_consumer.go
- run_inbound_estop.go
- run_inbound_handle.go
- run_inbound_hooks.go
- run_inbound_hooks_commands.go
- run_inbound_hooks_producer.go
- run_inbound_intercepts.go
- run_inbound_media.go
- run_inbound_one_turn_restore.go
- run_inbound_pairing.go
- run_inbound_prepare.go
- run_inbound_session_slots.go
- run_inbound_skill_rewrite.go
- run_inbound_text.go
- run_inbound_transcription.go
- run_inbound_unauthorized.go
- run_inbound_wiring.go
- run_loop_exception.go
- run_main.go
- run_main_args.go
- run_model_context.go
- run_module_import.go
- run_notifications.go
- run_notifications_async.go
- run_notifications_batch.go
- run_notifications_batch_cancel.go
- run_notifications_completion.go
- run_notifications_drain.go
- run_notifications_home.go
- run_notifications_inject.go
- run_notifications_ownership.go
- run_notifications_routes.go
- run_notifications_runner_ifaces.go
- run_notifications_update.go
- run_notifications_watcher.go
- run_plugin_injection.go
- run_plugin_injection_dispatch.go
- run_plugin_injection_schedule.go
- run_plugin_rewire.go
- run_plugin_rewire_reload.go
- run_probe_audio_duration.go
- run_process_exit.go
- run_process_exit_export.go
- run_process_notice.go
- run_profile_reconcile.go
- run_profile_reconcile_claims.go
- run_profile_reconcile_served.go
- run_profile_reconcile_verbs.go
- run_profile_reconcile_watch.go
- run_reap_turn_processes.go
- run_reconnect.go
- run_response_sanitize.go
- run_runtime.go
- run_runtime_agent_kwargs.go
- run_runtime_descriptor.go
- run_runtime_drain.go
- run_runtime_init.go
- run_runtime_init_descriptor.go
- run_runtime_ready.go
- run_runtime_recover.go
- run_runtime_registry.go
- run_runtime_serve.go
- run_runtime_settle.go
- run_runtime_ticket_store.go
- run_session_db.go
- run_session_env.go
- run_session_env_scope.go
- run_session_env_scope_export.go
- run_session_state.go
- run_shutdown.go
- run_shutdown_active_work.go
- run_shutdown_agents.go
- run_shutdown_cleanup.go
- run_shutdown_describe_active_work.go
- run_shutdown_drain.go
- run_shutdown_log.go
- run_shutdown_notices.go
- run_shutdown_restart.go
- run_shutdown_runtime_status.go
- run_shutdown_send_result.go
- run_shutdown_stop.go
- run_startup_access.go
- run_startup_checkpoints.go
- run_startup_connect.go
- run_startup_faulthandler.go
- run_startup_faulthandler_unix.go
- run_startup_guards.go
- run_startup_handoff.go
- run_startup_obligations.go
- run_startup_process_handoff.go
- run_startup_restore.go
- run_startup_resume.go
- run_startup_sequence.go
- run_startup_serving_state.go
- run_startup_stop_guards.go
- run_startup_unclean.go
- run_startup_warmup.go
- run_status_message.go
- run_store_hold.go
- run_thread_metadata.go
- run_topics_discord_lane.go
- run_topics_lane.go
- run_topics_lobby.go
- run_topics_new_header.go
- run_topics_recover.go
- run_topics_slash.go
- run_topics_title_rename.go
- run_topics_transfer.go
- run_turn.go
- run_turn_agent.go
- run_turn_agent_options.go
- run_turn_display.go
- run_turn_drain.go
- run_turn_events.go
- run_turn_finish.go
- run_turn_finish_tts.go
- run_turn_followup.go
- run_turn_handle.go
- run_turn_hygiene.go
- run_turn_mcp_reload.go
- run_turn_media_scope.go
- run_turn_persistence.go
- run_turn_prepare.go
- run_turn_prepare_config.go
- run_turn_prepare_lease.go
- run_turn_prepare_notes.go
- run_turn_prepare_runtime.go
- run_turn_prepare_runtime_export.go
- run_turn_prepare_session.go
- run_turn_prepare_skills.go
- run_turn_prepare_timestamp.go
- run_turn_prepare_turn.go
- run_turn_progress.go
- run_turn_progress_callbacks.go
- run_turn_progress_cards.go
- run_turn_progress_status.go
- run_turn_proxy.go
- run_turn_runner.go
- run_turn_runner_approval.go
- run_turn_runner_approval_settle.go
- run_turn_runner_callbacks.go
- run_turn_runner_clarify.go
- run_turn_runner_clarify_delivery.go
- run_turn_runner_export.go
- run_turn_runner_finish.go
- run_turn_runner_run.go
- run_turn_runner_stream.go
- run_turn_runner_sync.go
- run_turn_runner_wire.go
- run_turn_scope.go
- run_turn_scope_async.go
- run_turn_session_info.go
- run_turn_stream_config.go
- run_turn_worker.go
- run_turn_workers.go
- run_unavailable_skill.go
- run_user_boundary.go
- run_voice_channel.go
- run_voice_guild_id.go
- run_voice_input.go
- run_voice_load.go
- run_voice_reply.go
- run_voice_state.go
- run_watch_events.go
- run_watchers.go
- run_watchers_stall.go
- run_write_runtime_status.go
- runner.go
- runner_contract_delivery.go
- runner_contract_ingress.go
- runner_contract_live_turn.go
- runner_contract_model.go
- runner_state_adapters.go
- runner_state_core.go
- runner_state_inbound.go
- runner_state_reconcile.go
- runner_state_runtime.go
- runner_state_slash.go
- runner_state_startup.go
- runner_state_turn.go
- runtime_downgrade_exit.go
- session_api_turn_runtime.go
- session_cli_turn_route.go
- session_cold_review.go
- session_commands_runner_export.go
- session_controls_runner_export.go
- session_execution.go
- session_local_inventory.go
- session_policy_refused.go
- session_refine.go
- session_secret_prompt.go
- session_state.go
- session_sudo_prompt.go
- session_tui_side_runner.go
- session_turn_scope.go
- session_usage_publish.go
- session_vault_prompt.go
- slash_commands.go
- slash_commands_agent_lookup.go
- slash_commands_approval.go
- slash_commands_background.go
- slash_commands_branch_thread.go
- slash_commands_control.go
- slash_commands_goals.go
- slash_commands_goals_review.go
- slash_commands_helpers.go
- slash_commands_kanban.go
- slash_commands_maintenance.go
- slash_commands_model_command.go
- slash_commands_model_personality.go
- slash_commands_model_reasoning.go
- slash_commands_model_switch.go
- slash_commands_session.go
- slash_commands_session_branch.go
- slash_commands_session_compress.go
- slash_commands_session_guards.go
- slash_commands_session_reset.go
- slash_commands_session_resume.go
- slash_commands_session_retry.go
- slash_commands_session_save.go
- slash_commands_session_topic.go
- slash_commands_session_undo.go
- slash_commands_settings.go
- slash_commands_shared.go
- slash_commands_status.go
- slash_commands_status_usage.go
- slash_commands_update_spawn.go
- slash_commands_voice.go
- slash_commands_workspace.go
- status_phrases.go
- thread_pool_executor.go
- transcription_media.go
- turn_context.go
- turn_executor.go
- turn_lease.go
- turn_thread_reset.go