coderouter-cli 2.7.9__py3-none-any.whl → 2.8.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  """External coding-agent CLI adapter (``kind="agent_cli"``).
2
2
 
3
3
  This adapter invokes an external coding-agent CLI (Claude Code / Codex /
4
- Gemini / Grok) as a single one-shot ``exec`` and returns the agent's final
5
- answer as one ``prompt in → text out`` transformation. It is the in-core
6
- implementation of the external-agents-adapter design
4
+ Antigravity / Grok) as a single one-shot ``exec`` and returns the agent's
5
+ final answer as one ``prompt in → text out`` transformation. It is the
6
+ in-core implementation of the external-agents-adapter design
7
7
  (``docs/designs/external-agents-adapter.md``).
8
8
 
9
9
  Design in one paragraph
@@ -18,10 +18,10 @@ CodeRouter merely performs the one conversion. Following the
18
18
  ``openai_compat`` precedent, a *single* adapter class fronts *multiple*
19
19
  target agents, dispatched on the ``agent`` field.
20
20
 
21
- Implemented agents (Phase 1a + 1b + 1d)
22
- ========================================
21
+ Implemented agents (Phase 1 complete: 1a + 1b + 1c + 1d)
22
+ ==========================================================
23
23
 
24
- Three targets are implemented here:
24
+ Four targets are implemented here:
25
25
 
26
26
  * ``claude`` (Claude Code CLI, Phase 1a) — the most stable CLI, the most
27
27
  fine-grained safety controls, and the only one that emits
@@ -42,22 +42,44 @@ Three targets are implemented here:
42
42
  ``ProviderConfig.cost``, design §5.1.6). ``--no-memory`` is always passed
43
43
  so a user-level cross-session memory setting cannot leak state between
44
44
  requests.
45
-
46
- The remaining agent (gemini) is declared in the config schema so
47
- providers.yaml is forward-compatible, but constructing an adapter for it
48
- raises a clear ``AdapterError`` until its phase (1c) lands.
45
+ * ``antigravity`` (Antigravity CLI, command ``agy``, Phase 1c, in lieu of
46
+ ``gemini``) headless one-shot via ``agy -p <prompt> --mode ...``.
47
+ Google discontinued the legacy Gemini CLI's OAuth for individual
48
+ accounts in June 2026 (field-verified ``IneligibleTierError`` /
49
+ ``UNSUPPORTED_CLIENT``); its successor, the Antigravity CLI, is a
50
+ separate Go implementation (not a gemini-cli fork) fulfilling the design's
51
+ "gemini" slot. It has no stdin or ``--prompt-file`` channel — piped stdin
52
+ hangs the CLI (field-verified on agy 1.1.1) — so the prompt rides argv
53
+ (see the security note below). Output is plain text with no
54
+ ``--output-format`` flag, no token/cost figures, and no session id, so
55
+ usage is reported as zeros and meta is empty, mirroring grok's rationale.
56
+ It is also the only agent with a CLI-side self-termination flag
57
+ (``--print-timeout``), layered *underneath* the adapter's own
58
+ ``asyncio.wait_for`` + PGID SIGKILL rather than replacing it.
59
+
60
+ ``gemini`` itself is declared in the config schema for backward-compatible
61
+ config parsing, but constructing an adapter for it raises a clear
62
+ ``AdapterError`` with a migration pointer to ``agent="antigravity"``.
49
63
 
50
64
  Security (design §6, non-negotiable)
51
65
  ====================================
52
66
 
53
67
  * **allowlist argv only** — the child is launched with
54
68
  :func:`asyncio.create_subprocess_exec` and a list argv. ``shell=True`` is
55
- never used; the prompt is never subject to shell interpretation (claude
56
- and codex read it from stdin codex's argv carries a trailing ``-``
57
- sentinel making that explicit; grok reads it from a private ``0600``
58
- prompt file inside the resolved workdir its ``-p`` requires the prompt
59
- as an argv value, and argv would both hit Linux's ~128KiB
60
- ``MAX_ARG_STRLEN`` on huge prompts and leak the text into ``ps`` output).
69
+ never used. Prompt delivery is one of three mechanisms depending on the
70
+ agent: claude and codex read it from stdin (codex's argv carries a
71
+ trailing ``-`` sentinel making that explicit); grok reads it from a
72
+ private ``0600`` prompt file inside the resolved workdir (its ``-p``
73
+ requires the prompt as an argv value, and argv would both hit Linux's
74
+ ~128KiB ``MAX_ARG_STRLEN`` on huge prompts and leak the text into ``ps``
75
+ output); antigravity has neither a stdin nor a ``--prompt-file`` channel
76
+ (piped stdin hangs the CLI, field-verified), so its prompt is carried on
77
+ argv — accepting the same ``MAX_ARG_STRLEN`` cap and local ``ps``
78
+ visibility that grok's file delivery was specifically designed to avoid.
79
+ No shell is involved in any case (list argv, never shell text), and the
80
+ documented threat model (an isolated, single-operator workstation) treats
81
+ local ``ps`` visibility as an accepted, documented limitation for
82
+ antigravity rather than a defect.
61
83
  * **default read-only** — ``allow_file_writes=False`` /
62
84
  ``sandbox_mode="read_only"`` are the defaults, mapped to claude's
63
85
  ``--permission-mode plan``. Writes require explicit opt-in and the sandbox
@@ -82,6 +104,7 @@ import asyncio
82
104
  import contextlib
83
105
  import json
84
106
  import os
107
+ import re
85
108
  import shutil
86
109
  import signal
87
110
  import time
@@ -148,6 +171,29 @@ _CODEX_SANDBOX_ARGS = {
148
171
  "full_auto": ["-s", "workspace-write"],
149
172
  }
150
173
 
174
+ # sandbox_mode → antigravity ``--mode`` flags (design §5.4, Antigravity CLI
175
+ # 1.1.1, verified via facts-antigravity.md). ``agy --help`` only enumerates
176
+ # two ``--mode`` values (``plan`` / ``accept-edits``), so ``full_auto`` maps
177
+ # onto ``accept-edits`` plus the separate ``--dangerously-skip-permissions``
178
+ # flag (auto-approves all tool executions) rather than a third ``--mode``
179
+ # value. ``--sandbox`` is deliberately never used here: it has a known bypass
180
+ # bug when combined with ``--dangerously-skip-permissions`` (agy issue #36).
181
+ _ANTIGRAVITY_MODE_ARGS = {
182
+ "read_only": ["--mode", "plan"],
183
+ "edit": ["--mode", "accept-edits"],
184
+ "full_auto": ["--mode", "accept-edits", "--dangerously-skip-permissions"],
185
+ }
186
+
187
+ # Compiled ANSI escape sequence stripper for antigravity's plain-text output
188
+ # (design §5.1.6). Covers CSI sequences (``ESC [ ... final-byte``) plus bare
189
+ # OSC-style ``ESC ]`` sequences terminated by BEL or ``ESC \`` (kept simple —
190
+ # antigravity's TUI chrome is not fully specified, so this is a defensive
191
+ # best-effort strip, not a full ANSI parser).
192
+ _ANSI_RE = re.compile(
193
+ r"\x1b\[[0-9;?]*[ -/]*[@-~]" # CSI ... final byte
194
+ r"|\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)" # OSC ... BEL or ST
195
+ )
196
+
151
197
 
152
198
  def _chunk_text(text: str, size: int = _STREAM_CHUNK_CHARS) -> Iterator[str]:
153
199
  """Split ``text`` into ``size``-char pieces for the pseudo-stream."""
@@ -156,20 +202,26 @@ def _chunk_text(text: str, size: int = _STREAM_CHUNK_CHARS) -> Iterator[str]:
156
202
 
157
203
 
158
204
  class AgentCliAdapter(BaseAdapter):
159
- """Invoke an external coding-agent CLI one-shot (claude + codex + grok).
205
+ """Invoke an external coding-agent CLI one-shot (claude + codex + grok +
206
+ antigravity).
160
207
 
161
208
  The ``agent`` field selects the argv builder / output parser via the
162
209
  dispatch tables built in :meth:`__init__`, mirroring how
163
210
  ``openai_compat`` fronts many HTTP backends from one class.
164
211
  """
165
212
 
213
+ _IMPLEMENTED_AGENTS = ("claude", "codex", "grok", "antigravity")
214
+
166
215
  def __init__(self, config: ProviderConfig) -> None:
167
216
  """Bind to a ``ProviderConfig`` and reject unsupported agents.
168
217
 
169
- Constructing an adapter for an agent other than ``claude`` /
170
- ``codex`` / ``grok`` raises a non-retryable :class:`AdapterError`
171
- the remaining target (gemini) is declared in the schema but not
172
- implemented until its phase (design §9).
218
+ ``gemini`` gets its own rejection message (non-retryable): Google
219
+ discontinued the Gemini CLI's OAuth for individual accounts in June
220
+ 2026, so this adapter points the operator at ``antigravity``
221
+ instead of a generic "not implemented" message. Any other
222
+ unimplemented value (future-proofing; currently none, since the
223
+ schema's ``Literal`` only allows the five known agents) falls back
224
+ to a generic message listing what IS implemented.
173
225
  """
174
226
  super().__init__(config)
175
227
  if config.agent_cli is None: # pragma: no cover - schema enforces this
@@ -179,34 +231,50 @@ class AgentCliAdapter(BaseAdapter):
179
231
  retryable=False,
180
232
  )
181
233
  self.acfg: AgentCliConfig = config.agent_cli
182
- if self.acfg.agent not in ("claude", "codex", "grok"):
234
+ if self.acfg.agent not in self._IMPLEMENTED_AGENTS:
235
+ if self.acfg.agent == "gemini":
236
+ raise AdapterError(
237
+ "agent 'gemini' is not supported: Google discontinued "
238
+ "the Gemini CLI for individual accounts (June 2026; "
239
+ "IneligibleTierError). Use agent='antigravity' "
240
+ "(Antigravity CLI, command 'agy') instead.",
241
+ provider=config.name,
242
+ retryable=False,
243
+ )
183
244
  raise AdapterError(
184
- f"agent {self.acfg.agent!r} is not implemented yet "
185
- f"(implemented: claude, codex, grok). Wait for Phase 1c.",
245
+ f"agent {self.acfg.agent!r} is not implemented "
246
+ f"(implemented: {', '.join(self._IMPLEMENTED_AGENTS)}).",
186
247
  provider=config.name,
187
248
  retryable=False,
188
249
  )
189
250
  # agent → argv builder / output parser dispatch tables. claude landed
190
- # in Phase 1a, codex in Phase 1b, grok in Phase 1d; Phase 1c adds
191
- # gemini.
251
+ # in Phase 1a, codex in Phase 1b, grok in Phase 1d, antigravity in
252
+ # Phase 1c — all four (design §9) are now implemented.
192
253
  self._builders = {
193
254
  "claude": self._build_claude_argv,
194
255
  "codex": self._build_codex_argv,
195
256
  "grok": self._build_grok_argv,
257
+ "antigravity": self._build_antigravity_argv,
196
258
  }
197
259
  self._parsers = {
198
260
  "claude": self._parse_claude,
199
261
  "codex": self._parse_codex,
200
262
  "grok": self._parse_grok,
263
+ "antigravity": self._parse_antigravity,
201
264
  }
202
- # Prompt delivery is per-agent: claude and codex read their prompt
203
- # from stdin (10MB cap; codex's argv carries a trailing "-" sentinel
204
- # making that explicit), which keeps argv free of the (potentially
205
- # huge) prompt text. grok's ``-p`` REQUIRES the prompt as its argv
206
- # value (piped stdin is only appended as extra context, verified on
207
- # v0.2.93), so grok gets the prompt via ``--prompt-file`` instead —
208
- # see ``_write_prompt_file`` for the rationale.
265
+ # Prompt delivery is per-agent, one of three mechanisms: claude and
266
+ # codex read their prompt from stdin (10MB cap; codex's argv carries
267
+ # a trailing "-" sentinel making that explicit), which keeps argv
268
+ # free of the (potentially huge) prompt text. grok's ``-p``
269
+ # REQUIRES the prompt as its argv value (piped stdin is only
270
+ # appended as extra context, verified on v0.2.93), so grok gets the
271
+ # prompt via ``--prompt-file`` instead — see ``_write_prompt_file``
272
+ # for the rationale. antigravity has NEITHER a stdin nor a
273
+ # ``--prompt-file`` channel — piped stdin hangs the CLI outright
274
+ # (field-verified on agy 1.1.1) — so its prompt rides argv instead;
275
+ # see ``_build_antigravity_argv`` for the tradeoff this accepts.
209
276
  self._uses_stdin = self.acfg.agent in ("claude", "codex")
277
+ self._uses_argv = self.acfg.agent == "antigravity"
210
278
 
211
279
  # ------------------------------------------------------------------
212
280
  # BaseAdapter contract
@@ -255,10 +323,16 @@ class AgentCliAdapter(BaseAdapter):
255
323
 
256
324
  # Agents that cannot take the prompt on stdin (grok) get it through a
257
325
  # private temp file inside the workdir; it is ALWAYS removed in the
258
- # ``finally`` below, including on timeout / exception paths.
259
- prompt_file = None if self._uses_stdin else self._write_prompt_file(prompt, workdir)
326
+ # ``finally`` below, including on timeout / exception paths. Argv
327
+ # agents (antigravity) get neither a file nor stdin bytes — the
328
+ # prompt text is handed straight to the builder instead.
329
+ prompt_file = (
330
+ None
331
+ if self._uses_stdin or self._uses_argv
332
+ else self._write_prompt_file(prompt, workdir)
333
+ )
260
334
  try:
261
- argv = self._builders[self.acfg.agent](workdir, prompt_file)
335
+ argv = self._builders[self.acfg.agent](workdir, prompt_file, prompt)
262
336
  # Resolve the executable to an absolute path so argv[0] is a
263
337
  # concrete binary independent of the child's minimal PATH
264
338
  # (design §6 allowlist).
@@ -297,6 +371,10 @@ class AgentCliAdapter(BaseAdapter):
297
371
  retryable=False,
298
372
  ) from exc
299
373
 
374
+ # Non-stdin agents (grok's file delivery, antigravity's argv
375
+ # delivery) get None here, so ``communicate()`` closes stdin
376
+ # immediately without writing to it — verified required for
377
+ # antigravity, whose CLI hangs if anything is piped to stdin.
300
378
  stdin_bytes = prompt.encode("utf-8") if self._uses_stdin else None
301
379
  try:
302
380
  stdout, stderr = await asyncio.wait_for(
@@ -366,7 +444,9 @@ class AgentCliAdapter(BaseAdapter):
366
444
  # claude argv builder + output parser
367
445
  # ------------------------------------------------------------------
368
446
 
369
- def _build_claude_argv(self, workdir: str, prompt_file: str | None = None) -> list[str]:
447
+ def _build_claude_argv(
448
+ self, workdir: str, prompt_file: str | None = None, prompt: str | None = None
449
+ ) -> list[str]:
370
450
  """Assemble the ``claude -p`` argv (design §5.1.5 / §5.4).
371
451
 
372
452
  Shape::
@@ -375,12 +455,13 @@ class AgentCliAdapter(BaseAdapter):
375
455
  --permission-mode <plan|acceptEdits> --add-dir <workdir>
376
456
 
377
457
  The prompt is fed on stdin (not argv), so it never appears here and
378
- ``prompt_file`` is ignored (it exists only to keep the builder
379
- signature uniform across agents). ``--bare`` is deliberately NOT
380
- added it would skip OAuth/keychain reads and break subscription
381
- auth (design §5.3.4).
458
+ both ``prompt_file`` and ``prompt`` are ignored (they exist only to
459
+ keep the builder signature uniform across agents see
460
+ ``_build_antigravity_argv`` for the one agent that needs ``prompt``).
461
+ ``--bare`` is deliberately NOT added — it would skip OAuth/keychain
462
+ reads and break subscription auth (design §5.3.4).
382
463
  """
383
- del prompt_file # claude takes the prompt on stdin, not from a file.
464
+ del prompt_file, prompt # claude takes the prompt on stdin.
384
465
  model = self.acfg.model or self.config.model
385
466
  argv = [self.acfg.command, "-p", "--output-format", "json", "--model", model]
386
467
  if self.acfg.max_turns is not None:
@@ -494,7 +575,9 @@ class AgentCliAdapter(BaseAdapter):
494
575
  # codex argv builder + output parser (Phase 1b)
495
576
  # ------------------------------------------------------------------
496
577
 
497
- def _build_codex_argv(self, workdir: str, prompt_file: str | None = None) -> list[str]:
578
+ def _build_codex_argv(
579
+ self, workdir: str, prompt_file: str | None = None, prompt: str | None = None
580
+ ) -> list[str]:
498
581
  """Assemble the ``codex exec`` argv (design §5.1.5 / §5.4, verified
499
582
  against codex-cli 0.144.1 — see ``_codex/facts-codex.md``).
500
583
 
@@ -504,19 +587,20 @@ class AgentCliAdapter(BaseAdapter):
504
587
  -m <model> -C <workdir> -s <read-only|workspace-write> -
505
588
 
506
589
  The prompt is fed on stdin (not argv), so it never appears here and
507
- ``prompt_file`` is ignored (it exists only to keep the builder
508
- signature uniform across agents) — the trailing ``-`` makes the
509
- stdin intent explicit to ``codex exec``, which otherwise treats a
510
- bare invocation with no PROMPT arg the same way but reads more
511
- ambiguously in a fixed argv list. ``--skip-git-repo-check`` is
512
- ALWAYS passed because the isolated workdir is not a git repository
513
- (without it the CLI exits 1). ``--ephemeral`` is ALWAYS passed so no
514
- session state persists to disk, matching the adapter's stateless
515
- one-shot ethos (the same rationale as grok's ``--no-memory``). codex
516
- has no ``--max-turns`` equivalent, so ``AgentCliConfig.max_turns`` is
517
- silently ignored here (documented in the schema).
590
+ both ``prompt_file`` and ``prompt`` are ignored (they exist only to
591
+ keep the builder signature uniform across agents) — the trailing
592
+ ``-`` makes the stdin intent explicit to ``codex exec``, which
593
+ otherwise treats a bare invocation with no PROMPT arg the same way
594
+ but reads more ambiguously in a fixed argv list. ``--skip-git-repo-
595
+ check`` is ALWAYS passed because the isolated workdir is not a git
596
+ repository (without it the CLI exits 1). ``--ephemeral`` is ALWAYS
597
+ passed so no session state persists to disk, matching the adapter's
598
+ stateless one-shot ethos (the same rationale as grok's
599
+ ``--no-memory``). codex has no ``--max-turns`` equivalent, so
600
+ ``AgentCliConfig.max_turns`` is silently ignored here (documented in
601
+ the schema).
518
602
  """
519
- del prompt_file # codex takes the prompt on stdin, not from a file.
603
+ del prompt_file, prompt # codex takes the prompt on stdin.
520
604
  model = self.acfg.model or self.config.model
521
605
  argv = [
522
606
  self.acfg.command,
@@ -666,7 +750,9 @@ class AgentCliAdapter(BaseAdapter):
666
750
  # grok argv builder + output parser (Phase 1d)
667
751
  # ------------------------------------------------------------------
668
752
 
669
- def _build_grok_argv(self, workdir: str, prompt_file: str | None = None) -> list[str]:
753
+ def _build_grok_argv(
754
+ self, workdir: str, prompt_file: str | None = None, prompt: str | None = None
755
+ ) -> list[str]:
670
756
  """Assemble the grok headless argv (design §5, grok CLI v0.2.93).
671
757
 
672
758
  Shape::
@@ -680,8 +766,11 @@ class AgentCliAdapter(BaseAdapter):
680
766
  would hit Linux's ~128KiB ``MAX_ARG_STRLEN`` on large prompts and
681
767
  leak the text into ``ps`` output. ``--no-memory`` is deliberate: it
682
768
  enforces the one-request-one-transformation statelessness even if
683
- the user's grok config enables cross-session memory.
769
+ the user's grok config enables cross-session memory. ``prompt`` is
770
+ ignored (it exists only to keep the builder signature uniform across
771
+ agents — grok never takes it on argv).
684
772
  """
773
+ del prompt
685
774
  if prompt_file is None: # pragma: no cover - generate() always supplies it
686
775
  raise AdapterError(
687
776
  "grok argv requires a prompt file",
@@ -774,6 +863,108 @@ class AgentCliAdapter(BaseAdapter):
774
863
  meta["coderouter_session_id"] = session_id
775
864
  return result, usage, meta
776
865
 
866
+ # ------------------------------------------------------------------
867
+ # antigravity argv builder + output parser (Phase 1c, in lieu of gemini)
868
+ # ------------------------------------------------------------------
869
+
870
+ def _build_antigravity_argv(
871
+ self, workdir: str, prompt_file: str | None = None, prompt: str | None = None
872
+ ) -> list[str]:
873
+ """Assemble the ``agy -p`` argv (design §5.1.5 / §5.4, verified
874
+ against Antigravity CLI 1.1.1 — see ``_codex/facts-antigravity.md``).
875
+
876
+ Shape::
877
+
878
+ agy -p <prompt> --model <m> --mode <plan|accept-edits>
879
+ [--dangerously-skip-permissions] --print-timeout <n>s
880
+
881
+ ``workdir`` is unused here — antigravity picks up its working
882
+ directory from the child process's ``cwd`` (set by ``generate()``),
883
+ and this adapter deliberately never passes ``--add-dir`` (design
884
+ keeps the argv minimal; only claude's multi-root model needs it).
885
+ ``prompt_file`` is unused (antigravity has no such flag).
886
+
887
+ Prompt-delivery tradeoff (read this before touching the ``-p``
888
+ line): agy has no stdin channel — piping content to stdin makes the
889
+ real CLI hang waiting for a response that never comes (field-
890
+ verified on 1.1.1) — and no ``--prompt-file`` equivalent either. The
891
+ prompt therefore rides argv as the ``-p`` value, which is the *only*
892
+ delivery mechanism the CLI offers. This caps practical prompt size
893
+ at Linux's ~128KiB ``MAX_ARG_STRLEN`` and exposes the prompt text to
894
+ ``ps`` on the local host — exactly the two costs grok's
895
+ ``--prompt-file`` delivery was built to avoid (see the module
896
+ docstring's security section). No shell is involved (list argv, not
897
+ shell text), and the adapter's threat model — an isolated,
898
+ single-operator workstation — accepts local ``ps`` visibility as a
899
+ documented limitation rather than a defect; there is no safer
900
+ channel to fall back to.
901
+
902
+ ``--print-timeout`` is antigravity's own self-termination clock,
903
+ derived from ``exec_timeout_s`` — it is the CLI's *first* wall
904
+ against a hung call; the adapter's outer ``asyncio.wait_for`` +
905
+ process-group ``SIGKILL`` remains the second, unconditional wall
906
+ (design §6). ``max_turns`` is never emitted: agy has no ``--max-
907
+ turns``-equivalent flag (like codex), so ``AgentCliConfig.max_turns``
908
+ is silently ignored here (documented in the schema). No ``--sandbox``
909
+ (known bypass bug alongside ``--dangerously-skip-permissions``,
910
+ agy issue #36) and no ``--add-dir`` are ever passed.
911
+ """
912
+ del prompt_file # antigravity has no prompt-file flag.
913
+ if prompt is None: # pragma: no cover - generate() always supplies it
914
+ raise AdapterError(
915
+ "antigravity argv requires the prompt text",
916
+ provider=self.name,
917
+ retryable=False,
918
+ )
919
+ model = self.acfg.model or self.config.model
920
+ argv = [self.acfg.command, "-p", prompt, "--model", model]
921
+ argv += self._antigravity_mode_args()
922
+ argv += ["--print-timeout", f"{int(self.acfg.exec_timeout_s)}s"]
923
+ return argv
924
+
925
+ def _antigravity_mode_args(self) -> list[str]:
926
+ """Map ``sandbox_mode`` → antigravity ``--mode`` flags, clamped.
927
+
928
+ Same clamp as claude/codex/grok (design §5.4): when
929
+ ``allow_file_writes`` is False the effective mode is forced to
930
+ ``read_only`` regardless of ``sandbox_mode``, so writes always
931
+ require the explicit opt-in.
932
+ """
933
+ mode = self.acfg.sandbox_mode if self.acfg.allow_file_writes else "read_only"
934
+ return list(_ANTIGRAVITY_MODE_ARGS[mode])
935
+
936
+ def _parse_antigravity(
937
+ self, stdout: bytes, stderr: bytes
938
+ ) -> tuple[str, dict[str, Any], dict[str, Any]]:
939
+ """Parse antigravity's plain-text ``-p`` output (verified agy 1.1.1).
940
+
941
+ There is no ``--output-format`` flag at all (agy's ``--help`` does
942
+ not list one) — output is whatever the model printed, decorated
943
+ with whatever terminal styling the CLI applied even in non-TTY runs.
944
+ Parsing is therefore: UTF-8 decode (defensively, replacing invalid
945
+ bytes) → strip ANSI escape sequences (``_ANSI_RE``, best-effort, see
946
+ its definition) → ``.strip()`` surrounding whitespace. Empty output
947
+ raises a retryable :class:`AdapterError` so the chain can fall
948
+ through. There is no token/cost figure and no session id anywhere
949
+ in agy's output, so ``usage`` is all-zeros (cost stays 0 unless the
950
+ operator sets ``ProviderConfig.cost``, same rationale as grok,
951
+ design §5.1.6) and ``meta`` is empty.
952
+ """
953
+ text = _ANSI_RE.sub("", stdout.decode("utf-8", "replace")).strip()
954
+ if not text:
955
+ raise AdapterError(
956
+ "antigravity produced no stdout",
957
+ provider=self.name,
958
+ retryable=True,
959
+ )
960
+ usage: dict[str, Any] = {
961
+ "prompt_tokens": 0,
962
+ "completion_tokens": 0,
963
+ "total_tokens": 0,
964
+ }
965
+ meta: dict[str, Any] = {}
966
+ return text, usage, meta
967
+
777
968
  # ------------------------------------------------------------------
778
969
  # helpers: prompt rendering, response shaping, env, workdir, kill
779
970
  # ------------------------------------------------------------------
@@ -2,14 +2,41 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from typing import TYPE_CHECKING
6
+
5
7
  from coderouter.adapters.anthropic_native import AnthropicAdapter
6
8
  from coderouter.adapters.base import BaseAdapter
7
9
  from coderouter.adapters.openai_compat import OpenAICompatAdapter
8
10
  from coderouter.config.schemas import ProviderConfig
9
11
 
12
+ if TYPE_CHECKING:
13
+ from coderouter.plugins.registry import PluginRegistry
14
+
15
+ # in-core kinds, in resolution order. Kept as a tuple (not derived from
16
+ # the if-chain below) so the "Unknown adapter kind" error message and
17
+ # the plugin-shadow guard have a single source of truth.
18
+ _IN_CORE_KINDS: tuple[str, ...] = ("openai_compat", "anthropic", "agent_cli")
19
+
20
+
21
+ def _plugin_kinds(plugin_registry: PluginRegistry | None) -> list[str]:
22
+ """``kind`` values served by enabled adapter plugins, for error text."""
23
+ if plugin_registry is None:
24
+ return []
25
+ return [factory.kind for factory in plugin_registry.adapters]
26
+
27
+
28
+ def build_adapter(
29
+ provider: ProviderConfig,
30
+ plugin_registry: PluginRegistry | None = None,
31
+ ) -> BaseAdapter:
32
+ """Construct an adapter from a ProviderConfig.
10
33
 
11
- def build_adapter(provider: ProviderConfig) -> BaseAdapter:
12
- """Construct an adapter from a ProviderConfig."""
34
+ Resolution order (docs/designs/agent-cli-plugin-extraction.md §3.2):
35
+ in-core kinds first, then plugin-provided kinds, then a fail-fast
36
+ error. In-core kinds are checked first so a plugin can never shadow
37
+ a kind Core itself guarantees (``openai_compat`` / ``anthropic`` /,
38
+ during the Phase 2b migration window, ``agent_cli``).
39
+ """
13
40
  if provider.kind == "openai_compat":
14
41
  return OpenAICompatAdapter(provider)
15
42
  if provider.kind == "anthropic":
@@ -20,4 +47,14 @@ def build_adapter(provider: ProviderConfig) -> BaseAdapter:
20
47
  from coderouter.adapters.agent_cli import AgentCliAdapter
21
48
 
22
49
  return AgentCliAdapter(provider)
23
- raise ValueError(f"Unknown adapter kind: {provider.kind!r}")
50
+ if plugin_registry is not None:
51
+ for factory in plugin_registry.adapters:
52
+ if factory.kind == provider.kind:
53
+ return factory.build(provider)
54
+ raise ValueError(
55
+ f"Unknown adapter kind {provider.kind!r}. "
56
+ f"in-core kinds: {', '.join(_IN_CORE_KINDS)}; "
57
+ f"plugin-provided kinds: {_plugin_kinds(plugin_registry)}. "
58
+ f"If a plugin should provide {provider.kind!r}, ensure it is "
59
+ f"installed AND listed in plugins.enabled."
60
+ )
@@ -168,13 +168,18 @@ class AgentCliConfig(BaseModel):
168
168
 
169
169
  Introduced by the external-agents-adapter design (Phase 1). One
170
170
  ``agent_cli`` sub-config drives the :class:`AgentCliAdapter`, which
171
- invokes an external coding-agent CLI (codex / gemini / grok / claude)
172
- in a single one-shot ``exec`` and returns the final answer as one
173
- ``prompt in → text out`` transformation. ``claude`` (Claude Code CLI,
174
- Phase 1a), ``codex`` (codex CLI, Phase 1b) and ``grok`` (grok CLI,
175
- Phase 1d) are implemented; ``gemini`` is declared at the schema level
176
- so configs are forward-compatible, but the adapter rejects it until its
177
- phase (1c) lands.
171
+ invokes an external coding-agent CLI (codex / gemini / grok / claude /
172
+ antigravity) in a single one-shot ``exec`` and returns the final answer
173
+ as one ``prompt in → text out`` transformation. ``claude`` (Claude Code
174
+ CLI, Phase 1a), ``codex`` (codex CLI, Phase 1b), ``grok`` (grok CLI,
175
+ Phase 1d) and ``antigravity`` (Antigravity CLI, Phase 1c, in lieu of
176
+ ``gemini``) are implemented. ``gemini`` is declared at the schema level
177
+ for backward-compatible config parsing, but the adapter rejects it with
178
+ a migration pointer: Google discontinued the (legacy) Gemini CLI's
179
+ OAuth for individual accounts in June 2026 (``IneligibleTierError`` /
180
+ ``UNSUPPORTED_CLIENT`` on the real client) and its successor is the
181
+ Antigravity CLI (command ``agy``, a separate Go implementation, not a
182
+ gemini-cli fork) — set ``agent: "antigravity"`` instead.
178
183
 
179
184
  Auth note (grok): the grok CLI uses OAuth credentials stored under
180
185
  ``~/.grok`` (``grok login``), which the adapter's HOME inheritance
@@ -190,25 +195,41 @@ class AgentCliConfig(BaseModel):
190
195
  ``CODEX_API_KEY`` (exec-only) or ``OPENAI_API_KEY`` (general) in
191
196
  ``passthrough_env``.
192
197
 
198
+ Auth note (antigravity): the Antigravity CLI uses a Google-account OAuth
199
+ login (free tier included), with credentials preferentially stored in
200
+ the OS keyring and mirrored under ``~/.gemini/antigravity-cli/``
201
+ (``credentials.enc`` / ``settings.json``) — the adapter's HOME (and, on
202
+ macOS, USER) inheritance already covers this, no extra config needed.
203
+ Any API-key environment variable for CI / non-interactive setups is
204
+ UNCONFIRMED (field reports disagree on the variable name) — this
205
+ docstring deliberately does not name one as authoritative; if you find
206
+ one that works, list it in ``passthrough_env``.
207
+
193
208
  Follows the ``extra="forbid"`` convention used across this module so a
194
209
  typo'd key fails at config-load rather than being silently ignored.
195
210
  """
196
211
 
197
212
  model_config = ConfigDict(extra="forbid")
198
213
 
199
- agent: Literal["codex", "gemini", "grok", "claude"] = Field(
214
+ agent: Literal["codex", "gemini", "grok", "claude", "antigravity"] = Field(
200
215
  ...,
201
216
  description=(
202
217
  "External coding-agent CLI to invoke. 'claude' (Phase 1a), "
203
- "'codex' (Phase 1b) and 'grok' (Phase 1d) are implemented; "
204
- "'gemini' (Phase 1c) pending."
218
+ "'codex' (Phase 1b), 'grok' (Phase 1d) and 'antigravity' "
219
+ "(Phase 1c, Google's Antigravity CLI, command 'agy') are "
220
+ "implemented. 'gemini' is rejected by the adapter — Google "
221
+ "discontinued the Gemini CLI for individual accounts in June "
222
+ "2026; use 'antigravity' instead."
205
223
  ),
206
224
  )
207
225
  command: str | None = Field(
208
226
  default=None,
209
227
  description=(
210
228
  "CLI executable name or absolute path (resolved via PATH). "
211
- "When unset, defaults to the ``agent`` name."
229
+ "When unset, defaults to the ``agent`` name — EXCEPT "
230
+ "'antigravity', whose binary is named ``agy`` (the product is "
231
+ "'Antigravity CLI' but the executable keeps the short, "
232
+ "pre-rename command name)."
212
233
  ),
213
234
  )
214
235
  workdir: str | None = Field(
@@ -291,9 +312,14 @@ class AgentCliConfig(BaseModel):
291
312
  ``sandbox_mode="read_only"`` is contradictory — the operator asked
292
313
  for writes while pinning a read-only sandbox. Fail fast at load,
293
314
  matching the module's other cross-field validators.
315
+
316
+ ``command`` defaults to the ``agent`` name for every agent EXCEPT
317
+ ``antigravity``, whose binary is ``agy`` — the product renamed from
318
+ Gemini CLI to Antigravity CLI, but the executable kept its short
319
+ pre-rename name.
294
320
  """
295
321
  if self.command is None:
296
- self.command = self.agent
322
+ self.command = "agy" if self.agent == "antigravity" else self.agent
297
323
  if self.allow_file_writes and self.sandbox_mode == "read_only":
298
324
  raise ValueError(
299
325
  "agent_cli: allow_file_writes=True conflicts with "
@@ -316,13 +342,23 @@ class ProviderConfig(BaseModel):
316
342
  model_config = ConfigDict(extra="forbid")
317
343
 
318
344
  name: str = Field(..., description="Unique identifier used in profiles.yaml")
319
- kind: Literal["openai_compat", "anthropic", "agent_cli"] = Field(
345
+ # v2.8.0: widened from Literal["openai_compat", "anthropic", "agent_cli"]
346
+ # to str so a provider can name a kind served by an adapter plugin
347
+ # (docs/designs/agent-cli-plugin-extraction.md §3). Config loading
348
+ # happens before plugin discovery (coderouter/ingress/app.py
349
+ # ``load_config`` then ``discover_and_load``), so pydantic can't know
350
+ # the full set of valid kinds at this point — an unknown kind still
351
+ # fails fast, just one step later, in ``build_adapter`` when the
352
+ # engine builds its adapter cache at startup.
353
+ kind: str = Field(
320
354
  default="openai_compat",
321
355
  description=(
322
356
  "Adapter type. 'openai_compat' covers llama.cpp / Ollama / "
323
357
  "OpenRouter / LM Studio / Together / Groq. 'anthropic' is the "
324
358
  "native Anthropic Messages API passthrough (v0.3.x). 'agent_cli' "
325
- "invokes an external coding-agent CLI one-shot (see AgentCliConfig)."
359
+ "invokes an external coding-agent CLI one-shot (see AgentCliConfig). "
360
+ "Other values must be served by an adapter plugin listed in "
361
+ "plugins.enabled."
326
362
  ),
327
363
  )
328
364
  # base_url is required for HTTP-backed adapters (openai_compat / anthropic)
@@ -1,11 +1,13 @@
1
- """Plugin SDK Protocol contracts (v2.3.0).
1
+ """Plugin SDK Protocol contracts (v2.3.0, Adapter wired in v2.8.0).
2
2
 
3
- Six extension points are defined here. Two are wired into the engine
4
- in v2.3.0 (:class:`InputFilter`, :class:`Observer`); four are
5
- Protocol-only (:class:`Frontend`, :class:`Guard`, :class:`OutputFilter`,
6
- :class:`Adapter`) and will get engine integration when a real plugin
7
- drives the requirement see ``docs/inside/plugin-architecture-draft.md``
8
- §3 for the full design rationale.
3
+ Six extension points are defined here. Three are wired into the engine
4
+ (:class:`InputFilter`, :class:`Observer` since v2.3.0; :class:`Adapter`
5
+ since v2.8.0 see ``docs/designs/agent-cli-plugin-extraction.md`` §2);
6
+ three remain Protocol-only (:class:`Frontend`, :class:`Guard`,
7
+ :class:`OutputFilter`) and will get engine integration when a real
8
+ plugin drives the requirement see
9
+ ``docs/inside/plugin-architecture-draft.md`` §3 for the full design
10
+ rationale.
9
11
 
10
12
  Why declare contracts ahead of integration? It lets a plugin author
11
13
  build against the SDK *now* (and ship a working ``coderouter.frontend``
@@ -14,9 +16,11 @@ backward-incompatible Protocol revision later. ``runtime_checkable``
14
16
  is used so :func:`isinstance` checks work in the loader for clearer
15
17
  error messages.
16
18
 
17
- All hooks are async. Failures must NEVER block the engine response —
18
- the engine wraps every hook call in try/except and degrades gracefully
19
- (see ``coderouter/routing/fallback.py`` integration site).
19
+ InputFilter / Observer are async and run repeatedly on the hot path;
20
+ failures must NEVER block the engine response, so the engine wraps
21
+ every hook call in try/except and degrades gracefully (see
22
+ ``coderouter/routing/fallback.py`` integration site). Adapter is
23
+ different in shape — see its docstring below.
20
24
  """
21
25
  from __future__ import annotations
22
26
 
@@ -25,7 +29,8 @@ from typing import TYPE_CHECKING, Any, Protocol, runtime_checkable
25
29
  if TYPE_CHECKING:
26
30
  # Avoid circular imports at runtime — Protocol typing only needs
27
31
  # these for documentation and static analysis.
28
- from coderouter.config.schemas import CodeRouterConfig
32
+ from coderouter.adapters.base import BaseAdapter
33
+ from coderouter.config.schemas import CodeRouterConfig, ProviderConfig
29
34
  from coderouter.translation.anthropic import (
30
35
  AnthropicRequest,
31
36
  AnthropicResponse,
@@ -93,6 +98,44 @@ class Observer(Protocol):
93
98
  async def on_event(self, event_type: str, payload: dict[str, Any]) -> None: ...
94
99
 
95
100
 
101
+ # ====================================================================
102
+ # Adapter hook (engine integration in v2.8.0)
103
+ # ====================================================================
104
+
105
+
106
+ @runtime_checkable
107
+ class Adapter(Protocol):
108
+ """New ``kind`` value in providers.yaml, backed by a plugin.
109
+
110
+ The plugin declares the ``kind`` string it serves and a factory
111
+ that turns a matching :class:`~coderouter.config.schemas.ProviderConfig`
112
+ into a :class:`~coderouter.adapters.base.BaseAdapter` instance —
113
+ the same surface :func:`coderouter.adapters.registry.build_adapter`
114
+ uses for in-core kinds, so the engine treats plugin adapters
115
+ indistinguishably from built-ins once registered. See
116
+ ``docs/designs/agent-cli-plugin-extraction.md`` §2 for the design
117
+ rationale.
118
+
119
+ Shape-wise this hook differs from :class:`InputFilter` /
120
+ :class:`Observer`: those are instances the engine calls repeatedly
121
+ on the hot path, so they're async. An adapter provider is instead
122
+ a **factory** consulted once per provider at engine startup (and
123
+ again if the provider is re-registered at runtime) — construction
124
+ is I/O-free, so :meth:`build` is synchronous, matching
125
+ ``build_adapter``.
126
+ """
127
+
128
+ name: str
129
+ # The ``kind`` value this plugin serves in providers.yaml. Distinct
130
+ # from ``name`` (the plugin's own identifier, used in
131
+ # ``plugins.enabled`` / logs) — kept 1:1 for now; a future
132
+ # ``kinds: tuple[str, ...]`` can generalize this if a real plugin
133
+ # needs to serve more than one kind.
134
+ kind: str
135
+
136
+ def build(self, config: ProviderConfig) -> BaseAdapter: ...
137
+
138
+
96
139
  # ====================================================================
97
140
  # Future hooks (Protocol-only, engine integration in v2.4+)
98
141
  # ====================================================================
@@ -151,18 +194,3 @@ class OutputFilter(Protocol):
151
194
  async def transform(
152
195
  self, response: AnthropicResponse
153
196
  ) -> AnthropicResponse: ...
154
-
155
-
156
- @runtime_checkable
157
- class Adapter(Protocol):
158
- """New ``kind`` value in providers.yaml (e.g. ``bedrock-native``).
159
-
160
- Plugins implement the same async surface as
161
- :class:`coderouter.adapters.base.BaseAdapter` so the engine can
162
- treat them indistinguishably from built-in adapters once the
163
- loader registers the new ``kind`` mapping.
164
-
165
- Not yet integrated — Protocol contract only.
166
- """
167
-
168
- name: str
@@ -38,10 +38,14 @@ if TYPE_CHECKING:
38
38
 
39
39
  logger = get_logger(__name__)
40
40
 
41
- # Active hook groups in v2.3.0. The engine wires these into the
42
- # request flow; plugins targeting them will see their methods called
43
- # at runtime.
44
- PLUGIN_GROUPS_V2_3: tuple[str, ...] = ("input_filter", "observer")
41
+ # Active hook groups. The engine wires these into the request flow;
42
+ # plugins targeting them will see their methods called at runtime.
43
+ # ``input_filter`` / ``observer`` since v2.3.0; ``adapter`` joined in
44
+ # v2.8.0 (docs/designs/agent-cli-plugin-extraction.md §2.4) its
45
+ # factories are consulted from ``build_adapter``, not iterated on the
46
+ # hot path like the other two, but it goes through the same
47
+ # discover-then-enable-gate machinery below.
48
+ PLUGIN_GROUPS_V2_3: tuple[str, ...] = ("input_filter", "observer", "adapter")
45
49
 
46
50
  # Hook groups whose Protocol contracts are stable but whose engine
47
51
  # integration is deferred. Listing them here means a plugin author
@@ -51,7 +55,6 @@ PLUGIN_GROUPS_FUTURE: tuple[str, ...] = (
51
55
  "frontend",
52
56
  "guard",
53
57
  "output_filter",
54
- "adapter",
55
58
  )
56
59
 
57
60
 
@@ -20,8 +20,8 @@ from typing import Any
20
20
  class PluginRegistry:
21
21
  """In-memory registry of loaded plugin instances grouped by hook kind.
22
22
 
23
- Use the typed ``input_filters`` / ``observers`` properties on the
24
- hot path; plugin code should not iterate ``_by_group`` directly.
23
+ Use the typed ``input_filters`` / ``observers`` / ``adapters``
24
+ properties; plugin code should not iterate ``_by_group`` directly.
25
25
  """
26
26
 
27
27
  def __init__(self) -> None:
@@ -65,6 +65,17 @@ class PluginRegistry:
65
65
  """Plugins registered as ``coderouter.observer``."""
66
66
  return list(self._by_group.get("observer", ()))
67
67
 
68
+ @property
69
+ def adapters(self) -> list[Any]:
70
+ """Plugins registered as ``coderouter.adapter`` (kind factories).
71
+
72
+ Unlike ``input_filters`` / ``observers``, these aren't called
73
+ repeatedly on the hot path — :func:`coderouter.adapters.registry.build_adapter`
74
+ consults this list once per provider to resolve a plugin-served
75
+ ``kind`` (v2.8.0, docs/designs/agent-cli-plugin-extraction.md §2.4).
76
+ """
77
+ return list(self._by_group.get("adapter", ()))
78
+
68
79
  def is_empty(self) -> bool:
69
80
  """True iff no plugin instance has been registered, in any group.
70
81
 
@@ -1104,9 +1104,13 @@ class FallbackEngine:
1104
1104
  # via ``add_done_callback(_observer_tasks.discard)`` in
1105
1105
  # :meth:`_fanout_observers`.
1106
1106
  self._observer_tasks: set[asyncio.Task[None]] = set()
1107
- # Cache adapters so we don't re-instantiate per request
1107
+ # Cache adapters so we don't re-instantiate per request. v2.8.0:
1108
+ # pass the plugin registry through so a provider whose ``kind``
1109
+ # is served by an enabled adapter plugin resolves via
1110
+ # ``build_adapter``'s plugin lookup (agent-cli-plugin-extraction
1111
+ # §3.5) instead of raising "Unknown adapter kind".
1108
1112
  self._adapters: dict[str, BaseAdapter] = {
1109
- p.name: build_adapter(p) for p in config.providers
1113
+ p.name: build_adapter(p, self._plugin_registry) for p in config.providers
1110
1114
  }
1111
1115
  # v1.9-C: per-process adaptive routing adjuster (rolling-window
1112
1116
  # latency + error-rate observations, debounced rank changes).
@@ -1217,7 +1221,7 @@ class FallbackEngine:
1217
1221
  break
1218
1222
  if not replaced:
1219
1223
  self.config.providers.append(provider)
1220
- self._adapters[provider.name] = build_adapter(provider)
1224
+ self._adapters[provider.name] = build_adapter(provider, self._plugin_registry)
1221
1225
 
1222
1226
  try:
1223
1227
  chain = self.config.profile_by_name(profile_name)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coderouter-cli
3
- Version: 2.7.9
3
+ Version: 2.8.0
4
4
  Summary: Local-first, free-first, fallback-built-in LLM router. Claude Code / OpenAI compatible.
5
5
  Project-URL: Homepage, https://github.com/zephel01/CodeRouter
6
6
  Project-URL: Repository, https://github.com/zephel01/CodeRouter
@@ -16,16 +16,16 @@ coderouter/output_filters.py,sha256=0ry_rPiS_kC-FnHgaNVP6v7e6Al2djxzu9vBzZ8kEkE,
16
16
  coderouter/token_estimation.py,sha256=iz22vZEEW2P7uKLB2pYvPNpIbZGbgXRO5MtfkS_-9Sk,7531
17
17
  coderouter/token_estimation_accurate.py,sha256=GTfzrBVnvAGjeVzmzAeUdOYZvWZKLAxcxPpFiJGlzjk,4609
18
18
  coderouter/adapters/__init__.py,sha256=7dIDSZ-FE_0iSqLSDc_lK1idRdLTKcM2hP9tCJipgPI,463
19
- coderouter/adapters/agent_cli.py,sha256=ChTheoyDz9SE86Htr-ZOwSW-M7XrbuUfed1daAlvXBI,42154
19
+ coderouter/adapters/agent_cli.py,sha256=0g0V92drEQLJACXq-Dn0hE-J6e3vmsuBr5UdnAkXJyk,52430
20
20
  coderouter/adapters/anthropic_native.py,sha256=CT9Hitun-c3z83YHT2zZXgwZpY3_t6eRnOfAmNud2aw,23610
21
21
  coderouter/adapters/base.py,sha256=ykKMaiIVVGr23oFFXilK2iP_YhI8-CtsEiJyFXaC9bE,10396
22
22
  coderouter/adapters/openai_compat.py,sha256=wcrd_UpV7N6ISpUyKvdFPGU-YjCrX5oMqGpjAFEeWfg,20356
23
- coderouter/adapters/registry.py,sha256=A2LNhp70LOSNodM_iKO6EL-MBadB3kli-YPWRe1U7pQ,979
23
+ coderouter/adapters/registry.py,sha256=gvhKtoCPezCeSnNNz_4tpZoUerZGQHILEYNJ83d8W7s,2487
24
24
  coderouter/config/__init__.py,sha256=FODEn74fN-qZnt4INPSHswqhOlEgpL6-_onxsitSx8g,274
25
25
  coderouter/config/capability_registry.py,sha256=RZgzHF54dXy0CCDocRCz2ee21qXGbbgTSKTkRI9iLL4,16936
26
26
  coderouter/config/env_file.py,sha256=CoMK27fuAXm-NtoLzXb8yN2E-wDFjHQuFwiIlmgTBQw,10356
27
27
  coderouter/config/loader.py,sha256=FUEe8m4Tnmj_aul0vSctD8vKvNW-oLRoMRbTpSKqSmc,4077
28
- coderouter/config/schemas.py,sha256=fuqMuO9bafAhztUMtA6CwEBjSKNFyW-CIeen3Q0pRlg,87047
28
+ coderouter/config/schemas.py,sha256=AJIJ-zrEgI5czTlcD6YxWQe9rnJFsr6AcKSwwlCaLk8,89447
29
29
  coderouter/data/__init__.py,sha256=uNyfD9jaCvTWsBAWtaw1Fr25OSxzv3psGMfBjT1z0Cc,328
30
30
  coderouter/data/model-capabilities.yaml,sha256=S9jt6SC6-3s2-icZ_n-a14iEMnc2yB1C2R6q-N_tZWQ,19309
31
31
  coderouter/guards/__init__.py,sha256=5qliYBqygvVPneej7nx0uSjxDKsz7t8VzvrDgVBJlvU,1170
@@ -50,15 +50,15 @@ coderouter/metrics/__init__.py,sha256=7Es351DPS7yLM0yVF_F0eesmiD83n7Zzhie44chht3
50
50
  coderouter/metrics/collector.py,sha256=wdGuX5yOBWEHCz1KVIfaUBZP5NXW3U34yyYlLGwgoCE,61212
51
51
  coderouter/metrics/prometheus.py,sha256=THYkvrcpQK3ZNW-BV0h3O-PoT2ppNZ0dapQuu1nyHwE,24410
52
52
  coderouter/plugins/__init__.py,sha256=76hMLe5dV_ilripHXzWn3HSYoIALjzlw4EJVyI-GyIM,1974
53
- coderouter/plugins/base.py,sha256=n9hsck2NCSqi6oeHIumKC5zhQ8JGwCXUz7J5AZQCQss,5772
54
- coderouter/plugins/loader.py,sha256=xAIf6bIuth0QXCzwxO_ja6aSUlLzIqZNbrbQNJDgSE8,6841
55
- coderouter/plugins/registry.py,sha256=Tx0QHJHozZ5LTUliGylBdNVcdzHTBV0nedCUwGlbLMM,3236
53
+ coderouter/plugins/base.py,sha256=HACgppdfPyQRlHWXgwSvUeImaG_KRB0uLjhhQr1Ohyk,7267
54
+ coderouter/plugins/loader.py,sha256=KLnKgO6_GE7OJulwo292cTYPvxqWZlLL8S0k_O3ZDcg,7139
55
+ coderouter/plugins/registry.py,sha256=8UDmRpHnRdB-ES_xpprvrvbDlhIhonOvFFXobR6MGJA,3739
56
56
  coderouter/routing/__init__.py,sha256=g2vhutbozRx5QBThReqwPN3imk5qXdpDiaogILd3IRc,257
57
57
  coderouter/routing/adaptive.py,sha256=G2o377twGSjbUh65wiIFx6klnpFGjsD_nI3oDvcBwhY,21257
58
58
  coderouter/routing/auto_router.py,sha256=y4v0c8u5F9f98Vmhx1vRcKPiOgAvpzbFqr6TIh058h0,13341
59
59
  coderouter/routing/budget.py,sha256=PblmVKJGs_BwNa9uDHAA8hmZ4XIVKv38mHAeU0V3OMs,8451
60
60
  coderouter/routing/capability.py,sha256=rRQhzTgQYFTFDNYcSLKvq3xjdw6B1w7T-3jS7PTMI14,27864
61
- coderouter/routing/fallback.py,sha256=WNfDT9XDfKk584rQYHwSesq8-n3Axvp4j_e7qQ5ghuQ,144789
61
+ coderouter/routing/fallback.py,sha256=x3Y_LHA1NZhW4L1e7E0okuYpQn6-HNw5An7f7HX547M,145111
62
62
  coderouter/state/__init__.py,sha256=XoGcPmmBQSiZWML2S0juSveQ78xfhtdeCliNnVyzu7E,1088
63
63
  coderouter/state/audit_log.py,sha256=n7vuDsTfd5iuNUJhlRQPakJ2tMSsT9EfgPCzs1GEaac,10941
64
64
  coderouter/state/replay.py,sha256=Z_YHKroTKZdrL8qObFxcoLOAQWWXZvXFdLfxzvBhEJg,11230
@@ -69,8 +69,8 @@ coderouter/translation/__init__.py,sha256=PYXN7XVEwpG1uC8RLy6fvnGbzEZhhrEuUapH8I
69
69
  coderouter/translation/anthropic.py,sha256=aZkcYH4x82b0x7efJgJb9RWn9Hbyc9pEOthXe4vjUdU,11113
70
70
  coderouter/translation/convert.py,sha256=VV4kpu4dvLmGBmJfQnCLY5ryy_AnQcV2NuwjqRtaR8Q,52633
71
71
  coderouter/translation/tool_repair.py,sha256=DGOKArM53yfVbIfiAveoul1vGq9NEKmjagf43Qh4IkM,57630
72
- coderouter_cli-2.7.9.dist-info/METADATA,sha256=foZQpq3qpofluaktg5dWZBeLH9j7RUrD08n3wNS33p4,15546
73
- coderouter_cli-2.7.9.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
74
- coderouter_cli-2.7.9.dist-info/entry_points.txt,sha256=-dnLfD1YZ2WjH2zSdNCvlO65wYltM9bsHt9Fhg3yGss,51
75
- coderouter_cli-2.7.9.dist-info/licenses/LICENSE,sha256=wkEzoR86jFw33jvfOHjULqmkGEfxTFMgMaJnpR8mPRw,1065
76
- coderouter_cli-2.7.9.dist-info/RECORD,,
72
+ coderouter_cli-2.8.0.dist-info/METADATA,sha256=v_DJrJhY_mOdyE-dcIqR37OPgF-Ilv2bxG4H_p9kVEg,15546
73
+ coderouter_cli-2.8.0.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
74
+ coderouter_cli-2.8.0.dist-info/entry_points.txt,sha256=-dnLfD1YZ2WjH2zSdNCvlO65wYltM9bsHt9Fhg3yGss,51
75
+ coderouter_cli-2.8.0.dist-info/licenses/LICENSE,sha256=wkEzoR86jFw33jvfOHjULqmkGEfxTFMgMaJnpR8mPRw,1065
76
+ coderouter_cli-2.8.0.dist-info/RECORD,,