MCPcopy Create free account
hub / github.com/MetapriseAI/OrgKernel / page_chains_by_agent

Function page_chains_by_agent

src/orgkernel/pyapi/router.py:827–835  ·  view source on GitHub ↗

Paginated list of AuditChains for an agent (chain metadata only).

(
    agent_id: str,
    db: Annotated[AsyncSession, Depends(get_db)],
    page_no: int = Query(default=1, ge=1),
    page_size: int = Query(default=20, ge=1, le=100),
)

Source from the content-addressed store, hash-verified

825 description="Paginated list of AuditChains for an agent.",
826)
827async def page_chains_by_agent(
828 agent_id: str,
829 db: Annotated[AsyncSession, Depends(get_db)],
830 page_no: int = Query(default=1, ge=1),
831 page_size: int = Query(default=20, ge=1, le=100),
832) -> dict:
833 """Paginated list of AuditChains for an agent (chain metadata only)."""
834 svc = AuditChainService()
835 return await svc.list_by_agent(db, agent_id, page_no=page_no, page_size=page_size)
836
837
838router.include_router(_audit)

Callers

nothing calls this directly

Calls 2

list_by_agentMethod · 0.95
AuditChainServiceClass · 0.90

Tested by

no test coverage detected