fuchsia.modular

PROTOCOLS

Agent

Defined in fuchsia.modular/agent.fidl

An agent is a component whose lifecycle is not tied to any Story.

  • An agent is a singleton instance.
  • Components can connect to an Agent using the fuchsia.modular.ComponentContext capability.
  • An agent vends services to components that connect to it over a ServiceProvider.
  • An agent is started when someone wants to connect to it, or when a task it has scheduled has triggered.

    This FIDL interface should be implemented by a component that is meant to be run as an Agent.

    When an agent application implements the Lifecycle interface, it can receive a signal for when it should stop. An agent may be stopped for the following reasons:

    (1) All AgentController connections associated with this agent are closed.

    (2) The system wants to optimize for resources.

    Once the framework delivers a Lifecycle.Terminate(), the agent application may exit itself, or is killed by framework after a timeout.

    For more info see:

  • fuchsia.modular.AgentContext and fuchsia.modular.ComponentContext for capabilities an agent has.

  • fuchsia.modular.Lifecycle for how Components get lifecycle events.

Connect

Called when some component tries to connect to this agent. requestor_url identifies the requesting client. Different client roles are identified differently: * For Module clients in the general case, requestor_url will be the name provided at Module create time (ie, in calls to StoryPuppetMaster's StoryCommand.AddMod/mod_name) with :'s escaped (see below for a complete explanation). * For all other clients (Agents and Shells), requestor_url is set to the requesting component's URL.

services must be connected to an implementation of fuchsia.sys.ServiceProvider offering services specific to the requesting client.

Details on module naming: modules are named hierarchically based on what client created them. This is called a module path. If created by 1) an agent or 2) an existing module, the path is constructed differently.

In the case of (2), the module path is the concatenation of the existing module's path with the new module's name, as provided by the parent module. In the case of (1), the module path is the concatenation of StoryCommand.AddMod/mod_name and StoryCommand.AddMod/surface_relation_parent.

The full path is encoded into requestor_url as escape_colons(module_path).join(':').

Request

NameType
requestor_url string
services request<fuchsia.sys/ServiceProvider>

RunTask

Called when some task identified by task_id is scheduled to run. The task was first posted by this Agent using AgentContext.ScheduleTask(). The return callback is called by this Agent when all work related to this task is completed. Note that the framework may call Lifecycle.Terminate() before RunTask returns.

TODO(alhaad): The current implementation allows the Agent to run a task until its callback returns. If the task takes a long time to finish, the framework has no way to signal a request for termination other than to shut down the entire Agent instance. Instead, we should cap task length with strategies like budgets. Also, the Task should likely have its own connection that allows for more signalling.

Request

NameType
task_id string

Response

NameType

AgentContext

Defined in fuchsia.modular/agent_context.fidl

An instance of this service is exposed to agents in their namespace. AgentContext allows an agent to schedule tasks which run in response to triggers. Triggers are conditions such as a message arriving on a MessageQueue.

GetComponentContext

DEPRECATED: ComponentContext is now available in the namespace/environment for Modules.

Request

NameType
request request<ComponentContext>

GetEntityReferenceFactory

Connects to an EntityReferenceFactory for this Agent. Entity references obtained from this EntityReferenceFactory will be resolved back to this Agent.

Request

NameType
request request<EntityReferenceFactory>

ScheduleTask

Schedules a task described in task_info. When this task is scheduled to run, Agent.RunTask() is called.

Request

NameType
task_info TaskInfo

ScheduleTaskWithCompletion

Schedules a task described in task_info. When this task is scheduled to run, Agent.RunTask() is called. Executes the callback on completion.

Request

NameType
task_info TaskInfo

Response

NameType
done bool

DeleteTask

No new runs of this task will be scheduled.

Request

NameType
task_id string

GetTokenManager

The auth token manager this Agent may use for accessing external services.

Request

NameType
request request<fuchsia.auth/TokenManager>

AgentController

Defined in fuchsia.modular/agent_controller.fidl

This interface is used by the caller of ComponentContext::ConnectToAgent() to tell the framework that it is still interested in keeping this Agent running.

The system counts AgentController connections and terminates this Agent if the count goes to zero.

BaseShell

Defined in fuchsia.modular/base_shell.fidl

This interface is implemented by a base shell. Dependencies are passed to it in Initialize() on startup. The base shell is also expected to implement Lifecycle in order to receive a Terminate() call on teardown.

In one component instance there can only be one BaseShell service instance. The ViewOwner request is sent to the separate ViewProvider service. This way, the base shell may be implemented as a flutter component.

Teardown may be initiated by the base shell calling BaseShellContext.Shutdown(), or by the system shutting down.

Initialize

Request

NameType
base_shell_context BaseShellContext
base_shell_params BaseShellParams

GetAuthenticationUIContext

This method may be invoked by the basemgr to request an AuthenticationUIContext. request will then be used to request the base shell to show login screen during a UserProvider.AddUser() or if a token needs to be refreshed.

Request

NameType
request request<fuchsia.auth/AuthenticationUIContext>

BaseShellContext

Defined in fuchsia.modular/base_shell.fidl

This interface allows the BaseShell to request capabilities from the Basemgr in a way that is more explicit about the services that are offered than a generic ServiceProvider.

GetUserProvider

Acquires the user provider service, which is used to add/remove/list and authenticate users.

Request

NameType
request request<UserProvider>

GetPresentation

Acquires the presentation service, which is assumed to already be connected to the presenter.

Request

NameType
presentation request<fuchsia.ui.policy/Presentation>

Shutdown

This requests the shutdown of the basemgr.

Request

NameType

UserProvider

Defined in fuchsia.modular/user_provider.fidl

Given by the Basemgr to the BaseShell at Initialize() so the BaseShell can get information about the users of this device from the Basemgr, and act on the provided information (including extending the user database).

AddUser

Adds information of a user that can be used to authenticate her/him to this device. Once successfully added, the user can login to the same device via Login().

identity_provider is the identity provider to use for identification.

device_name is what the user wants to name the device. If null or empty the device's current hostname will be used.

account is NULL if there was an error during identification and error_code is set.

Request

NameType
identity_provider fuchsia.modular.auth/IdentityProvider

Response

NameType
account fuchsia.modular.auth/Account?
error_code string?

RemoveUser

Removes information of a user from the local user database.

account_id is received from either AddUser() or PreviousUsers().

Request

NameType
account_id string

Response

NameType
error_code string?

Login

Uses the credentials provided in AddUser() to start a user session. This would mean syncing with the user's ledger instance and displaying a user shell with all of the user's stories.

Request

NameType
user_login_params UserLoginParams

Login2

DEPRECATED: For transitional purposes only.

Request

NameType
user_login_params UserLoginParams2

PreviousUsers

List of all users who have authenticated to this device in the past.

Request

NameType

Response

NameType
accounts vector<fuchsia.modular.auth/Account>

Clipboard

Defined in fuchsia.modular/clipboard.fidl

An interface that provides clients with the ability to store and retrieve text.

Push

Pushes text onto the clipboard.

Request

NameType
text string

Peek

Peeks at the current topmost item on the clipboard and returns it, or null if no such item exists.

Request

NameType

Response

NameType
text string?

ComponentContext

Defined in fuchsia.modular/component_context.fidl

Provided to all component instances in their respective initialization information by the framework. For example, a Module gets it from its ModuleContext and an Agent gets it from its AgentContext.

GetLedger

Gets the Ledger associated with this component. This ledger instance is unique to this component (nb. not the component instance) under this user.

Request

NameType
request request<fuchsia.ledger/Ledger>

ConnectToAgent

Used to start an agent in the user scope if it isn't already running, and connect to it.

Request

NameType
url string
incoming_services request<fuchsia.sys/ServiceProvider>
controller request<AgentController>

ConnectToAgentService

Connects to an agent that provides the given request.service_name, and then connects the given request.channel to that service. request.agent_controller must be kept alive until the service is no longer required.

If an error is encountered, the request.channel will be closed with a status code, such as: * ZX_ERR_NOT_FOUND -- if a request.handler agent URL is not specified, and an agent for the request.service_name is not found * ZX_ERR_PEER_CLOSED -- if request.service_name is not available from the agent (either specified or discovered)

Request

NameType
request AgentServiceRequest

ObtainMessageQueue

Used to create or delete a message queue or retrieve an existing queue identified by name. name is local to the calling component instance.

Request

NameType
name string
queue request<MessageQueue>

DeleteMessageQueue

Request

NameType
name string

GetMessageSender

Gets a MessageSender service that can be used to send a message to a queue identified by queue_token. Token for a MessageQueue is obtained from its GetToken() method. The token is unique within the scope of the user, i.e. it can be used by other component instances than the one that created the message queue.

Request

NameType
queue_token string
sender request<MessageSender>

GetEntityResolver

Gets the EntityResolver service, which can be used to resolve an entity reference to an Entity interface.

Request

NameType
request request<EntityResolver>

CreateEntityWithData

Creates a new entity from type_to_data such that duplicate types are overriden by subsequent entries.

This is a useful way to represent small immutable entities without having to provide the entity using an Agent. The types and data together must be within 16KB in size.

Request

NameType
type_to_data vector<TypeToDataEntry>

Response

NameType
entity_reference string?

GetPackageName

Gets the package name of this component.

Request

NameType

Response

NameType
package_name string

MessageQueue

Defined in fuchsia.modular/message_queue.fidl

A message queue is a named, locally persistent FIFO data structure. Message queues are created, read from, and deleted by component instances through their ComponentContext service.

A message queue is created by a component instance from its component context in order to receive messages in it.

A sender token that identifies the queue can be obtained from the message queue connection and passed to other components. This enables the other component to send messages to the queue. A sender token does not allow a component to read messages from a queue.

The name of a queue is local to the component instance, i.e. it can only be used by the component instance that created the queue to access it. The name can specifically be used to obtain a MessageReader connection for the message queue.

The existence of message queues and their tokens is synchronized across devices, allowing components with instances on multiple devices to route messages within each device. For example, modules can use sender tokens on different devices and see those messages delivered to the agent instance on the same device. However, individual messages are local to a device.

GetToken

Gets a sender token associated with this queue. It can be used by other components to send messages to this queue.

Request

NameType

Response

NameType
queue_token string

RegisterReceiver

Registers a receiver for this MessageQueue. MessageReader.OnReceive() is called when there is an unread message. There can be at most one receiver registered for a message queue at any time. Registering a new receiver replaces the previous one.

Request

NameType
receiver MessageReader

MessageSender

Defined in fuchsia.modular/message_queue.fidl

Used to send a message to a message queue. The MessageSender connection is obtained from ComponentContext.GetMessageSender() using a queue token of the MessageQueue. The queue token is obtained by the component that created the message queue and is then passed to the other component through services specific to either component.

Send

Request

NameType
message fuchsia.mem/Buffer

MessageReader

Defined in fuchsia.modular/message_queue.fidl

A component instance may implement and register a MessageReader interface using MessageQueue.RegisterReceiver(). When there are new unread messages, they are sent to MessageReader.OnReceive(). TODO(vardhan): There is a conflict with C++ fidl bindings for 'MessageReceiver'. After that is fixed, rename this interface to MessageReceiver.

OnReceive

Called when there is a new message to be received. Once an OnReceive() responds back, the message is acknowledged as having been received and the next one is sent when available. If a client's OnReceive() does not respond before the MessageReader interface is closed, then a future MessageReader for this message queue will receive the unacknowledged message again.

Request

NameType
message fuchsia.mem/Buffer

Response

NameType

ContextEngine

Defined in fuchsia.modular/context_engine.fidl

Top-level service provider interface that vends services to read and write context data.

GetReader

Request

NameType
client_info ComponentScope
request request<ContextReader>

GetWriter

Request

NameType
client_info ComponentScope
request request<ContextWriter>

GetContextDebug

Request

NameType
request request<ContextDebug>

ContextReader

Defined in fuchsia.modular/context_reader.fidl

Exposes access to Context values, each of which are explicitly named by a 'topic'. Each topic has a known/pre-defined value representation.

This interface is meant to be used in the scope of a single Fuchsia component.

Subscribe

When any conditions that would cause the resulting set of context values selected by query to change, a ContextUpdate is sent to listener.

The current state of values selected by query are sent to listener immediately.

The subscription will continue to stay active as long as the listener handle is not closed.

Request

NameType
query ContextQuery
listener ContextListener

Get

Returns the current context state matching query.

Request

NameType
query ContextQuery

Response

NameType
update ContextUpdate

ContextListener

Defined in fuchsia.modular/context_reader.fidl

OnContextUpdate

Receives a full snapshot of context state every time context is updated in such a way that results in a changed set of values for the ContextQuery used in the subscription for this listener.

Request

NameType
update ContextUpdate

ContextWriter

Defined in fuchsia.modular/context_writer.fidl

CreateValue

Creates and returns a ContextValueWriter for a future value of type, allowing the client to set and update the contents at a later time. The value is removed from the Context service when value_writer is closed or a connection error occurs.

Request

NameType
value_writer request<ContextValueWriter>
type ContextValueType

WriteEntityTopic

This method is here to make transitioning from topic-based context publishing to CreateValue() easier and will be removed eventually. Internally, calls CreateValue() with type = ContextValueType.ENTITY, and sets metadata.entity.topic = topic, unless WriteEntityTopic() was called already on this instance with the same topic value. In that case, performs an upate instead of adding a new value.

Leaving value null removes the topic value from the Context service.

Request

NameType
topic string
value string?

ContextValueWriter

Defined in fuchsia.modular/context_writer.fidl

CreateChildValue

Like ContextWriter.CreateValue(), but creates the new value as a child to this value.

Request

NameType
value_writer request<ContextValueWriter>
type ContextValueType

Set

Updates the content and/or metadata of this value. If either content or metadata are left null, the existing values will remain.

Request

NameType
content string?
metadata ContextMetadata?

ContextDebug

Defined in fuchsia.modular/debug.fidl

Watch

The watch will stay active until the listener handle is closed.

Request

NameType
listener ContextDebugListener

WaitUntilIdle

Waits until Context Engine has reached a steady state such that no further activity will occur unless acted upon from the outside.

Request

NameType

Response

NameType

ContextDebugListener

Defined in fuchsia.modular/debug.fidl

OnValuesChanged

Called any time a value is added, updated or removed. Each element in values represents a single add, update or remove operation. Values are guaranteed to appear before their children in the case that a parent and its child are included in the same update.

Request

NameType
values vector<ContextDebugValue>

OnSubscriptionsChanged

Request

NameType
subscription vector<ContextDebugSubscription>

Entity

Defined in fuchsia.modular/entity.fidl

A multi-typed data entity.

GetTypes

Returns the types associated with this entity. Each entry in types references a well-known content type.

Request

NameType

Response

NameType
types vector<string>

GetData

Given one of the types returned from GetTypes() above, returns associated short-form data, or null if the type is absent from GetTypes().

Request

NameType
type string

Response

NameType
data fuchsia.mem/Buffer?

WriteData

Sets the data for a particular type. This will precipitate an OnUpdated event with the associated type.

Request

NameType
type string
data fuchsia.mem/Buffer

Response

NameType
status EntityWriteStatus

GetReference

Gets the entity reference for this entity, which can be persisted and then later used to locate this entity. These references are weak references and are not sufficient to keep the entity alive.

Request

NameType

Response

NameType
entity_reference string

Watch

Begins watching for data changes on a particular type. The watcher immediately fires OnUpdated with the current value for the requested type (or null if the type is not present). Closing the Entity interface does not close the watcher.

Request

NameType
type string
watcher EntityWatcher

EntityWatcher

Defined in fuchsia.modular/entity.fidl

OnUpdated

Fires on data updates for a particular type. If the type is initially not present, a null data pointer is produced. The type may only transition from absent to present at most once, as there is no deletion.

No deduplication is performed.

Request

NameType
data fuchsia.mem/Buffer?

EntityProvider

Defined in fuchsia.modular/entity_provider.fidl

EntityProviders (agents) must implement and provide the EntityProvider service if they create entity references (using EntityReferenceFactory). This service is used by the framework to provide data for an Entity interface for an entity. This interface is requested by the framework in the agent's application outgoing services, and is closed by the framework when there are no more Entitys that need to be provided.

In the below methods, cookie will have been previously passed to EntityReferenceFactory.CreateReference(), though this may have been in an earlier or remote app instance. Entity providers should attempt to resolve unfamiliar cookies or else treat the entities as empty and read-only.

GetTypes

Returns the types associated with the requested entity. Each entry in type references a well-known content type.

If the cookie cannot be resolved, the provider should produce an empty vector.

Request

NameType
cookie string

Response

NameType
types vector<string>

GetData

Given one of the types returned from GetTypes() above, returns associated short-form data, or null if the type is absent from GetTypes().

If the cookie cannot be resolved, the provider should return null.

Request

NameType
cookie string
type string

Response

NameType
data fuchsia.mem/Buffer?

WriteData

Sets the data for a particular type. This must precipitate an OnUpdate event with the associated type.

If the cookie cannot be resolved, the provider should no-op with EntityWriteStatus::READ_ONLY.

Request

NameType
cookie string
type string
data fuchsia.mem/Buffer

Response

NameType
status EntityWriteStatus

Watch

Begins watching for data changes on a particular type. The watcher must immediately fire OnUpdated with the current value for the requested type (or null if the type is not present).

No deduplication of events should be performed.

At most one update may be in-flight at a time on a particular watcher; once a client is ready for another update, it will call the callback. At most one update should be queued for dispatch for a particular watcher; older updates should be dropped.

If the cookie cannot be resolved, the provider should emit a single event with null data.

Request

NameType
cookie string
type string
watcher EntityWatcher

EntityReferenceFactory

Defined in fuchsia.modular/entity_reference_factory.fidl

Agents use this interface to create Entity references that can subsequently be dereferenced into an Entity interface using EntityResolver. Agents that create entity references must also expose an EntityProvider service in their application's outgoing services, so that agents can provide data for Entitys that they create. This interface is available through an agent's AgentContext.

CreateReference

Agents call this to manufacture a reference for an Entity they will provide. Returns an opaque, persistable entity_reference that components can resolve into an Entity interface using EntityResolver. When data is requested from an Entity interface resolved from this entity_reference, the cookie associated with this entity_reference will be passed back to the EntityProvider of the Agent that originally created this reference.

cookie should uniquely identify the Entity within the scope of the calling entity provider. For example, it may be used as the primary key value for a database.

Request

NameType
cookie string

Response

NameType
entity_reference string

EntityResolver

Defined in fuchsia.modular/entity_resolver.fidl

This interface is given to all components in their ComponentContext. Any component can resolve an entity reference into an Entity.

ResolveEntity

Finds and binds entity_request to an Entity handle for the Entity referenced by entity_reference. If an error occurs, entity_request will be closed.

This method is called by any component who wants to use an Entity using an entity reference. A component has to get an entity reference (directly or indirectly) from an agent, for example through some fidl interface. The agent will create an entity reference using EntityReferenceFactory. During entity resolution, that agent then provides data for the Entity through an EntityProvider service it exposes. Thus, any Agent that wishes to use EntityReferenceFactory to dispense entity references through its agent services MUST also implement the EntityProvider service.

Request

NameType
entity_reference string
entity_request request<Entity>

IntentHandler

Defined in fuchsia.modular/intent_handler.fidl

The IntentHandler interface is exposed by modules which wish to handle intents on the behalf of other modules or agents.

The modular framework expects any module which declares support for intent handling in its module manifest to expose IntentHandler in its outgoing services.

Any time the framework receives an intent which is to be handled by a specific module its IntentHandler will be called with the intent it is meant to handle.

HandleIntent

Handles the provided intent. Any links referenced in the intent parameters will be in the namespace of the handling component, and can be retrieved via ModuleContext.GetLink.

Request

NameType
intent Intent

Lifecycle

Defined in fuchsia.modular/lifecycle.fidl

An interface implemented by applications that wish to terminate gracefully.

Terminate

The client of this application has requested that this application terminate gracefully.

If the application does not terminate itself in a timely manner, the client may forcibly terminate the application.

Request

NameType

ModuleContext

Defined in fuchsia.modular/module_context.fidl

This interface is exposed to all Module instances in a story. It allows to create Link instances and run more Module instances.

Gets a Link instance with the given name.

The Link instance has a name so that it can be recognized when the story is resumed. The name is unique in the scope of the Module instance. If the method is called again with the same argument by the same Module instance, a new connection to the same Link instance is obtained. It's up to the Module instance to ensure the name is unique within the scope of itself.

TODO(thatguy): When no modules use null link names any more, make name required.

Request

NameType
name string?
link request<Link>

AddModuleToStory

Starts a new Module instance and adds it to the story. The Module to execute is identified by the contents of [intent] and the Module instance is given a [name] in the scope of the starting Module instance. The view for the Module is given to the story shell for display.

Providing a [surface_relation] advises the StoryShell how to layout surfaces that the new module creates. If [surface_relation] is null then a default relation is used.

If the method is called again with the same [name] by the same Module instance, but with different arguments, the existing Module instance is restarted with the changed arguments. If the other arguments don't change, just an additional ModuleController connection is made.

Request

NameType
name string
intent Intent
module_controller request<ModuleController>
surface_relation SurfaceRelation?

Response

NameType
status StartModuleStatus

EmbedModule

Like AddModuleToStory(), but passes a [view_token] explicitly to embed the view of the requested Module instance in the view of the requesting Module instance, instead of relying on the story shell for display. If a Module instance with the same [name] and [intent] is already running, [view_token] is destroyed.

Request

NameType
name string
intent Intent
module_controller request<ModuleController>
view_token fuchsia.ui.views/ViewToken

Response

NameType
status StartModuleStatus

EmbedModule2

Request

NameType
name string
intent Intent
module_controller request<ModuleController>
view_token fuchsia.ui.views/ViewToken

Response

NameType
status StartModuleStatus

StartContainerInShell

DEPRECATED: no longer implemented.

Request

NameType
container_name string
parent_relation SurfaceRelation
layout vector<ContainerLayout>
relationships vector<ContainerRelationEntry>
nodes vector<ContainerNode>

GetComponentContext

DEPRECATED: ComponentContext is now available in the namespace/environment for Modules.

Request

NameType
request request<ComponentContext>

GetStoryId

Gets the id for this story which may be used to create a suggestion proposal to resume this story, especially by agents.

Request

NameType

Response

NameType
story_id string

RequestFocus

Requests that the current story and module gain focus. It's up to the story shell and session shell to honor that request.

Request

NameType

Active

DEPRECATED in favor of using StartOngoingActivity().

Request

NameType

RemoveSelfFromStory

When a module calls [RemoveSelfFromStory()] the framework will stop the module and remove it from the story. If there are no more running modules in the story the story will be deleted.

Request

NameType

RequestStoryVisibilityState

Requests to update the visibility state of the current story within the session shell. The framework will decide whether to honor this request, then forward it to the session shell.

Modules should not have any knowledge of the story's visibility state, nor should it ever operate with any assumption of the visibility state.

Note that the framework keeps this state only in memory, which means that across reboots, the story visibility state will revert back to DEFAULT. This makes it unsafe for any component outside the framework to make assumptions about the story visibility state. Also, this differs from other UI states such as focus state, which is persisted across reboots.

Request

NameType
visibility_state StoryVisibilityState

StartOngoingActivity

Declares that activity of the given [type] is ongoing in this module. This information is forwarded to the session shell (cf. StoryProvider.WatchActivity() and StoryActivityWatcher).

Modules should close [request] when the ongoing activity has stopped, and this will also signal to the session shell that the ongoing activity has stopped. For now, pausing media should count as a stopped ongoing activity, and when it is resumed it should be started as a new ongoing activity. Conversely, media playing in a continuous playlist (i.e playing the next video or song) should be treated as the same ongoing activity. Modules must request a connection per ongoing activity; a single connection may not be re-used for multiple ongoing activities.

Request

NameType
type OngoingActivityType
request request<OngoingActivity>

CreateEntity

Creates a [fuchsia.modular.Entity] with the given [type] and [data]. The lifetime of the created entity is tied to the lifetime of the current story, but can be dereferenced by modules and agents outside the scope of the story.

[entity_request] will be connected to the created entity, or closed if the creation fails.

The returned [reference] is the entity reference for the created entity, or null if the entity creation failed.

Request

NameType
type string
data fuchsia.mem/Buffer
entity_request request<Entity>

Response

NameType
entity_reference string?

OngoingActivity

Defined in fuchsia.modular/module_context.fidl

This interface defines the protocol over which a Module can communicate about an ongoing activity to the framework. It is provided to Modules via ModuleContext.StartOngoingActivity().

ModuleController

Defined in fuchsia.modular/module_controller.fidl

This interface is used by the caller of ModuleContext.StartModule() to control the started Module instance.

Closing this connection doesn't affect its Module instance; it just relinquishes the ability of the caller to control the Module instance.

Focus

Requests that this module become the focused module in the story.

Request

NameType

Defocus

Requests that this module be hidden in the story.

Request

NameType

Stop

Requests the Module instance to stop. The running Module component's Lifecycle::Terminate() method is called, the instance is shut down and state within the framework is cleaned up.

The result callback is called once the Module's runtime has been torn down.

Request

NameType

Response

NameType

OnStateChange

Called with the current state when it changes. DEPRECATED: Do not use this. ModuleState is a framework-internal concept and should not be exposed outside.

Response

NameType
new_state ModuleState

ModuleResolver

Defined in fuchsia.modular/module_resolver.fidl

FindModules

Finds Modules (contained in Fuchsia packages) that satisfy the constraints specified in query. Module resolution is done by matching the requested query.action and query.parameter_constraints (with both names and types) against actions and constraints specified in module manifests.

If no results could be found, response.results will be empty.

For detailed information on the resolution process, see docs/modular/module_resolution.md.

Request

NameType
query FindModulesQuery

Response

NameType
response FindModulesResponse

FocusController

Defined in fuchsia.modular/focus.fidl

This file has interfaces for 2 pieces of information: (1) The story that is currently in focus and (2) stories that are visible to the user. Names of interfaces follow the usual patterns:

{Focus,VisibleStories}Controller is used by session shell to update information whenever changes take place.

FocusProvider is used by maxwell and session shell to query and get updates on which story is in focus on which device and visible stories on this device.

Implemented by sessionmgr. Given to session shell through its namespace.

Set

Request

NameType
focused_story_id string?

WatchRequest

Request

NameType
watcher FocusRequestWatcher

FocusRequestWatcher

Defined in fuchsia.modular/focus.fidl

Implemented by session shell. OnFocusRequest() gets called whenever there is a new request to change focus on this device. Requests can be made via FocusProvider.Request().

OnFocusRequest

Request

NameType
story_id string

FocusProvider

Defined in fuchsia.modular/focus.fidl

Implemented by sessionmgr. Given to session shell and session agents through their namespace. Focus is persisted on the ledger.

Query

Returns the stories that are focused across all devices.

Request

NameType

Response

NameType
focused_stories vector<FocusInfo>

Watch

Watches for change in focus on any of the user's devices.

Request

NameType
watcher FocusWatcher

Request

Requests session shell to change focus on this device. If session shell responds to this request, focus shall be taken away from previously focused story and an update will be sent on FocusWatcher.OnFocusChange(). If story_id is NULL, the timeline is brought back into focus.

Request

NameType
story_id string?

FocusWatcher

Defined in fuchsia.modular/focus.fidl

Implemented by anyone who is interested in getting updates when focus changes.

OnFocusChange

Request

NameType
focus_info FocusInfo?

VisibleStoriesController

Defined in fuchsia.modular/focus.fidl

Implemented by sessionmgr. Given to session shell through its namespace.

Set

Request

NameType
visible_story_ids vector<string>?

SessionShell

Defined in fuchsia.modular/session_shell.fidl

This interface is implemented by a session shell and is used by the sessionmgr to hand to the session shell views of stories, or to notify that the view of a story is about to be closed.

AttachView

Displays the given story view. The story this view belongs to is identified by view_id.story_id. DEPRECATED. For transitional purposes only.

Request

NameType
view_id ViewIdentifier
view_holder_token fuchsia.ui.views/ViewHolderToken

AttachView2

Request

NameType
view_id ViewIdentifier
view_holder_token fuchsia.ui.views/ViewHolderToken

DetachView

Instructs the session shell to detach the view identified by view_id that was previously provided by AttachView() from the UI of the session shell. The view will be closed soon after DetachView() returns, or when a timeout is reached.

It is customary for the session shell to display a placeholder before a view is attached for a given view identifier, or after it was detached.

If the story identified by view_id.story_id is about to be deleted, the Shell will observe a call to StoryProviderWatcher.OnDelete() sometime after DetachView() returns.

If the session for which this session shell is responsible for is being terminated, or the session shell is stopped because it's replaced by another session shell, DetachView() will not be called at all, and the shell will rather observe a call to Lifecycle.Terminate().

Request

NameType
view_id ViewIdentifier

Response

NameType

SessionShellContext

Defined in fuchsia.modular/session_shell.fidl

This interface allows a SessionShell to request capabilities from its creator in a way that is more explicit about the services that are offered than a generic ServiceProvider.

GetAccount

The account associated with the currently logged-in user. It's NULL if logged into GUEST mode.

Request

NameType

Response

NameType
account fuchsia.modular.auth/Account?

GetComponentContext

Request

NameType
request request<ComponentContext>

GetDeviceName

Request

NameType

Response

NameType
device_name string

GetFocusController

Request

NameType
request request<FocusController>

GetFocusProvider

Request

NameType
request request<FocusProvider>

Request

NameType
request request<Link>

GetPresentation

Request

NameType
request request<fuchsia.ui.policy/Presentation>

GetSpeechToText

Request

NameType
request request<fuchsia.speech/SpeechToText>

GetStoryProvider

Request

NameType
request request<StoryProvider>

GetVisibleStoriesController

Request

NameType
request request<VisibleStoriesController>

Logout

Requests logout of the user. This causes the basemgr to tear down the Sessionmgr instance of the user.

Request

NameType

SessionShellPresentationProvider

Defined in fuchsia.modular/session_shell.fidl

Session shell provides this service to the framework which may plumb it to different subscribers, such as story shell and intelligence provider.

EXPERIMENTAL Service that allows consumers of a given story to get a connection to a Presentation, and visual state services provided by the user shell. This allows story shell implementations to coordinate event and focus handling. An analog mechanism exists between BaseShell and SessionShell.

GetPresentation

When a StoryShell calls StoryShellContext.GetPresentation(), this request arrives here.

Request

NameType
story_id string
request request<fuchsia.ui.policy/Presentation>

WatchVisualState

When a StoryShell calls StoryShellContext.WatchVisualState(), this request arrives here.

Request

NameType
story_id string
watcher StoryVisualStateWatcher

Defined in fuchsia.modular/link.fidl

This interface is implemented by the story runner. The ModuleContext service acts as a factory for it.

An instance of Link holds one of two types of values:

(1) A JSON string that can be modified incrementally or completely overwritten, depending on the use of Set() and Update(). The JSON string is set to "null" when the Link is created.

(2) An entity reference that can be set or retrieved with SetEntity() and GetEntity().

Each Module instance receives one Link instance for each parameter of its action template in its ModuleContext. It receives its ModuleContext in Module.Initialize() or in its service namespace. The Module can access its Links by calling ModuleContext.GetLink() with the intent parameter name as the link name. These instances are shared with the parent Module if there is any, or with the StoryController client if the Module is a top level Module of a Story. A Module can create additional Link instances by calling ModuleContext.GetLink() with any other link name. Why would it do that? To share the new Link instance with Modules it requests to start in turn, or to record its own state in the story record, so that it is transferred to other devices that run the same story, or to persist it for later resumption of the story.

A client may obtain another handle to the same Link instance by calling GetLink() with the same name again.

A client of Link can set the JSON string stored in the instance and register a handler (an implementation of the LinkWatcher interface) to be notified of changes to the JSON string in the Link. A client may or may not be notified of changes it itself makes to the Link value, depending on whether it registers with WatchAll() or Watch(), respectively. If the client registers with Watch(), then it will not be notified of changes made through the same Link connection.

No service name: returned from ModuleContext.GetLink().

Get

Gets the value at the given path, which is represented using the JSON Pointer specification (https://tools.ietf.org/html/rfc6901).

json_data is a UTF8 encoded string representing valid JSON.

Returns null if path does not exist. Returns the entire JSON object if path is either null or an empty array. Returns the string "null" if the link is empty.

Request

NameType
path vector<string>?

Response

NameType
json_data fuchsia.mem/Buffer?

Set

Set() overwrites the value/object/array at the given path. Set also overwrites any values or arrays as necessary to ensure that path exists. The json_data parameter must be a UTF8 encoded JSON string. Either pass "null" to set the value to null, or use Erase to completely remove a member of an object. To replace the root, pass null for path.

This call notifies Watchers, although this may be skipped if nothing changed.

Request

NameType
path vector<string>?
json_data fuchsia.mem/Buffer

Erase

Erases the object member at the given path. If the path is not found or does not match the current structure of the JSON, the path will not be created and the call is ignored. The path parameter cannot be null or zero length because the root is a value, not a key. This call notifies Watchers, although this may be skipped if nothing changed.

Request

NameType
path vector<string>

GetEntity

Returns the entity reference in this link. If no entity reference is present, returns a null fidl string.

Request

NameType

Response

NameType
entity_reference string?

SetEntity

Sets this to be an Entity Link with the given entity_reference. The existing value of the link is overwritten. If entity_reference is null, then any existing value in the link is overwritten with the JSON string "null".

Request

NameType
entity_reference string?

Watch

Registers a watcher, which is notified whenever the document changes. This watcher will not be invoked for changes caused by calls made on this handle. The Notify() callback method will be immediately invoked with the value in the Link, even if it's empty.

The LinkWatcher connection will be closed if the owning Link handle closed.

All connections to a Link and LinkWatcher are closed once the story the link belongs to is stopped.

Request

NameType
watcher LinkWatcher

WatchAll

Like Watch(), but the watcher is notified also of changes made through the same handle as the watcher is registered on.

Request

NameType
watcher LinkWatcher

Sync

Waits for the completion of methods previously invoked on the same connection. Allows to create sequentiality across service instances without giving every method an empty return value. Nb. this makes no guarantees about sequentiality with methods invoked on different connections, even to the same Link instance.

Request

NameType

Response

NameType

LinkWatcher

Defined in fuchsia.modular/link.fidl

This interface is implemented by a client of Link.

The Notify() method is invoked whenever the Link changes. The entire JSON string in the Link will be sent. In other words, this isn't an incremental notification. json cannot be null because an empty Link is the valid JSON document "null".

No service name: created by Module.

Notify

Request

NameType
json fuchsia.mem/Buffer

PuppetMaster

Defined in fuchsia.modular/puppet_master.fidl

ControlStory

Request

NameType
story_name string
request request<StoryPuppetMaster>

DeleteStory

Request

NameType
story_name string

Response

NameType

GetStories

Request

NameType

Response

NameType
story_names vector<string>

StoryPuppetMaster

Defined in fuchsia.modular/puppet_master.fidl

Enqueue

Request

NameType
commands vector<StoryCommand>

Execute

Request

NameType

Response

NameType
result ExecuteResult

SetCreateOptions

Request

NameType
story_options StoryOptions

SetStoryInfoExtra

Request

NameType
story_info_extra vector<StoryInfoExtraEntry>

Response

NameType
result StoryPuppetMaster_SetStoryInfoExtra_Result

Annotate

Attach the annotations to the story. If the story does not yet exist, it will be created.

Existing annotations with the same key will be overwritten, or deleted if new value is null.

Request

NameType
annotations vector<Annotation>[50]

Response

NameType
result StoryPuppetMaster_Annotate_Result

StoryController

Defined in fuchsia.modular/story_controller.fidl

Used by the clients of StoryProvider (SessionShell) to interact with a single story. Created by StoryProvider.

If StoryController is closed, the StoryState associated with this story does not change.

GetInfo

Gets information associated with the story.

Request

NameType

Response

NameType
info StoryInfo
state StoryState

GetInfo2

For transition purposes only.

Request

NameType

Response

NameType
info StoryInfo2
state StoryState

RequestStart

Requests to run the story controlled by this StoryController instance. When the story starts, if not yet running, the view of the newly started story shell will be passed in a call to SessionShell.AttachView().

Request

NameType

Stop

Requests to stop the story controlled by this StoryController. If Start() requests are pending when this request is issued, the request is queued until the Start() requests complete. Before stopping the story, a snapshot of the story will be taken and saved. Returns when the story is stopped.

Request

NameType

Response

NameType

TakeAndLoadSnapshot

Creates a new view with the given view_owner request to display snapshots. Takes a snapshot for the story controlled by this StoryController and then loads the snapshot to the created view such that it is rendered. The callback will be invoked once the view has been created and the snapshot has been loaded.

Request

NameType
view_token fuchsia.ui.views/ViewToken

Response

NameType

Watch

Registers a watcher for changes of the story state.

Note that stories can stop themselves at any time and it is advisable for the holder of a StoryController to provide a watcher.

Request

NameType
watcher StoryWatcher

GetActiveModules

DEPRECATED

Request

NameType

Response

NameType
module_data vector<ModuleData>

GetModules

DEPRECATED

Request

NameType

Response

NameType
module_data vector<ModuleData>

GetModuleController

DEPRECATED (metadata about, and requesting changes to runtime state).

Request

NameType
module_path vector<string>
request request<ModuleController>

DEPRECATED

Request

NameType
link_path LinkPath
link request<Link>

StoryWatcher

Defined in fuchsia.modular/story_controller.fidl

Implemented by the client calling StoryController.Watch().

OnStateChange

Called with the current state right after registration, and subsequently when the state changes.

Request

NameType
new_state StoryState

OnModuleAdded

DEPRECATED

Request

NameType
module_data ModuleData

OnModuleFocused

DEPRECATED

Request

NameType
module_path vector<string>

StoryLinksWatcher

Defined in fuchsia.modular/story_controller.fidl

Implemented by the client calling StoryController.GetActiveLinks().

DEPRECATED: StoryController is only to be used for Story concepts (metadata about, and requesting changes to runtime state).

Called when a link becomes active in the story, i.e. when it is loaded into memory and connected with modules and watchers. After this notification, the Link can be obtained with GetLink() and further notifications can be obtained from watchers on the Link and connection error handlers on the LinkWatcher.

Note that the Link remains active until there are no connections to it left. Hence in order to obtain a notification when the Link becomes inactive, a client must give up the Link connection after registering a LinkWatcher, and listen for the LinkWatcher connection to go down.

This is EXPERIMENTAL. We certainly can make this simpler once we know it is what we need.

Request

NameType
link_path LinkPath

StoryProvider

Defined in fuchsia.modular/story_provider.fidl

Sessionmgr passes a connection to this service to the SessionShell so it can operate on stories for the user. It is also passed to other services that monitor or manipulate stories, specifically the maxwell services.

Closing a StoryProvider connection has no effect on the state of the framework.

GetStories

Returns a list of existing stories. If watcher is provided, the client will be notified of story changes (new stories, deleted stories, runtime state changes).

Request

NameType
watcher StoryProviderWatcher?

Response

NameType
story_infos vector<StoryInfo>

GetStories2

For transition purposes only.

Request

NameType
watcher StoryProviderWatcher?

Response

NameType
story_infos vector<StoryInfo2>

GetStoryInfo

Requests detailed information about the given story. If the story doesn't exist, returns null.

Request

NameType
story_id string

Response

NameType
story_info StoryInfo?

GetStoryInfo2

For transition purposes only.

Request

NameType
story_id string

Response

NameType
story_info StoryInfo2

GetController

Obtains a controller for a previously created story identified by its story ID. Obtaining the controller doesn't run it yet. If the story doesn't exist, the interface request is closed.

Request

NameType
story_id string
request request<StoryController>

PreviousStories

Returns info of known stories. DEPRECATED: In favor of GetStories().

Request

NameType

Response

NameType
story_infos vector<StoryInfo>

PreviousStories2

DEPRECATED: In favor of GetStories2(). For transition purposes only.

Request

NameType

Response

NameType
story_infos vector<StoryInfo2>

Watch

Registers a watcher for changes in the story collection. DEPRECATED: In favor of GetStories().

Request

NameType
watcher StoryProviderWatcher

WatchActivity

Registers a watcher for ongoing story activity. Upon registration, StoryActivityWatcher.OnStoryActivity() will be called to update clients with the initial data. See StoryActivityWatcher for motivations.

Request

NameType
watcher StoryActivityWatcher

StoryProviderWatcher

Defined in fuchsia.modular/story_provider.fidl

Implemented by clients of StoryProvider.

OnChange

Called in three different situations:

  • Immediately when a new watcher is registered with one OnChange() invocation with the current infor and state of each story known on the current device.

  • Every time a change to StoryInfo is applied to the record of the story kept on the current device, including a new story created on another device becoming known on this device for the first time.

  • Every time the StoryState of the story changes on this device. The StoryState on another device of a story known on this device is not made known on this device.

  • Every time the StoryVisibilityState of the story changes on this device. The StoryVisibilityState on another device of a story known on this device is not made known on this device.

    I.e. if the story is started or stopped on another device, it does not cause an OnChange() call on this device. Cf. OnDelete() below.

    The ID of the story the notifications are about are part of StoryInfo.

    story_state is STOPPED if the story was just created or just became known on this device and was not yet started on the current device. It's RUNNING when the story is started on the current device.

    story_visibility_state is DEFAULT until a mod on the current device requests for the visibility state to be changed.

Request

NameType
story_info StoryInfo
story_state StoryState
story_visibility_state StoryVisibilityState

OnChange2

For transition purposes only.

Request

NameType
story_info StoryInfo2
story_state StoryState
story_visibility_state StoryVisibilityState

OnDelete

Called when a story record is permanently deleted. The deletion could have originated on this or on another device.

If the story is running on this device at the time it is deleted, OnChange() will not be called first.

Request

NameType
story_id string

StoryActivityWatcher

Defined in fuchsia.modular/story_provider.fidl

Implemented by clients of StoryProvider in order to inform them about ongoing activities in stories. activities is the entire list of ongoing activities (represented by its type) within the story by the given story_id. If activities is empty, it means that there is no ongoing activity within the story.

Clients can expect this event whenever there is a newly started/stopped ongoing activity, as well as when the client first registers for updates via StoryProvider.WatchActivity(). activities can contain duplicate OngoingActivityType's, ex. if a story is playing 2 videos at once.

OnStoryActivityChange

Request

NameType
story_id string
activities vector<OngoingActivityType>

StoryShell

Defined in fuchsia.modular/story_shell.fidl

This interface is implemented by a story shell. Dependencies are passed to it in Initialize() on startup. The story shell is also expected to implement Lifecycle in order to receive a Terminate() call on teardown.

In one component instance there can only be one StoryShell service instance. The view token is sent to the separate View service. This way, the story shell may be implemented as a flutter component.

Teardown may occur via the session shell calling StoryController.Stop(), the sessionmgr being terminated, or by the system shutting down.

Initialize

Request

NameType
story_shell_context StoryShellContext

AddSurface

Adds a new Surface and its corresponding view to be displayed by the StoryShell. More context that allows the story shell to decide how to layout will be added later. Also, interface to influence life cycle and focus is obviously missing. view_connection the new view and the associated Surface ID. surface_info metadata relating to the Surface.

Request

NameType
view_connection ViewConnection
surface_info SurfaceInfo

AddSurface2

DEPRECATED. For transition purposes only.

Request

NameType
view_connection ViewConnection2
surface_info SurfaceInfo

AddSurface3

For transition purposes only.

Request

NameType
view_connection ViewConnection
surface_info SurfaceInfo2

FocusSurface

Focuses the surface with surface_id, bringing it to the foreground.

Request

NameType
surface_id string

DefocusSurface

Defocuses the surface with surface_id, dismissing it to the background.

Request

NameType
surface_id string

Response

NameType

AddContainer

Adds a container, with corresponding container layouts to the story. Optionally provide a parent_id to connect to, if omitted adds the Container node as the root of a new tree in the Story DEPRECATED

Request

NameType
containerName string
parentId string?
relation SurfaceRelation
layout vector<ContainerLayout>
relationships vector<ContainerRelationEntry>
views vector<ContainerView>

AddContainer2

DEPRECATED. For transition purposes only.

Request

NameType
containerName string
parentId string?
relation SurfaceRelation
layout vector<ContainerLayout>
relationships vector<ContainerRelationEntry>
views vector<ContainerView2>

OnSurfaceFocused

Notify when a Surface is focused in the story. The focus could be from a user interaction or requested by the framework through StoryController#FocusModule. EXPERIMENTAL

Response

NameType
surface_id string

RemoveSurface

Remove the Surface with surface_id from the StoryShell entirely. This is final. The Surface is removed from the graph. If necessary, the associated Surface is defocused. There is no expectation that DefocusSurface is called before this.

Request

NameType
surface_id string

ReconnectView

Reconnect the view in viewConnection.

Called to reconnect views that have previously been added to the story shell via addSurface, and then disconnected. A ViewTokenPair is created and the View token is given to the child view. The ViewHolder token is notified if the View is destroyed before it is connected. Once the ViewHolder has been created using a Scenic Session, the Session will be notified when the view is available, if it becomes unavailable, or if it is disconnected. If a surface with a disconnected view is to be shown again, ReconnectView is called.

E.g. called in response to StoryShell calling RequestView().

Request

NameType
view_connection ViewConnection

ReconnectView2

DEPRECATED. For transition purposes only.

Request

NameType
view_connection ViewConnection2

UpdateSurface

Update the surface This is called when the intent is to update the surface metadata in the story graph in place. Any fields, except for the surface_id can be updated. If no value or null is passed for a field it remains unchanged. This includes the view_holder_token inside the connection.

E.g called when an intent resolves to a module that is known by the caller to already be running, to update associated metadata.

Request

NameType
view_connection ViewConnection
surface_info SurfaceInfo

UpdateSurface2

DEPRECATED. For transition purposes only.

Request

NameType
view_connection ViewConnection2
surface_info SurfaceInfo

UpdateSurface3

For transition purposes only.

Request

NameType
view_connection ViewConnection
surface_info SurfaceInfo2

StoryShellContext

Defined in fuchsia.modular/story_shell.fidl

This interface provides the StoryShell instance with everything it needs to know or be able to do about the Story. Not much right now, but we expect this to increase.

GetPresentation

Requests a Presentation connection from the SessionShell. See SessionShellPresenationProvider in session_shell.fidl.

Request

NameType
request request<fuchsia.ui.policy/Presentation>

WatchVisualState

Starts watching Story shell's visual state.

Request

NameType
watcher StoryVisualStateWatcher

Gets a Link instance that the story shell can use for persisting metadata.

Request

NameType
request request<Link>

RequestView

Requests a view for a Surface. Requests that a view for surface_id is provided through StoryShell.ReconnectView().

Request

NameType
surface_id string

OnSurfaceOffScreen

Notification that the Surface is no longer on screen.

Request

NameType
surface_id string

StoryVisualStateWatcher

Defined in fuchsia.modular/story_shell.fidl

Implemented by StoryShell to get notified about visual state changes.

OnVisualStateChange

Request

NameType
visual_state StoryVisualState

StoryShellFactory

Defined in fuchsia.modular/story_shell_factory.fidl

StoryShellFactory creates or returns an existing StoryShell for a particular story. This is intended to be implemented by session shells that want to implement StoryShell functionality themselves.

AttachStory

Requests a StoryShell for the story with the given story_id.

Request

NameType
story_id string
story_shell request<StoryShell>

DetachStory

Instructs the session shell to teardown the story shell with the given story_id. This will be called before the story is stopped.

Request

NameType
story_id string

Response

NameType

IntelligenceServices

Defined in fuchsia.modular/intelligence_services.fidl

A container for component-scoped services. This contains any and all services needed by any sort of Module/Agent.

GetContextReader

These are just here for illustrative purposes, and are not a complete list.

Request

NameType
context_reader request<ContextReader>

GetContextWriter

Request

NameType
context_writer request<ContextWriter>

UserIntelligenceProvider

Defined in fuchsia.modular/user_intelligence_provider.fidl

GetComponentIntelligenceServices

Creates an IntelligenceServices scoped to a specific Component, identified by scope.

NOTE: Eventually component_id will become more complex, specifying information needed to evaluate access-control policies for downstream services.

ANOTHER NOTE: IntelligenceServices is a short-term "big bucket" in which to put any and all services that are to be exposed to Agents and Modules. Once our understanding of the needs of Agents/Modules is clearer, we should break the bucket apart.

Request

NameType
scope ComponentScope
services request<IntelligenceServices>

GetSpeechToText

Request

NameType
speech_to_text request<fuchsia.speech/SpeechToText>

StartAgents

The ComponentContext is used to create agents and use message queues.

Request

NameType
user_intelligence_context ComponentContext
session_agents vector<string>
startup_agents vector<string>

GetServicesForAgent

A standard set of services provided to all agents at startup, along with services particuarly for this agent.

Request

NameType
agent_url string

Response

NameType
service_list fuchsia.sys/ServiceList

STRUCTS

TaskInfo

Defined in fuchsia.modular/agent_context.fidl

Used to describe a task to the framework.

NameTypeDescriptionDefault
task_id string An agent provided task id that can be used later to refer to this task. No default
trigger_condition TriggerCondition The condition that would cause this task to get scheduled. No default
persistent bool If set to true, the trigger condition will be persisted on the user's ledger and will be available across reboots and devices. No default

Annotation

Defined in fuchsia.modular/annotation.fidl

A user-defined annotation for a story or module.

NameTypeDescriptionDefault
key string[256] An identfier for this annotation. No default
value AnnotationValue? The contents of this annotation. No default

BaseShellParams

Defined in fuchsia.modular/base_shell.fidl

NameTypeDescriptionDefault
presentation fuchsia.ui.policy/Presentation? No default

UserLoginParams

Defined in fuchsia.modular/user_provider.fidl

Used to specify arguments to log into a user session.

NameTypeDescriptionDefault
account_id string? `account_id` is received from either AddUser() or PreviousUsers(). It can be NULL which means logging-in using incognito mode. No default

UserLoginParams2

Defined in fuchsia.modular/user_provider.fidl

DEPRECATED, for backwards compatibility only

NameTypeDescriptionDefault
account_id string? `account_id` is received from either AddUser() or PreviousUsers(). It can be NULL which means logging-in in an incognito mode. No default

TypeToDataEntry

Defined in fuchsia.modular/component_context.fidl

Used by ComponentContext.CreateEntityWithData().

NameTypeDescriptionDefault
type string No default
data string No default

AppConfig

Defined in fuchsia.modular/config.fidl

Used to pass around configuration references to apps such as user shell, base shell, story shell.

NameTypeDescriptionDefault
url string No default
args vector<string>? No default

ContextQuery

Defined in fuchsia.modular/context_reader.fidl

NameTypeDescriptionDefault
selector vector<ContextQueryEntry> A map of ContextSelector structs. The keys are specified by the client. Each key gets a corresponding entry in `ContextUpdate.values` when it is generated in response to this query. No default

ContextQueryEntry

Defined in fuchsia.modular/context_reader.fidl

NameTypeDescriptionDefault
key string No default
value ContextSelector No default

ContextSelector

Defined in fuchsia.modular/context_reader.fidl

NameTypeDescriptionDefault
meta ContextMetadata? A partial metadata struct. Any metadata value given in `meta` restricts the set of values in the eventual ContextUpdate to include only those whose metadata match values given. A null `meta` will match any value of the given `type`. Use this sparingly as a full update could become quite large. For example, to select all context values in a given story, one would specify: meta.value["story"]["id"] = "..." No default
type ContextValueType A string specifying the type of context object to return. No default

ContextUpdate

Defined in fuchsia.modular/context_reader.fidl

NameTypeDescriptionDefault
values vector<ContextUpdateEntry> A list of ContextValue for each key in `ContextQuery.selector`. An empty list means no values matched the given ContextSelector. No default

ContextUpdateEntry

Defined in fuchsia.modular/context_reader.fidl

NameTypeDescriptionDefault
key string No default
value vector<ContextValue> No default

ContextDebugValue

Defined in fuchsia.modular/debug.fidl

Represents a single update to a value. If value is omitted, the value with id was deleted.

NameTypeDescriptionDefault
parent_ids vector<string> No default
id string No default
value ContextValue? No default

ContextDebugSubscription

Defined in fuchsia.modular/debug.fidl

NameTypeDescriptionDefault
id string No default
debug_info SubscriptionDebugInfo? These are null when describing a subscription that was removed, although it's safe to condition only on `query`. No default
query ContextQuery? No default

SubscriptionDebugInfo

Defined in fuchsia.modular/debug.fidl

NameTypeDescriptionDefault
client_info ComponentScope No default

ContextMetadata

Defined in fuchsia.modular/metadata.fidl

This struct serves two purposes. It is:

1) Used to expose metadata along with each context node when interfacing with clients either publishing, or retieving, context values.

2) Used while getting or querying for context values from a ContextReader to restrict the set of values returned by partially specifying a ContextMetadata struct.

NameTypeDescriptionDefault
story StoryMetadata? No default
mod ModuleMetadata? No default
entity EntityMetadata? No default
link LinkMetadata? No default

StoryMetadata

Defined in fuchsia.modular/metadata.fidl

NameTypeDescriptionDefault
id string? No default
focused FocusedState? No default

ModuleMetadata

Defined in fuchsia.modular/metadata.fidl

NameTypeDescriptionDefault
url string? No default
path vector<string>? No default
focused FocusedState? No default

EntityMetadata

Defined in fuchsia.modular/metadata.fidl

NameTypeDescriptionDefault
topic string? No default
type vector<string>? No default

LinkMetadata

Defined in fuchsia.modular/metadata.fidl

NameTypeDescriptionDefault
module_path vector<string>? These fields are identical to those in modular.LinkPath. Can't use modular.LinkPath directly because depending on lib/modular/fidl:link_path causes issues with Dart bindings (they try to import the file from the wrong package name), and depending on lib/modular/fidl causes a dependency cycle (lib/context -> lib/module -> lib/user_intelligence -> lib/context). No default
name string? No default

FocusedState

Defined in fuchsia.modular/metadata.fidl

bool type cannot be made optional (in StoryMetadata above), so we cannot differentiate between an unspecified value and false. So we have to create a struct with an enum in it to represent the boolean states, so that we can allow it to be null.

NameTypeDescriptionDefault
state FocusedStateState No default

ContextValue

Defined in fuchsia.modular/value.fidl

NameTypeDescriptionDefault
type ContextValueType The type of value this describes. No default
content string? If `type` == ContextType.ENTITY, contains the JSON encoded representation of the Entity's content. No default
meta ContextMetadata All metadata for the node. When this ContextValue is included in a ContextUpdate, `meta` will contain a merged view of metadata that is inclusive of all of this value node's ancestors. No default

Intent

Defined in fuchsia.modular/intent.fidl

The Intent struct is a runtime descriptor for an abstract action to be initiated in Fuchsia. For details please see docs/intent.md.

NameTypeDescriptionDefault
action string? The name of the action represented by this Intent. This is nullable for backwards compatibility. No default
handler string? An explicit handler for the Intent. Specified as the component URL of the module. No default
parameters vector<IntentParameter>? The parameters that will be passed to the handler of `action`. No default

IntentParameter

Defined in fuchsia.modular/intent.fidl

A struct representing a parameter that is passed to the handler of an Intent's Action.

NameTypeDescriptionDefault
name string? The name of the parameter. The handler (i.e. selected mod) will be provided with the data for this parameter under a link called `name`. No default
data IntentParameterData The data that will be passed to the intent handler. No default

LinkPath

Defined in fuchsia.modular/link_path.fidl

Addresses a Link within a story. A LinkPath struct should be treated as an opaque unique identifier of a link instance. The module_path and link_name components are leftovers from legacy code and have no external meaning. TODO(thatguy,lindkvist): Replace this structure with a vector<>. MI4-1021

NameTypeDescriptionDefault
module_path vector<string> No default
link_name string? No default

ModuleData

Defined in fuchsia.modular/module_data.fidl

Information about a Module instance in a story.

NameTypeDescriptionDefault
module_url string The URL of the Module binary. No default
module_path vector<string> The named path leading up to this Module instance. The last name in this array is the name by which the Module was started by the parent Module instance calling StartModule(). No default
parameter_map ModuleParameterMap Contains the mapping of Mod parameter name to Link instances for this mod. No default
module_source ModuleSource The way in which this Module instance was first started in the story, either by request from another Module instance (INTERNAL) or by request from outside the story (i.e. by suggestion from an agent - EXTERNAL). No default
surface_relation SurfaceRelation? The `surface_relation` that was used to start this Module instance with. The same is used when re-inflating the Module instance when the story is resumed. A SurfaceRelation value of null represents an embedded Module instance (started by EmbedModule()) that is not managed by the story shell. No default
module_deleted bool True if this module was removed from its story either through ModuleController.Stop() or ModuleContext.RemoveSelfFromStory(). No default
intent Intent? The intent that was issued to start add this Module instance to the story. Some Module instances may have been added not by an Intent, for example as the initial module of a story. For those the field may be null. TODO(thatguy,mesch): This field should now always be set, so make it required once the framework is cleaned up enough to guarantee this statement. No default
is_embedded bool If true, this module was started by a parent module using ModuleContext.EmbedModule(), and its view is not managed by the StoryShell. false

ModuleParameterMap

Defined in fuchsia.modular/module_data.fidl

NameTypeDescriptionDefault
entries vector<ModuleParameterMapEntry> No default

ModuleParameterMapEntry

Defined in fuchsia.modular/module_data.fidl

NameTypeDescriptionDefault
name string? A null [name] is allowed for backwards compatibility with default links. TODO(thatguy); When no modules use null link names any more, make this required. No default
link_path LinkPath No default

ModuleManifest

Defined in fuchsia.modular/module_manifest.fidl

Metadata that define the runtime properties of a Module.

NameTypeDescriptionDefault
binary string The relative path from the root of the package where the Module executable file can be found. TODO(MF-94): Extract a module's URL from its cmx manifest instead of here. No default
suggestion_headline string? A human-readable string that can be used when suggesting this Module. DEPRECATED. No default
intent_filters vector<IntentFilter>? A list of intents that this module is able to handle. No default
composition_pattern string? Identifies the pattern with which to compose this module with others. No default
placeholder_color string? Defines the color of the placeholder widget used while the module loads. No default

IntentFilter

Defined in fuchsia.modular/module_manifest.fidl

This struct is used to describe an intent that a module is able to handle.

NameTypeDescriptionDefault
action string The action this module is able to handle. No default
parameter_constraints vector<ParameterConstraint> Includes the name and types of entities for the parameters required to execute specified [action]. No default
action_display ActionDisplay Defines presentation properties for suggestions of this action. No default

ParameterConstraint

Defined in fuchsia.modular/module_manifest.fidl

NameTypeDescriptionDefault
name string No default
type string The entity type that is valid for this parameter. No default

FindModulesQuery

Defined in fuchsia.modular/module_resolver.fidl

Mirrors the information present in a Intent. Where a Intent is meant to interface between Modules and the Framework, this structure is specific to the interface between the Framework and the ModuleResolver.

In that role, it has references to structures and concepts that are only visible within the abstraction layer of the Framework.

NameTypeDescriptionDefault
handler string? The handler is a module URL; if the handler is specified, the search for (action, parameter_constraints) is scoped within the specified handler. No default
action string No default
parameter_constraints vector<FindModulesParameterConstraint> No default

FindModulesParameterConstraint

Defined in fuchsia.modular/module_resolver.fidl

NameTypeDescriptionDefault
param_name string No default
param_types vector<string> No default

FindModulesResponse

Defined in fuchsia.modular/module_resolver.fidl

NameTypeDescriptionDefault
status FindModulesStatus No default
results vector<FindModulesResult> No default

FindModulesResult

Defined in fuchsia.modular/module_resolver.fidl

NameTypeDescriptionDefault
module_id string The ID of the Module. For now, this is the URL of the Module binary. No default
manifest ModuleManifest? The Module's manifest file (see docs/manifests/module.md). No default

FocusInfo

Defined in fuchsia.modular/focus.fidl

Specifies the focused story of a device.

NameTypeDescriptionDefault
device_id string The id of the device. No default
focused_story_id string? The id of the focused story. If null, no stories are focused. No default
last_focus_change_timestamp uint64 The time the focused story on the device `device_id` was last changed. 0 if no focus has ever been set for device `device_id`. No default

ViewIdentifier

Defined in fuchsia.modular/session_shell.fidl

Identifies a view provided to a session shell. The values of the story_id field match those used in the StoryProvider interface, allowing identification of the same story across interfaces.

This is a struct rather than a naked string to allow for future evolution of the identifier without changing the SessionShell API itself.

NameTypeDescriptionDefault
story_id string No default

CreateLinkInfo

Defined in fuchsia.modular/create_link.fidl

Defines the attributes for a Link when the Link is created.

NameTypeDescriptionDefault
initial_data fuchsia.mem/Buffer Passed as root_json argument to StoryProvider.CreateStoryWithInfo() Link.Set() to set the value in the root link of the new Story's primary module. No default
allowed_types LinkAllowedTypes? If `allowed_types` is null, the Link contains JSON. No schema validation is performed. No default

LinkAllowedTypes

Defined in fuchsia.modular/create_link.fidl

NameTypeDescriptionDefault
allowed_entity_types vector<string> The Link must contain an Entity (see Link.SetEntity()) that has at least one of `allowed_entity_types` in its `Entity.GetTypes()` return value. If empty, allows any Entity type. No default

CreateModuleParameterMapInfo

Defined in fuchsia.modular/create_module_parameter_map.fidl

Module parameters are named pointers to link instances.

NameTypeDescriptionDefault
property_info vector<CreateModuleParameterMapEntry>? Contains instructions to create each name in the parameter map. No default

CreateModuleParameterMapEntry

Defined in fuchsia.modular/create_module_parameter_map.fidl

NameTypeDescriptionDefault
key string? No default
value CreateModuleParameterInfo No default

StoryPuppetMaster_SetStoryInfoExtra_Response

generated

NameTypeDescriptionDefault

StoryPuppetMaster_Annotate_Response

generated

NameTypeDescriptionDefault

ExecuteResult

Defined in fuchsia.modular/puppet_master.fidl

NameTypeDescriptionDefault
status ExecuteStatus No default
story_id string? No default
error_message string? No default

SetFocusState

Defined in fuchsia.modular/story_command.fidl

NameTypeDescriptionDefault
focused bool No default

AddMod

Defined in fuchsia.modular/story_command.fidl

Adds a mod described by intent to the story with name mod_name. If mod_name already exists in the story, the mod is updated.

NameTypeDescriptionDefault
mod_name vector<string> The name of the mod within the story. The mod's name acts as the unique ID of the mod, scoped to the story in which it is contained. Since AddMod is reused for observation and mod names are vector inside the framework, they are vector here as well. Clients should treat the full vector as a single opaque value. Clients should provide `mod_name_transitional` instead. If both are provided, `mod_name` is ignored. No default
mod_name_transitional string? The name of the mod within the story. This should be used instead of `mod_name`. If provided, it is equivalent to passing `mod_name` with a single item. If both are provided, `mod_name` is ignored. No default
intent Intent No default
surface_relation SurfaceRelation `surface_relation` defines the visual relationship between this mod and the mod at `surface_parent_mod_name`. No default
surface_parent_mod_name vector<string>? No default

RemoveMod

Defined in fuchsia.modular/story_command.fidl

Removes the mod under mod_name from the story.

NameTypeDescriptionDefault
mod_name vector<string> The name of the mod within the story. Clients should provide `mod_name_transitional` instead. If both are provided, `mod_name` is ignored. No default
mod_name_transitional string? The name of the mod within the story. This should be used instead of `mod_name`. If provided, it is equivalent to passing `mod_name` with a single item. If both are provided, `mod_name` is ignored. No default

SetLinkValue

Defined in fuchsia.modular/story_command.fidl

Sets the value of link at path to value.

NameTypeDescriptionDefault
path LinkPath No default
value fuchsia.mem/Buffer? No default

FocusMod

Defined in fuchsia.modular/story_command.fidl

Instructs the session shell to focus the mod under mod_name.

NameTypeDescriptionDefault
mod_name vector<string> The name of the mod within the story. Clients should provide `mod_name_transitional` instead. If both are provided, `mod_name` is ignored. No default
mod_name_transitional string? The name of the mod within the story. This should be used instead of `mod_name`. If provided, it is equivalent to passing `mod_name` with a single item. If both are provided, `mod_name` is ignored. No default

SetKindOfProtoStoryOption

Defined in fuchsia.modular/story_command.fidl

Updates the kind_of_proto_story option in a story.

NameTypeDescriptionDefault
value bool No default

StoryInfo

Defined in fuchsia.modular/story_info.fidl

Information about a story as provided to the SessionShell.

NameTypeDescriptionDefault
url string? URL of the first module run in this story. This module is free to run more modules in the story. Used for display purposes only. No default
id string The ID of the Story, used to reference it in method arguments. No default
last_focus_time int64 Wallclock time when the story was last focused. From `ZX_CLOCK_UTC`, thus nanoseconds since UNIX epoch (1970-01-01 00:00 UTC). A value of zero means the story has never been focused. No default
extra vector<StoryInfoExtraEntry>? Data the SessionShell wants to keep associated with this Story, like title, a color, or a display rank. No default

StoryInfoExtraEntry

Defined in fuchsia.modular/story_info.fidl

NameTypeDescriptionDefault
key string No default
value string No default

StoryOptions

Defined in fuchsia.modular/story_options.fidl

NameTypeDescriptionDefault
kind_of_proto_story bool Whether or not the story will be hidden on a call to StoryProvider#GetStories. No default

ViewConnection

Defined in fuchsia.modular/story_shell.fidl

A pair mapping a surface ID to a view (via view_holder_token).

NameTypeDescriptionDefault
surface_id string The ID for the surface No default
view_holder_token fuchsia.ui.views/ViewHolderToken Token for embedding the new view corresponding to the surface. No default

ViewConnection2

Defined in fuchsia.modular/story_shell.fidl

DEPRECATED, for transition purposes only.

NameTypeDescriptionDefault
surface_id string The ID for the surface No default
view_holder_token fuchsia.ui.views/ViewHolderToken Token for embedding the new view corresponding to the surface. No default

SurfaceInfo

Defined in fuchsia.modular/story_shell.fidl

Contains metadata for a Surface.

NameTypeDescriptionDefault
parent_id string ID of the view that is parent of this Surface. No default
surface_relation SurfaceRelation? The relationship between the parent Surface and this new Surface. Used for layout optimization. No default
module_manifest ModuleManifest? Information about the module populates the view. No default
module_source ModuleSource How the Surface was generated. By an action internal to the story or by an external action. No default

ContainerView

Defined in fuchsia.modular/story_shell.fidl

NameTypeDescriptionDefault
node_name string Name by which this container node is referenced in container layout and surface relationship specifications (cf. container.fidl) No default
view_holder_token fuchsia.ui.views/ViewHolderToken Token for embedding the new view. The view is resolved from the intent corresponding to `node_name`. No default

ContainerView2

Defined in fuchsia.modular/story_shell.fidl

DEPRECATED, for transition purposes only.

NameTypeDescriptionDefault
node_name string Name by which this container node is referenced in container layout and surface relationship specifications (cf. container.fidl) No default
view_holder_token fuchsia.ui.views/ViewHolderToken Token for embedding the new view. The view is resolved from the intent corresponding to `node_name`. No default

ContainerLayout

Defined in fuchsia.modular/container.fidl

Specification of the layout of multiple surfaces in a module container. The surfaces are referenced by name in ContainerRelationEntry.

NameTypeDescriptionDefault
surfaces vector<LayoutEntry> No default

LayoutEntry

Defined in fuchsia.modular/container.fidl

Specification of the postion of one surface within a container layout, specified by a rectangle.

NameTypeDescriptionDefault
node_name string Surface name, referenced by container relation entry. No default
rectangle float32[4] Layout, as rectangle in Dart conventions(left, top, width, height), as a proportion of the size of the container No default

ContainerRelationEntry

Defined in fuchsia.modular/container.fidl

Specifies the surface relationship between modules started together in module container.

NameTypeDescriptionDefault
node_name string Surface name, referenced by layout. No default
parent_node_name string Surface name of the layout parent. This could be the container itself, rather than a module in it. No default
relationship SurfaceRelation This surface relation between the surface identified by node_name and by parent_node_name. It is possible to specify a surface relationship of a module in a container to the container itself, as opposed to another module in the container. This expresses for example that a module can be dismissed individually, as opposed to dismissing the module dismisses the container as a whole. No default

ContainerNode

Defined in fuchsia.modular/container.fidl

Specifies one module to start inside a container. The module is specified by a intent as usual. The node_name of the surface is referenced by container layout and by container relation entry.

NameTypeDescriptionDefault
node_name string Name by which this module is references in layout and surface relationship specifications (cf. above). No default
intent Intent The intent to resolve to a module. No default

SurfaceRelation

Defined in fuchsia.modular/surface.fidl

Describes the relationship between two Surfaces. Provides information to the StoryShell for layout optimization.

NameTypeDescriptionDefault
arrangement SurfaceArrangement Advice on arranging these surfaces on the screen together. SurfaceArrangement.NONE
dependency SurfaceDependency Advice for dismissal of surfaces to be linked. SurfaceDependency.NONE
emphasis float32 Relative emphasis of the child surface, relative to the parent. Influences relative areas of surfaces on screen. 1

GlobalScope

Defined in fuchsia.modular/scope.fidl

NameTypeDescriptionDefault

ModuleScope

Defined in fuchsia.modular/scope.fidl

NameTypeDescriptionDefault
url string No default
story_id string No default
module_path vector<string> No default

AgentScope

Defined in fuchsia.modular/scope.fidl

NameTypeDescriptionDefault
url string No default

StoryScope

Defined in fuchsia.modular/scope.fidl

NameTypeDescriptionDefault
story_id string No default

ENUMS

AnnotationError

Type: uint32

Defined in fuchsia.modular/annotation.fidl

Error returned from calls to Annotate().

NameValueDescription
VALUE_TOO_BIG 1
TOO_MANY_ANNOTATIONS 2

FocusedStateState

Type: uint32

Defined in fuchsia.modular/metadata.fidl

NameValueDescription
FOCUSED 1
NOT_FOCUSED 2

ContextValueType

Type: uint32

Defined in fuchsia.modular/value_type.fidl

NameValueDescription
STORY 1
MODULE 2
AGENT 3
ENTITY 4
LINK 5

EntityWriteStatus

Type: uint32

Defined in fuchsia.modular/entity.fidl

NameValueDescription
OK 0
ERROR 1
READ_ONLY 2

StartModuleStatus

Type: uint32

Defined in fuchsia.modular/module_context.fidl

Communicates the status of an Intent to a Module.

NameValueDescription
SUCCESS 0
NO_MODULES_FOUND 1

OngoingActivityType

Type: uint32

Defined in fuchsia.modular/module_context.fidl

NameValueDescription
UNSPECIFIED 0
VIDEO 1
AUDIO 2

ModuleSource

Type: uint32

Defined in fuchsia.modular/module_data.fidl

NameValueDescription
INTERNAL 0
EXTERNAL 1

ModuleState

Type: uint32

Defined in fuchsia.modular/module_state.fidl

State used to notify about state transitions of a Module instance. This is very similar to the StoryState, however it's not entirely the same and hence a separate type. A module cannot have an INITIAL state, because it's started as soon as it is created, and it gets deleted as soon as it reaches the STOPPED state, whileas a story can be restarted.

Currently possible state transitions (and the events that cause them) are:

        -> RUNNING     ModuleContext.AddModuleToStory() or
                       ModuleContext.EmbedModule() or
                       StoryController.AddModule()

RUNNING -> STOPPED ModuleController.Stop() or StoryController.Stop() RUNNING -> ERROR application exits

NameValueDescription
RUNNING 2
STOPPED 4
ERROR 5

FindModulesStatus

Type: uint32

Defined in fuchsia.modular/module_resolver.fidl

NameValueDescription
SUCCESS 0
UNKNOWN_HANDLER 1

ExecuteStatus

Type: uint32

Defined in fuchsia.modular/puppet_master.fidl

NameValueDescription
OK 0
INVALID_COMMAND 1
INVALID_STORY_ID 2
STORY_MUST_HAVE_MODS 3
INVALID_MOD 4
NO_MODULES_FOUND 5
INTERNAL_ERROR 6

ConfigureStoryError

Type: int32

Defined in fuchsia.modular/puppet_master.fidl

NameValueDescription
ERR_STORY_ALREADY_CREATED 1

StoryVisualState

Type: uint32

Defined in fuchsia.modular/story_shell.fidl

Defines the visual state of the Story shell.

NameValueDescription
MINIMIZED 0
MAXIMIZED 1
MAXIMIZED_OVERLAYED 2

StoryState

Type: uint32

Defined in fuchsia.modular/story_state.fidl

State of a Story. A story is either running, stopping, or stopped, separately on every device of the user. If it's running, it can also be focused, but that's tracked in a separate service, cf. FocusProvider in focus.fidl.

Possible state transitions are:

STOPPED -> RUNNING RUNNING -> STOPPING STOPPING -> STOPPED

NameValueDescription
RUNNING 1
STOPPING 2
STOPPED 3

StoryVisibilityState

Type: uint32

Defined in fuchsia.modular/story_visibility_state.fidl

Visibility state of a Story within the session shell. This state describes how a story should be displayed within the session shell, regardless of whether the story is in focus or not. Focus state and visibility state are orthogonal concepts. E.g A story can be out-of-focus and be in IMMERSIVE state at the same time if a user was playing a video, exits, then re-enters the story. The expectation in this scenario is that the story is in IMMERSIVE state upon re-enter.

All state transitions are possible.

NameValueDescription
DEFAULT 1
IMMERSIVE 2

SurfaceArrangement

Type: uint32

Defined in fuchsia.modular/surface.fidl

Expresses arrangement type.

NameValueDescription
NONE 0
COPRESENT 1
SEQUENTIAL 2
ONTOP 3

SurfaceDependency

Type: uint32

Defined in fuchsia.modular/surface.fidl

Links surface dismissal.

NameValueDescription
NONE 0
DEPENDENT 1

TABLES

AgentServiceRequest

Defined in fuchsia.modular/component_context.fidl

Used by ComponentContext.ConnectToAgentService

OrdinalNameTypeDescription
1 service_name string The name of the requested service.
2 channel handle<channel> The channel that will be used to communicate with the requested service.
3 handler string[2083] The component URL of the Agent that is to provide the specified service. If no handler is specified, the framework will perform resolution to find an appropriate handler.
4 agent_controller request<AgentController> The AgentController that keeps the agent alive.

ActionDisplay

Defined in fuchsia.modular/module_manifest.fidl

Defines how a suggestion of an action will be presented.

OrdinalNameTypeDescription
1 display_info DisplayInfo Defines presentation fields for a suggestion. The string fields might be templated and will be filled from data in `parameter_mapping`. For example: "Listen to $artistName"
2 parameter_mapping vector<ParameterMapping> Fields to be replaced in the given `display_info` templated strings. In the example above, we would map name=artistName to the intent field artist.name where artist is the intent parameter name and name a field of it.

DisplayInfo

Defined in fuchsia.modular/module_manifest.fidl

Presentation information about the suggestion.

OrdinalNameTypeDescription
1 title string The title of the suggestion.
2 subtitle string A subtitle for the suggestion.
3 icon string A url from which to fetch the icon of the suggestion.

ParameterMapping

Defined in fuchsia.modular/module_manifest.fidl

Defines pairs that will be replaced in the DisplayInfo.

OrdinalNameTypeDescription
1 name string The name of the variable to be replaced in the template.
2 parameter_property string The path in the intent parameter to get that name. `PARAMETER_PROPERTY` = string | string . `PARAMETER_PROPERTY` The first string in the dot-separated string is the name of the intent parameter and the following are nested subfields.

StoryInfo2

Defined in fuchsia.modular/story_info.fidl

Information about a story as provided to the SessionShell. For transition purposes only.

OrdinalNameTypeDescription
1 id string The ID of the Story, used to reference it in method arguments.
2 last_focus_time int64 Wallclock time when the story was last focused. From ZX_CLOCK_UTC, thus nanoseconds since UNIX epoch (1970-01-01 00:00 UTC). A value of zero means the story has never been focused.
3 annotations vector<Annotation>[100] Collection of user-defined key-value attributes that describe this story. The `Annotation.value` field of each `Annotation` is always set.

SurfaceInfo2

Defined in fuchsia.modular/story_shell.fidl

Contains metadata for a Surface.

OrdinalNameTypeDescription
1 parent_id string ID of the view that is parent of this Surface.
2 surface_relation SurfaceRelation The relationship between the parent Surface and this new Surface. Used for layout optimization.
3 module_manifest ModuleManifest Information about the module populates the view.
4 module_source ModuleSource How the Surface was generated. By an action internal to the story or by an external action.

UNIONS

TriggerCondition

Defined in fuchsia.modular/agent_context.fidl

Describes the condition that needs to be met for a task to become scheduled. This is not yet complete and will be extended or changed.

NameTypeDescription
message_on_queue string Triggers when there is a new message on a message queue. `message_on_queue` is the name of the message queue to be watched. This means that only the component that originally obtained the message queue will be able to observe new message events.
queue_deleted string Triggers when a message queue is deleted. `queue_deleted` is the token for the message queue that is to be watched. This allows both message queue readers and writers to watch for queue deletions.
alarm_in_seconds uint32 Fires an inexact repeating alarm every `alarm_in_seconds` seconds that'll satisfy this trigger condition. The first alarm fires in `alarm_in_seconds` seconds.

IntentParameterData

Defined in fuchsia.modular/intent.fidl

NameTypeDescription
entity_reference string Set this if you already have an Entity reference at runtime. Entity.getTypes() will be used to set the constraints for this noun during resolution.
json fuchsia.mem/Buffer Set this if you have structured JSON data. Values typically are a JSON object with a "@type" attribute and other associated data. TODO(thatguy): We need to decide if we want to keep this in place, or deprecate this eventually and move entirely to using Entity references. DEPRECATED: Use `entity_reference`.
entity_type vector<string> Set this if you want to explicitly define this noun's allowed types. This is also useful in the cases where the noun has a 'direction' of type 'output', and you wish to set the allowable output types from the Module (see docs/modular/manifests/action_template.md for a definition of 'direction'). Only one entry in `entity_type` must match the constraint specified by the Module for the constraint to be considered satisfied.

CreateModuleParameterInfo

Defined in fuchsia.modular/create_module_parameter_map.fidl

NameTypeDescription
link_path LinkPath Instructs parameter map initialization to either use an existing Link (`link_path` is set) or create a new Link (`create_link` is set).
create_link CreateLinkInfo

StoryPuppetMaster_SetStoryInfoExtra_Result

generated

NameTypeDescription
response StoryPuppetMaster_SetStoryInfoExtra_Response
err ConfigureStoryError

StoryPuppetMaster_Annotate_Result

generated

NameTypeDescription
response StoryPuppetMaster_Annotate_Response
err AnnotationError

StoryCommand

Defined in fuchsia.modular/story_command.fidl

StoryCommands are POD structures that describe the set of operations that can be performed on a story by components outside the modular framework. All commands are:

(1) Scoped to a single story (2) Idempotent: issuing the same command twice yields the same result (3) Symmetrical with observation: the same structures are used to describe operations to watchers of a story (through SessionWatcher) as are used to control a story.

NameTypeDescription
set_focus_state SetFocusState Sets the focus state of the story to `set_focus_state.focused`.
add_mod AddMod Adds a Mod.
remove_mod RemoveMod Removes an existing Mod.
set_link_value SetLinkValue Sets the value of a Link.
focus_mod FocusMod Brings focus to a mod.
set_kind_of_proto_story_option SetKindOfProtoStoryOption Updates the kind_of_proto_story option in a story.

ComponentScope

Defined in fuchsia.modular/scope.fidl

Specifies the access scope a given component has to services within Maxwell.

NameTypeDescription
global_scope GlobalScope Reserved for system-level services.
module_scope ModuleScope Scope for a specific Module instance within a specific Story.
agent_scope AgentScope Scope for a specific Agent. Agents are not tied to a specific story.
story_scope StoryScope Scope for a specific Story, potentially containing several Module instances.

XUNIONS

AnnotationValue

Defined in fuchsia.modular/annotation.fidl

The value of a Annotation.

The actual field used depends on the type of annotation, which is user-defined, and not enforced by the framework.

The size of buffer is limited to MAX_ANNOTATION_VALUE_BUFFER_LENGTH_BYTES bytes.

NameTypeDescription
text string[1024]
bytes vector<uint8>[1024]
buffer fuchsia.mem/Buffer

CONSTANTS

NameValueTypeDescription
MAX_ANNOTATIONS_PER_STORY 100 uint32 Maximum number of annotations on a single story.
MAX_ANNOTATIONS_PER_MODULE 100 uint32 Maximum number of annotations on a single module.
MAX_ANNOTATION_KEY_LENGTH 256 uint32 Maximum length of AnnotationKey.
MAX_ANNOTATION_VALUE_LENGTH 1024 uint32 Maximum length of AnnotationValue fields: `text` and `bytes`.
MAX_ANNOTATION_VALUE_BUFFER_LENGTH_BYTES 102400 uint32 Maximum length of the AnnotationValue.buffer field, in bytes. Does not apply to other fields; see MAX_ANNOTATION_VALUE_LENGTH.
MAX_ANNOTATE_SIZE 50 uint32 Maximum number of annotations that can be passed to StoryPuppetMaster.Annotate.