Forge documentation
Library referencePython

forge.auth

Python auth package; imports are explicit from this package.

Python auth package; imports are explicit from this package.

Package contract

FieldValue
Languagepython
Source version0.1.0
Manifestforge-py/pyproject.toml
Source files5
EvidenceSource reference; registry publication and runtime conformance are separate checks

Import boundary

import forge.auth

Use a source checkout or your verified private registry. Manifest coordinates identify the package; they do not establish that a public registry release exists.

Source reference

Download package reference JSON. Each original source file and generated declaration artifact has its own SHA-256 digest. Function bodies and constant values are omitted from downloads. These are source declaration inventories, not compiler-resolved rustdoc, TypeDoc, DocC, or Dokka output. Private modules can contain public declarations that are not reachable through the package boundary; consult the entry point before importing.

capability.py

Read declaration text · 22 declaration entries

class Scope()

def parse(scope_str: str) -> Scope

def wildcard() -> Scope

def implies(self, other: Scope) -> bool

def as_str(self) -> str

class ScopeSet()

def __init__(self) -> None

def from_strings(scope_strs: list[str]) -> ScopeSet

def add(self, scope: Scope) -> None

def allows(self, requested: Scope) -> bool

def is_superset_of(self, other: ScopeSet) -> bool

def to_strings(self) -> list[str]

class ArsenalACT()

def is_expired(self) -> bool

def remaining_ttl_seconds(self) -> int

def to_dict(self) -> dict[str, Any]

def from_dict(data: dict[str, Any]) -> ArsenalACT

def to_json(self) -> str

def from_json(data: str) -> ArsenalACT

def verify_act(act: ArsenalACT) -> None

def extract_scopes(act: ArsenalACT) -> list[str]

def act_allows_scope(act: ArsenalACT, scope_str: str) -> bool

delegation.py

Read declaration text · 9 declaration entries

class DelegationRequest()

def delegate_capabilities(request: DelegationRequest) -> ArsenalACT

class DelegationManager()

def __init__(self, parent_act: ArsenalACT, parent_did: str) -> None

def parent_act(self) -> ArsenalACT

def parent_did(self) -> str

def delegation_count(self) -> int

def delegations(self) -> list[ArsenalACT]

def delegate(self, child_did: str, requested_scopes: ScopeSet, *, min_ttl_reduction: int=DEFAULT_MIN_TTL_REDUCTION) -> ArsenalACT

error.py

Read declaration text · 18 declaration entries

class ForgeAuthError(ForgeError)

def error_code(self) -> str

class TokenExpiredError(ForgeAuthError)

def __init__(self, token_id: str, agent_did: str, expired_at: str) -> None

def is_expired(self) -> bool

def error_code(self) -> str

class InsufficientScopeError(ForgeAuthError)

def __init__(self, agent_did: str, required_scope: str, available_scopes: list[str]) -> None

def error_code(self) -> str

class CapabilityEscalationError(ForgeAuthError)

def __init__(self, parent_did: str, child_did: str, requested: str, available: list[str]) -> None

def error_code(self) -> str

class DelegationDeniedError(ForgeAuthError)

def __init__(self, parent_did: str, child_did: str, reason: str) -> None

def error_code(self) -> str

class InvalidTokenError(ForgeAuthError)

def __init__(self, reason: str) -> None

def error_code(self) -> str

tool_auth.py

Read declaration text · 15 declaration entries

class ToolAuthorizationDecision(Enum)

def is_allowed(self) -> bool

def is_denied(self) -> bool

def is_legacy_mode(self) -> bool

class ToolAuthorizationRequest()

class ToolAuthorizationResult()

def build_tool_scope(tool_name: str) -> str

def authorize_tool_invocation(request: ToolAuthorizationRequest) -> ToolAuthorizationResult

class ToolAuthorizer()

def __init__(self, act: ArsenalACT | None, agent_did: str) -> None

def act(self) -> ArsenalACT | None

def agent_did(self) -> str

def is_legacy_mode(self) -> bool

def authorize(self, tool_name: str, tool_tier: ToolTier) -> ToolAuthorizationResult

def update_act(self, act: ArsenalACT) -> None

Continue

On this page