Documentation
¶
Index ¶
- Constants
- Variables
- type AppRuntime
- type AppStorage
- type CoreRootServer
- func (s *CoreRootServer) AccessStateAtom(ctx context.Context, req *s4wave_root.AccessStateAtomRequest) (*s4wave_root.AccessStateAtomResponse, error)
- func (s *CoreRootServer) AccessWebListener(ctx context.Context, req *s4wave_root.AccessWebListenerRequest) (*s4wave_root.AccessWebListenerResponse, error)
- func (s *CoreRootServer) Close()
- func (s *CoreRootServer) DeleteSession(ctx context.Context, req *s4wave_root.DeleteSessionRequest) (*s4wave_root.DeleteSessionResponse, error)
- func (s *CoreRootServer) GetCdn(ctx context.Context, req *s4wave_root.GetCdnRequest) (*s4wave_root.GetCdnResponse, error)
- func (s *CoreRootServer) GetChangelog(ctx context.Context, req *s4wave_root.GetChangelogRequest) (*s4wave_root.GetChangelogResponse, error)
- func (s *CoreRootServer) GetDebugDb(ctx context.Context, _ *s4wave_root.GetDebugDbRequest) (*s4wave_root.GetDebugDbResponse, error)
- func (s *CoreRootServer) GetSessionMetadata(ctx context.Context, req *s4wave_root.GetSessionMetadataRequest) (*s4wave_root.GetSessionMetadataResponse, error)
- func (s *CoreRootServer) HashSum(ctx context.Context, req *s4wave_root.HashSumRequest) (*s4wave_root.HashSumResponse, error)
- func (s *CoreRootServer) HashValidate(ctx context.Context, req *s4wave_root.HashValidateRequest) (*s4wave_root.HashValidateResponse, error)
- func (s *CoreRootServer) ListProviders(ctx context.Context, req *s4wave_root.ListProvidersRequest) (*s4wave_root.ListProvidersResponse, error)
- func (s *CoreRootServer) ListSessions(ctx context.Context, req *s4wave_root.ListSessionsRequest) (*s4wave_root.ListSessionsResponse, error)
- func (s *CoreRootServer) ListSpaceRootAliases(ctx context.Context, _ *s4wave_root.ListSpaceRootAliasesRequest) (*s4wave_root.ListSpaceRootAliasesResponse, error)
- func (s *CoreRootServer) LookupProvider(ctx context.Context, req *s4wave_root.LookupProviderRequest) (*s4wave_root.LookupProviderResponse, error)
- func (s *CoreRootServer) MarshalHash(ctx context.Context, req *s4wave_root.MarshalHashRequest) (*s4wave_root.MarshalHashResponse, error)
- func (s *CoreRootServer) MountApp(ctx context.Context, req *s4wave_root.MountAppRequest) (*s4wave_root.MountAppResponse, error)
- func (s *CoreRootServer) MountSession(ctx context.Context, req *s4wave_root.MountSessionRequest) (*s4wave_root.MountSessionResponse, error)
- func (s *CoreRootServer) MountSessionByIdx(ctx context.Context, req *s4wave_root.MountSessionByIdxRequest) (*s4wave_root.MountSessionByIdxResponse, error)
- func (s *CoreRootServer) ParseHash(ctx context.Context, req *s4wave_root.ParseHashRequest) (*s4wave_root.ParseHashResponse, error)
- func (s *CoreRootServer) ReclaimRuntime(_ context.Context, _ *s4wave_root.ReclaimRuntimeRequest) (*s4wave_root.ReclaimRuntimeResponse, error)
- func (s *CoreRootServer) Register(mux srpc.Mux) error
- func (s *CoreRootServer) RemoveSpaceRootAlias(ctx context.Context, req *s4wave_root.RemoveSpaceRootAliasRequest) (*s4wave_root.RemoveSpaceRootAliasResponse, error)
- func (s *CoreRootServer) ResetSession(ctx context.Context, req *s4wave_root.ResetSessionByIdxRequest) (*s4wave_root.ResetSessionByIdxResponse, error)
- func (s *CoreRootServer) RespondToListenerYieldPrompt(_ context.Context, req *s4wave_root.RespondToListenerYieldPromptRequest) (*s4wave_root.RespondToListenerYieldPromptResponse, error)
- func (s *CoreRootServer) RunBackgroundPlugins(ctx context.Context) error
- func (s *CoreRootServer) SetAppPluginIDs(ids []string)
- func (s *CoreRootServer) SetBindingRegistry(registry *process_binding.BindingRegistry)
- func (s *CoreRootServer) SetHostPluginID(pluginID string)
- func (s *CoreRootServer) SetListenerStatusBroker(broker *resource_listener.StatusBroker)
- func (s *CoreRootServer) SetMountAppFunc(fn MountAppFunc)
- func (s *CoreRootServer) SetYieldBroker(broker *yield_policy.Broker)
- func (s *CoreRootServer) StopWebListener(ctx context.Context, req *s4wave_root.StopWebListenerRequest) (*s4wave_root.StopWebListenerResponse, error)
- func (s *CoreRootServer) UnlockSession(ctx context.Context, req *s4wave_root.UnlockSessionByIdxRequest) (*s4wave_root.UnlockSessionByIdxResponse, error)
- func (s *CoreRootServer) UpsertSpaceRootAlias(ctx context.Context, req *s4wave_root.UpsertSpaceRootAliasRequest) (*s4wave_root.UpsertSpaceRootAliasResponse, error)
- func (s *CoreRootServer) WatchAllAccountStatuses(req *s4wave_root.WatchAllAccountStatusesRequest, ...) error
- func (s *CoreRootServer) WatchListenerStatus(_ *s4wave_root.WatchListenerStatusRequest, ...) error
- func (s *CoreRootServer) WatchListenerYieldPrompts(_ *s4wave_root.WatchListenerYieldPromptsRequest, ...) error
- func (s *CoreRootServer) WatchRuntimeHandoff(_ *s4wave_root.WatchRuntimeHandoffRequest, ...) error
- func (s *CoreRootServer) WatchSessionMetadata(req *s4wave_root.WatchSessionMetadataRequest, ...) error
- func (s *CoreRootServer) WatchSessions(req *s4wave_root.WatchSessionsRequest, ...) error
- func (s *CoreRootServer) WatchSpaceRootAliases(_ *s4wave_root.WatchSpaceRootAliasesRequest, ...) error
- func (s *CoreRootServer) WatchSpaceRootRuntime(req *s4wave_root.WatchSpaceRootRuntimeRequest, ...) error
- func (s *CoreRootServer) WatchStateAtoms(_ *s4wave_root.WatchStateAtomsRequest, ...) error
- func (s *CoreRootServer) WatchWebListeners(_ *s4wave_root.WatchWebListenersRequest, ...) error
- type MountAppFunc
Constants ¶
const StateAtomObjectStoreID = "state-atoms"
StateAtomObjectStoreID is the object store ID for state atoms.
Variables ¶
var BoundPluginIDs = []string{webAppPluginID, webPkgPluginID}
BoundPluginIDs are the plugins whose browser files a bound listener serves.
Functions ¶
This section is empty.
Types ¶
type AppRuntime ¶
AppRuntime exposes the Resource service and HTTP route of a live installation.
type AppStorage ¶
AppStorage is a validated storage capability for a nested installation. EphemeralID distinguishes privately owned Worlds; supplied engines remain caller-owned.
type CoreRootServer ¶
type CoreRootServer struct {
// contains filtered or unexported fields
}
CoreRootServer implements the RootResourceService for s4wave core.
func NewCoreRootServer ¶
func NewCoreRootServer(le *logrus.Entry, b bus.Bus) *CoreRootServer
NewCoreRootServer creates a new CoreRootServer.
func (*CoreRootServer) AccessStateAtom ¶
func (s *CoreRootServer) AccessStateAtom( ctx context.Context, req *s4wave_root.AccessStateAtomRequest, ) (*s4wave_root.AccessStateAtomResponse, error)
AccessStateAtom accesses a state atom resource.
func (*CoreRootServer) AccessWebListener ¶
func (s *CoreRootServer) AccessWebListener( ctx context.Context, req *s4wave_root.AccessWebListenerRequest, ) (*s4wave_root.AccessWebListenerResponse, error)
AccessWebListener creates or reuses a localhost web listener.
func (*CoreRootServer) Close ¶
func (s *CoreRootServer) Close()
Close releases process-owned root resources.
func (*CoreRootServer) DeleteSession ¶
func (s *CoreRootServer) DeleteSession( ctx context.Context, req *s4wave_root.DeleteSessionRequest, ) (*s4wave_root.DeleteSessionResponse, error)
DeleteSession removes a session from the local session list by index.
func (*CoreRootServer) GetCdn ¶
func (s *CoreRootServer) GetCdn( ctx context.Context, req *s4wave_root.GetCdnRequest, ) (*s4wave_root.GetCdnResponse, error)
GetCdn mounts a CdnResource for the selected CDN instance and returns both the client resource id and the CDN Space ULID in one round-trip. Empty cdn_id selects the default CDN. Unknown ids return the wrapped ErrUnknownCdn from the registry so callers can distinguish misconfigured ids from transport errors.
func (*CoreRootServer) GetChangelog ¶
func (s *CoreRootServer) GetChangelog( ctx context.Context, req *s4wave_root.GetChangelogRequest, ) (*s4wave_root.GetChangelogResponse, error)
GetChangelog returns the embedded application changelog.
func (*CoreRootServer) GetDebugDb ¶
func (s *CoreRootServer) GetDebugDb( ctx context.Context, _ *s4wave_root.GetDebugDbRequest, ) (*s4wave_root.GetDebugDbResponse, error)
GetDebugDb returns a debug database resource for storage diagnostics.
func (*CoreRootServer) GetSessionMetadata ¶
func (s *CoreRootServer) GetSessionMetadata( ctx context.Context, req *s4wave_root.GetSessionMetadataRequest, ) (*s4wave_root.GetSessionMetadataResponse, error)
GetSessionMetadata returns metadata for a session by index.
func (*CoreRootServer) HashSum ¶
func (s *CoreRootServer) HashSum( ctx context.Context, req *s4wave_root.HashSumRequest, ) (*s4wave_root.HashSumResponse, error)
HashSum computes a hash of the given data with the specified hash type.
func (*CoreRootServer) HashValidate ¶
func (s *CoreRootServer) HashValidate( ctx context.Context, req *s4wave_root.HashValidateRequest, ) (*s4wave_root.HashValidateResponse, error)
HashValidate validates a hash object.
func (*CoreRootServer) ListProviders ¶
func (s *CoreRootServer) ListProviders( ctx context.Context, req *s4wave_root.ListProvidersRequest, ) (*s4wave_root.ListProvidersResponse, error)
ListProviders lists the available providers.
func (*CoreRootServer) ListSessions ¶
func (s *CoreRootServer) ListSessions( ctx context.Context, req *s4wave_root.ListSessionsRequest, ) (*s4wave_root.ListSessionsResponse, error)
ListSessions lists the configured sessions.
func (*CoreRootServer) ListSpaceRootAliases ¶ added in v0.51.2
func (s *CoreRootServer) ListSpaceRootAliases( ctx context.Context, _ *s4wave_root.ListSpaceRootAliasesRequest, ) (*s4wave_root.ListSpaceRootAliasesResponse, error)
ListSpaceRootAliases lists configured local state-root records.
func (*CoreRootServer) LookupProvider ¶
func (s *CoreRootServer) LookupProvider(ctx context.Context, req *s4wave_root.LookupProviderRequest) (*s4wave_root.LookupProviderResponse, error)
LookupProvider accesses a provider Resource by ID.
func (*CoreRootServer) MarshalHash ¶
func (s *CoreRootServer) MarshalHash( ctx context.Context, req *s4wave_root.MarshalHashRequest, ) (*s4wave_root.MarshalHashResponse, error)
MarshalHash marshals a Hash to a base58 string.
func (*CoreRootServer) MountApp ¶
func (s *CoreRootServer) MountApp(ctx context.Context, req *s4wave_root.MountAppRequest) (*s4wave_root.MountAppResponse, error)
MountApp mounts an isolated installation using exactly one supplied storage source.
func (*CoreRootServer) MountSession ¶
func (s *CoreRootServer) MountSession( ctx context.Context, req *s4wave_root.MountSessionRequest, ) (*s4wave_root.MountSessionResponse, error)
MountSession mounts a session and returns the Session resource by SessionRef.
func (*CoreRootServer) MountSessionByIdx ¶
func (s *CoreRootServer) MountSessionByIdx( ctx context.Context, req *s4wave_root.MountSessionByIdxRequest, ) (*s4wave_root.MountSessionByIdxResponse, error)
MountSessionByIdx mounts a session by index and returns the Session resource.
func (*CoreRootServer) ParseHash ¶
func (s *CoreRootServer) ParseHash( ctx context.Context, req *s4wave_root.ParseHashRequest, ) (*s4wave_root.ParseHashResponse, error)
ParseHash parses a Hash from a base58 string.
func (*CoreRootServer) ReclaimRuntime ¶
func (s *CoreRootServer) ReclaimRuntime( _ context.Context, _ *s4wave_root.ReclaimRuntimeRequest, ) (*s4wave_root.ReclaimRuntimeResponse, error)
ReclaimRuntime signals the listener controller to reclaim the runtime from the remote owner.
func (*CoreRootServer) Register ¶
func (s *CoreRootServer) Register(mux srpc.Mux) error
Register registers the server with the Root resource mux. Bound web listeners serve the same mux, so register on it before they start.
func (*CoreRootServer) RemoveSpaceRootAlias ¶ added in v0.51.2
func (s *CoreRootServer) RemoveSpaceRootAlias( ctx context.Context, req *s4wave_root.RemoveSpaceRootAliasRequest, ) (*s4wave_root.RemoveSpaceRootAliasResponse, error)
RemoveSpaceRootAlias removes a configured local state root.
func (*CoreRootServer) ResetSession ¶
func (s *CoreRootServer) ResetSession( ctx context.Context, req *s4wave_root.ResetSessionByIdxRequest, ) (*s4wave_root.ResetSessionByIdxResponse, error)
ResetSession resets a PIN-locked session via entity key verification.
func (*CoreRootServer) RespondToListenerYieldPrompt ¶
func (s *CoreRootServer) RespondToListenerYieldPrompt( _ context.Context, req *s4wave_root.RespondToListenerYieldPromptRequest, ) (*s4wave_root.RespondToListenerYieldPromptResponse, error)
RespondToListenerYieldPrompt resolves a pending prompt with the user's decision.
func (*CoreRootServer) RunBackgroundPlugins ¶
func (s *CoreRootServer) RunBackgroundPlugins(ctx context.Context) error
RunBackgroundPlugins keeps each Space with a confirmed background plugin that is not suspended mounted, with its plugin runtime running those plugins, for as long as the confirmation stands in its Session's metadata. The Space's other plugins run only while an application mounts its contents. Holding the Session mount keeps the Session running. Returns when ctx ends.
func (*CoreRootServer) SetAppPluginIDs ¶
func (s *CoreRootServer) SetAppPluginIDs(ids []string)
SetAppPluginIDs supplies application composition before the resource is published.
func (*CoreRootServer) SetBindingRegistry ¶
func (s *CoreRootServer) SetBindingRegistry(registry *process_binding.BindingRegistry)
SetBindingRegistry shares binding notifications with the parent Resource root when this root belongs to a nested application.
func (*CoreRootServer) SetHostPluginID ¶ added in v0.51.3
func (s *CoreRootServer) SetHostPluginID(pluginID string)
SetHostPluginID records the plugin id serving this resource root.
func (*CoreRootServer) SetListenerStatusBroker ¶ added in v0.57.2
func (s *CoreRootServer) SetListenerStatusBroker(broker *resource_listener.StatusBroker)
SetListenerStatusBroker injects the shared listener status broker.
func (*CoreRootServer) SetMountAppFunc ¶
func (s *CoreRootServer) SetMountAppFunc(fn MountAppFunc)
SetMountAppFunc installs the app runtime composition before serving requests.
func (*CoreRootServer) SetYieldBroker ¶ added in v0.57.2
func (s *CoreRootServer) SetYieldBroker(broker *yield_policy.Broker)
SetYieldBroker injects the shared listener yield broker. The composition root that also wires the resource listener controller injects one broker so takeover prompts and reclaim signals agree across consumers.
func (*CoreRootServer) StopWebListener ¶
func (s *CoreRootServer) StopWebListener( ctx context.Context, req *s4wave_root.StopWebListenerRequest, ) (*s4wave_root.StopWebListenerResponse, error)
StopWebListener stops a daemon-owned localhost web listener.
func (*CoreRootServer) UnlockSession ¶
func (s *CoreRootServer) UnlockSession( ctx context.Context, req *s4wave_root.UnlockSessionByIdxRequest, ) (*s4wave_root.UnlockSessionByIdxResponse, error)
UnlockSession unlocks a PIN-locked session before mounting.
func (*CoreRootServer) UpsertSpaceRootAlias ¶ added in v0.51.2
func (s *CoreRootServer) UpsertSpaceRootAlias( ctx context.Context, req *s4wave_root.UpsertSpaceRootAliasRequest, ) (*s4wave_root.UpsertSpaceRootAliasResponse, error)
UpsertSpaceRootAlias validates and persists a configured local state root.
func (*CoreRootServer) WatchAllAccountStatuses ¶
func (s *CoreRootServer) WatchAllAccountStatuses( req *s4wave_root.WatchAllAccountStatusesRequest, strm s4wave_root.SRPCRootResourceService_WatchAllAccountStatusesStream, ) error
WatchAllAccountStatuses streams provider account statuses for all sessions.
func (*CoreRootServer) WatchListenerStatus ¶
func (s *CoreRootServer) WatchListenerStatus( _ *s4wave_root.WatchListenerStatusRequest, strm s4wave_root.SRPCRootResourceService_WatchListenerStatusStream, ) error
WatchListenerStatus streams the current desktop resource listener status: effective socket path, whether the listener is currently bound, and the count of connected resource clients. The UI uses this to render a live status chip on the session-local command-line setup page and to choose the agent prompt. A runtime without a resource listener, such as the browser, sends one empty status.
func (*CoreRootServer) WatchListenerYieldPrompts ¶
func (s *CoreRootServer) WatchListenerYieldPrompts( _ *s4wave_root.WatchListenerYieldPromptsRequest, strm s4wave_root.SRPCRootResourceService_WatchListenerYieldPromptsStream, ) error
WatchListenerYieldPrompts streams the set of pending takeover prompts surfaced by the desktop resource listener's yield broker. The UI subscribes to this stream, renders a modal for the first prompt, and resolves via RespondToListenerYieldPrompt.
func (*CoreRootServer) WatchRuntimeHandoff ¶
func (s *CoreRootServer) WatchRuntimeHandoff( _ *s4wave_root.WatchRuntimeHandoffRequest, strm s4wave_root.SRPCRootResourceService_WatchRuntimeHandoffStream, ) error
WatchRuntimeHandoff streams the current runtime handoff state so the UI can render the "Runtime handed off" banner and the Reclaim action.
func (*CoreRootServer) WatchSessionMetadata ¶
func (s *CoreRootServer) WatchSessionMetadata( req *s4wave_root.WatchSessionMetadataRequest, strm s4wave_root.SRPCRootResourceService_WatchSessionMetadataStream, ) error
WatchSessionMetadata streams metadata for a session by index.
func (*CoreRootServer) WatchSessions ¶
func (s *CoreRootServer) WatchSessions( req *s4wave_root.WatchSessionsRequest, strm s4wave_root.SRPCRootResourceService_WatchSessionsStream, ) error
WatchSessions streams the session list, sending updates when sessions change.
func (*CoreRootServer) WatchSpaceRootAliases ¶ added in v0.51.2
func (s *CoreRootServer) WatchSpaceRootAliases( _ *s4wave_root.WatchSpaceRootAliasesRequest, strm s4wave_root.SRPCRootResourceService_WatchSpaceRootAliasesStream, ) error
WatchSpaceRootAliases streams configured local state-root records.
func (*CoreRootServer) WatchSpaceRootRuntime ¶ added in v0.51.2
func (s *CoreRootServer) WatchSpaceRootRuntime( req *s4wave_root.WatchSpaceRootRuntimeRequest, strm s4wave_root.SRPCRootResourceService_WatchSpaceRootRuntimeStream, ) error
WatchSpaceRootRuntime streams sessions from a selected configured root daemon.
func (*CoreRootServer) WatchStateAtoms ¶
func (s *CoreRootServer) WatchStateAtoms( _ *s4wave_root.WatchStateAtomsRequest, strm s4wave_root.SRPCRootResourceService_WatchStateAtomsStream, ) error
WatchStateAtoms streams the known root state atom store ids on change.
func (*CoreRootServer) WatchWebListeners ¶
func (s *CoreRootServer) WatchWebListeners( _ *s4wave_root.WatchWebListenersRequest, strm s4wave_root.SRPCRootResourceService_WatchWebListenersStream, ) error
WatchWebListeners streams daemon-owned localhost web listeners.
type MountAppFunc ¶
type MountAppFunc func(context.Context, AppStorage) (AppRuntime, func(), error)
MountAppFunc attaches to the ordinary runtime composed by the root controller.