controlplane

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttentionListFilter added in v0.5.0

type AttentionListFilter struct {
	Status    contract.AttentionStatus
	Action    contract.AttentionAction
	SessionID string
	Limit     int
}

type AttentionQueue added in v0.5.0

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

func NewAttentionQueue added in v0.5.0

func NewAttentionQueue() *AttentionQueue

func (*AttentionQueue) Enqueue added in v0.5.0

func (*AttentionQueue) Get added in v0.5.0

func (*AttentionQueue) List added in v0.5.0

func (*AttentionQueue) Update added in v0.5.0

type AttentionUpdate added in v0.5.0

type AttentionUpdate struct {
	Status   contract.AttentionStatus
	Metadata map[string]any
	Result   map[string]any
	Error    string
}

type EventBus

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

func NewEventBus

func NewEventBus() *EventBus

func (*EventBus) Publish

func (b *EventBus) Publish(event contract.RuntimeEvent)

func (*EventBus) Subscribe

func (b *EventBus) Subscribe(buffer int) (<-chan contract.RuntimeEvent, func())

type EventLogger added in v0.4.7

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

func NewEventLogger added in v0.4.7

func NewEventLogger(path string) (*EventLogger, error)

func NewEventLoggerFromEnv added in v0.4.7

func NewEventLoggerFromEnv() (*EventLogger, error)

func (*EventLogger) Write added in v0.4.7

func (l *EventLogger) Write(event contract.RuntimeEvent) error

type RPCServer

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

func NewRPCServer

func NewRPCServer(service *Service) *RPCServer

func (*RPCServer) ServeUnix

func (s *RPCServer) ServeUnix(ctx context.Context, socketPath string) error

type Service

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

func NewService

func NewService(providers ...api.Provider) *Service

func (*Service) CallInteraction added in v0.5.0

func (s *Service) CallInteraction(ctx context.Context, nativeMethod string, params map[string]any) (json.RawMessage, error)

func (*Service) CancelTTS added in v0.5.0

func (s *Service) CancelTTS(ctx context.Context, params map[string]any) (map[string]any, error)

func (*Service) ClickScreen added in v0.5.0

func (s *Service) ClickScreen(ctx context.Context, params map[string]any) (map[string]any, error)

func (*Service) Describe

func (s *Service) Describe() contract.SystemDescriptor

func (*Service) EnqueueAttention added in v0.5.0

func (s *Service) EnqueueAttention(item contract.AttentionItem) contract.AttentionItem

func (*Service) EnqueueInsert added in v0.5.0

func (s *Service) EnqueueInsert(ctx context.Context, params map[string]any) (map[string]any, error)

func (*Service) EnqueueTTS added in v0.5.0

func (s *Service) EnqueueTTS(ctx context.Context, params map[string]any) (map[string]any, error)

func (*Service) ForkThread added in v0.5.0

func (s *Service) ForkThread(ctx context.Context, threadID string, name string, metadata contract.ThreadMetadata) (*contract.TrackedThread, error)

func (*Service) GetThread added in v0.5.0

func (s *Service) GetThread(ctx context.Context, threadID string, providerSessionID string) (*contract.TrackedThread, error)

func (*Service) GetTrackedSession added in v0.5.0

func (s *Service) GetTrackedSession(
	ctx context.Context,
	sessionID string,
	providerSessionID string,
) (*contract.TrackedSession, error)

func (*Service) InteractionCall added in v0.5.0

func (s *Service) InteractionCall(ctx context.Context, nativeMethod string, params any) (json.RawMessage, error)

func (*Service) Interrupt

func (s *Service) Interrupt(
	ctx context.Context,
	sessionID string,
) (*contract.RuntimeEvent, error)

func (*Service) ListAttention added in v0.5.0

func (s *Service) ListAttention(filter AttentionListFilter) []contract.AttentionItem

func (*Service) ListInsertTargets added in v0.5.0

func (s *Service) ListInsertTargets(ctx context.Context, params map[string]any) (map[string]any, error)

func (*Service) ListSessions

func (s *Service) ListSessions(
	ctx context.Context,
	runtime string,
) ([]contract.RuntimeSession, error)

func (*Service) ListThreadEvents added in v0.5.0

func (s *Service) ListThreadEvents(ctx context.Context, threadID string, afterID int64, limit int) ([]contract.ThreadEvent, error)

func (*Service) ListThreads added in v0.5.0

func (s *Service) ListThreads(ctx context.Context, runtime string, archived *bool) ([]contract.TrackedThread, error)

func (*Service) ListTrackedSessions added in v0.5.0

func (s *Service) ListTrackedSessions(
	ctx context.Context,
	runtime string,
) ([]contract.TrackedSession, error)

func (*Service) ModelRegistry added in v0.5.0

func (s *Service) ModelRegistry(ctx context.Context) (contract.ModelRegistry, error)

func (*Service) ObserveScreen added in v0.5.0

func (s *Service) ObserveScreen(ctx context.Context, params map[string]any) (map[string]any, error)

func (*Service) OpenApp added in v0.5.0

func (s *Service) OpenApp(ctx context.Context, nativeMethod string, params map[string]any) (map[string]any, error)

func (*Service) PublishEvent

func (s *Service) PublishEvent(event contract.RuntimeEvent)

func (*Service) ReadThread added in v0.5.0

func (s *Service) ReadThread(ctx context.Context, threadID string) (*contract.ThreadRead, error)

func (*Service) Respond

func (s *Service) Respond(
	ctx context.Context,
	request api.RespondRequest,
) (*contract.RuntimeEvent, error)

func (*Service) ResumeSession

func (s *Service) ResumeSession(
	ctx context.Context,
	runtime string,
	request api.ResumeSessionRequest,
) (*contract.RuntimeSession, error)

func (*Service) RollbackThread added in v0.5.0

func (s *Service) RollbackThread(ctx context.Context, threadID string, turns int) (*contract.TrackedThread, error)

func (*Service) STTCommand added in v0.5.0

func (s *Service) STTCommand(ctx context.Context, nativeMethod string, params map[string]any) (map[string]any, error)

func (*Service) SendInput

func (s *Service) SendInput(
	ctx context.Context,
	request api.SendInputRequest,
) (*contract.RuntimeEvent, error)

func (*Service) SetThreadArchived added in v0.5.0

func (s *Service) SetThreadArchived(ctx context.Context, threadID string, archived bool) error

func (*Service) SetThreadMetadata added in v0.5.0

func (s *Service) SetThreadMetadata(ctx context.Context, threadID string, metadata contract.ThreadMetadata) error

func (*Service) SetThreadName added in v0.5.0

func (s *Service) SetThreadName(ctx context.Context, threadID string, name string) error

func (*Service) StartSession

func (s *Service) StartSession(
	ctx context.Context,
	runtime string,
	request api.StartSessionRequest,
) (*contract.RuntimeSession, error)

func (*Service) StopSession

func (s *Service) StopSession(
	ctx context.Context,
	sessionID string,
) (*contract.RuntimeEvent, error)

func (*Service) SubmitSTT added in v0.5.0

func (s *Service) SubmitSTT(ctx context.Context, params map[string]any) (map[string]any, error)

func (*Service) SubscribeEvents

func (s *Service) SubscribeEvents(buffer int) (<-chan contract.RuntimeEvent, func())

func (*Service) SubscribeInteraction added in v0.5.0

func (s *Service) SubscribeInteraction(ctx context.Context, nativeMethod string, params any) (map[string]any, error)

func (*Service) SubscribeSTT added in v0.5.0

func (s *Service) SubscribeSTT(ctx context.Context, params map[string]any) (map[string]any, error)

func (*Service) UnsubscribeInteraction added in v0.5.0

func (s *Service) UnsubscribeInteraction(ctx context.Context, subscriptionID string, nativeMethod string) (map[string]any, error)

func (*Service) UnsubscribeSTT added in v0.5.0

func (s *Service) UnsubscribeSTT(ctx context.Context, params map[string]any) (map[string]any, error)

func (*Service) UpdateAttention added in v0.5.0

func (s *Service) UpdateAttention(id string, update AttentionUpdate) (contract.AttentionItem, error)

type SessionDirectory

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

func NewSessionDirectory

func NewSessionDirectory() *SessionDirectory

func (*SessionDirectory) Delete

func (d *SessionDirectory) Delete(sessionID string)

func (*SessionDirectory) Get

func (d *SessionDirectory) Get(sessionID string) (contract.RuntimeSession, bool)

func (*SessionDirectory) List

func (*SessionDirectory) UpdateFromEvent

func (d *SessionDirectory) UpdateFromEvent(event contract.RuntimeEvent)

func (*SessionDirectory) Upsert

func (d *SessionDirectory) Upsert(session contract.RuntimeSession)

type SessionLedger added in v0.5.0

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

func NewSessionLedger added in v0.5.0

func NewSessionLedger() *SessionLedger

func (*SessionLedger) Get added in v0.5.0

func (l *SessionLedger) Get(sessionID string, providerSessionID string) (contract.TrackedSession, bool)

func (*SessionLedger) List added in v0.5.0

func (*SessionLedger) UpdateFromEvent added in v0.5.0

func (l *SessionLedger) UpdateFromEvent(event contract.RuntimeEvent)

func (*SessionLedger) Upsert added in v0.5.0

func (l *SessionLedger) Upsert(session contract.RuntimeSession)

type ThreadStore added in v0.5.0

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

func NewThreadStore added in v0.5.0

func NewThreadStore(path string) (*ThreadStore, error)

func NewThreadStoreFromEnv added in v0.5.0

func NewThreadStoreFromEnv() (*ThreadStore, error)

func (*ThreadStore) AddEvent added in v0.5.0

func (s *ThreadStore) AddEvent(ctx context.Context, event contract.RuntimeEvent) error

func (*ThreadStore) Close added in v0.5.0

func (s *ThreadStore) Close() error

func (*ThreadStore) ForkThread added in v0.5.0

func (s *ThreadStore) ForkThread(ctx context.Context, sourceThreadID string, newThreadID string, preserveProviderSession bool) (contract.TrackedThread, error)

func (*ThreadStore) GetThread added in v0.5.0

func (s *ThreadStore) GetThread(ctx context.Context, threadID string, providerSessionID string) (contract.TrackedThread, error)

func (*ThreadStore) ListThreadEvents added in v0.5.0

func (s *ThreadStore) ListThreadEvents(ctx context.Context, threadID string, afterID int64, limit int) ([]contract.ThreadEvent, error)

func (*ThreadStore) ListThreads added in v0.5.0

func (s *ThreadStore) ListThreads(ctx context.Context, runtime string, archived *bool) ([]contract.TrackedThread, error)

func (*ThreadStore) SetArchived added in v0.5.0

func (s *ThreadStore) SetArchived(ctx context.Context, threadID string, archived bool) error

func (*ThreadStore) SetMetadata added in v0.5.0

func (s *ThreadStore) SetMetadata(ctx context.Context, threadID string, metadata contract.ThreadMetadata) error

func (*ThreadStore) SetName added in v0.5.0

func (s *ThreadStore) SetName(ctx context.Context, threadID string, name string) error

func (*ThreadStore) SetParent added in v0.5.0

func (s *ThreadStore) SetParent(ctx context.Context, threadID string, parentThreadID string) error

func (*ThreadStore) UpsertTrackedSession added in v0.5.0

func (s *ThreadStore) UpsertTrackedSession(ctx context.Context, tracked contract.TrackedSession) error

Directories

Path Synopsis
providers
pi

Jump to

Keyboard shortcuts

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