feat(F): F-TEST + F-DOC + F-UI-TRIG — Phase F complete!
- F-TEST: tests/test_phase_f_agents.py (1425 lines, 45 tests, all pass) — ReAct Loop, Permissions, Approvals, Skills, Context Builder, Data Policy, Transparency, Workstream, Budget - F-DOC: docs/api-documentation.md (Phase F endpoints), docs/plugin-development-guide.md (Agent chapter 32), docs/test-strategy.md (Phase F test conventions) - F-UI-TRIG: trigger_dispatcher dispatches agents on ui.*/context.* events (already implemented in F-PROACTIVE) - Bug fix: approval.py metadata reserved attribute renamed to request_metadata - PROGRESS.md: Phase F marked done, ~155/223 tasks done (70%)
This commit is contained in:
@@ -65,8 +65,8 @@ class ApprovalRequest(Base, TenantMixin):
|
||||
expires_at: Mapped[datetime | None] = mapped_column(
|
||||
DateTime(timezone=True), nullable=True
|
||||
)
|
||||
metadata: Mapped[dict[str, Any]] = mapped_column(
|
||||
JSONB, nullable=False, default=dict
|
||||
request_metadata: Mapped[dict[str, Any]] = mapped_column(
|
||||
"metadata", JSONB, nullable=False, default=dict
|
||||
)
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ async def create_approval_request(
|
||||
approver_group=approver_group,
|
||||
status="pending",
|
||||
expires_at=expires_at,
|
||||
metadata=metadata or {},
|
||||
request_metadata=metadata or {},
|
||||
)
|
||||
db.add(req)
|
||||
await db.flush()
|
||||
|
||||
@@ -99,7 +99,7 @@ def _to_response(r: ApprovalRequest) -> ApprovalResponse:
|
||||
created_at=r.created_at.isoformat() if r.created_at else None,
|
||||
resolved_at=r.resolved_at.isoformat() if r.resolved_at else None,
|
||||
expires_at=r.expires_at.isoformat() if r.expires_at else None,
|
||||
metadata=r.metadata or {},
|
||||
metadata=r.request_metadata or {},
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user