From 0233b481b10e659ec7edfcd53e5ce0c8927ddfe4 Mon Sep 17 00:00:00 2001 From: claude Date: Tue, 2 Jun 2026 00:28:57 +0000 Subject: [PATCH] fix(egress): break circular import with manifest via TYPE_CHECKING MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit manifest → agent_provider → egress → manifest created a cycle that caused ImportError on any module import. With from __future__ import annotations already present, Bottle is only needed at type-check time (annotations are lazy strings under PEP 563). Assisted-by: Claude Code --- bot_bottle/egress.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot_bottle/egress.py b/bot_bottle/egress.py index fb46b84..834a300 100644 --- a/bot_bottle/egress.py +++ b/bot_bottle/egress.py @@ -27,9 +27,12 @@ from __future__ import annotations from abc import ABC, abstractmethod from dataclasses import dataclass from pathlib import Path +from typing import TYPE_CHECKING from .log import die -from .manifest import Bottle + +if TYPE_CHECKING: + from .manifest import Bottle CODEX_HOST_CREDENTIAL_TOKEN_REF = "BOT_BOTTLE_CODEX_HOST_ACCESS_TOKEN"