feat(agents-api): support self-hosted function callbacks - #615
Merged
Merged
Conversation
SaladDay
marked this pull request as ready for review
September 15, 2026 05:30
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.
Self-hosted Sessions can configure supported non-deferred application functions and submit result-only batches. Creation previously rejected every function definition. Results now reach the existing Session-locked callback path, retaining their original Turn/call identity after completion and during later work.
The change reuses native preparation and application receipts. Results create no Turn or reservation. Mixed events, pending-input conflicts and Environment installation metadata keep their documented boundaries. No Store/query/schema, daemon/native protocol, dependency or product change.
Validation: fixed SDK 3.13.0 and raw HTTP against real PostgreSQL reproduce baseline rejection and verify configuration, isolation, atomic ordered batches, field presence and concurrent/terminal/later retries. This controlled fixture is enrolled in CI; injected calls and native observations are explicitly synthetic. Separate built-service acceptance uses real MiniMax through the registered daemon and native Codex: two automatic SDK success/error callbacks, remote commands with exit 7 and file persistence, cold native history, query recovery and old-result retry during later work. SDK/raw live observations match 108 payloads. Existing real cancellation and ordinary none/restart/key-rotation regressions passed.
Evidence limits: three earlier function attempts failed acceptance: one assumed synchronous executor reconnection; two encountered model-appended shell commands. The final fixture waits for actual reconnection and explicitly requires unchanged command arguments/separate file reads. Assertions remain intact and all failures are retained. This does not establish general model reliability or full protocol compatibility. Mixed cancellation/publication, deferred tools, tool-set completeness, Usage and interrupted-call recovery remain open.
Final make check passed (326.7 s) and applicable CI passed at 9c0933a. Fresh independent built-in blind review found no actionable in-scope issues across the full diff and necessary adjacent paths. It inspected recorded evidence without rerunning heavy tests. OpenAPI is regenerated. The earlier focused/official/cancellation checks are retained at bed87fa; only the new native Python fixture changed afterward and all four standalone binaries are byte-identical. Final source, real workflows and check receipts remain tied to their actual heads.
Task: ENV-PUBLIC-FUNCTION-001 under ATOM-007. ATOM-006 and REQ-006 stay open. Requirements, all attempts, source/artifact hashes, review and delivery records: ~/.parsar/remediation/20260915/environment-public-functions on zju_a100_2.