Zeno secrets adapter: 1Password CLI-backed `SecretsStore` for agent runtime secrets.
Project description
zeno-secrets-1password
1Password-backed SecretsStore for Zeno.
Ships OpCliSecretsStore, a SecretsStore adapter that reads secrets
through the 1Password CLI (op read). Intended for agents that run in
environments where a 1Password service-account token is available but
mounting the raw secret material into the process env is undesirable.
Install
uv add 'zeno-framework[secrets-1password]'
Install the 1Password CLI on the host:
brew install 1password-cli # macOS
# or follow https://developer.1password.com/docs/cli/get-started/
Export a service-account token:
export OP_SERVICE_ACCOUNT_TOKEN="ops_..."
Usage
from zeno.ai import ZenoApp
from zeno.secrets_1password import OpCliSecretsStore
app = ZenoApp(
...,
secrets=OpCliSecretsStore(
references={
"OPENAI_API_KEY": "op://Engineering/openai/credential",
"STRIPE_KEY": "op://Engineering/stripe/api_key",
},
cache_ttl=60.0,
),
)
Inside a tool:
@tool
async def call_stripe(ctx: Ctx) -> str:
api_key = await ctx.secrets.get("STRIPE_KEY")
...
What it does
get(name)— ifnamebegins withop://, invokesop read namedirectly; otherwise looks up the reference in thereferencesmap and shellsop read <ref>.- Results are cached in-process for
cache_ttlseconds (default 60). Passcache_ttl=Noneto disable caching. - Invocations time out at
timeoutseconds (default 5). The subprocess is killed and reaped on timeout; noResourceWarningleaks. OP_SERVICE_ACCOUNT_TOKENis passed to the subprocess via an explicit env dict that inherits onlyPATH— unrelated parent env vars are not leaked into theopprocess. Passtoken="ops_..."to the constructor to override the env var.- Missing
opbinary →ConfigurationErrorwith an install pointer. - Missing token →
ConfigurationErrorraised before the subprocess runs. op readexit codes are inspected: "item not found" / "no such" / "isn't an item" map toSecretNotFoundError; everything else (auth failures, network errors) maps toSecretsBackendErrorwith the stderr text preserved in the message.
Why op CLI, not the Connect HTTP API?
The CLI path works both locally (via 1Password desktop auth) and in CI (via a service-account token) with no Connect server to self-host. Connect-based and SDK-based stores can ship later as sibling classes inside the same package without breaking existing callers.
Part of the Zeno framework.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zeno_secrets_1password-1.0.0rc1.tar.gz.
File metadata
- Download URL: zeno_secrets_1password-1.0.0rc1.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bb729666dd63f59b0f4b0fda7623da78bf92d095568400a0aef6d69ee1d5c4b
|
|
| MD5 |
63bc92d3dbd5a1d1152c18ed38afcf77
|
|
| BLAKE2b-256 |
15e09645386c50e232c1510c8fc42825b20efc06f020244a538a890841955819
|
Provenance
The following attestation bundles were made for zeno_secrets_1password-1.0.0rc1.tar.gz:
Publisher:
publish.yml on nkootstra/zeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zeno_secrets_1password-1.0.0rc1.tar.gz -
Subject digest:
0bb729666dd63f59b0f4b0fda7623da78bf92d095568400a0aef6d69ee1d5c4b - Sigstore transparency entry: 1383573039
- Sigstore integration time:
-
Permalink:
nkootstra/zeno@7369fbec32dfe63880e968970c2e8070e6091b4f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nkootstra
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7369fbec32dfe63880e968970c2e8070e6091b4f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file zeno_secrets_1password-1.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: zeno_secrets_1password-1.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
974c8a990b341d12674837d67130dd7d412c0b5871a3f582125b6685ee92dfdb
|
|
| MD5 |
0ff6c19e4952b158bbb9439657ae6bda
|
|
| BLAKE2b-256 |
e25cc4536f0651ab7685dcd5372f5f467e473df05371ef5e3fb908e089ca7d94
|
Provenance
The following attestation bundles were made for zeno_secrets_1password-1.0.0rc1-py3-none-any.whl:
Publisher:
publish.yml on nkootstra/zeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zeno_secrets_1password-1.0.0rc1-py3-none-any.whl -
Subject digest:
974c8a990b341d12674837d67130dd7d412c0b5871a3f582125b6685ee92dfdb - Sigstore transparency entry: 1383573064
- Sigstore integration time:
-
Permalink:
nkootstra/zeno@7369fbec32dfe63880e968970c2e8070e6091b4f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nkootstra
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7369fbec32dfe63880e968970c2e8070e6091b4f -
Trigger Event:
workflow_dispatch
-
Statement type: