standaloneoperations

package
v0.39.9 Latest Latest
Warning

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

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

Documentation

Overview

Package standaloneoperations owns the public standalone lifecycle operation catalog shared by the StackKits CLI, MCP connector, and State Console.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmMutation

func ConfirmMutation(id ID, confirmation string, ownerApproved bool) error

ConfirmMutation enforces the exact operation confirmation and local Owner approval shared by every mutating MCP adapter.

func ValidateCatalog

func ValidateCatalog() error

ValidateCatalog checks the embedded authority without relying on callers.

Types

type Contract

type Contract struct {
	ID            ID       `json:"id"`
	ToolName      string   `json:"toolName"`
	Title         string   `json:"title"`
	Description   string   `json:"description"`
	Command       []string `json:"command"`
	Mutation      bool     `json:"mutation"`
	Destructive   bool     `json:"destructive"`
	Idempotent    bool     `json:"idempotent"`
	OwnerApproval bool     `json:"ownerApproval"`
}

Contract describes one operation without owning its lifecycle implementation. Command is the exact public CLI path that executes it.

func All

func All() []Contract

All returns fresh contracts in stable catalog order.

func Lookup

func Lookup(id ID) (Contract, bool)

Lookup resolves one stable operation identity.

func LookupTool

func LookupTool(name string) (Contract, bool)

LookupTool resolves one registered MCP tool name.

type ID

type ID string

ID is the stable identity used for operation-specific confirmation.

const (
	Init                  ID = "stackkit.init"
	Validate              ID = "stackkit.validate"
	Resolve               ID = "stackkit.resolve"
	Generate              ID = "stackkit.generate"
	Plan                  ID = "stackkit.plan"
	Apply                 ID = "stackkit.apply"
	Verify                ID = "stackkit.verify"
	Status                ID = "stackkit.status"
	Setup                 ID = "stackkit.setup"
	Logs                  ID = "stackkit.logs"
	Backup                ID = "stackkit.backup"
	BackupStatus          ID = "stackkit.backup.status"
	BackupScheduleEnable  ID = "stackkit.backup.schedule.enable"
	BackupScheduleDisable ID = "stackkit.backup.schedule.disable"
	BackupScheduleStatus  ID = "stackkit.backup.schedule.status"
	Restore               ID = "stackkit.restore"
	RestoreAbandon        ID = "stackkit.restore.abandon"
	Upgrade               ID = "stackkit.upgrade"
	Drift                 ID = "stackkit.drift"
	Remove                ID = "stackkit.remove"
)

Jump to

Keyboard shortcuts

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