Documentation
¶
Overview ¶
Package setup owns the transactional domain core for installing JetKVM into supported agent hosts. Host-native CLIs remain the terminal authority.
Index ¶
- Constants
- Variables
- type Command
- type CommandResult
- type Component
- type Config
- type DoctorCheck
- type DoctorReport
- type DoctorStatus
- type Host
- type JournalEntry
- type Mode
- type Plan
- type PlanRequest
- type Receipt
- type ReceiptStatus
- type Runner
- type Scope
- type Service
- func (s *Service) Apply(ctx context.Context, plan Plan) (Receipt, error)
- func (s *Service) Doctor(ctx context.Context, target Target, version string) (DoctorReport, error)
- func (s *Service) Inspect(ctx context.Context, target Target, pluginVersion string) (Snapshot, error)
- func (s *Service) Plan(ctx context.Context, request PlanRequest) (Plan, error)
- func (s *Service) Uninstall(ctx context.Context, target Target, dryRun bool) (Receipt, error)
- type Snapshot
- type State
- type Step
- type Store
- type Target
Constants ¶
View Source
const ( CanonicalMCPCommand = "jetkvm" MarketplaceSource = "kaaanata/jetkvm-cli" MarketplaceName = "jetkvm" PluginReference = "jetkvm@jetkvm" )
Variables ¶
View Source
var ( ErrInvalidTarget = errors.New("invalid setup target") ErrCommandFailed = errors.New("agent host command failed") ErrSetupConflict = errors.New("setup conflict") ErrMigrationNeeded = errors.New("legacy direct integration requires explicit migration") ErrInvalidPlan = errors.New("setup plan does not match the authoritative transition") ErrStalePlan = errors.New("setup plan is stale") ErrReceiptNotFound = errors.New("setup receipt not found") ErrRollbackConflict = errors.New("setup rollback ownership conflict") ErrVerification = errors.New("setup verification failed") )
Functions ¶
This section is empty.
Types ¶
type CommandResult ¶
type DoctorCheck ¶
type DoctorReport ¶
type DoctorReport struct {
Target Target `json:"target"`
Status DoctorStatus `json:"status"`
State State `json:"state"`
Checks []DoctorCheck `json:"checks"`
Observed time.Time `json:"observed_at"`
}
type DoctorStatus ¶
type DoctorStatus string
const ( DoctorReady DoctorStatus = "ready" DoctorActionRequired DoctorStatus = "action_required" DoctorConflict DoctorStatus = "conflict" )
type JournalEntry ¶
type Plan ¶
type Plan struct {
ID uuid.UUID `json:"id"`
Target Target `json:"target"`
PluginVersion string `json:"plugin_version"`
InitialState State `json:"initial_state"`
BeforeFingerprint string `json:"before_fingerprint"`
Steps []Step `json:"steps,omitempty"`
DryRun bool `json:"dry_run"`
CreatedAt time.Time `json:"created_at"`
}
type PlanRequest ¶
type Receipt ¶
type Receipt struct {
SchemaVersion int `json:"schema_version"`
ID uuid.UUID `json:"id"`
PlanID uuid.UUID `json:"plan_id"`
Target Target `json:"target"`
PluginVersion string `json:"plugin_version,omitempty"`
Status ReceiptStatus `json:"status"`
InitialState State `json:"initial_state"`
BeforeFingerprint string `json:"before_fingerprint"`
AfterFingerprint string `json:"after_fingerprint,omitempty"`
OwnedComponents []string `json:"owned_components,omitempty"`
Journal []JournalEntry `json:"journal,omitempty"`
RollbackJournal []JournalEntry `json:"rollback_journal,omitempty"`
FailureKind string `json:"failure_kind,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type ReceiptStatus ¶
type ReceiptStatus string
const ( ReceiptPrepared ReceiptStatus = "prepared" ReceiptCommitted ReceiptStatus = "committed" ReceiptRolledBack ReceiptStatus = "rolled_back" ReceiptRollbackConflict ReceiptStatus = "rollback_conflict" ReceiptFailed ReceiptStatus = "failed" ReceiptDryRun ReceiptStatus = "dry_run" ReceiptUninstalled ReceiptStatus = "uninstalled" )
type Runner ¶
type Runner interface {
Run(context.Context, Command) (CommandResult, error)
}
Runner is the only process execution boundary. Implementations must not interpret a non-zero exit as success or inject credentials into commands.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
type Target ¶
type Target struct {
Host Host `json:"host"`
Mode Mode `json:"mode"`
Scope Scope `json:"scope"`
Workspace string `json:"workspace,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.