chore(python): audit providers kimi grok qwen letta

Move the four providers onto _runtime and _shell_command; expected
runtime scripts take the runtime config; add unique_preconditions.

Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
This commit is contained in:
雷电芽衣 committed 2026-09-02 23:58:10 -04:00
1 parent 37e8289510
commit 407e4628a0
24 files changed
+297 -1920

No files matched your search

+7 -2
View File
@@ -4,10 +4,11 @@ from __future__ import annotations
from dataclasses import dataclass
import os
from typing import List, Optional
from typing import List, Optional, Tuple
from ._managed_files import MAX_SOURCE_BYTES, physical_directory_exists, read_physical_file
from ._runtime import expected_runtime_scripts, runtime_contract_exists
from ._strict_json import JsonObject
from .droid_config import (
DroidDocument,
DroidSources,
@@ -109,13 +110,17 @@ def require_hooks_enabled(sources: DroidSources) -> None:
)
def _expected_scripts(agent_id: str, _config: JsonObject) -> Tuple[str, str]:
return expected_runtime_scripts(AGENT_KEY, agent_id)
def runtime_files_exist(contracts: List[RuntimeContract]) -> bool:
return any(
runtime_contract_exists(
contract,
AGENT_KEY,
"Factory Droid",
expected_runtime_scripts(AGENT_KEY, contract.agent_id),
_expected_scripts,
)
for contract in contracts
)