repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
Mirrored from https://github.com/yingqi-z20/Agent-libOS
stars
latest
clone command
git clone gitlawb://did:key:z6MkqRzA...RfoM/yingqi-z20-Agen...git clone gitlawb://did:key:z6MkqRzA.../yingqi-z20-Agen...d98dd2c9IPC1d ago| from __future__ import annotations |
| #2 |
| #3 | from dataclasses import dataclass |
| #4 | from typing import Any |
| #5 |
| #6 | from agent_libos.models.base import CapabilityID, StrEnum |
| #7 |
| #8 |
| #9 | class CapabilityRight(StrEnum): |
| #10 | READ = "read" |
| #11 | WRITE = "write" |
| #12 | EXECUTE = "execute" |
| #13 | LINK = "link" |
| #14 | DIFF = "diff" |
| #15 | MATERIALIZE = "materialize" |
| #16 | DELETE = "delete" |
| #17 | GRANT = "grant" |
| #18 | REVOKE = "revoke" |
| #19 | APPROVE = "approve" |
| #20 | ADMIN = "admin" |
| #21 |
| #22 |
| #23 | @dataclass(frozen=True) |
| #24 | class Capability: |
| #25 | cap_id: CapabilityID |
| #26 | subject: str |
| #27 | resource: str |
| #28 | rights: set[str] |
| #29 | constraints: dict[str, Any] |
| #30 | issued_by: str |
| #31 | issued_at: str |
| #32 | expires_at: str | None = None |
| #33 | delegable: bool = False |
| #34 | revocable: bool = True |
| #35 | revoked: bool = False |
| #36 |