fix: tool registry emits Anthropic schema, question lifecycle cleanup
- Tool.to_schema() emits input_schema (Anthropic Messages API) instead of OpenAI-style parameters - QuestionManager: remove questions from _pending on answer and timeout, reject double answers, add list_pending() - core/skills/__init__.py so skills are importable as a package - revert optional-import fallbacks in logger/message_bus: nats-py and loguru are hard requirements, a broken install should fail loudly - tests for wait_for_answer happy path and timeout cleanup Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012AJLYcbTHCe45fyFnMfEin
This commit is contained in:
@@ -8,11 +8,8 @@ from collections import defaultdict
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum
|
||||
|
||||
try:
|
||||
import nats
|
||||
import nats.js.errors
|
||||
except ImportError:
|
||||
nats = None
|
||||
import nats
|
||||
import nats.js.errors
|
||||
|
||||
from core.types import AgentMessage, MessageType
|
||||
from core.logger import logger
|
||||
@@ -59,9 +56,6 @@ class MessageBus:
|
||||
|
||||
async def connect(self):
|
||||
"""Connect to NATS and create the logistics JetStream stream."""
|
||||
if nats is None:
|
||||
logger.warning("nats-py not installed; message bus running in local in-memory mode")
|
||||
return
|
||||
self._nc = await nats.connect(
|
||||
servers=[f"nats://{NATS_HOST}:{NATS_PORT}"],
|
||||
user=NATS_USER,
|
||||
|
||||
Reference in New Issue
Block a user