This repository has been archived on 2026-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
orchestrator/agent-team/agent_team/db/__init__.py
Adam Moussa 4656ca64b6 feat(agent-team): task_transitions ledger + graph node instrumentation
Add a v3 task_transitions table (additive migration + startup assertion) and a
fail-soft, idempotent TransitionRecorder. build_graph gains an injected
transition_recorder that wraps every node via a functools.wraps'd _instrument
(signature-preserving so LangGraph still injects RunnableConfig); the coordinator
wires it. Records one row per node entry (idempotent under resume replay) and
closes the open row on terminal status. Backs the dashboard task-history view.
2026-06-23 17:15:08 -04:00

31 lines
817 B
Python

"""SQLite schema and connection helpers for the R720 agent-team pipeline.
SQL DDL lives ONLY in this subpackage (``schema.py`` constants mirrored by the
companion ``schema.sql``). The LangGraph ``SqliteSaver`` checkpointer creates
its own tables against the same database file.
"""
from agent_team.db.schema import (
BUDGET_LEDGER_DDL,
PENDING_QUESTIONS_DDL,
SCHEMA_VERSION,
TASK_TRANSITIONS_DDL,
assert_task_transitions_ready,
connect,
init_db,
migrate,
)
from agent_team.db.transitions import TransitionRecorder, read_transitions
__all__ = [
"BUDGET_LEDGER_DDL",
"PENDING_QUESTIONS_DDL",
"SCHEMA_VERSION",
"TASK_TRANSITIONS_DDL",
"TransitionRecorder",
"assert_task_transitions_ready",
"connect",
"init_db",
"migrate",
"read_transitions",
]