Geo 待群发—获取范文/仿写状态,导出时下载 ZIP 到本地并上报,可群发时提示用户。QClaw 定时仅装本 skill 即可。
只做三件事(不触发周期、不成稿、不发帖):
GET /api/geo/optimization/tasks(必要时 mass-publish/pending)needsFanwenExport / needsFangxieExport 为 true 时下载并 POST mass-publish-exportSaaS 任务须已配置国内 范文 和/或 普通仿写(协同 API 默认开启)。勿调用深度仿写、 web_fetch、 generate-deep-imitate。
~/.qclaw/geo-api-key 或 ~/.openclaw/geo-api-key;无则让用户在 QClaw 发送: 这是geo的api key:<SaaS 龙虾密钥>POST /api/geo/verify-key, code != 0 则停止bash
GEO_KEY=$(cat ~/.qclaw/geo-api-key 2>/dev/null || cat ~/.openclaw/geo-api-key 2>/dev/null)
BASE="https://ai.gaobobo.cn"
text
~/.qclaw/geo-exports/{brand}_{product}_C{cycle}/fanwen/fanwen.zip
~/.qclaw/geo-exports/{brand}_{product}_C{cycle}/fangxie/fangxie.zip
bash
curl -s "$BASE/api/geo/optimization/tasks" -H "Authorization: Bearer $GEO_KEY"
对每个 items[] 看 openclawActions( 勿向用户索要 OPT-ID):
字段动作needsFanwenExport == true下载 .../export/fanwen.zip → 本机 fanwen/, POST mass-publish-export branch: fanwen``needsFangxieExport == true下载 fangxie.zip → 本机 fangxie/, branch: fangxie``fanwenStatus == completed 且本地已有 zip跳过范文fangxieStatus == not_enabled跳过仿写
导出示例(范文;仿写改路径与 branch):
bash
OPT_ID="<task.taskId>"
CYCLE=<latestCycle.cycleNumber>
DIR="$HOME/.qclaw/geo-exports/${BRAND}_${PRODUCT}_C${CYCLE}/fanwen"
mkdir -p "$DIR"
curl -fsSL -o "$DIR/fanwen.zip" \
"$BASE/api/geo/optimization/$OPT_ID/cycles/$CYCLE/export/fanwen.zip" \
-H "Authorization: Bearer $GEO_KEY"
curl -s -X POST "$BASE/api/geo/optimization/$OPT_ID/cycles/$CYCLE/mass-publish-export" \
-H "Authorization: Bearer $GEO_KEY" -H "Content-Type: application/json" \
-d "{\"branch\":\"fanwen\",\"local_path_hint\":\"$DIR\"}"
bash
curl -s "$BASE/api/geo/optimization/mass-publish/pending" \
-H "Authorization: Bearer $GEO_KEY"
items[] 含 brandName、 productName、 cycleNumber、 massPublishScopeLabel、 fanwenStatusLabel、 fangxieStatusLabel、 fanwenLocalPath、 fangxieLocalPath。
可群发:任一侧 ZIP 导出状态为 ready_to_export(待导出)或 completed(已完成)。
text
【GEO 待群发】{brandName} · {productName} · 第 {cycleNumber} 周期
范文 ZIP:{fanwenStatusLabel} · {fanwenLocalPath 或「—」}
仿写 ZIP:{fangxieStatusLabel} · {fangxieLocalPath 或「—」}
{若可群发}请用融媒宝批量导入上述目录中的 ZIP。
无 items:说明当前无待群发,或仍在生成中。