feat(agent): Jina 搜索改用标准 MCP SDK 接入
- agent/task_executor.py: Jina 搜索从手搓 httpx 改为官方 mcp SDK
(streamablehttp_client + ClientSession);工具经 OpenAI function-calling 暴露给模型
- agent/requirements.txt: +mcp==1.28.0;pydantic 2.9.2->2.13.4(mcp 要求 >=2.11)
- orchestrator/agent_launcher.py: JINA_API_KEY 经 per-swarm Secret 透传给 agent pod
(SENSITIVE_ENV_KEYS),不内联 PodSpec
- k8s/orchestrator-local.yaml: 本地部署清单(默认 in-pod 沙箱评估开关 + JINA_API_KEY)
沙箱保持默认 in-pod 方案,未引入 OpenSandbox。
影响范围: agent_swarm(agent/orchestrator) + Agent(新增 Jina MCP 工具)。
密钥经 k8s Secret 注入无明文。不影响 Manager 契约/计费/审计/发布链路。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit deb984ac38)
This commit is contained in:
@@ -87,6 +87,19 @@ spec:
|
||||
name: swarm-model-key
|
||||
key: OPENAI_API_KEY
|
||||
optional: true
|
||||
# Sandbox: default in-pod code-execution quality evaluation, fail-closed double gate
|
||||
# (ENABLE_QUALITY_EVAL + HEICODE_SANDBOX_ISOLATED). Matches the deployed environment.
|
||||
- name: ENABLE_QUALITY_EVAL
|
||||
value: "1"
|
||||
- name: HEICODE_SANDBOX_ISOLATED
|
||||
value: "1"
|
||||
# Jina MCP key — passed through to launched agent pods via agent_launcher
|
||||
- name: JINA_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: swarm-jina-key
|
||||
key: JINA_API_KEY
|
||||
optional: true
|
||||
resources:
|
||||
requests: { memory: "256Mi", cpu: "200m" }
|
||||
limits: { memory: "512Mi", cpu: "500m" }
|
||||
|
||||
Reference in New Issue
Block a user