runtimecore

package
v0.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateEvaluateHook

func ValidateEvaluateHook(event hook.Event) error

func ValidateIngestEvent

func ValidateIngestEvent(event hook.Event) error

Types

type Core

type Core struct {
	// contains filtered or unexported fields
}

func New

func New(runtime HookRuntime) (*Core, error)

func (*Core) CloseSession

func (c *Core) CloseSession(ctx context.Context, sessionID string) error

func (*Core) EnsureSessionForEvent

func (c *Core) EnsureSessionForEvent(ctx context.Context, event hook.Event) (hook.Event, error)

func (*Core) EvaluateHook

func (c *Core) EvaluateHook(ctx context.Context, event hook.Event) (hook.Result, error)

func (*Core) IngestEvent

func (c *Core) IngestEvent(ctx context.Context, event hook.Event) (hook.Result, error)

func (*Core) OpenSession

func (c *Core) OpenSession(ctx context.Context, session Session) (Session, error)

func (*Core) ProcessHook

func (c *Core) ProcessHook(ctx context.Context, event hook.Event) (hook.Result, error)

type HookRuntime

type HookRuntime interface {
	EvaluateHook(context.Context, hook.Event) (hook.Result, error)
	IngestEvent(context.Context, hook.Event) (hook.Result, error)
}

type Session

type Session struct {
	ID         string
	Agent      string
	CWD        string
	Source     SessionSource
	ExternalID string
}

type SessionRuntime

type SessionRuntime interface {
	OpenSession(context.Context, Session) (Session, error)
	CloseSession(context.Context, string) error
	EnsureSessionForEvent(context.Context, hook.Event) (hook.Event, error)
}

type SessionSource

type SessionSource string
const (
	SessionSourceWrapperOwned   SessionSource = "wrapper_owned"
	SessionSourceDaemonObserved SessionSource = "daemon_observed"
)

Jump to

Keyboard shortcuts

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