AbstractCode can translate durable workflow emit_event effects into host UX updates.
Start here: docs/getting-started.md.
This is designed so:
- the event is recorded in the ledger (durable, replayable),
- different hosts (TUI, web) can render the same “UX hint” deterministically.
Related:
- Workflows overview:
docs/workflows.md - Architecture:
docs/architecture.md
Canonical namespace: abstract.*
Deprecated alias: abstractcode.* is accepted and normalized to abstract.*.
Evidence: abstractcode/workflow_agent.py::_normalize_ui_event_name().
Purpose: update the host’s status/spinner text.
Accepted payload shapes:
- string:
"Indexing repo…" - object:
{ "text": "Indexing repo…", "duration": 2 }
duration is seconds:
null/missing: host default-1: sticky (do not auto-clear)> 0: auto-clear after that many seconds (best-effort)
Evidence:
- Payload parsing:
abstractcode/workflow_agent.py::_extract_status() - TUI rendering:
abstractcode/react_shell.py(on-step handler for"status")
Purpose: show a notification/message block in the host.
Accepted payload shapes:
- string:
"Done." - object:
- required:
text - optional:
level(info|success|warning|error),title,meta(object)
- required:
Evidence:
- Payload parsing:
abstractcode/workflow_agent.py::_extract_message() - TUI rendering:
abstractcode/react_shell.py(on-step handler for"message")
Purpose: render a “tool call” UX block without requiring actual tool execution.
Accepted payload shapes:
- a single tool call object
- a list of tool call objects
Supported tool call object shapes (best-effort normalization):
- Preferred normalized:
{ "name": "read_file", "arguments": { "path": "README.md" }, "call_id": "..." }
- OpenAI-ish:
{ "id": "...", "type": "function", "function": { "name": "read_file", "arguments": "{\"path\":\"README.md\"}" } }
Evidence: abstractcode/workflow_agent.py::_extract_tool_exec() and UI translation in _subscribe_ui_events().
Purpose: render a “tool result” UX block.
Accepted payload shapes:
- a single tool result object
- a list of tool result objects
Supported tool result object fields (best-effort):
name/tool/tool_name(string)success(boolean)output/result/content/text(any; rendered as string)
Evidence: abstractcode/workflow_agent.py::_extract_tool_result() and UI translation in _subscribe_ui_events().
- Events are only surfaced after the corresponding ledger record is written as
status == completed. - Hosts must treat these events as UX-only (they must not affect correctness).
Evidence: ledger subscription filter in abstractcode/workflow_agent.py::_subscribe_ui_events().