Documentation
¶
Index ¶
- Constants
- func DescriptorHashInput(m Manifest) ([]byte, error)
- func Validate(m Manifest) error
- type CancelPolicySpec
- type CapabilityBinding
- type CompiledMethodSchemas
- type ConfirmationMode
- type ConfirmationSpec
- type IntentSpec
- type Manifest
- type MethodEffect
- type MethodExecutionMode
- type MethodRouteKind
- type MethodRouteSpec
- type MethodSpec
- type MigrationSpec
- type NetworkAccessSpec
- type NetworkConnectorSpec
- type Plugin
- type Publisher
- type SettingFieldSpec
- type SettingsSpec
- type StorageSpec
- type StoreSpec
- type SurfaceIntent
- type SurfaceKind
- type SurfaceSpec
- type ValidationError
- type WidgetSizeSpec
- type WorkerMode
- type WorkerSpec
Constants ¶
View Source
const ( CancelDisableBehaviorCancel = "cancel" CancelDisableBehaviorOrphan = "orphan" CancelDisableBehaviorWait = "wait" CancelUninstallBehaviorCancelThenBlockDelete = "cancel_then_block_delete" CancelUninstallBehaviorForceCleanupAllowed = "force_cleanup_allowed" )
Variables ¶
This section is empty.
Functions ¶
func DescriptorHashInput ¶
Types ¶
type CancelPolicySpec ¶
type CapabilityBinding ¶
type CapabilityBinding struct {
BindingID string `json:"binding_id"`
Contract capabilitycontract.Pin `json:"contract"`
}
type CompiledMethodSchemas ¶
type CompiledMethodSchemas struct {
// contains filtered or unexported fields
}
CompiledMethodSchemas holds the closed request and response contracts for one manifest method. The compiled validators are safe for concurrent validation.
func CompileMethodSchemas ¶
func CompileMethodSchemas(method MethodSpec) (*CompiledMethodSchemas, error)
CompileMethodSchemas validates and compiles a method's JSON Schema contracts. Remote schema loading is disabled so package validation remains deterministic and cannot perform network I/O.
func (*CompiledMethodSchemas) ValidateRequest ¶
func (s *CompiledMethodSchemas) ValidateRequest(value map[string]any) error
func (*CompiledMethodSchemas) ValidateResponse ¶
func (s *CompiledMethodSchemas) ValidateResponse(value any) error
type ConfirmationMode ¶
type ConfirmationMode string
const ( ConfirmationNone ConfirmationMode = "none" ConfirmationRequired ConfirmationMode = "required" ConfirmationRiskBased ConfirmationMode = "risk_based" )
type ConfirmationSpec ¶
type ConfirmationSpec struct {
Mode ConfirmationMode `json:"mode"`
PreflightMethod *string `json:"preflight_method,omitempty"`
RequestHashFields []string `json:"request_hash_fields,omitempty"`
PlanHashRequired bool `json:"plan_hash_required,omitempty"`
}
type IntentSpec ¶
type Manifest ¶
type Manifest struct {
SchemaVersion string `json:"schema_version"`
Publisher Publisher `json:"publisher"`
Plugin Plugin `json:"plugin"`
Surfaces []SurfaceSpec `json:"surfaces,omitempty"`
CapabilityBindings []CapabilityBinding `json:"capability_bindings,omitempty"`
Methods []MethodSpec `json:"methods,omitempty"`
Workers []WorkerSpec `json:"workers,omitempty"`
Storage *StorageSpec `json:"storage,omitempty"`
NetworkAccess *NetworkAccessSpec `json:"network_access,omitempty"`
Settings *SettingsSpec `json:"settings,omitempty"`
Intents []IntentSpec `json:"intents,omitempty"`
}
func (Manifest) APIVersion ¶
type MethodEffect ¶
type MethodEffect string
const ( MethodEffectRead MethodEffect = "read" MethodEffectWrite MethodEffect = "write" MethodEffectExecute MethodEffect = "execute" MethodEffectDelete MethodEffect = "delete" MethodEffectAdmin MethodEffect = "admin" )
type MethodExecutionMode ¶
type MethodExecutionMode string
const ( MethodExecutionSync MethodExecutionMode = "sync" MethodExecutionOperation MethodExecutionMode = "operation" MethodExecutionSubscription MethodExecutionMode = "subscription" )
type MethodRouteKind ¶
type MethodRouteKind string
const ( MethodRouteCapability MethodRouteKind = "capability" MethodRouteWorker MethodRouteKind = "worker" MethodRouteCoreAction MethodRouteKind = "core_action" )
type MethodRouteSpec ¶
type MethodSpec ¶
type MethodSpec struct {
Method string `json:"method"`
Effect MethodEffect `json:"effect,omitempty"`
Execution MethodExecutionMode `json:"execution,omitempty"`
Dangerous bool `json:"dangerous,omitempty"`
PreflightOnly bool `json:"preflight_only,omitempty"`
Confirmation *ConfirmationSpec `json:"confirmation,omitempty"`
CancelPolicy *CancelPolicySpec `json:"cancel_policy,omitempty"`
RequestSchema map[string]any `json:"request_schema,omitempty"`
ResponseSchema map[string]any `json:"response_schema,omitempty"`
Route MethodRouteSpec `json:"route"`
}
type MigrationSpec ¶
type MigrationSpec struct {
FromVersion int `json:"from_version"`
ToVersion int `json:"to_version"`
Reversible bool `json:"reversible"`
RequiresWorker bool `json:"requires_worker"`
EstimatedBytes int64 `json:"estimated_bytes"`
MaxDurationMS int `json:"max_duration_ms"`
DataLossRisk bool `json:"data_loss_risk"`
StepsHash string `json:"steps_hash"`
}
type NetworkAccessSpec ¶
type NetworkAccessSpec struct {
Connectors []NetworkConnectorSpec `json:"connectors,omitempty"`
}
type NetworkConnectorSpec ¶
type SettingFieldSpec ¶
type SettingFieldSpec struct {
Key string `json:"key"`
Type string `json:"type"`
Label string `json:"label"`
Scope string `json:"scope"`
Default any `json:"default,omitempty"`
SecretRef string `json:"secret_ref,omitempty"`
Options []string `json:"options,omitempty"`
Validation map[string]any `json:"validation,omitempty"`
}
type SettingsSpec ¶
type SettingsSpec struct {
SchemaVersion int `json:"schema_version"`
Migration MigrationSpec `json:"migration"`
Fields []SettingFieldSpec `json:"fields,omitempty"`
}
type StorageSpec ¶
type StorageSpec struct {
Stores []StoreSpec `json:"stores,omitempty"`
}
type SurfaceIntent ¶
type SurfaceIntent string
const ( SurfaceIntentPrimary SurfaceIntent = "primary" SurfaceIntentSecondary SurfaceIntent = "secondary" SurfaceIntentUtility SurfaceIntent = "utility" )
type SurfaceKind ¶
type SurfaceKind string
const ( SurfaceView SurfaceKind = "view" SurfaceCommand SurfaceKind = "command" SurfaceBackground SurfaceKind = "background" )
type SurfaceSpec ¶
type SurfaceSpec struct {
SurfaceID string `json:"surface_id"`
Kind SurfaceKind `json:"kind"`
Intent SurfaceIntent `json:"intent,omitempty"`
Label string `json:"label"`
Entry string `json:"entry"`
Icon string `json:"icon,omitempty"`
DefaultSize *WidgetSizeSpec `json:"default_size,omitempty"`
}
type ValidationError ¶
func (ValidationError) Error ¶
func (e ValidationError) Error() string
type WidgetSizeSpec ¶
type WorkerMode ¶
type WorkerMode string
const ( WorkerModeJob WorkerMode = "job" WorkerModeActor WorkerMode = "actor" )
type WorkerSpec ¶
Click to show internal directories.
Click to hide internal directories.