blob: 347482a2c5e67af0b39e70e25bf827d33eea208d [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.modular.session;
using fuchsia.sys;
/// Descriptions and defaults for these configurations are echoed in
/// [modular config guide](
type BasemgrConfig = table {
/// When set to false, Cobalt statistics are disabled.
/// Default: true
1: enable_cobalt bool;
2: reserved;
/// Create story shells through StoryShellFactory exposed by the session
/// shell instead of creating separate story shell components. When set,
/// `story_shell_url` and any story shell args are ignored.
/// Default: false
3: use_session_shell_for_story_shell_factory bool;
4: reserved;
/// A map of launch configurations specific to session shells.
5: session_shell_map vector<SessionShellMapEntry>;
/// Launch configurations specific to story shell.
6: story_shell StoryShellConfig;
7: reserved;
/// Launch configuration for a session launcher component.
/// If specified, this component is started instead of sessionmgr,
/// and all other configuration fields are ignored, except `enable_cobalt`.
/// The session launcher component can then use the `Launcher` protocol
/// to launch sessionmgr with a particular configuration.
8: session_launcher AppConfig;
type SessionShellMapEntry = table {
/// The name of the session shell represented by its url.
1: name;
/// The launch configurations for the session shell.
2: config SessionShellConfig;
type SessionShellConfig = table {
/// Contains the fuchsia package url and arguments to pass to the shell.
1: app_config AppConfig;
2: reserved;
3: reserved;
4: reserved;
type StoryShellConfig = table {
/// Contains the fuchsia package url and arguments to pass to the shell.
1: app_config AppConfig;
type SessionmgrConfig = table {
1: reserved;
/// When set to false, Cobalt statistics are disabled. This is used for
/// testing.
/// Default: true
2: enable_cobalt bool;
3: reserved bool;
4: reserved;
/// A list of fuchsia package urls that specify which agents to launch at
/// startup.
5: startup_agents vector<>;
/// A list of fuchsia package urls that specify which agents to launch at
/// startup with PuppetMaster and FocusProvider services.
6: session_agents vector<>;
/// The fuchsia package url for which story shell to use.
7: story_shell_url;
/// A map of agents to the arguments they should be started with.
8: component_args vector<AppConfig>;
9: reserved;
/// A list of services mapped to the component URL that serves it.
/// Valid components to specify here are agents or the session shell.
/// Services listed here are available in the incoming namespaces for
/// modules, shells, and agents.
10: agent_service_index vector<AgentServiceIndexEntry>;
/// A list of agent URLs that will cause the session to be restarted
/// when they terminate. If an agent is not in this list, sessionmgr will
/// restart it individually, preserving the session.
/// The session shell is automatically added to this list.
11: restart_session_on_agent_crash vector<>:MAX;
/// If set to true, disables any automatic agent restarts when an agent is
/// observed to have crashed.
12: disable_agent_restart_on_crash bool;
/// Used to pass around configuration references to apps such as base shell,
/// session shell, story shell, and agents.
type AppConfig = table {
/// The fuchsia package url for app.
1: url;
/// The arguments for the app.
2: args vector<string>;
/// A service and the URL of the agent known to provide that service.
type AgentServiceIndexEntry = table {
/// The service name.
1: service_name string;
/// The fuchsia component url for agent.
2: agent_url fuchsia.sys.component_url;
/// Contains the configurations for the modular framework components.
type ModularConfig = table {
1: basemgr_config BasemgrConfig;
2: sessionmgr_config SessionmgrConfig;