Files
sundynix-agentix/Makefile
T
Blizzard a67604f4b7 feat: mcp-py 接入工具总线 sundynix.tools.py.* (与 Go 同契约)
第 5b 层 Python 算法工具挂上 NATS,core NATS request-reply + 队列组,
与 Go 侧 ServeTool 字节级同契约({tool,args,task_id}/{ok,content,error})。

- mcp_gateway: nats-py 连接(无限重连) + queue subscribe(mcp-py-workers) + 按工具名路由
  工具 echo / run_code(Docker桩) / parse_document(MinerU桩) / secure_sandbox(gVisor桩)
- Makefile: 新增 mcp-py-setup(venv + pip install -e .),mcp-py 缺 venv 自动 setup
  e2e 补上 TestToolCallRoundTrip
- 验证: live 对 NATS 容器跑通 4 类调用(含未知工具错误);3 个 Go e2e PASS

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 12:58:38 +08:00

41 lines
1.4 KiB
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
.PHONY: infra infra-down devnats demo e2e gateway dispatcher mcp-go mcp-py mcp-py-setup desktop tidy
infra: ## 启动基础设施 (NATS / Postgres / Redis / Milvus / Neo4j)
docker compose up -d
infra-down:
docker compose down
devnats: ## 启动内嵌 JetStream NATS(无 Docker 本地联调)
cd sundynix-shared && go run ./cmd/devnats
demo: ## 一键演示 Gateway→NATS→Dispatcher 任务流(无需 Docker
bash scripts/demo.sh
e2e: ## 跑共享 bus 的端到端测试(内嵌 NATS):任务流 / 工具调用 / Token 流
cd sundynix-shared && go test ./bus/ -run 'TestTaskRoundTrip|TestToolCallRoundTrip|TestTokenStreamRoundTrip' -v
gateway:
cd sundynix-gateway && go run ./cmd/server
dispatcher:
cd sundynix-dispatcher && go run ./cmd/dispatcher
mcp-go:
cd sundynix-mcp-go && go run ./cmd/server
mcp-py-setup: ## 创建 venv 并安装 mcp-py 依赖(首次运行 mcp-py 前执行)
cd sundynix-mcp-py && python3 -m venv .venv && .venv/bin/pip install -q -e .
mcp-py: ## 运行 Python 算法型 MCP 工具服务(缺 venv 则自动 setup
cd sundynix-mcp-py && [ -x .venv/bin/python ] || $(MAKE) mcp-py-setup
cd sundynix-mcp-py && .venv/bin/python -m sundynix_mcp_py.main
desktop:
cd sundynix-desktop && wails dev
tidy:
cd sundynix-gateway && go mod tidy
cd sundynix-dispatcher && go mod tidy
cd sundynix-mcp-go && go mod tidy