Skip to content

feat: explicitly prepare and reuse Express managed API keys - #145

Merged
anycodes merged 4 commits into
mainfrom
feat/aksk-api-key-bootstrap
Oct 27, 2026
Merged

anycodes merged 4 commits into
mainfrom
feat/aksk-api-key-bootstrap

Conversation

@anycodes

@anycodes anycodes commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

AK/SK-only Express SDK users previously had to provision an API key manually. Add explicit prepare_api_key(confirm=True) / prepare_api_key_sync(confirm=True), then reuse the private key through the shared abx engine from standard sync/async and ProviderSandbox clients. Existing explicit/E2B API keys retain priority and need no CLI.

Refs #143. Requires the CLI operations tracked in Alibaba-Agent-Sandbox/agent-sandbox#202 to land first. Do not close the cross-repository acceptance until both consumers and provider are delivered.

Type of Change

  • ✨ New feature
  • 📖 Documentation
  • 🧪 Tests

Changes

  • Keep cloud SDK calls, private storage, Team/identity isolation and expiry policy in the Express provider engine. Python performs read-only resolution and validates the private file reference.
  • Refuse preparation without explicit confirm=True before engine I/O; ordinary SDK/MCP runtime calls never create or renew credentials.
  • Publish bilingual permission guidance and administrator policy links, preserving the standard E2B migration contract.

Testing

  • Supported remote CI passed: full client/server Python 3.10/3.11/3.12, engine integration, standard contract, runtime fixtures, paired build and hygiene. Local make ci still reproduces the environment-specific baseline in test: reproduce baseline malformed WebSocket upgrade returning 501 #144 (874 pass, 1 fail, 1 skip); no local repair is claimed.
  • Full client suite: 2338 pass, 27 skip, 10 deselect (Python 3.12).
  • Ruff, mypy, formatting, paired build/twine/py.typed/combined install.
  • Real Express acceptance: explicit preparation, sync/async/provider create, exec, files and kill; owned key deleted and absence confirmed; isolated engine stopped.

Checklist

  • Code follows project conventions; standard client resolves through registry composition.
  • Tests added/updated.
  • Documentation updated in English and Chinese.
  • No credentials or raw sensitive logs included.
  • Client/server version lockstep preserved (no bump).

Definition of Done

  • Final submitted head passed the complete required CI matrix before merge.
  • Feature regressions pass.
  • E2E against real components recorded in .agents/evidence/verify/2026-10-27-managed-api-key.md.
  • Implemented ADR, bilingual docs and CHANGELOG included.
  • Repository health: 106 pass, 1 warning, zero fail; hygiene clean.

Limitations: optional AK/SK path requires the matching CLI feature; no release publication, Windows ACL claim, alternate-region matrix or independent restricted RAM-user verification. Full server failure reproduces on clean main and after proxy variables are removed; no server implementation is changed here.

@anycodes
anycodes marked this pull request as ready for review October 27, 2026 07:22
@anycodes
anycodes merged commit 259cc1e into main Oct 27, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant