Environment abstractions for general agents
Project description
ya-agent-environment
Environment abstractions for general agents.
ya-agent-environment provides the shared base interfaces used by YA agents:
EnvironmentFileOperatorShellResourceRegistry- resumable resources
TmpFileOperator
The Python import package is ya_agent_environment.
Shell Backend Contract
Custom Shell backends implement _create_process() and return an ExecutionHandle with stream, wait, and kill callbacks. Shell.execute() is the final public foreground boundary and must not be overridden: the base class owns process creation, timeout, cancellation, foreground/background registration, and session-reset cleanup. The foreground timeout budget begins before process creation, but shell-owned creation still resolves and terminates any eventual handle before reporting timeout. Class creation raises TypeError when final MRO resolution replaces execute(), so direct and mixin-based legacy overrides fail fast instead of silently bypassing lifecycle ownership; migrate their process creation into _create_process(). A wait callback must not report natural completion while owned descendants remain, and a kill callback must not return until backend execution is confirmed terminated; raising preserves the handle for a later reset retry. Backends must retain a stable execution identity through termination: a POSIX numeric PGID is no longer an ownership handle after its leader is reaped, so residual-group cleanup requires a live guardian or an equivalent platform-owned primitive.
Development
This package is maintained as a workspace member in ya-mono.
uv run python -m pytest packages/ya-agent-environment/tests -vv
uv run python -m pyright
uv build --package ya-agent-environment -o dist
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 ya_agent_environment-1.14.1.tar.gz.
File metadata
- Download URL: ya_agent_environment-1.14.1.tar.gz
- Upload date:
- Size: 62.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79f320cff6cb827788823da83d0e586f487488746656eea49c182d64685d1a1a
|
|
| MD5 |
70e71099e7dc06847cc6ae41fc616f1c
|
|
| BLAKE2b-256 |
6ffc11cba0f48641029ab294ea46640f53dfd97757a3d47c4e4e7d8c51f80ef9
|
File details
Details for the file ya_agent_environment-1.14.1-py3-none-any.whl.
File metadata
- Download URL: ya_agent_environment-1.14.1-py3-none-any.whl
- Upload date:
- Size: 41.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42a5e9dcc1a5cd0202e1375c94d43724340b09453f11a674b4965aae31fcb717
|
|
| MD5 |
1c5fb75d0a32a55aa3b871c4628ff10a
|
|
| BLAKE2b-256 |
530c925f8427f51746b603244a62005f8fcae49cab6c1e2efada5c8accd8038f
|