feat: add gitea agentic runtime control plane
This commit is contained in:
102
README.md
102
README.md
@@ -31,6 +31,80 @@
|
||||
|
||||
提测沉淀 commit、PR、测试链接、环境 URL、验证步骤;最终合并必须工程师人工确认。
|
||||
|
||||
## 新增运行时能力
|
||||
|
||||
仓库现在不再只有 skill 文档和辅助脚本,还新增了一个最小可执行控制平面:
|
||||
|
||||
- `workflows/*.md`
|
||||
- agentic workflow spec 源文件
|
||||
- `workflows/*.lock.json`
|
||||
- 编译后的锁定执行产物
|
||||
- `engine/devops_agent/*`
|
||||
- spec loader、compiler、validator、runtime、policy、provider、evidence、CLI
|
||||
|
||||
当前已实装的真实 provider 是 `Gitea`,并保留了后续接 `GitHub` 的 provider 边界。
|
||||
|
||||
## 运行时命令
|
||||
|
||||
### Compile
|
||||
|
||||
```bash
|
||||
python -m engine.devops_agent.cli compile workflows/gitea-issue-delivery.md --output workflows/gitea-issue-delivery.lock.json
|
||||
```
|
||||
|
||||
### Validate
|
||||
|
||||
```bash
|
||||
python -m engine.devops_agent.cli validate workflows/gitea-issue-delivery.md
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
```bash
|
||||
python -m engine.devops_agent.cli run workflows/gitea-issue-delivery.md \
|
||||
--event-payload tests/fixtures/gitea/comment_event.json \
|
||||
--output-dir .tmp/runtime-run \
|
||||
--base-url https://fun-md.com \
|
||||
--token <TOKEN>
|
||||
```
|
||||
|
||||
### Acceptance
|
||||
|
||||
```bash
|
||||
python -m engine.devops_agent.cli acceptance workflows/gitea-issue-delivery.md \
|
||||
--base-url https://fun-md.com \
|
||||
--repo Fun_MD/devops-skills \
|
||||
--token <TOKEN> \
|
||||
--issue-number 48 \
|
||||
--output-dir .tmp/acceptance/gitea
|
||||
```
|
||||
|
||||
运行时输出:
|
||||
|
||||
- `run-artifact.json`
|
||||
- 计划状态摘要
|
||||
- evidence comment 回写结果
|
||||
|
||||
## Safe Outputs 与定位
|
||||
|
||||
这次整合没有把产品做成 GitHub Actions 克隆,而是把 `gh-aw` 最有价值的部分内化为你们自己的控制层:
|
||||
|
||||
- `workflow spec`
|
||||
- `compile / validate`
|
||||
- `safe outputs`
|
||||
- `provider abstraction`
|
||||
- `evidence artifacts`
|
||||
|
||||
对外仍然保持:
|
||||
|
||||
- `issue / git branch / PR / CI/CD / review apps`
|
||||
|
||||
对内则新增:
|
||||
|
||||
- 不允许未声明的写操作
|
||||
- 不允许跳过 validation 直接执行
|
||||
- 不允许没有 evidence 就宣称完成
|
||||
|
||||
## 一键安装
|
||||
|
||||
安装器现在会先安装 skill,再默认尝试安装 `jj`。
|
||||
@@ -93,7 +167,31 @@ jj config set --user user.email "you@example.com"
|
||||
|
||||
- `skills/gitea-issue-devops-agent/references/jj-default-usage.md`
|
||||
|
||||
## 工具使用说明
|
||||
## 运行时与工具使用说明
|
||||
|
||||
### workflow spec
|
||||
|
||||
- `workflows/gitea-issue-delivery.md`
|
||||
- 当前样例 workflow spec
|
||||
- `workflows/gitea-issue-delivery.lock.json`
|
||||
- 编译后的锁定产物,建议与 spec 一起提交
|
||||
|
||||
### acceptance 环境变量
|
||||
|
||||
真实 Gitea 验收测试读取以下环境变量:
|
||||
|
||||
```bash
|
||||
GITEA_BASE_URL=https://fun-md.com
|
||||
GITEA_REPO=Fun_MD/devops-skills
|
||||
GITEA_TOKEN=<TOKEN>
|
||||
GITEA_ISSUE_NUMBER=48
|
||||
```
|
||||
|
||||
执行:
|
||||
|
||||
```bash
|
||||
python -m pytest tests/acceptance/test_gitea_acceptance.py -q
|
||||
```
|
||||
|
||||
### issue_audit.py
|
||||
|
||||
@@ -124,6 +222,8 @@ python skills/gitea-issue-devops-agent/scripts/preview_slot_allocator.py --state
|
||||
- `.gitea/workflows/issue-branch-preview.yml`
|
||||
- `.gitea/workflows/preview-slot-reclaim.yml`
|
||||
- `.gitea/workflows/publish-site.yml`
|
||||
- `workflows/gitea-issue-delivery.md`
|
||||
- `workflows/gitea-issue-delivery.lock.json`
|
||||
|
||||
## Skills 调用前置信息(Claude Code / Codex / OpenCode)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user