Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.domain.triggers.targets

Module Contents

ActionInvocationSpec

class roboto.domain.triggers.targets.ActionInvocationSpec(/, **data)#View Source

Bases: pydantic.BaseModel

How to run an action: which action, its parameters, overrides, and input selectors.

The part of an invoke-action target that says nothing about when it runs, shared by InvokeActionTarget and anything else that stores an action invocation to run later, such as an ingestion rule. String leaves of parameter_values and invocation_input may contain {{...}} placeholders resolved against the event namespace at dispatch time.

Parameters

data Any

Attributes

ActionInvocationSpec.action

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

ActionInvocationSpec.compute_requirement_overrides

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

Optional compute requirement overrides for the invocation.

ActionInvocationSpec.container_parameter_overrides

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

Optional container parameter overrides for the invocation.

ActionInvocationSpec.invocation_input

Optional query-based input selection (files, topics, sessions) resolved when the invocation runs, e.g. InvocationInput.file_query('tags CONTAINS "{{event.name}}"'). 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.

ActionInvocationSpec.model_config

model_config #

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

ActionInvocationSpec.parameter_values

parameter_values dict[str, Any] = None #

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

ActionInvocationSpec.referenced_placeholders()

referenced_placeholders()#View Source

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

Return type

set[str]

Attributes

ActionInvocationSpec.timeout

timeout int | None = None #

Optional invocation timeout override, in minutes.

ActionInvocationSpec.upload_destination

Optional destination for the invocation’s output files.

InvokeActionTarget

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

Bases: ActionInvocationSpec, _TargetSpecBase

Stored configuration for invoking an action when a trigger fires.

Spec only — dispatch behavior lives server-side. The ActionInvocationSpec fields say how to run the action; this class adds the target’s identity and its file patterns. String leaves of required_inputs and additional_inputs may contain {{...}} placeholders, as the spec’s may.

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

Attributes

InvokeActionTarget.additional_inputs

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.

InvokeActionTarget.from_invocation()

classmethod from_invocation(invocation, *, target_id, required_inputs=None, additional_inputs=None)#View Source

A target that runs invocation, with the given identity and file patterns.

Parameters

target_id str
required_inputs Optional[list[str]]
additional_inputs Optional[list[str]]

InvokeActionTarget.invocation()

invocation()#View Source

How this target runs its action, without its identity or file patterns.

Attributes

InvokeActionTarget.model_config

model_config #

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

InvokeActionTarget.referenced_placeholders()

referenced_placeholders()#View Source

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

Return type

set[str]

Attributes

InvokeActionTarget.required_inputs

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.

InvokeActionTarget.target_id

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.

InvokeActionTarget.type

type Literal[TriggerTargetType] #

Discriminator for TriggerTargetSpec.

SendSlackMessageTarget

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

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

Attributes

SendSlackMessageTarget.channel_id

channel_id str #

Slack channel to post to.

SendSlackMessageTarget.model_config

model_config #

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

SendSlackMessageTarget.referenced_placeholders()

referenced_placeholders()#View Source

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

Return type

set[str]

Attributes

SendSlackMessageTarget.target_id

target_id str #

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

SendSlackMessageTarget.text

text str #

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

SendSlackMessageTarget.type

type Literal[TriggerTargetType] #

Discriminator for TriggerTargetSpec.

StartAgentTarget

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

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

Attributes

StartAgentTarget.agent_id

agent_id str #

The agent definition to launch.

StartAgentTarget.analysis_scope

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

Optional analysis scope for the resulting thread.

StartAgentTarget.model_config

model_config #

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

StartAgentTarget.referenced_placeholders()

referenced_placeholders()#View Source

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

Return type

set[str]

Attributes

StartAgentTarget.target_id

target_id str #

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

StartAgentTarget.type

type Literal[TriggerTargetType] #

Discriminator for TriggerTargetSpec.

StartAgentTarget.values

values dict[str, str] = None #

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

StartAgentTarget.visibility

Visibility of the resulting agent thread.

TriggerTargetSpec

roboto.domain.triggers.targets.TriggerTargetSpec#View Source

A trigger target spec, discriminated on type.

TriggerTargetType

class roboto.domain.triggers.targets.TriggerTargetType#View Source

Bases: roboto.compat.StrEnum

The kind of thing a trigger does when it fires.

Attributes

TriggerTargetType.InvokeAction

InvokeAction = 'invoke_action' #

Invoke a containerized action.

TriggerTargetType.SendSlackMessage

SendSlackMessage = 'send_slack_message' #

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

TriggerTargetType.StartAgent

StartAgent = 'start_agent' #

Start an AI agent thread from a saved agent definition.

target_catalog_manifest()

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

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]

Was this page helpful?