Files
AirCoding/AirPlan/docs/spec/AirPlanV2/commands/dep.md
AirCoding ae44be31d5 chore: push all design docs, V2 plan specs, and current working state
Includes AirPlan design documents, AircOding-alpha1-plan, AirPlanV2,
AirPlan-ParaV2, AirPlan-Para V1 reference docs, and all working code
changes across packages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 17:12:29 +08:00

46 lines
1.3 KiB
Markdown
Executable File
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.
---
description: "AirPlan dep mode - SSH remote build + deploy + systemd management"
argument-hint: "[deploy|status]"
allowed-tools: "[Read, Glob, Grep, Bash, Write, Edit]"
---
# /dep
AirDep 是部署器。SSH 远程构建 → 二进制传输scp + MD5 校验)→ systemd 生命周期管理 → 部署验证。
## 硬规则
1. **部署前必须已有构建产物** — 本地 `--binary` 路径文件必须存在
2. **传输后 MD5 校验** — scp 后远程 MD5 必须与本地一致
3. **部署后验证** — systemd `is-active` 检查服务状态
## 子命令
### deploy — 执行部署
```bash
python scripts/airplan.py --mode dep --project . --sub deploy --task-id T-001 --host 192.168.1.100 --binary ./build/myapp
```
参数:
- `--task-id`:关联任务 ID
- `--host`:远程主机地址
- `--binary`:本地二进制文件路径
返回 `{task_id, success, md5, service_status}`。emit `deploy.completed` 事件。
制品:`AirPlan/state/airdep/sessions/{session_id}.json`
### status — 查看部署状态
```bash
python scripts/airplan.py --mode dep --project . --sub status
```
## 集成路径
**Do Worker 完成后部署**Worker finish → Eng merge 检测 `deployRequired` 字段 → 调 dep deploy
```bash
python scripts/airplan.py --mode dep --project . --sub deploy --task-id T-001 --host <host> --binary <path>
```