refactor(agent): move placeholder env injection into agent_provision_plan
The has_provider_auth check and egress-placeholder injection were duplicated in both backends. Move them into agent_provision_plan so the provisioner owns that decision entirely: - Replace has_provider_auth: bool param with manifest_egress_routes, compute has_provider_auth internally from the route roles. - Inject CLAUDE_CODE_OAUTH_TOKEN=egress-placeholder inside the plan when has_provider_auth, alongside the existing nonessential-traffic vars. Backends no longer touch the placeholder env. - Remove placeholder_env from AgentProviderRuntime; expose placeholder_env_for() for print_util's hide-from-summary logic. Assisted-by: Claude Code
This commit is contained in:
@@ -9,7 +9,7 @@ from __future__ import annotations
|
||||
|
||||
from typing import Sequence
|
||||
|
||||
from ..agent_provider import runtime_for
|
||||
from ..agent_provider import placeholder_env_for
|
||||
from ..log import info
|
||||
|
||||
|
||||
@@ -41,5 +41,5 @@ def visible_agent_env_names(
|
||||
think a real key is entering the agent, so hide only the active
|
||||
provider-owned placeholder.
|
||||
"""
|
||||
hidden = {runtime_for(agent_provider_template).placeholder_env}
|
||||
hidden = {placeholder_env_for(agent_provider_template)}
|
||||
return sorted({name for name in env_names if name and name not in hidden})
|
||||
|
||||
Reference in New Issue
Block a user