core

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decision

type Decision string

Decision is the normalized permission decision.

const (
	DecisionAllow Decision = "allow"
	DecisionDeny  Decision = "deny"
	DecisionAsk   Decision = "ask"
)

type EventID

type EventID string

EventID uniquely identifies a persisted event record.

type EventMeta

type EventMeta struct {
	EventID   EventID
	SessionID SessionID
	TaskID    TaskID
	TraceID   TraceID
}

EventMeta carries cross-module event identity metadata.

type RiskLevel

type RiskLevel string

RiskLevel classifies operation risk for policy and audit.

const (
	RiskLow    RiskLevel = "low"
	RiskMedium RiskLevel = "medium"
	RiskHigh   RiskLevel = "high"
)

type Role

type Role string

Role normalizes message authorship across provider/session/tool boundaries.

const (
	RoleSystem    Role = "system"
	RoleUser      Role = "user"
	RoleAssistant Role = "assistant"
	RoleTool      Role = "tool"
)

type SemanticError

type SemanticError interface {
	error
	Code() string
	Retryable() bool
}

SemanticError is the minimal, testable cross-module error contract.

type SessionID

type SessionID string

SessionID identifies a persisted conversation session.

type SessionMode

type SessionMode string

SessionMode is the normalized interaction mode at session scope.

const (
	SessionModeBuild SessionMode = "build"
	SessionModePlan  SessionMode = "plan"

	// Legacy mode labels are treated as build mode for backward compatibility.
	SessionModeDefault           SessionMode = SessionModeBuild
	SessionModeAcceptEdits       SessionMode = SessionModeBuild
	SessionModeBypassPermissions SessionMode = SessionModeBuild
)

type TaskID

type TaskID string

TaskID identifies an asynchronous runtime task or sub-agent run.

type TaskStatus

type TaskStatus string

TaskStatus is the normalized runtime task status.

const (
	TaskPending   TaskStatus = "pending"
	TaskRunning   TaskStatus = "running"
	TaskCompleted TaskStatus = "completed"
	TaskFailed    TaskStatus = "failed"
	TaskKilled    TaskStatus = "killed"
)

type TraceID

type TraceID string

TraceID links events across modules for a single request flow.

Jump to

Keyboard shortcuts

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