使用 mitmprox 抓取 openclaw 数据包

以下是在 macOS 上使用 mitmproxy 抓取 OpenClaw onboard 引导流程中发送的请求体的步骤和结果。 装包工具的使用可以参考 使用 mitmprox 抓取 codex 数据包,这里不赘述。 因为每一步的 tools 内容都一样,所以除 Step 1 以外的步骤我就剩略了这部分。 可以看到整个引导过程完全通过提示工程驱动工具完成。 Step 1. 系统启动后主动给大模型发送消息 Sender (untrusted metadata):\njson\n{\n \"label\": \"openclaw-tui (gateway-client)\",\n \"id\": \"gateway-client\",\n \"name\": \"openclaw-tui\",\n \"username\": \"openclaw-tui\"\n}\n\n\n[Mon 2026-03-16 22:15 GMT+8] Wake up, my friend! { "model": "coder-model", "messages": [ { "role": "system", "content": "You are a personal assistant running inside OpenClaw.\n## Tooling\nTool availability (filtered by policy):\nTool names are case-sensitive. Call tools exactly as listed.

Read more

在本地 GitLab 中通过 Docker 安装 Qodo PR-Agent 并集成代码 Review

Qodo 的开源 PR-Agent 可以直接接入 GitLab Merge Request,在 MR 页面里生成描述、Review 结论和改进建议。对于内网自建 GitLab,最稳妥的方式是把 PR-Agent 作为一个本地 webhook 服务跑在 Docker 中,再通过 GitLab Webhook 把 MR 事件转给它。 本文记录一套在本地 GitLab 中落地的最小可用方案,目标是: 使用 Docker 部署 PR-Agent 接入本地 GitLab 在 Merge Request 中通过评论触发 /review、/describe、/improve 说明:本文使用 webhook 模式,适合自建 GitLab 和内网环境。对应镜像标签可使用 codiumai/pr-agent:0.32-gitlab_webhook。 前置条件 部署前先准备好下面几项: 一个可以访问 GitLab 的 Docker 主机 一个本地 GitLab 实例,例如 http://localhost:8080 一个 OpenAI 兼容模型 一个专门给 PR-Agent 使用的 GitLab 机器人账号 建议不要直接使用管理员账号,而是新建一个 pr-agent-bot 用户。 第一步:在 GitLab 中准备机器人账号 先在 GitLab 中创建一个专用用户,例如 pr-agent-bot,然后把它加入需要接管 Review 的项目或组。

Read more

使用 mitmprox 抓取 codex 数据包

这篇文章只做一件事:在 macOS 上用 mitmproxy 抓一次 Codex 发送 hello 的请求。 Step 1. 安装 mitmproxy brew install mitmproxy 确认安装成功: mitmdump --version Step 2. 启动抓包代理 打开第一个终端,执行: mitmdump --listen-host 127.0.0.1 --listen-port 8080 -w codex-hello.mitm 这一步会: 在本机启动代理 127.0.0.1:8080 把抓到的流量保存到 codex-hello.mitm 这个终端先不要关。 Step 3. 安装 mitmproxy 根证书 第一次启动 mitmproxy 后,会在本机生成证书: open ~/.mitmproxy 在 macOS 中操作: 双击 mitmproxy-ca-cert.pem 导入到“登录”钥匙串 打开“钥匙串访问” 找到 mitmproxy 证书 双击证书,展开“信任” 把“使用此证书时”改成“始终信任” 关闭窗口并输入密码保存 Step 4. 让 Codex 走本地代理 打开第二个终端,执行: export HTTP_PROXY="http://127.0.0.1:8080" export HTTPS_PROXY="http://127.0.0.1:8080" export ALL_PROXY="http://127.

Read more

智能体软件工程:AI在软件开发中的应用与挑战

导读 本信息搜集整理自网络,内容仅供参考。 智能体软件工程 #1|智能体原生工作估算 《智能体软件工程》可能是一系列文章,记录我从传统软件工程向智能体软件工程的迁移过程。 一个老程序员的顿悟 我写了近二十年代码了。估算工期这件事,早已刻进肌肉记忆——拆任务、排优先级、乘以经验系数、加上联调和 buffer(冗余量),最后给出一个"两到三周"。这套方法论伴随我度过了瀑布、敏捷、DevOps 的每一次范式迁移,从未失灵。 直到 AI 编程到来。 我最近用 AI Agent 做一个 CLI 工具。脑子里的第一反应是这个工具的实现过程:解析参数、核心转换、校验逻辑、错误处理、测试,一整套下来,按古法编程怎么也得两三天。结果 Agent 从动手到交付,连半小时都没用完。 效率提升了吗?表面上看,当然。 但更深层的问题随之浮现:我甚至无法正确预判 AI 需要多久。 我的整个估算框架是锚定在"人类开发者"这个基座上的。多少行代码、多少次 debug、多少轮 code review。当执行者从人变成智能体,这套尺子就彻底失灵了。 更讽刺的是,AI Agent 自己也犯同样的错。你问 Claude 或 GPT:“做这个功能要多久?“它会一本正经地告诉你"大约 2-3 天”。因为它的训练数据里,Stack Overflow 和技术博客就是这么写的。Agent 在用人类的经验估人类的时间,然后自己十分钟干完。 我开始意识到,当软件工程迈向智能体软件工程(Agentic Software Engineering)的过程中,第一个需要变化的,就是这种"拿人的尺子量 AI 的活"的心态。 所以我写了一个 Skill,agent-estimation,专门解决这个问题。 问题的根源:人类时间锚定 我把这个现象叫做 Human-Time Anchoring(人类时间锚定)。 它的运作机制是这样的: AI Agent 在生成估算时,会不自觉地调用训练数据中的"集体经验”。一个 REST API 项目?论坛上说要一周。一个带实时图表的全栈 Dashboard?技术负责人在 Sprint Planning 里估了三个迭代。这些数字是人类开发者在人类的认知带宽、上下文切换成本、沟通损耗下产出的经验值。它们对人类成立,但对一个可以每 3 分钟完成一轮"思考→写码→执行→验证→修复"循环的 Agent 来说,完全不适用。 这导致了一个系统性偏差:AI 几乎总是高估自己的工期。 而我们这些老程序员,反过来也在犯同样的错:我们拿自己过去的经验去预期 AI 的产出速度,然后在"哇,这么快?“和"等等,它真能做到吗?“之间反复横跳。

Read more

LeRobot 数据采集

通过操作 LeRobot 机械臂执行指定任务来采集数据,数据会被保存到本地并可以选择上传到 Hugging Face Hub 进行管理和分享。 切换到 LeRobot 虚拟环境 source ~/miniconda3/bin/activate conda activate lerobot 执行以下命令跟随语音提示完成 3 轮摇操作数据采集,每轮采集在 60 秒内完成抓取香蕉放到苹果旁,然后再在。30 秒内将香蕉摆放回原来的位置后再等待下一轮的语音指令,直到完成 3轮数据采集后命令会自动结束。 dataset.repo_id 配置数据集的存储目录名,最终数据会存储到 ~/.cache/huggingface/lerobot/{repo-id} 目录下,注意 repo-id 的格式必须为 {xxx}/{xxx}。 lerobot-record \ --robot.type=so101_follower \ --robot.port=/dev/tty.usbmodem5B415369931 \ --robot.id=zihao_follower_arm \ --teleop.type=so101_leader \ --teleop.port=/dev/tty.usbmodem5B420772871 \ --teleop.id=zihao_leader_arm \ --robot.cameras='{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 5}, side: {type: opencv, index_or_path: 1, width: 640, height: 480, fps: 5} }' \ --display_data=true \ --dataset.

Read more

LeRobot 驱动安装和遥空操作

安装 Miniconda mkdir -p ~/miniconda3 curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 rm ~/miniconda3/miniconda.sh 接受 Anaconda 默认 channel 的服务条款 source ~/miniconda3/bin/activate conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r 其他操作系统安装,参考 https://www.anaconda.com/docs/getting-started/miniconda/install 文档 环境设置 初始化 LeRobot 虚拟环境 source ~/miniconda3/bin/activate conda create -y -n lerobot python=3.12 conda activate lerobot 注意后续工作都需要在 LeRobot 虚拟环境中进行,如果关闭了终端或者新开了一个终端,需要重新执行上面的 source ~/miniconda3/bin/activate 和 conda activate lerobot 命令进入 LeRobot 虚拟环境。 安装 ffmpeg 7.x(ffmpeg 8.X is not yet supported)

Read more

使用 API 接入 Github Copilot 提供的模型

使用 API 接入 Github Copilot 提供的模型 1. 获取 GitHub access token(Device Flow) 1.1 申请 device code export CLIENT_ID="Iv1.123456" export SCOPE="read:user" curl -sS -X POST "https://github.com/login/device/code" \ -H "Accept: application/json" \ -H "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "client_id=${CLIENT_ID}" \ --data-urlencode "scope=${SCOPE}" {"device_code":"9c2e1edec2cb88521acfeda02f1cb23sb4ceedfa","user_code":"E12E-8762","verification_uri":"https://github.com/login/device","expires_in":899,"interval":5} 你会得到 JSON:device_code, user_code, verification_uri, expires_in, interval。 1.2 打开浏览器授权 访问 verification_uri,输入 user_code,同意授权。 1.3 轮询换 GitHub access token export DEVICE_CODE="9c2e1edec2cb88521acfeda02f1cb23sb4ceedfa" curl -sS -X POST "https://github.com/login/oauth/access_token" \ -H "Accept: application/json" \ -H "Content-Type: application/x-www-form-urlencoded" \ --data-urlencode "client_id=${CLIENT_ID}" \ --data-urlencode "device_code=${DEVICE_CODE}" \ --data-urlencode "grant_type=urn:ietf:params:oauth:grant-type:device_code" {"access_token":"ghu_af2cHWUGwwyJ3SOKh7crBAHUplj72900zMne","token_type":"bearer","scope":""} 成功返回 access_token 后:

Read more

AWS Lightsail 证书安装与自动续期

适用场景 使用 AWS Lightsail 托管服务器 使用 Lightsail / Route53 管理 DNS 使用 Nginx(宿主机或 Docker) 需要 通配符证书(*.example.com) 希望 证书自动续期、无人值守 一、整体架构说明(非常重要) Let’s Encrypt │ │ DNS-01 验证 ▼ Route53 / Lightsail DNS(权威) │ │ TXT _acme-challenge ▼ Certbot(dns-route53 插件) │ │ 自动续期 ▼ Nginx(reload 生效) ⚠️ 关键原则 _acme-challenge TXT 只能由 certbot 自动管理 禁止手动添加或残留 TXT NS(Name Server)必须与 DNS Zone 完全一致 二、前置条件检查清单 1. 域名 DNS 已交由 Lightsail 管理 在 Lightsail 控制台应看到: ✅ You are using Lightsail to manage the DNS records for your domain.

Read more

DeepSeek-R1 vLLM性能基准测试:wrk压力测试详细报告

配置 DeepSeek-R1-Distill-Qwen-14B NVIDIA A40 vLLM vllm/vllm-openai:v0.8.5 NVIDIA-SMI 560.35.03 Driver Version: 560.35.03 CUDA Version: 12.6 wrk 测试方法 创建一个请求文件 cat > post.lua << 'EOF' wrk.method = "POST" wrk.body = '{"model":"deepseek-14b","messages":[{"role":"user","content":"写一个50字的短文"}],"max_tokens":50}' wrk.headers["Content-Type"] = "application/json" wrk.headers["Authorization"] = "Bearer your-api-key" EOF 10 线程 20 并发持续测试一分钟 [root@myserver wrk-4.2.0]# ./wrk --timeout 30s -t10 -c20 -d60s -s post.lua http://10.1.2.100:8080/v1/chat/completions Running 1m test @ http://10.1.2.100:8080/v1/chat/completions 10 threads and 20 connections Thread Stats Avg Stdev Max +/- Stdev Latency 3.07s 38.

Read more

Awesome Text to Image Prompts

Jesse Faden’s Double exposure, Midjourney style, merging, blending, overlay double exposure image, Double Exposure style, An exceptional masterpiece by Yukisakura revealing a fantastic double exposure composition of Jesse Faden’s (control) silhouette harmoniously intertwined with the visually striking details of a cyberpunk metropolis. While the road’s details are outwardly echoing through the fabric of the figure, beautiful tension climbs as the contrasting use of monochrome in the background maintains razor-sharp focus on the remarkable double exposure image.

Read more