Skip to main content

ai-devlease-client

Typed async client of the ai-devlease lease manager (import ai_devlease_client).

The server and client require mcp-proxy-adapter>=8.11.21, which validates direct command parameters before injecting trusted framework context. This is a minimum dependency version, with no upper cap.

Commands: acquire (adapter queue: submit, then poll the job), renew (holder only), release, status, lock_exclusive, unlock_exclusive, catalog, help, health, and the registry commands register_service, list_services, remove_service, deploy_start, deploy_finish, stop_service, info, history (command line: python -m ai_devlease_client <subcommand>; the guide is returned by info). Holder format is <project>/<run_id> (one /, each segment 1..64 of [a-z0-9._-]) and is validated before the call. Errors map to typed exceptions: -32602 to ValidationError and -32010..-32017 to ServiceNotInCatalogError .. StorageError.

await client.acquire(holder, service, exclusive=False) takes a shared lease by default. exclusive=True monopolizes only the explicit service; its dependencies stay shared. Only exact booleans are accepted. client.lease(..., exclusive=True) retains the mode on initial acquisition and automatic recovery. CLI acquire and hold accept --exclusive. The returned lease.exclusive is that root's accepted intent. Status holder exclusive and status/list lease_exclusive_holder describe the live monopoly separately from the independent lock_exclusive fields. Foreign conflicts wait within the existing 300-second admission deadline (ServiceInUseError for lease conflicts, existing E4 for lock/deploy); configure the existing client acquisition budget above that bound to observe server timeouts. Successful reacquire replaces only its root's mode; a failed upgrade preserves the old lease. Every dependency contribution expires with its requested root, regardless of the dependency's catalog TTL. A separate direct acquire uses that service's own TTL. Renew propagates each live root's new expiry; the effective holder/node expiry is the maximum of its root contributions. The acquire lease reports this root's expiry, while services/status report effective coverage. Every foreign live user of the actual deployed service still blocks its restart/deploy.

Registered expected_version is a minimum for acquire, dependency starts, restarts and monitoring: the actual healthy registered version must be at least that floor under PEP 440 ordering. Opaque nonblank versions retain exact-equality compatibility; lower, missing or unequal opaque versions fail. Results report the actual service version. deploy_finish verification and build delivery still require the exact intended artifact version, so a newer service alone cannot prove that deployment.

async with AiDevleaseClient.from_document_path("config.json") as client:
    async with client.lease("proj/run1", "fake-a") as lease:
        ...  # renewed every 60 s; lease.restart_required lists services to reconnect to

await client.history(service=None, service_id=None, holder=None, after_id=0, until_id=None, limit=100) returns HistoryResult containing typed HistoryEvent records. Omitted until_id snapshots the current maximum event ID. Continue with next_after_id and the returned until_id, keeping filters unchanged. service and service_id are mutually exclusive; holder combines with either. Unknown historical identities return an empty page. IDs are 0..2^63-1, limit is 1..200. None omits optional wire fields.

Events survive service removal and process restart. Started and terminal records share operation_id; an unmatched start after a crash has unknown outcome. Automatic events have source sweeper and no holder. Safe parameters/results omit URLs, credentials and raw error text. A terminal storage failure can follow already completed business or host effects; StorageError never promises rollback. There is no history CLI.

Metadata

Release files for ai-devlease-client 0.1.35

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-devlease-client 0.1.35
File Size Uploaded Provenance Actions
ai_devlease_client-0.1.35.tar.gz 28.9 kB Without provenance Details for ai_devlease_client-0.1.35.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ai-devlease-client 0.1.35
File Interpreter ABI Platform Actions
ai_devlease_client-0.1.35-py3-none-any.whl Python 3 none any Details for ai_devlease_client-0.1.35-py3-none-any.whl

Total release size: 61.2 kB

Release files / ai_devlease_client-0.1.35.tar.gz

Download URL ai_devlease_client-0.1.35.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
255646ae949cb7c9e0d4431f6b642de89e08f4d27a991902f85c64f2be112e99
BLAKE2b-256 checksum
How to use checksums
21f8b48f19c30b1338986c00e60845b9e3c12109c6e7faae8433722302bb6377
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / ai_devlease_client-0.1.35-py3-none-any.whl

Download URL ai_devlease_client-0.1.35-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f13fa31dfce7542f68a1030d5daee4f2dfaadd0ddf6d322b38f2b0614c246e5
BLAKE2b-256 checksum
How to use checksums
534a5babdc46ecc27bd55f835ef079dbc1cf908d555cd2a1bce5947fde45cb35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for ai-devlease-client 0.1.35

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.35 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page