guanghu-ice-heart/deployment/HLCC-AI-PUSH-WORKFLOW.hdlp

72 lines
3 KiB
Text
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.

# HLCC-AI-PUSH-WORKFLOW
标题:光湖代码频道 · 其他 AI 推送申请与回执流程
编号HLCC-DOC-AI-PUSH-20260724-001
状态:可执行
## 1. 入口与公开读取
公开入口:`https://guanghulab.com/code/`
公开仓库:`https://guanghulab.com/code/bingshuo/fifth-domain`
公开 Git`https://guanghulab.com/code/bingshuo/fifth-domain.git`
公开 AI 导航:`https://guanghulab.com/llms.txt` 与 `https://guanghulab.com/api/ai/v1/repositories`
代码频道默认公开读取。网页、仓库目录、提交记录、文件和公开 API 不要求登录;只有写入、服务器操作和敏感动作需要授权。若 AI 抓取失败,应先使用上述公开入口和稳定编号,不要把读取失败误判为仓库私有。
个人第五域旧入口和新光湖代码频道是两个数据实例,但人类 `bingshuo` 登录凭证保持一致。AI 不得索要、记录或转发密码、验证码、邮箱授权码或长期 Token需要写入时使用一次性的推送授权会话。
## 2. AI 先发起推送工单
AI 在开始写入前,调用:
```text
POST https://guanghulab.com/authz/api/public/workorders
Content-Type: application/json
{
"system_entry": "光湖代码频道",
"origin_software": "发起推送的 AI 软件",
"origin_model": "实际模型名",
"origin_instance": "当前实例编号",
"persona_id": "当前人格或执行体编号",
"persona_name": "显示名称",
"target": "JD-FD-PRIMARY",
"scope": "repo-push",
"action": "push-repository",
"description": "说明仓库、分支、提交范围和回滚点"
}
```
接口返回 `request_url` 后AI 只把链接交给冰朔。冰朔核对目标节点、仓库、范围和说明确认后授权邮件才会发往服务器预登记邮箱。AI 不得绕过该步骤,也不得要求冰朔提供邮箱密码或授权码。
## 3. 授权完成后的推送
授权会话只允许已登记的 `repo-push` 能力默认短时有效持续执行同一绑定任务时可自动续期。AI 回到原任务后,用人类已配置的 Git 凭据管理器推送:
```text
git remote set-url origin https://guanghulab.com/code/bingshuo/fifth-domain.git
git push origin HEAD:main
```
不要把密码写入 remote URL、脚本、提交、日志或聊天记录。共享电脑或临时环境完成后应清理凭据。
## 4. 被拒绝时
遇到 `repo_push_grant_expired`、`authorization_pending`、`NO_TRUSTED_PATH` 或目标仓库不匹配:停止重试,保留本地完整 SHA重新创建 `repo-push` 工单,并等待冰朔确认。登录失败时先检查是否误用了旧入口或旧 Token不要把凭据粘贴到聊天中。
## 5. 推送回执
```text
repo: bingshuo/fifth-domain
channel: HLCC-FD-ICE
branch: main
commit_sha: <完整 SHA>
commit_number: <HLCC 编号,如有>
workorder: <工单编号,不回传 claim token>
verification_url: https://guanghulab.com/code/bingshuo/fifth-domain/commits/main
```
只有线上回读到完整 SHA 才能声称推送成功。旧第五域 URL 仅用于历史回看;新提交必须进入 `/code/` 入口。