chore(python): audit providers claudecode codex cursor gemini

Add _runtime (paths, config validation, status checks) and _shell_command
(quoting, parsers) and move the four providers onto them.

Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
This commit is contained in:
雷电芽衣 committed 2026-09-02 23:36:33 -04:00
1 parent ed34831c20
commit 6dd0197cab
15 files changed
+732 -1755

No files matched your search

+2 -6
View File
@@ -7,11 +7,11 @@ import math
import os
from typing import Any, Dict, List, Optional, Tuple
from ._runtime import same_agent_id
from .gemini_command import (
GeminiRuntimeReference,
build_gemini_command,
gemini_runtime_reference,
same_gemini_agent_id,
)
@@ -63,10 +63,6 @@ class ManagedRemoval:
remove_group: bool
def elydora_dir() -> str:
return os.path.join(os.path.expanduser("~"), ".elydora")
def _optional_string(value: JsonObject, field: str, label: str) -> None:
if field in value and not isinstance(value[field], str):
raise ValueError(f'{label} field "{field}" must be a string')
@@ -286,7 +282,7 @@ def managed_gemini_removals(
is not None
and (
agent_id is None
or same_gemini_agent_id(reference.agent_id, agent_id)
or same_agent_id(reference.agent_id, agent_id)
)
)
if indexes: