Skip to content

API Reference parrot.integrations.slack.devloop.blocks

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.integrations.slack.devloop.blocks

View source

Block Kit builders for the Slack dev-loop adapter (FEAT-555 M10). Pure functions, no I/O.

Alias GateView

Re-exported from parrot.integrations.devloop.models.GateView.

Alias RequestType

Re-exported from parrot.integrations.devloop.models.RequestType.

Alias RunEvent

Re-exported from parrot.integrations.devloop.models.RunEvent.

Alias RunRecord

Re-exported from parrot.integrations.devloop.models.RunRecord.

Function answers_modal

form_definition for open_modal: callback_id devloop_answers.

One optional multiline text input per question (block_id q<N>).

answers_modal(record: RunRecord, gate: GateView) -> dict[str, Any]

Parameter Type Default Description
record RunRecord The run the gate belongs to.
gate GateView The open_questions gate.

Returns: dict[str, Any] — The form_definition dict.

Function confirm_blocks

Confirm card for BOTH kinds (spec Q1): field preview + Confirm / Edit / Cancel buttons.

confirm_blocks(pending_id: str, kind: RequestType, fields: dict[str, str]) -> list[dict[str, Any]]

Parameter Type Default Description
pending_id str
kind RequestType
fields dict[str, str]

Returns: list[dict[str, Any]]

Function dispatch_root_blocks

Public thread root: ':rocket: Development flow dispatched — run <id> for <title>, started by <@user>'.

dispatch_root_blocks(record: RunRecord) -> list[dict[str, Any]]

Parameter Type Default Description
record RunRecord

Returns: list[dict[str, Any]]

Function edit_modal

form_definition for SlackInteractiveHandler.open_modal (interactive.py:308): callback_id devloop_edit.

edit_modal(pending_id: str, kind: RequestType, fields: dict[str, str]) -> dict[str, Any]

Parameter Type Default Description
pending_id str The pending confirmation's id (carried as modal metadata).
kind RequestType "bug" or "feature" — selects the field list.
fields dict[str, str] The confirm card's display projection (brief_summary_fields), used as initial values.

Returns: dict[str, Any] — A form_definition: id, title, fields, metadata.

Function gate_blocks

Gate card body.

open_questions ⇒ numbered questions + Answer / Abort ideation; other kinds ⇒ title/instructions/payload_ref + Approve / Reject.

gate_blocks(record: RunRecord, gate: GateView) -> list[dict[str, Any]]

Parameter Type Default Description
record RunRecord The run the gate belongs to.
gate GateView The pending gate.

Returns: list[dict[str, Any]] — The Block Kit blocks for the card.

Function gate_resolved_blocks

Card body after resolution: 'Answered by <@user> (k of n)' / 'Rejected by …' / 'Expired'.

gate_resolved_blocks(record: RunRecord, gate: GateView) -> list[dict[str, Any]]

Parameter Type Default Description
record RunRecord The run the gate belongs to.
gate GateView The resolved/expired gate.

Returns: list[dict[str, Any]] — The Block Kit blocks for the updated card.

Function run_started_blocks

In-thread 'started' message with base branch / Jira key when present.

run_started_blocks(record: RunRecord) -> list[dict[str, Any]]

Parameter Type Default Description
record RunRecord

Returns: list[dict[str, Any]]

Function status_card_blocks

One line per node in graph order.

`` `node_id``` — completed green, running spinning, remaining idle. Failed nodes append their error, truncated to 120 characters.

status_card_blocks(record: RunRecord, nodes: dict[str, dict[str, Any]]) -> list[dict[str, Any]]

Parameter Type Default Description
record RunRecord The run the status card belongs to.
nodes dict[str, dict[str, Any]] DevLoopSessionState.model_dump()["nodes"] — {node_id: {"status": ..., "error": ...}}.

Returns: list[dict[str, Any]] — The Block Kit blocks for the status card.

Function status_list_text

Ephemeral status text: one line per run (id, kind, phase, current node, pending gate, permalink).

status_list_text(records: list[RunRecord], permalink: Callable[[RunRecord], str]) -> str

Parameter Type Default Description
records list[RunRecord]
permalink Callable[[RunRecord], str]

Returns: str

Function terminal_blocks

Terminal summary for the run thread.

run_closed ⇒ completed/failed summary (PR URL, Jira key); run_cancelled ⇒ cancelled by; process_exited ⇒ exit code + stderr tail.

terminal_blocks(record: RunRecord, event: RunEvent) -> list[dict[str, Any]]

Parameter Type Default Description
record RunRecord The finished run.
event RunEvent The terminal :class:RunEvent.

Returns: list[dict[str, Any]] — The Block Kit blocks for the terminal message.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally