feat(codex-bridge): handoff instruction for Codex Desktop only (off by default)

User decision: the "larger work goes to AITURK" instruction lives only in what Codex IDE sees; the CLI must
not know it exists. The bridge adds it in flight by the originator header (measured: Codex Desktop, codex-tui,
codex_exec) and only when a send command is configured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
yilsemandClaude Opus 5.5 committed 2026-10-11 01:05:00 +03:00
1 parent d9a7661281
commit 1445e204da
6 files changed
+108 -2

No files matched your search

@@ -28,6 +28,7 @@ import ozet_kopru
import pencere
import yarim
import model_gecis
import is_hatti
SURUM = "8"
HERE = os.path.dirname(os.path.abspath(__file__))
@@ -666,6 +667,7 @@ def decompress(body, enc):
OZET_FRENI = ozet_kopru.DonguFreni()
YONLENDIRME = model_gecis.Yonlendirme(HOME)
GORULEN_ISTEMCI = set() # originator degerleri; her biri gunluge bir kez yazilir
_BILINEN = {"kaynak": None, "liste": []}
def bilinen_modeller():
@@ -1108,6 +1110,16 @@ class H(http.server.BaseHTTPRequestHandler):
# istek sanip is yapmaz, yavas modelde asil soru beklemez. Secilen modelin adiyla aninda donulur.
log(f"[{n} {slug}] nokta mesaji kopruden karsilandi (modele gonderilmedi)")
return self._yerel_yanit(gelen, f"{model_adi(slug)} hazır. Sohbetin modeli artık {model_adi(slug)}.")
# Is hatti talimati yalniz masaustu uygulamasindan gelen istege eklenir; CLI hic gormez (is_hatti.py).
kaynak = self.headers.get("originator") or ""
if kaynak and kaynak not in GORULEN_ISTEMCI:
GORULEN_ISTEMCI.add(kaynak)
log(f"istemci goruldu: {kaynak}")
try:
if is_hatti.masaustu_mu(kaynak) and is_hatti.ekle(req, is_hatti.talimat(CFG.get("aiturk_hat"))):
govde_degisti = True
except Exception as e:
log(f"[{n} {slug}] is hatti talimati atlandi: {type(e).__name__}: {e}")
# Ayni sohbetin onceki cevabi yarida kesildiyse (yarim.py) metni bu istege not olarak eklenir.
yarim_eklenen = 0
if CFG.get("yarim_cevap", True):