feat(agents-api): initialize hosted environments from template and inline files - #709
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hosted Sessions can now start with inline base64 files or project-owned Files API references, supplied directly or through an Environment Template. Core freezes tenant-authorized encrypted bytes per Session and uses one initialization path for Docker/E2B and all three harnesses. Execution and live Files wait for completion; uncertain installation fails and reclaims the Environment without replay, while later reconnects preserve user edits.
Scope ends at initial files. Other populated installations, restricted network and unconfirmed referenced-files override semantics still reject explicitly; this is partial protocol coverage. Provider retains its five operations.
Validation: generated OpenAPI/sqlc; real PostgreSQL and race suites;
make check; real Docker/E2B binary transfer and 50 MiB/symlink installer checks; pinned SDK 3.13.0/raw HTTP with real model execution for Codex, Claude Code and MiniMax Code on both providers. Template and inline paths cover snapshot/deletion retries, Files/Artifacts, tenant/credential isolation, cancellation and native-history recovery. E2B additionally verifies interruption during initialization without early execution or replay. Qualified Runtime builds were reused. A final rebuilt Docker/Codex run also verified a 5 MiB inline file through native execution, Artifacts, cancellation and history recovery; HTTP/PostgreSQL regression covers 10 MiB total inline content and creation retries. Exact evidence scope and build hashes are recorded incontracts/agents-api/environment-templates.md.Earlier test-network timeouts and one alternative restart-order observation remain recorded in Feishu; passing runs do not claim those causes were fixed. Fresh independent GPT-6 Astra high reviewed the entire final diff and found no actionable issues. Reviewer did not rerun full/model acceptance; the server test records are the validation gate. GitHub CI is not the merge gate.