mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #74] [CLOSED] [4/4] feat(template): execute COPY/ADD steps and document E2B builds #159
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#159
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/74
Author: @JoyboyBrian
Created: 7/29/2026
Status: ❌ Closed
Base:
main← Head:e2b-build/06-copy-exec📝 Commits (4)
81a8edbfeat(snapshot): template build-context archive store (posixfs + oss)d11d80afeat(api): E2B build-context upload endpoints and [template_build] configa5377b6feat(template): host-side COPY plan (archive rewrite to guest paths)730cc51feat(template): execute COPY/ADD steps and document E2B builds📊 Changes
35 files changed (+4283 additions, -34 deletions)
View changed files
📝
config/default.toml(+24 -0)📝
docs/src/integration/e2b.md(+28 -0)📝
scripts/tests/e2e/e2b_python_sdk_compat.py(+23 -4)📝
scripts/tests/e2e/suites/09_e2b_compat.sh(+2 -2)➕
src/api/build_files.rs(+287 -0)📝
src/api/generated/src/apis/templates.rs(+29 -0)📝
src/api/generated/src/models.rs(+158 -0)📝
src/api/generated/src/server/mod.rs(+172 -0)📝
src/api/impls/mod.rs(+4 -0)📝
src/api/impls/template.rs(+95 -0)📝
src/api/impls/template_helpers.rs(+185 -13)📝
src/api/mod.rs(+1 -0)📝
src/api/openapi.yml(+48 -0)📝
src/api/server.rs(+3 -2)📝
src/cfg.rs(+223 -0)📝
src/sandbox/backend.rs(+14 -0)📝
src/sandbox/envd.rs(+35 -0)📝
src/sandbox/process.rs(+12 -0)📝
src/snapshot/image_export/service.rs(+2 -0)📝
src/snapshot/manager.rs(+8 -0)...and 15 more files
📄 Description
What
Wire E2B
COPYandADDexecution end to end:--chown, preserve requested modes, and extract once withtar;This is the final layer of the active four-PR stack, replayed onto current main at
00ba6cbwithout #70.e2b-build/03-build-file-storee2b-build/04-upload-apie2b-build/05-copy-plane2b-build/06-copy-execWhy
This completes the user-visible E2B template-build workflow on top of #71–#73. The official SDK can upload a local Dockerfile context, reference it by
filesHash, and build a reusable AgentENV template containing the copied files.Related: #28. The original PR remains the full concept/reference discussion.
Scope and non-goals
This layer contains the COPY/ADD build-spec mapping, archive materialization, guest upload/extraction, sandbox plumbing, documentation, and E2E coverage. It removes #73's temporary
dead_codeallowance.It does not introduce or claim ownership of WORKDIR behavior. WORKDIR directory creation and relative resolution already exist on current main; the E2E uses that existing behavior only to verify copied files from a realistic Dockerfile.
Existing-alias rebuild remains unsupported. Use a new alias or delete the existing template before rebuilding; #70 is parked pending the alias refactor.
Exact layer diff: e2b-build/05-copy-plan...e2b-build/06-copy-exec
Design
filesHashreferences, enforces count/aggregate size limits, and materializes archives through the repository store.--no-overwrite-dir.Compatibility and operations
[template_build]limits introduced by #72; no additional setting is added here.tar; no new host dependency or port.Validation
Fresh-template Linux/KVM E2E on
devmachine:The E2E uses a newly generated alias and temporary local build context, so it exercises the supported path independently of the parked alias-rebuild work.
Reviewer notes
The main review surfaces are archive resource bounds, path safety at the planner boundary,
--chownidentity resolution, and extraction semantics. Merge after #71–#73; #70 is not required.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.