本地服务器执行
目标
在本地运行 Claude 编排器,并通过 Cloudflare 隧道提供外部 webhook 访问。
启动服务器
python3 execution/local_server.py
启动 FastAPI 服务器,监听端口 8000。
Cloudflare 隧道
如需外部访问(webhook),请使用 Cloudflare 隧道:
cloudflared tunnel --url http://localhost:8000
端点
与 Modal 部署相同:
/directive?slug={slug}- 执行指令/list-webhooks- 列出 webhook/general-agent- 通用代理任务
开发用途
- 比 Modal 部署迭代更快
- 完全访问本地文件和凭证
- 通过 print 语句进行实时调试
环境
直接使用本地的 .env 文件(与 Modal 使用 secrets 不同)。
模式
输入
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
port | integer | 否 | 服务器端口(默认:8000) |
输出
| 名称 | 类型 | 描述 |
|---|---|---|
server_url | string | 本地服务器地址(http://localhost:8000) |
tunnel_url | string | Cloudflare 隧道地址(如果启用) |
可组合的技能
与此技能配合良好的技能:add-webhook
成本
免费(本地执行)