credentials
credentials
¶
Credential persistence for tools and channels.
Stores credentials in ~/.openjarvis/credentials.toml with 0o600 permissions. Thread-safe writes via lock. Sets os.environ on save for immediate effect.
Functions¶
is_credential_optional
¶
Return whether key is an upgrade for tool_name rather than required.
get_required_credentials
¶
Return only the keys tool_name cannot run without.
Source code in src/openjarvis/core/credentials.py
load_credentials
¶
Load credentials, preserving malformed input as a recoverable backup.
Source code in src/openjarvis/core/credentials.py
save_credential
¶
Save a single credential key, validate, write file, and set os.environ.
Source code in src/openjarvis/core/credentials.py
delete_credential
¶
Delete a persisted credential and remove it from the running process.
Source code in src/openjarvis/core/credentials.py
get_credential_status
¶
Return {KEY: bool} for each declared key indicating if set in env.
Includes optional keys; use :func:is_credential_optional to tell whether a
missing key actually blocks the tool.
Source code in src/openjarvis/core/credentials.py
inject_credentials
¶
Load credentials.toml and inject into os.environ. Call at server startup.
Source code in src/openjarvis/core/credentials.py
get_tool_credential
¶
Read a single credential without polluting os.environ.
Falls back to os.environ if the key is not in credentials.toml,
for backward compatibility with Docker env var workflows.