runtimekind

package
v0.20.0 Latest Latest
Warning

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

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

Documentation

Overview

Package runtimekind is the single owner of the session runtime vocabulary and of the capability table that says what each runtime kind supports.

"Which runtime executes this session" is a cross-cutting concern: SQL constraints, message normalization, schedules, channel commands, discuss, forks, deletion, permissions, backups, and recovery all branch on it. Consumers share this table instead of copying the vocabulary and rules.

This is deliberately a leaf package (stdlib-only) so that packages which cannot import the session domain (chat/message, schedule) still share the vocabulary instead of copying it.

Index

Constants

View Source
const (
	ModeChat     = "chat"
	ModeDiscuss  = "discuss"
	ModeSchedule = "schedule"
	ModeSubagent = "subagent"
)

Session modes a runtime can host. The string values are the session_mode column vocabulary owned by chat/thread; the cross-package pin test keeps them equal.

Variables

This section is empty.

Functions

func IsDirect

func IsDirect(raw string) bool

IsDirect reports a direct external agent runtime (codex, claude-code).

func IsExternal

func IsExternal(raw string) bool

IsExternal reports any runtime dispatched through the external.Driver port (the ACP pool and the direct runtimes).

func RequiresWorkspaceExec

func RequiresWorkspaceExec(raw string) bool

RequiresWorkspaceExec reports a runtime whose sessions demand the workspace_exec permission from their runtime owner and driving actor.

func ResolvesOwnModel

func ResolvesOwnModel(raw string) bool

ResolvesOwnModel reports a runtime whose model selection lives inside the agent rather than in Memoh model rows.

func SupportedSessionModes

func SupportedSessionModes(raw string) []string

SupportedSessionModes lists the modes accepted by a runtime kind.

func SupportsSessionMode

func SupportsSessionMode(raw, mode string) bool

SupportsSessionMode reports whether the runtime can host the session mode.

func UsesDecisionWaiter

func UsesDecisionWaiter(raw string) bool

UsesDecisionWaiter reports a runtime whose decisions are consumed by an in-process waiter instead of a native-loop re-entry.

func Valid

func Valid(raw string) bool

Valid reports whether raw names a known runtime kind.

Types

type Kind

type Kind string

Kind names one session runtime: the engine that executes a session's turns.

const (
	// Model is the built-in native model runtime (Twilight AI loop).
	Model Kind = "model"
	// ACPAgent is the ACP pool serving user-supplied custom agents.
	ACPAgent Kind = "acp_agent"
	// Codex is the direct codex external agent runtime.
	Codex Kind = "codex"
	// ClaudeCode is the direct Claude Code external agent runtime.
	ClaudeCode Kind = "claude-code"
)

func Normalize

func Normalize(raw string) (Kind, bool)

Normalize maps a raw runtime type string onto its Kind. It trims space and rejects unknown vocabulary; the empty string is unknown (legacy-row derivation is the session domain's job, not vocabulary's).

Jump to

Keyboard shortcuts

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