feat(api): export helpers that host facades re-export - #43
Merged
Merged
Conversation
- loop_types.__all__ now lists wall_deadline_remaining_s, which the loop hooks of every host use but star-import facades could not see. - model_profile._to_openai_tool_calls becomes public to_openai_tool_calls; the private name stays as an alias. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 25, 2026
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.
Summary
Hosts wrap AgentCore modules as compatibility facades (
from agent_core.X import *+sys.modules[__name__] = X). Two helpers every host needs were invisible through that pattern, so each host hand-writes extra re-exports:loop_types.wall_deadline_remaining_sis public and used by every host'sAgentLoopHooks(wall_deadline_remaining=...), but was missing from__all__. Added.model_profile._to_openai_tool_callsis imported by hosts that build assistant messages by hand (ApodexHarness re-exports it asto_openai_tool_callsfor that reason). Renamed to publicto_openai_tool_calls;_to_openai_tool_callsstays as an alias, so nothing breaks.Scoped deliberately: other private names FrontierAgent touched during its migration (ApodexAI/FrontierAgent#50) turned out to have public equivalents already (
bind_max_tokens,agent_core.retry_policy) or are test-only, so they stay private.Changelog entry (suggested, under Added)
loop_types.wall_deadline_remaining_sis listed in__all__;model_profile.to_openai_tool_callsis public (the_to_openai_tool_callsname remains an alias).Test plan
tests/test_public_host_helpers.py(star import exposes both; alias identity)test_model_profile_native.pymoved to the public nameruff,pyright agent_core, fullpytest -q🤖 Generated with Claude Code
Release workflow
Uses the shared centralized-release workflow in #44. This PR keeps the current package version and contributes its own independent
changes/fragment. Version, lockfile and changelog aggregation happen in a later release PR. #40, #42 and #43 were tested in all six merge orders without conflicts.