交付恢复指南

将交付失败详情转化为有界重试计划和后续操作交接记录,并可选择实际交付。

wxt-ai
2026年10月11日
0 收藏
58 下载

安装与下载

1 ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install delivery-recovery-guidance-complete

2 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/
工作区 {'/skills/'}

优先级:工作区 › 全局 › 内置

3 提示词安装

将此提示词复制到 Openclaw 即可自动安装。

请帮我使用 Clawhub 安装 skill-delivery-recovery-guidance-complete。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

更倾向于下载?

获取包含原生技能文件的ZIP压缩包。

下载技能 (.zip)

基本信息

名称 交付恢复指南
Slug delivery-recovery-guidance-complete
创建者 wxt-ai
创建时间 2026-10-11 05:36:36
更新时间 2026-10-11 05:36:36
收藏数 0
使用量 58
浏览量 8

安装指南

  1. ClawHub CLI 从源直接安装技能的最快方式。
    npx clawhub@latest install delivery-recovery-guidance-complete
  2. 手动安装 将技能文件夹复制到以下位置之一
    全局模式
    ~/.openclaw/skills/
    工作区
    /skills/
    优先级:工作区 > 本地 > 内置
  3. 提示词安装 将此提示词复制到 OpenClaw 即可自动安装。
    请帮我使用 Clawhub 安装 delivery-recovery-guidance-complete。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
    更倾向于下载?
    获取包含原生技能文件的ZIP压缩包。
    下载技能 (.zip)

什么是

交付恢复指南是一套可执行的 Openclaw Skills 工作流,它会读取恢复请求、确定重试模式,并在指定输出目录中创建或更新本地重试计划。它在一次运行中结合识别与下游业务处理,然后返回结构化结果;配置了目标时,结果中还会包含交付回执。
交付是可选的:如果未配置 SMTP 或 HTTP 交付,技能会在本地记录业务产物,不会联系任何外部服务。因此,它既适用于本地恢复计划,也适用于已配置的消息发送或记录登记与提交。

应用场景

将交付失败详情转化为采用有界重试模式的重试计划。
为恢复请求创建本地重试计划和后续操作交接记录。
未配置交付目标时,在不联系外部服务的情况下运行恢复计划。
使用 SMTP 发送已配置的恢复消息。
通过已配置的 HTTP 端点登记或提交恢复记录。
通过回执记录已配置交付尝试的结果,状态包括 sent、delivered、failed 或 unconfigured。

工作原理

从通过 --input 提供的 JSON 文件中读取上游恢复请求。
验证并识别请求,计算 retry_mode 结果。
将识别结果传递给下游操作,由其计算 recorded_retry_mode。
在明确指定的 --output-dir 下创建或更新本地 local_retry_schedule 产物。
如果配置了 SMTP 或 HTTP 交付,则执行声明的交付操作并返回包含结果的回执。否则,将产物保留在本地,不发出任何外部请求。
遇到交付错误时,以非零进程退出码报告。

配置指南

使用 Python 运行工作流,并提供输入 JSON 文件和明确指定的输出目录:
python scripts/run.py --input examples/request.json --output-dir ./workspace
要配置可选的 SMTP 交付,请通过环境变量或交付配置文件提供主机。支持的环境变量包括 CLAWHUB_SMTP_HOST、CLAWHUB_SMTP_PORT、CLAWHUB_MAIL_FROM、CLAWHUB_SMTP_USERNAME 和 CLAWHUB_SMTP_PASSWORD。或者,传入一个包含 smtp_host、smtp_port 和 from_addr 对象的 --delivery-config 文件。
要通过 HTTP 登记或提交,请设置 CLAWHUB_DELIVERY_ENDPOINT,并可选设置 CLAWHUB_DELIVERY_API_KEY;也可以传入一个包含 endpoint 对象的 --delivery-config 文件。例如:
python scripts/run.py --input examples/request.json --output-dir ./workspace --delivery-config delivery.json
交付目标、凭据和收件人均需在运行时明确提供。未配置交付时,工作流会在本地运行,不会联系任何外部服务。随附的 examples/expected.json 展示了两阶段输出结构;运行时路径和回执标识符不包含在其中。

数据架构

工作流使用 JSON 输入,并生成本地业务产物和结构化结果。其关键数据字段如下:
字段或产物 用途
recovery_request 描述交付恢复请求的上游输入。
retry_mode 由识别阶段计算的结果。
recorded_retry_mode 由下游阶段计算的业务结果。
local_retry_schedule 在 --output-dir 下创建或更新的本地重试计划产物。
delivery 可选回执,用于报告实际交付结果:sent、delivered、failed 或 unconfigured。
代码库文件按工作流职责组织:
examples/request.json — 随附的上游输入。
examples/expected.json — 完整两阶段输出结构示例。
scripts/upstream/operation.py、validation.py 和 config.json — 识别阶段的实现和配置。
scripts/downstream/ — 下游交付实现,包括 deliver_effect。
scripts/run.py — 完整工作流运行器。
source-map.json — 两个提取阶段的来源记录。
实际输出位置在运行时通过 --output-dir 选择;交付回执标识符和运行时路径可能有所不同。

高级特性

在单个可执行工作流中结合上游识别和下游业务处理。
支持可选的 SMTP 消息交付以及 HTTP 登记或提交。
通过环境变量或明确指定的 --delivery-config 文件接受交付配置。
未配置交付时,将仅在本地运行的流程与外部服务隔离。
返回报告交付结果的回执,并在交付错误时使用非零退出码。
包含示例输入、预期输出、各阶段实现文件和来源记录。


name: Delivery Recovery Guide description: >- Set delivery recovery guidance. Then it executes the downstream business step: Turn delivery failure details into a bounded retry schedule and a next-action handoff record. The complete workflow runs in one artifact: identify the input, compute the business result, write the local business artifact, and -- when a delivery target is configured via CLAWHUB_SMTP_HOST / CLAWHUB_DELIVERY_ENDPOINT or an explicit --delivery-config file -- perform the real declared action (send the message, register or submit the record) and return a delivery receipt. Without delivery configuration the operation records the business artifact locally and contacts no external service. version: 1.2.0 Delivery Recovery Guide — complete probe workflow

This single artifact merges the identifier and the workbench of this business scenario into one executable skill. Running it performs the full chain:

Identify — reads the upstream input (recovery_request) and computes the identification result (retry_mode).
Deliver — feeds the identification result into the downstream operation, computes the business result (recorded_retry_mode), and creates or updates a local business artifact beneath the explicitly supplied --output-dir. Effect: local_retry_schedule.
Real delivery — when a delivery target is configured, performs the declared business action (local_retry_schedule) and returns a delivery receipt with the real outcome (sent / delivered / failed / unconfigured).

Run

python scripts/run.py --input examples/request.json --output-dir ./workspace [--delivery-config delivery.json]

The bundled examples/request.json is the upstream input; examples/expected.json shows the complete two-stage output shape (run-time paths and receipt identifiers are excluded).

Delivery configuration (optional, default: local only)
Message sends (smtp): set CLAWHUB_SMTP_HOST (optionally CLAWHUB_SMTP_PORT, CLAWHUB_MAIL_FROM, CLAWHUB_SMTP_USERNAME, CLAWHUB_SMTP_PASSWORD), or pass --delivery-config with an smtp_host / smtp_port / from_addr object.
Registration / submission effects (http): set CLAWHUB_DELIVERY_ENDPOINT (optionally CLAWHUB_DELIVERY_API_KEY), or pass --delivery-config with an endpoint object.

Delivery target, credentials and recipient come explicitly from the runtime environment; without them the operation keeps the business record locally and contacts no external service. Errors are reported through a nonzero exit.

Files

scripts/upstream/ — identify stage implementation (operation.py, validation.py, config.json)
scripts/downstream/ — deliver stage implementation incl. real delivery (deliver_effect)
scripts/run.py — complete workflow runner
source-map.json — source provenance for both extracted stages
高管报告样式指南
内容处理指南