From f81d8009adbaadca2ddbce782ea878ac218c9b04 Mon Sep 17 00:00:00 2001 From: AnyEnv Sandbox Date: Sun, 25 Oct 2026 15:26:41 +0000 Subject: [PATCH] docs: use official PyPI for the local runtime example --- .agents/README.md | 2 + .../2026-10-25-example-official-index.md | 26 ++++++++++++ .../2026-10-25-example-official-index.md | 40 +++++++++++++++++++ CHANGELOG.md | 2 + examples/README.md | 2 +- 5 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .agents/evidence/verify/2026-10-25-example-official-index.md create mode 100644 .agents/notes/proposed/process/2026-10-25-example-official-index.md diff --git a/.agents/README.md b/.agents/README.md index dbb64c7..3b801c2 100644 --- a/.agents/README.md +++ b/.agents/README.md @@ -50,3 +50,5 @@ state. A local/runtime result is not cloud acceptance or package publication. - [Fresh documented example rerun](notes/proposed/process/2026-10-25-example-rerun.md) · [verification](evidence/verify/2026-10-25-example-rerun.md). - [Public runtime a2 guidance](notes/proposed/process/2026-10-25-public-runtime-a2.md) · [verification](evidence/verify/2026-10-25-public-runtime-a2.md). + +- [Example official PyPI index](notes/proposed/process/2026-10-25-example-official-index.md) · [verification](evidence/verify/2026-10-25-example-official-index.md). diff --git a/.agents/evidence/verify/2026-10-25-example-official-index.md b/.agents/evidence/verify/2026-10-25-example-official-index.md new file mode 100644 index 0000000..7103d69 --- /dev/null +++ b/.agents/evidence/verify/2026-10-25-example-official-index.md @@ -0,0 +1,26 @@ +# Example official-index verification + +Date: 2026-10-25 +Result: PASS (local checks; remote delivery is a separate gate) + +Scope: one example installation command based on main +`a4e24a81d9a6305a7a6e992fd9cec6077587537a`, plus changelog and records. +Python 3.13.13 in a new virtual environment; Node 22.22.2, npm 12.0.2. +No repository Python source or PYTHONPATH was injected. + +Executed checks: + +- `python3 -m pip install --index-url https://pypi.org/simple 'agent-sandbox-server==0.4.0a2'`: exit 0, installed exact public a2. +- `python3 -m pip check`: exit 0, no broken requirements. +- `npm ci`: exit 0, installed the lockfile unchanged. +- `npm run typecheck`: exit 0. +- `npm test`: exit 0; 24 passed, 0 skipped, including actual local Python server loop. +- `node examples/agent-loop.mjs`: exit 0; actual HTTP health true, shell exit 0 + and stdout `4\n`, file roundtrip `answer=4\n`, owned process SIGTERM exit -15. +- `npm pack --dry-run`: exit 0, package ESM/type exports listed; no package published. +- `git diff --check` and new record-link existence checks: exit 0. + +The new environment's installation can use pip's content cache; the command +explicitly selects official PyPI instead of a user-configured mirror. These are +local runtime/HTTP checks, not cloud lifecycle or model acceptance. No cloud +resources were created. Latest-head CI/review and actual merge remain to verify. diff --git a/.agents/notes/proposed/process/2026-10-25-example-official-index.md b/.agents/notes/proposed/process/2026-10-25-example-official-index.md new file mode 100644 index 0000000..cc9c79e --- /dev/null +++ b/.agents/notes/proposed/process/2026-10-25-example-official-index.md @@ -0,0 +1,40 @@ +# Decision: Select official PyPI for the example runtime + +Status: proposed + +## Problem + +The shared English/Chinese example setup pins public server 0.4.0a2 but lets a +configured mirror choose its index. A stale mirror can lack this published alpha. +The existing CI already selects the official index explicitly. + +## Decision + +Add `--index-url https://pypi.org/simple` to the existing installation command. +Keep one shared command for both languages and the exact published runtime pin. + +## API Design + +No API, source export, package version or runtime change. + +## Alternatives considered + +A mirror fallback or source installation would add paths readers do not need. +Changing global pip configuration would exceed this example's scope. + +## Dependencies + +[Public Python runtime a2](https://github.com/Alibaba-Agent-Sandbox/python-sdk/releases/tag/v0.4.0a2). + +## Test Strategy + +Install the documented server in a new Python environment using the explicit +index, check dependencies, then run the existing Node checks and actual local loop +without PYTHONPATH. Review links and the exact diff; wait for latest-head CI/review. + +## Acceptance criteria + +The documented installation and real local HTTP/command/file/process cleanup pass. +Existing Node checks and normal PR gates pass. No npm publication is implied. + +[Verification](../../../evidence/verify/2026-10-25-example-official-index.md). diff --git a/CHANGELOG.md b/CHANGELOG.md index bfdc2d6..340e696 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Documentation +- Use the official PyPI index for the local example's exact public server 0.4.0a2 installation, matching CI. + - Verify the documented local agent-loop example with public Python runtime 0.4.0a1 and refresh its installation pin. ### Removed diff --git a/examples/README.md b/examples/README.md index d143ca6..3aab0c6 100644 --- a/examples/README.md +++ b/examples/README.md @@ -40,7 +40,7 @@ The current example uses an installed Python runtime and preserves caller `PYTHONPATH`; it adds no fixed repository paths. Install the server before running: ```bash -python3 -m pip install 'agent-sandbox-server==0.4.0a2' +python3 -m pip install --index-url https://pypi.org/simple 'agent-sandbox-server==0.4.0a2' npm ci npm test node examples/agent-loop.mjs