Documentation
¶
Overview ¶
Package sdk implements Stream Dock Manager protocol v1, OpenAction events for OpenDeck, and plugin protocol features shared with VSD Craft and Elgato Stream Deck.
Index ¶
- Constants
- Variables
- func ConnectWithInfo(parent context.Context, address, token string, h Handler, info HostInfo) error
- func DeferAction(ctx context.Context) func(error)
- func FrameCapabilities(value Capabilities) (string, error)
- func ImageDataURI(mediaType string, data []byte) (string, error)
- func NetworkPayload() (sent, received uint64)
- func OpenActionDeepLink(event Event) (url string, matched bool, err error)
- func OpenActionSettingsRequested(event Event) bool
- func OperationID() string
- func Run(ctx context.Context, args []string, h Handler) error
- func ShouldLogAction(e Event) bool
- func TrackConn(connection net.Conn) net.Conn
- type ActionCapability
- type ActionLogging
- type ActionPermissionStatus
- type ActionPermissions
- type AdditiveDial
- type Capabilities
- type Client
- func (c *Client) Alert(ctx context.Context, binding string) error
- func (c *Client) CreateNotification(ctx context.Context, action string, level NotificationLevel, message string) error
- func (c *Client) CurrentPluginTheme() *PluginTheme
- func (c *Client) DesktopInput(ctx context.Context, binding string, value any) error
- func (c *Client) Dispatch(ctx context.Context, handler Handler, event Event)
- func (c *Client) Display(ctx context.Context, binding, title, image string, state int, layout string, ...) error
- func (c *Client) DynamicItems(ctx context.Context, value any) error
- func (c *Client) Feedback(ctx context.Context, binding string, value any) error
- func (c *Client) FeedbackLayout(ctx context.Context, binding, layout string) error
- func (c *Client) FormatText(ctx context.Context, action, text string) (string, error)
- func (c *Client) GetGlobalSettings(ctx context.Context) error
- func (c *Client) GetPermissions(ctx context.Context) (PermissionList, error)
- func (c *Client) GetPluginTheme(ctx context.Context) (*PluginTheme, error)
- func (c *Client) GetSettings(ctx context.Context, binding string) error
- func (c *Client) GlobalSettings(ctx context.Context, value any) error
- func (c *Client) HasPermission(ctx context.Context, action string, scope map[string]string) (PermissionStatus, error)
- func (c *Client) Host() HostInfo
- func (c *Client) Image(ctx context.Context, binding, image string) error
- func (c *Client) ListVaultEntries(ctx context.Context, action string, scope map[string]string, start int) (VaultEntryPage, error)
- func (c *Client) Log(ctx context.Context, message string) error
- func (c *Client) LogStream(ctx context.Context, stream LogStream, message string) error
- func (c *Client) NotifyCompletion(ctx context.Context, activation string) (CompletionStatus, error)
- func (c *Client) OK(ctx context.Context, binding string) error
- func (c *Client) ObserveControl(e Event) bool
- func (c *Client) OpenURL(ctx context.Context, address string) error
- func (c *Client) ReadClipboardText(ctx context.Context, activation string) (ClipboardText, error)
- func (c *Client) ReadVaultLocation(ctx context.Context, selection VaultValueRequest) (VaultLocation, error)
- func (c *Client) ReadVaultSecret(ctx context.Context, selection VaultValueRequest) (VaultSecret, error)
- func (c *Client) ReadVaultText(ctx context.Context, selection VaultValueRequest) (VaultText, error)
- func (c *Client) Request(ctx context.Context, protocol, method string, payload any) (json.RawMessage, error)
- func (c *Client) RequestPermissions(ctx context.Context, activation string, scopes []map[string]string) (PermissionReview, error)
- func (c *Client) RequestVSDCraftSettings(ctx context.Context) error
- func (c *Client) RunVaultRecipe(ctx context.Context, activation string, scope map[string]string, ...) (RecipeResult, error)
- func (c *Client) SelectVaultEntry(ctx context.Context, activation, action string, scope map[string]string) (PermissionReview, error)
- func (c *Client) Send(ctx context.Context, e Event) error
- func (c *Client) SendExampleWebhook(ctx context.Context, activation, certificate string) (RecipeResult, error)
- func (c *Client) SendLocalWebhook(ctx context.Context, activation, origin string) (RecipeResult, error)
- func (c *Client) SetLogRedactor(redact func(string) string)
- func (c *Client) SetNetworkDebug(enabled bool)
- func (c *Client) Settings(ctx context.Context, binding string, value any) error
- func (c *Client) ShowTextResult(ctx context.Context, activation, text string) (RecipeResult, error)
- func (c *Client) State(ctx context.Context, binding string, state int) error
- func (c *Client) Stderr(ctx context.Context) io.Writer
- func (c *Client) Stdout(ctx context.Context) io.Writer
- func (c *Client) SubscribeTelemetry(ctx context.Context, topics []string) error
- func (c *Client) SummarizeClipboard(ctx context.Context, activation string) (RecipeResult, error)
- func (c *Client) Supports(capability string) bool
- func (c *Client) SupportsThemeRPC() bool
- func (c *Client) Title(ctx context.Context, binding, text string) error
- func (c *Client) ToInspector(ctx context.Context, binding, action string, value any) error
- func (c *Client) WriteVaultSecret(ctx context.Context, selection VaultValueRequest, ...) (VaultWriteReceipt, error)
- type ClipboardText
- type CompletionStatus
- type Event
- type Handler
- type HostInfo
- type HostStore
- func (s *HostStore) Commit(ctx context.Context, version StorageVersion, operation string, ...) (StorageReceipt, error)
- func (s *HostStore) Get(ctx context.Context, key string) (StorageValue, error)
- func (s *HostStore) ListKeys(ctx context.Context, cursor string) (StorageKeys, error)
- func (s *HostStore) Receipt(ctx context.Context, generation, operation string) (StorageReceipt, error)
- type LogStream
- type Measurement
- type NotificationLevel
- type OpenActionDeviceInfo
- type OpenActionDeviceOutput
- type OpenActionDeviceProvider
- func (p *OpenActionDeviceProvider) Deregister(device string) (map[string]any, error)
- func (p *OpenActionDeviceProvider) DeviceEvent(event, device string) (map[string]any, error)
- func (p *OpenActionDeviceProvider) EncoderChange(device string, position uint8, ticks int16) (map[string]any, error)
- func (p *OpenActionDeviceProvider) EncoderDown(device string, position uint8) (map[string]any, error)
- func (p *OpenActionDeviceProvider) EncoderUp(device string, position uint8) (map[string]any, error)
- func (p *OpenActionDeviceProvider) KeyDown(device string, position uint8) (map[string]any, error)
- func (p *OpenActionDeviceProvider) KeyUp(device string, position uint8) (map[string]any, error)
- func (p *OpenActionDeviceProvider) ParseOutput(data []byte) (OpenActionDeviceOutput, error)
- func (p *OpenActionDeviceProvider) Press(event, device string, position uint8) (map[string]any, error)
- func (p *OpenActionDeviceProvider) Register(info OpenActionDeviceInfo) (map[string]any, error)
- func (p *OpenActionDeviceProvider) RerenderImages(device string) (map[string]any, error)
- func (p *OpenActionDeviceProvider) TouchscreenPress(device string, position uint8, x, y uint16, hold bool) (map[string]any, error)
- type Payload
- type PermissionDeclaration
- type PermissionList
- type PermissionNotice
- type PermissionReview
- type PermissionStatus
- type PluginTheme
- type PortableSettings
- type ProbePool
- type RPCError
- type RecipeResult
- type Scheduler
- type SettingsResult
- type StorageKeys
- type StorageMutation
- type StorageReceipt
- type StorageValue
- type StorageVersion
- type Surface
- type TelemetrySnapshot
- type ThemeColors
- type ThemeMedia
- type ThemeWallpaper
- type ThemedAsset
- type UnsupportedFeatureError
- type VaultEntryName
- type VaultEntryPage
- type VaultLocation
- type VaultSecret
- type VaultText
- type VaultValueRequest
- type VaultWriteReceipt
Constants ¶
const ContractVersion = 1
const DescriptorLimit = 64 << 10
const DescriptorPrefix = "SDMCAP1:"
const DescriptorSuffix = ":ENDSDMCAP1"
const HTTPBrokerProtocol = "plugin-http-broker-v1"
const MaxInputBytes = 8 * MaxMessageBytes
MaxInputBytes charges encoded envelopes until dispatch (or dial batching) releases them. The socket reader may additionally hold one bounded envelope
const MaxInputItems = 128
const MaxLogBytes = MaxMessageBytes
const MaxMessageBytes = 1 << 20
MaxMessageBytes bounds the complete UTF-8 JSON envelope in protocol v1, including legacy hosts
const MaxOutputBytes = 8 * MaxMessageBytes
const MaxPortableImageBytes = 512 * 1024
MaxPortableImageBytes leaves room for the base64 image and protocol envelope
const MaximumStorageMessage = 512 << 10
const MaximumStorageValue = 256 << 10
const NotificationsProtocol = "plugin-notifications-v1"
NotificationsProtocol identifies Manager's plugin-message notification support
const OpenActionDidReceiveDeepLink = "didReceiveDeepLink"
const OpenActionShowSettingsInterface = "showSettingsInterface"
OpenAction events are opt-in; no UI or URL is opened by these helpers
const PermissionsProtocol = "plugin-permissions-v1"
const RPCRequestEvent = "streamDockManagerRpcRequest"
const RPCResponseEvent = "streamDockManagerRpcResponse"
const SettingsProtocol = "plugin-settings-rpc-v1"
const StorageProtocol = "plugin-storage-v1"
const TextReferencesProtocol = "plugin-text-references-v1"
const ThemeEvent = "didReceivePluginTheme"
const ThemeProtocol = "plugin-theme-v1"
const VaultReferencesProtocol = "plugin-vault-references-v1"
const VaultSecretSharingProtocol = "plugin-vault-secret-sharing-v1"
const VaultValuesProtocol = "plugin-vault-values-v1"
const VaultWritesProtocol = "plugin-vault-writes-v1"
Variables ¶
var CompiledDescriptor string
CompiledDescriptor is injected from the same Definition that generates the manifest. It remains referenced by registration, including stripped builds
Functions ¶
func ConnectWithInfo ¶
ConnectWithInfo negotiates optional extensions from explicit host metadata
func DeferAction ¶
DeferAction ties asynchronous work to the current tracked input. Call the returned function exactly when that work finishes. The SDK reports success only after the handler and every deferred operation have succeeded
func FrameCapabilities ¶
func FrameCapabilities(value Capabilities) (string, error)
Encode the capability descriptor in its framed wire format
func ImageDataURI ¶
ImageDataURI encodes caller-provided PNG or SVG bytes for portable setImage messages. It never reads files or URLs, changes paths, or grants permissions It does not decode or sanitize images: only pass trusted image bytes. The ordinary outgoing message limit still applies to the complete message
func NetworkPayload ¶
func NetworkPayload() (sent, received uint64)
NetworkPayload excludes SDK loopback, TLS/TCP overhead, DNS, subprocesses, and library-owned transports (including speedtest-go)
func OpenActionDeepLink ¶
OpenActionDeepLink returns the untrusted, opaque payload URL, not a decoded command. The caller must validate routing/content before taking any action
func OpenActionSettingsRequested ¶
OpenActionSettingsRequested recognizes OpenDeck's payload-free request Set HasSettingsInterface in the manifest only if your handler supplies a UI
func OperationID ¶
func OperationID() string
OperationID is independent of the authentication token and may be retained for explicit reconciliation. Reuse it only for the identical logical mutation
func ShouldLogAction ¶
Select action events worth recording in plugin logs
Types ¶
type ActionCapability ¶
type ActionCapability struct {
Refresh *polling.RefreshPolicy `json:"refresh,omitempty"`
ParameterFields []string `json:"parameter_fields,omitempty"`
FeedbackLayout string `json:"feedback_layout,omitempty"`
ControlTypes []string `json:"control_types,omitempty"`
AdditiveDial bool `json:"additive_dial,omitempty"`
Settings string `json:"settings,omitempty"`
Icon ThemedAsset `json:"icon"`
States []ThemedAsset `json:"states"`
}
type ActionLogging ¶
ActionLogging optionally selects the input events that execute a plugin action Receipts remain independent of logging; release-based actions can opt in here
type ActionPermissionStatus ¶ added in v0.1.1
type ActionPermissions ¶ added in v0.1.1
type AdditiveDial ¶
AdditiveDial opts in only actions whose rotation operation is additive
type Capabilities ¶
type Capabilities struct {
Permissions *PermissionDeclaration `json:"permissions,omitempty"`
MinimumManager string `json:"minimum_manager,omitempty"`
RequiredCapabilities []string `json:"required_capabilities,omitempty"`
Version int `json:"version"`
ID string `json:"id"`
PluginVersion string `json:"plugin_version"`
ThemeProtocol int `json:"theme_protocol"`
SettingsProtocol int `json:"settings_protocol"`
InputProtocol int `json:"input_protocol"`
PluginSettings string `json:"plugin_settings,omitempty"`
Icon ThemedAsset `json:"icon"`
Actions map[string]ActionCapability `json:"actions"`
}
func RuntimeCapabilities ¶
func RuntimeCapabilities() (*Capabilities, error)
Decode the descriptor embedded at build time
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewLocalClient ¶
NewLocalClient supplies the same bounded, capability-gated writer without a socket. The caller owns draining the returned events (for simulations/tests)
func (*Client) CreateNotification ¶ added in v0.1.1
func (c *Client) CreateNotification(ctx context.Context, action string, level NotificationLevel, message string) error
CreateNotification sends a plain-text notice under the reviewed action scope
func (*Client) CurrentPluginTheme ¶
func (c *Client) CurrentPluginTheme() *PluginTheme
Read the cached plugin theme
func (*Client) DesktopInput ¶
Request negotiated desktop input for a binding
func (*Client) Dispatch ¶
Dispatch runs one event through the same completion/error machinery as Run It belongs to the caller's serialized loop; testkit uses it for offline replay
func (*Client) Display ¶
func (c *Client) Display(ctx context.Context, binding, title, image string, state int, layout string, feedback any) error
Display sends standard vendor display commands; Manager-only extensions remain negotiated
func (*Client) DynamicItems ¶
Send dynamic inspector choice data
func (*Client) FeedbackLayout ¶
Select a binding feedback layout
func (*Client) FormatText ¶ added in v0.1.1
FormatText resolves one transient string in the host's permission-checked action scope
func (*Client) GetGlobalSettings ¶
Request the current plugin-global settings
func (*Client) GetPermissions ¶ added in v0.1.1
func (c *Client) GetPermissions(ctx context.Context) (PermissionList, error)
func (*Client) GetPluginTheme ¶
func (c *Client) GetPluginTheme(ctx context.Context) (*PluginTheme, error)
Fetch the current theme through negotiated RPC
func (*Client) GetSettings ¶
Request the current binding settings
func (*Client) GlobalSettings ¶
Replace plugin-global portable settings
func (*Client) HasPermission ¶ added in v0.1.1
func (*Client) ListVaultEntries ¶ added in v0.1.1
func (*Client) NotifyCompletion ¶ added in v0.1.1
func (*Client) ObserveControl ¶
ObserveControl is called by the transport before ordinary event admission True means an RPC response was consumed; base settings notifications always remain available to the normal event loop. It never invokes plugin callbacks
func (*Client) ReadClipboardText ¶ added in v0.1.1
func (*Client) ReadVaultLocation ¶ added in v0.1.1
func (c *Client) ReadVaultLocation(ctx context.Context, selection VaultValueRequest) (VaultLocation, error)
func (*Client) ReadVaultSecret ¶ added in v0.1.1
func (c *Client) ReadVaultSecret(ctx context.Context, selection VaultValueRequest) (VaultSecret, error)
ReadVaultSecret reads one explicitly approved credential, without a vendor fallback.
func (*Client) ReadVaultText ¶ added in v0.1.1
ReadVaultText reads one approved nonsecret text slot, without a vendor fallback.
func (*Client) Request ¶
func (c *Client) Request(ctx context.Context, protocol, method string, payload any) (json.RawMessage, error)
Request performs a bounded, capability-negotiated Manager RPC. Cancellation or timeout after enqueue is indeterminate; it never retries through another route
func (*Client) RequestPermissions ¶ added in v0.1.1
func (*Client) RequestVSDCraftSettings ¶ added in v0.1.1
RequestVSDCraftSettings sends the documented VSD Craft backend request using the registration UUID Handle didReceiveSettings as an event; the request does not select an action binding
func (*Client) RunVaultRecipe ¶ added in v0.1.1
func (c *Client) RunVaultRecipe(ctx context.Context, activation string, scope map[string]string, entryRef string) (RecipeResult, error)
RunVaultRecipe asks Manager to review an exact reference and fixed destination.
func (*Client) SelectVaultEntry ¶ added in v0.1.1
func (*Client) SendExampleWebhook ¶ added in v0.1.1
func (c *Client) SendExampleWebhook(ctx context.Context, activation, certificate string) (RecipeResult, error)
SendExampleWebhook opens a review for a fixed local HTTPS ping. The PEM is the listener’s public session certificate.
func (*Client) SendLocalWebhook ¶ added in v0.1.1
func (c *Client) SendLocalWebhook(ctx context.Context, activation, origin string) (RecipeResult, error)
SendLocalWebhook asks Manager to review a ping to the declared local HTTP origin.
func (*Client) SetLogRedactor ¶
SetLogRedactor installs a snapshot-based sanitizer. It is applied before framing; writers never echo RPC messages to the process console
func (*Client) SetNetworkDebug ¶
SetNetworkDebug is normally driven by Manager's per-plugin log preferences Diagnostic traffic uses the independent bounded log queue, never stdout echo
func (*Client) ShowTextResult ¶ added in v0.1.1
func (*Client) SubscribeTelemetry ¶
Subscribe to the requested host telemetry topics
func (*Client) SummarizeClipboard ¶ added in v0.1.1
SummarizeClipboard opens the Manager-owned transfer review. Only Manager receives the text.
func (*Client) SupportsThemeRPC ¶
Check whether the host supports theme RPC
func (*Client) ToInspector ¶
Send a payload to the matching property inspector
func (*Client) WriteVaultSecret ¶ added in v0.1.1
func (c *Client) WriteVaultSecret(ctx context.Context, selection VaultValueRequest, kind, value, expectedRevision string) (VaultWriteReceipt, error)
WriteVaultSecret creates a private slot, or rotates it when given its current revision.
type ClipboardText ¶ added in v0.1.1
type CompletionStatus ¶ added in v0.1.1
type CompletionStatus struct {
State string `json:"state"`
}
type Event ¶
type Event struct {
Event string `json:"event"`
ID string `json:"id,omitempty"`
Action string `json:"action,omitempty"`
Context string `json:"context,omitempty"`
Device string `json:"device,omitempty"`
UUID string `json:"uuid,omitempty"`
Payload json.RawMessage `json:"payload,omitempty"`
Surface *Surface `json:"streamDockManager,omitempty"`
DeviceInfo json.RawMessage `json:"deviceInfo,omitempty"`
Raw json.RawMessage `json:"-"`
ProtocolID string `json:"protocol_id,omitempty"`
RequestID string `json:"request_id,omitempty"`
Method string `json:"method,omitempty"`
Result json.RawMessage `json:"result,omitempty"`
Error *RPCError `json:"error,omitempty"`
// contains filtered or unexported fields
}
func (Event) PermissionNotice ¶ added in v0.1.1
func (e Event) PermissionNotice() (PermissionNotice, bool)
func (*Event) UnmarshalJSON ¶
UnmarshalJSON retains the complete event for forward-compatible extensions
type HostInfo ¶
type HostInfo struct {
Raw map[string]json.RawMessage
Manager struct {
Version string `json:"version"`
ContractVersion int `json:"contract_version"`
Capabilities []string `json:"capabilities"`
RunID string `json:"run_id"`
DebugNetwork bool `json:"debug_network"`
} `json:"streamDockManager"`
}
HostInfo retains the host's raw fields so newer metadata remains available
func ParseHostInfo ¶
Decode and validate the host registration metadata
type HostStore ¶
type HostStore struct {
// contains filtered or unexported fields
}
func NewHostStore ¶
Create a namespace-scoped negotiated host store
func (*HostStore) Commit ¶
func (s *HostStore) Commit(ctx context.Context, version StorageVersion, operation string, mutations []StorageMutation) (StorageReceipt, error)
Commit validated mutations against an expected storage version
type Measurement ¶
type NotificationLevel ¶ added in v0.1.1
type NotificationLevel string
const ( NotificationInfo NotificationLevel = "info" NotificationSuccess NotificationLevel = "success" NotificationWarning NotificationLevel = "warning" NotificationError NotificationLevel = "error" )
type OpenActionDeviceInfo ¶
type OpenActionDeviceOutput ¶
type OpenActionDeviceOutput struct {
Event string `json:"event"`
Device string `json:"device"`
Controller *string `json:"controller"`
Position *uint8 `json:"position"`
Image *string `json:"image"`
Brightness *uint8 `json:"brightness"`
}
OpenActionDeviceOutput is a provider command, not an action-plugin setImage A setImage with nil Controller/Position/Image requests clearing the screen Image is opaque; callers must validate/decode it before hardware use
type OpenActionDeviceProvider ¶
type OpenActionDeviceProvider struct {
// contains filtered or unexported fields
}
OpenActionDeviceProvider builds OpenDeck-specific wire envelopes. It neither grants a namespace nor sends messages or accesses hardware. Declare the same two-character DeviceNamespace in the manifest and use only on an opted-in host Wire reference: nekename/OpenDeck commit 3ddecc1ce8952a423916cf066724356267b97410
func NewOpenActionDeviceProvider ¶
func NewOpenActionDeviceProvider(namespace string) (*OpenActionDeviceProvider, error)
Create a device provider with a validated namespace
func (*OpenActionDeviceProvider) Deregister ¶
func (p *OpenActionDeviceProvider) Deregister(device string) (map[string]any, error)
Build a device removal envelope
func (*OpenActionDeviceProvider) DeviceEvent ¶
func (p *OpenActionDeviceProvider) DeviceEvent(event, device string) (map[string]any, error)
Build a namespace-checked device lifecycle envelope
func (*OpenActionDeviceProvider) EncoderChange ¶
func (p *OpenActionDeviceProvider) EncoderChange(device string, position uint8, ticks int16) (map[string]any, error)
Build an encoder rotation envelope
func (*OpenActionDeviceProvider) EncoderDown ¶
func (p *OpenActionDeviceProvider) EncoderDown(device string, position uint8) (map[string]any, error)
Build an encoder-down event for the selected position
func (*OpenActionDeviceProvider) ParseOutput ¶
func (p *OpenActionDeviceProvider) ParseOutput(data []byte) (OpenActionDeviceOutput, error)
Decode bounded host output addressed to this provider
func (*OpenActionDeviceProvider) Press ¶
func (p *OpenActionDeviceProvider) Press(event, device string, position uint8) (map[string]any, error)
Build a key or encoder press envelope
func (*OpenActionDeviceProvider) Register ¶
func (p *OpenActionDeviceProvider) Register(info OpenActionDeviceInfo) (map[string]any, error)
Build a provider registration envelope
func (*OpenActionDeviceProvider) RerenderImages ¶
func (p *OpenActionDeviceProvider) RerenderImages(device string) (map[string]any, error)
Request the host to resend device images
func (*OpenActionDeviceProvider) TouchscreenPress ¶
func (p *OpenActionDeviceProvider) TouchscreenPress(device string, position uint8, x, y uint16, hold bool) (map[string]any, error)
Build a touchscreen press envelope
type PermissionDeclaration ¶ added in v0.1.1
type PermissionDeclaration struct {
Version int `json:"version"`
Actions map[string]ActionPermissions `json:"actions"`
}
PermissionDeclaration describes requests. Only Manager can grant them.
type PermissionList ¶ added in v0.1.1
type PermissionList struct {
Revision string `json:"revision"`
Scopes []ActionPermissionStatus `json:"scopes"`
}
type PermissionNotice ¶ added in v0.1.1
type PermissionNotice struct {
Event string `json:"event"`
RequestID string `json:"request_id,omitempty"`
ReviewID string `json:"review_id,omitempty"`
Outcome string `json:"outcome,omitempty"`
Revision string `json:"revision,omitempty"`
Action string `json:"action,omitempty"`
Scopes []map[string]string `json:"scopes,omitempty"`
Entry *VaultEntryName `json:"entry,omitempty"`
ResultHandle string `json:"result_handle,omitempty"`
}
PermissionNotice contains only the fields published by Manager for this terminal or change event.
type PermissionReview ¶ added in v0.1.1
type PermissionStatus ¶ added in v0.1.1
type PluginTheme ¶
type PluginTheme struct {
Version int `json:"version"`
Resolved string `json:"resolved"`
Revision uint64 `json:"revision"`
Theme ThemeColors `json:"theme"`
}
type PortableSettings ¶
type PortableSettings struct {
// contains filtered or unexported fields
}
PortableSettings uses the same action/global object on every host. Its base writes report only "sent"; reads report observed state, never a commit receipt
func NewPortableSettings ¶
func NewPortableSettings(client *Client, scope, address string) (*PortableSettings, error)
Create a portable settings accessor for an explicit scope
func (*PortableSettings) Read ¶
func (s *PortableSettings) Read(ctx context.Context) (SettingsResult, error)
Read portable settings through the selected host contract
func (*PortableSettings) Replace ¶
func (s *PortableSettings) Replace(ctx context.Context, value map[string]any) (SettingsResult, error)
Replace portable settings with a cloned object
func (*PortableSettings) Update ¶
func (s *PortableSettings) Update(ctx context.Context, changes map[string]any) (SettingsResult, error)
Update serializes read/merge/write within this facade only, not across other plugin/inspector writers. Explicit null remains a value, not a deletion marker
type ProbePool ¶
type ProbePool struct {
// contains filtered or unexported fields
}
func NewProbePool ¶
func NewProbePool() *ProbePool
Workers and their queue are allocated only when the first probe is submitted
type RecipeResult ¶ added in v0.1.1
type Scheduler ¶
Scheduler explicitly enables timed polling. Handlers without Scheduler never poll A zero deadline suspends idle polling until an event or wake Methods run on the handler event loop and must not block
type SettingsResult ¶
type StorageKeys ¶
type StorageKeys struct {
StorageVersion
Keys []string `json:"keys"`
Cursor string `json:"cursor,omitempty"`
}
type StorageMutation ¶
type StorageReceipt ¶
type StorageReceipt struct {
StorageVersion
OperationID string `json:"operation_id"`
Committed bool `json:"committed"`
Found bool `json:"found,omitempty"`
}
type StorageValue ¶
type StorageValue struct {
StorageVersion
Found bool `json:"found"`
Value json.RawMessage `json:"value,omitempty"`
}
type StorageVersion ¶
type Surface ¶
type Surface struct {
ActivationToken string `json:"activation_token,omitempty"`
RequestID string `json:"request_id,omitempty"`
ControlID string `json:"control_id"`
Width int `json:"width"`
Height int `json:"height"`
FeedbackTarget string `json:"feedback_target"`
Touch *struct {
X int `json:"x"`
Y int `json:"y"`
Phase string `json:"phase"`
} `json:"touch,omitempty"`
}
type TelemetrySnapshot ¶
type TelemetrySnapshot struct {
AudioObserver bool `json:"audio_observer"`
CPU Measurement `json:"cpu"`
Memory Measurement `json:"memory"`
Network Measurement `json:"network"`
Disks map[string]Measurement `json:"disks"`
AudioVolume Measurement `json:"audio_volume"`
AudioMuted Measurement `json:"audio_muted"`
}
func (*TelemetrySnapshot) UnmarshalJSON ¶
func (s *TelemetrySnapshot) UnmarshalJSON(data []byte) error
Decode a validated telemetry snapshot
type ThemeColors ¶
type ThemeMedia ¶
type ThemeWallpaper ¶
type ThemeWallpaper struct {
SVG string
Media *ThemeMedia
}
func (*ThemeWallpaper) UnmarshalJSON ¶
func (w *ThemeWallpaper) UnmarshalJSON(data []byte) error
Decode a bounded wallpaper description
type ThemedAsset ¶
type UnsupportedFeatureError ¶
type UnsupportedFeatureError struct{ Feature string }
func (*UnsupportedFeatureError) Error ¶
func (e *UnsupportedFeatureError) Error() string
Describe the unsupported host feature
type VaultEntryName ¶ added in v0.1.1
type VaultEntryPage ¶ added in v0.1.1
type VaultEntryPage struct {
Entries []VaultEntryName `json:"entries"`
Next *int `json:"next"`
}
type VaultLocation ¶ added in v0.1.1
VaultLocation contains the saved coordinates approved for a single action.
func (VaultLocation) MarshalJSON ¶ added in v0.1.1
func (VaultLocation) MarshalJSON() ([]byte, error)
type VaultSecret ¶ added in v0.1.1
type VaultSecret struct {
Revision string
EntryKind string
// contains filtered or unexported fields
}
VaultSecret keeps a directly shared credential out of default display and serialization.
func (VaultSecret) MarshalJSON ¶ added in v0.1.1
func (VaultSecret) MarshalJSON() ([]byte, error)
func (VaultSecret) Reveal ¶ added in v0.1.1
func (s VaultSecret) Reveal() string
Reveal explicitly extracts plaintext. Avoid logging, persistence and replay.
type VaultText ¶ added in v0.1.1
VaultText contains a nonsecret text slot value (which may still be private).
func (VaultText) MarshalJSON ¶ added in v0.1.1
type VaultValueRequest ¶ added in v0.1.1
type VaultValueRequest struct {
Slot string `json:"slot"`
Field string `json:"field"`
Action string `json:"action"`
}
VaultValueRequest selects a reviewed logical setup slot; it grants no authority.
type VaultWriteReceipt ¶ added in v0.1.1
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package authoring owns the shared plugin lifecycle; it imports no feature implementation
|
Package authoring owns the shared plugin lifecycle; it imports no feature implementation |
|
Package cache provides owner-serialized caches with deterministic LRU eviction Values are caller-owned immutable snapshots.
|
Package cache provides owner-serialized caches with deterministic LRU eviction Values are caller-owned immutable snapshots. |
|
Package connectedws supplies the bounded, tracked transport for external service connections.
|
Package connectedws supplies the bounded, tracked transport for external service connections. |
|
Package connectors adapts independent integrations to the SDK lifecycle It contains no feature imports, so executables retain dependency isolation
|
Package connectors adapts independent integrations to the SDK lifecycle It contains no feature imports, so executables retain dependency isolation |
|
Package discovery coordinates read-only inspector work on an owner event loop Start uses a bounded executor supplied by the caller; Complete and Expire run on the loop.
|
Package discovery coordinates read-only inspector work on an owner event loop Start uses a bounded executor supplied by the caller; Complete and Expire run on the loop. |
|
Package displaybench measures the real engine/SDK display path on loopback It deliberately imports no official plugin or operating-system action adapter
|
Package displaybench measures the real engine/SDK display path on loopback It deliberately imports no official plugin or operating-system action adapter |
|
examples
|
|
|
advanced
command
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT |
|
benchmark
command
A bounded in-process authoring workload, separate from loopback/hardware measurements
|
A bounded in-process authoring workload, separate from loopback/hardware measurements |
|
Package httptrack optionally tracks transferred HTTP payload for SDK reporting
|
Package httptrack optionally tracks transferred HTTP payload for SDK reporting |
|
Package inspectors contains the SDK's packaged, local inspector helpers
|
Package inspectors contains the SDK's packaged, local inspector helpers |
|
internal
|
|
|
benchmarkclock
Package benchmarkclock measures benchmark intervals without changing runtime timers or the system timer resolution
|
Package benchmarkclock measures benchmark intervals without changing runtime timers or the system timer resolution |
|
netdebug
Package netdebug connects optional transport diagnostics to the SDK log queue without adding HTTP dependencies to plugins that do not use HTTP
|
Package netdebug connects optional transport diagnostics to the SDK log queue without adding HTTP dependencies to plugins that do not use HTTP |
|
payload
Package payload shares process-local payload accounting without importing HTTP
|
Package payload shares process-local payload accounting without importing HTTP |
|
statefile
Package statefile bounds state reads before JSON decoding, including files that grow after they are opened.
|
Package statefile bounds state reads before JSON decoding, including files that grow after they are opened. |
|
Package managedstate persists JSON records through an explicitly selected SDK backend.
|
Package managedstate persists JSON records through an explicitly selected SDK backend. |
|
Package operations tracks external outcomes without executing or retrying work Serialize calls on the owner loop or with a caller-held mutex.
|
Package operations tracks external outcomes without executing or retrying work Serialize calls on the owner loop or with a caller-held mutex. |
|
Package packaging audits runtime dependencies and local resource closure
|
Package packaging audits runtime dependencies and local resource closure |
|
Package requests shares in-flight JSON reads without coupling consumer cancellation It never retries a write.
|
Package requests shares in-flight JSON reads without coupling consumer cancellation It never retries a write. |
|
Package settings validates declarative inspector fields without losing extensions
|
Package settings validates declarative inspector fields without losing extensions |
|
Package storage persists plugin-owned state.
|
Package storage persists plugin-owned state. |
|
Package testkit runs real SDK handlers without sockets or a Manager checkout
|
Package testkit runs real SDK handlers without sockets or a Manager checkout |
|
peers
Package testutil provides disposable protocol peers; it never connects to a user's accounts, local services or VPN tools
|
Package testutil provides disposable protocol peers; it never connects to a user's accounts, local services or VPN tools |
|
Package thumbnail provides bounded standard-library image decoding and sampling
|
Package thumbnail provides bounded standard-library image decoding and sampling |