Skip to main content

Module row

Module row 

Source
Expand description

The db_agents column lists and row mappers the definition and instance reads share.

ConstantsΒ§

AGENT_DEFINITION_SELECT πŸ”’
The db_agents SELECT that reads a row in the AgentDefinition shape β€” the column order map_agent_definition_row expects. Shared by agent_def_list (all rows) and agent_row_get (one row).
INSTANCE_COLUMNS πŸ”’
The db_agents columns every instance read selects, in the order map_instance_row expects.

FunctionsΒ§

map_agent_definition_row πŸ”’
Row mapper for db_agents rows projected back into the AgentDefinition shape. The column order MUST match the SELECT in agent_def_list. parent_template_id maps to parent_id because the consolidated table renamed the field to clarify its semantics (template lineage), but the wire shape kept the old name.
map_instance_row πŸ”’
Project a non-template db_agents row (selected with INSTANCE_COLUMNS) into the AgentInstance shape: the row’s id is both id and definition_id, last_block_id is block_id, chains are pre-collapsed so parent_instance_id is empty, and a row that never recorded a launch reports created_at as started_at.