Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
{
"db_name": "PostgreSQL",
"query": "\n UPDATE work_registration\n SET ended_at = NOW(), end_reason = 'pull_request_finished'\n WHERE ended_at IS NULL\n AND agent_session_id IN (\n SELECT link.agent_session_id\n FROM agent_session_pull_request link\n WHERE lower(link.github_key) = lower($1)\n AND NOT EXISTS (\n SELECT 1\n FROM agent_session_pull_request other\n LEFT JOIN github_pull_request pull_request\n ON lower(pull_request.github_key) = lower(other.github_key)\n WHERE other.agent_session_id = link.agent_session_id\n AND pull_request.status IS DISTINCT FROM 'merged'\n AND pull_request.status IS DISTINCT FROM 'closed'\n )\n )\n RETURNING agent_session_id\n ",
"describe": {
"columns": [
{
"ordinal": 0,
"name": "agent_session_id",
"type_info": "Uuid"
}
],
"parameters": {
"Left": [
"Text"
]
},
"nullable": [
false
]
},
"hash": "9100a3a74e30a9eb6555184c11d83dda2de68d240b7b1627fd298e4da122c2af"
}