Skip to main content

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:

  • Environment
  • FileOperator
  • Shell
  • ResourceRegistry
  • 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

ya_agent_environment-1.12.3.tar.gz (61.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ya_agent_environment-1.12.3-py3-none-any.whl (41.0 kB view details)

Uploaded Python 3

File details

Details for the file ya_agent_environment-1.12.3.tar.gz.

File metadata

  • Download URL: ya_agent_environment-1.12.3.tar.gz
  • Upload date:
  • Size: 61.8 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

Hashes for ya_agent_environment-1.12.3.tar.gz
Algorithm Hash digest
SHA256 a4ee2c1b924e181a8c5bcc875da49d3107779f62f8efb1b1ee0bf5d7534d9cda
MD5 8b2c5d6e7591298fa9438b15e76e55fd
BLAKE2b-256 f21fcf5dbe81c06104ea0a2e5931d0028c1a1ada214680dbf12c69e315dab7ad

See more details on using hashes here.

File details

Details for the file ya_agent_environment-1.12.3-py3-none-any.whl.

File metadata

  • Download URL: ya_agent_environment-1.12.3-py3-none-any.whl
  • Upload date:
  • Size: 41.0 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

Hashes for ya_agent_environment-1.12.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1879c8979726c69e1598be6e559ff66f059a188fb4a62dd8376cb0eb68795c40
MD5 7b447d5f81d989f2ffc2f95ef6597ca2
BLAKE2b-256 55e23008d2a03f8c20b09d81672b931b42bc000f7e81b58d2ef52cde14d18c7b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page