Mint a new ExecutionToken. The token is: - Scoped to agent_id + mission_id - Signed by the Org CA (prevents Token Grafting) - Time-bounded by expires_at - Scope-restricted by execution_scope
(
data: ExecutionTokenCreate,
db: Annotated[AsyncSession, Depends(get_db)],
)
| 454 | description="Create and sign a new ExecutionToken scoped to an agent + mission.", |
| 455 | ) |
| 456 | async def mint_token( |
| 457 | data: ExecutionTokenCreate, |
| 458 | db: Annotated[AsyncSession, Depends(get_db)], |
| 459 | ) -> ExecutionTokenOut: |
| 460 | """ |
| 461 | Mint a new ExecutionToken. |
| 462 | |
| 463 | The token is: |
| 464 | - Scoped to agent_id + mission_id |
| 465 | - Signed by the Org CA (prevents Token Grafting) |
| 466 | - Time-bounded by expires_at |
| 467 | - Scope-restricted by execution_scope |
| 468 | """ |
| 469 | svc = ExecutionTokenService(db) |
| 470 | return await svc.mint(data) |
| 471 | |
| 472 | |
| 473 | @_token.get( |
nothing calls this directly
no test coverage detected