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

Function mark_token_used

src/orgkernel/pyapi/router.py:533–542  ·  view source on GitHub ↗

Mark a token as consumed (used=True).

(
    token_id: str,
    db: Annotated[AsyncSession, Depends(get_db)],
)

Source from the content-addressed store, hash-verified

531 description="Mark an ExecutionToken as consumed.",
532)
533async def mark_token_used(
534 token_id: str,
535 db: Annotated[AsyncSession, Depends(get_db)],
536) -> ExecutionTokenOut:
537 """Mark a token as consumed (used=True)."""
538 svc = ExecutionTokenService(db)
539 try:
540 return await svc.mark_used(token_id)
541 except ValueError as e:
542 raise HTTPException(status_code=404, detail=str(e))
543
544
545@_token.post(

Callers

nothing calls this directly

Calls 2

mark_usedMethod · 0.95

Tested by

no test coverage detected