roboto.domain.triggers.targets#

Module Contents#

class roboto.domain.triggers.targets.InvokeActionTarget(/, **data)#

Bases: _TargetSpecBase

Stored configuration for invoking an action when a trigger fires.

Spec only — dispatch behavior lives server-side. String leaves of parameter_values, required_inputs, additional_inputs, and invocation_input may contain {{...}} placeholders resolved against the event namespace at dispatch time.

An event that names a dataset invokes the action against that dataset, with inputs matched from its files by the file patterns. An event that names no dataset has no files to match: the invocation has no data source and selects its inputs with invocation_input.

Parameters:

data (Any)

action: roboto.domain.actions.action_record.ActionReference#

The action to invoke. owner defaults to the trigger’s org when omitted and digest to the action’s latest version.

additional_inputs: list[str] | None = None#

Optional extra file patterns passed as invocation inputs beyond the required ones. Only for events that name a dataset; must be empty otherwise.

compute_requirement_overrides: roboto.domain.actions.action_record.ComputeRequirements | None = None#

Optional compute requirement overrides for the invocation.

container_parameter_overrides: roboto.domain.actions.action_record.ContainerParameters | None = None#

Optional container parameter overrides for the invocation.

invocation_input: roboto.domain.actions.invocation_record.InvocationInput | None = None#

Optional query-based input selection (files, topics, sessions) resolved when the invocation runs, e.g. InvocationInput.from_session_id("{{session.session_id}}"). The way a trigger on an event that names no dataset selects its inputs; may also accompany the file patterns of an event that names one.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

parameter_values: dict[str, Any] = None#

Parameter values passed to the action; string leaves may be templated.

referenced_placeholders()#

Return every {{name}} placeholder referenced by this target’s templated fields.

Return type:

set[str]

required_inputs: list[str] = None#

File patterns (e.g. **/*.bag) that gate dispatch on the firing event’s files. Only for events that name a dataset; must be empty otherwise.

target_id: str#

Stable id of this target within its trigger. Part of the dispatch idempotency key: the target’s once-per history is kept under this id, so renaming it (or replacing it with an identical target under a new id) starts a fresh history and the target fires again for subjects the old id already fired for.

timeout: int | None = None#

Optional invocation timeout override, in minutes.

type: Literal[TriggerTargetType]#

Discriminator for TriggerTargetSpec.

upload_destination: roboto.domain.actions.invocation_record.InvocationUploadDestination | None = None#

Optional destination for the invocation’s output files.

class roboto.domain.triggers.targets.SendSlackMessageTarget(/, **data)#

Bases: _TargetSpecBase

Stored configuration for posting a Slack message when a trigger fires.

Spec only — dispatch behavior lives server-side. The channel must be on the org’s Slack outbound allowlist at dispatch time.

Parameters:

data (Any)

channel_id: str#

Slack channel to post to.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

referenced_placeholders()#

Return every {{name}} placeholder referenced by this target’s templated text.

Return type:

set[str]

target_id: str#

Stable id of this target within its trigger; part of the dispatch idempotency key.

text: str#

Message body; may contain {{...}} placeholders resolved against the event namespace.

type: Literal[TriggerTargetType]#

Discriminator for TriggerTargetSpec.

class roboto.domain.triggers.targets.StartAgentTarget(/, **data)#

Bases: _TargetSpecBase

Stored configuration for starting an agent thread when a trigger fires.

Spec only — dispatch behavior lives server-side. Each value in values is a template resolved against the event namespace, then handed to the agent’s own variable resolution as a plain value.

Parameters:

data (Any)

agent_id: str#

The agent definition to launch.

analysis_scope: roboto.ai.core.AnalysisScope | None = None#

Optional analysis scope for the resulting thread.

model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

referenced_placeholders()#

Return every {{name}} placeholder referenced by this target’s templated values.

Return type:

set[str]

target_id: str#

Stable id of this target within its trigger; part of the dispatch idempotency key.

type: Literal[TriggerTargetType]#

Discriminator for TriggerTargetSpec.

values: dict[str, str] = None#

Agent variable name to a template string resolved against the event namespace.

visibility: roboto.ai.agent_thread.record.ThreadVisibility#

Visibility of the resulting agent thread.

roboto.domain.triggers.targets.TriggerTargetSpec#

A trigger target spec, discriminated on type.

class roboto.domain.triggers.targets.TriggerTargetType#

Bases: roboto.compat.StrEnum

The kind of thing a trigger does when it fires.

InvokeAction = 'invoke_action'#

Invoke a containerized action.

SendSlackMessage = 'send_slack_message'#

Post a message to a Slack channel on the org’s allowlist.

StartAgent = 'start_agent'#

Start an AI agent thread from a saved agent definition.

roboto.domain.triggers.targets.target_catalog_manifest()#

The kinds of target a trigger can have, as the web UI’s target picker reads them.

target_catalog.json in this package is this function’s output, written by scripts/gen_trigger_manifests.py and drift-checked by a test on each side. Each entry’s body is empty: a target carries no save-time constraint of its own, so the picker offers every type for every event.

Return type:

dict[str, Any]