app

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package app assembles the shared JetKVM domain core used by CLI and MCP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutomationService

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

AutomationService is the single CLI/MCP control authority. It preserves one underlying automation.Service and applies each device's configured session limits before any handle reaches the shared registry.

func (*AutomationService) CanWake added in v1.0.8

func (s *AutomationService) CanWake(deviceID domain.DeviceID, scope policy.Scope) bool

func (*AutomationService) CloseControl

func (s *AutomationService) CloseControl(ctx context.Context, request automation.ControlRequest) (control.Handle, error)

func (*AutomationService) Drain

func (s *AutomationService) Drain(ctx context.Context) error

func (*AutomationService) GetControl

func (*AutomationService) GetPowerCapabilities added in v1.0.9

func (*AutomationService) GetPowerState

func (*AutomationService) Observe added in v1.0.2

func (*AutomationService) OpenControl

func (*AutomationService) PowerAction

func (*AutomationService) PrepareOpenControl

func (*AutomationService) PreparePowerAction

func (*AutomationService) PrepareRunActions

func (*AutomationService) ReleaseInput

func (*AutomationService) RunActions

type MCPHost added in v1.0.6

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

MCPHost owns the bootstrap-to-ready transition and runtime lifetime. Its gate joins in-flight calls before replacing protocol handlers or closing a runtime.

func NewMCPHost added in v1.0.6

func NewMCPHost(ctx context.Context, path, version string) (*MCPHost, error)

func (*MCPHost) Close added in v1.0.6

func (h *MCPHost) Close() error

func (*MCPHost) NewStatelessHTTPServer added in v1.0.6

func (h *MCPHost) NewStatelessHTTPServer(cfg mcpserver.HTTPConfig) (*http.Server, error)

func (*MCPHost) RunStdio added in v1.0.6

func (h *MCPHost) RunStdio(ctx context.Context) error

type Runtime

type Runtime struct {
	Config         config.Config
	ConfigRevision string
	Devices        domain.DeviceService
	MCP            *mcpserver.Server
	Policy         *policy.Compiled
	Store          *store.Store
	Automation     *AutomationService
	Confirmation   *confirmation.Authority
	// contains filtered or unexported fields
}

Runtime is the one composition root shared by CLI commands and MCP tools.

func Load

func Load(ctx context.Context, path, version string) (_ *Runtime, err error)

Load validates the complete configuration and constructs all authoritative services before publishing the runtime to any command or MCP handler.

func (*Runtime) Close

func (r *Runtime) Close() error

Close drains all device actors before releasing the durable store.

Jump to

Keyboard shortcuts

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