task-recovery

使用 task_id 恢复超时的 Sonilo 生成调用结果。当 text_to_sfx、video_to_sfx、video_to_video_music、video_to_video_sfx、video_to_sound、video_to_video_sound、audio_ducking、dubbing、proofread、analyze_video 或 video_to_music(preserve_speech=true)等调用超时或被中断时使用——生成任务已运行并已计费,其结果仍可检索。

仓库最近推送
GitHub Stars
117
Forks
9
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "task-recovery":https://skillpi.com/zh/skills/deepskill-d06642a065f5f2c3c16e2008c7574d0284fa6a49bd090d838ec6169bffefa306。安装前核对上游来源和版本:https://github.com/sonilo-ai/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

使用 task_id 恢复超时的 Sonilo 生成调用结果。当 text_to_sfx、video_to_sfx、video_to_video_music、video_to_video_sfx、video_to_sound、video_to_video_sound、audio_ducking、dubbing、proofread、analyze_video 或 video_to_music(preserve_speech=true)等调用超时或被中断时使用——生成任务已运行并已计费,其结果仍可检索。

0 下载

介绍来源: third_party · sonilo-ai · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: task-recovery
description: Recover the result of a timed-out Sonilo generation call using its task_id. Use whenever text_to_sfx, video_to_sfx, video_to_video_music, video_to_video_sfx, video_to_sound, video_to_video_sound, audio_ducking, dubbing, proofread, analyze_video, or video_to_music(preserve_speech=true) times out or its call was interrupted — the generation already ran (and was already charged) and its result is still retrievable.
license: MIT
compatibility: "Requires Sonilo through either transport — the MCP server connected, or the `sonilo` CLI installed and signed in — plus credentials: a `sonilo login` sign-in, the hosted OAuth plugin, or SONILO_API_KEY. See the setup-api-key skill."
allowed-tools: Bash, Read, Write, mcp__sonilo__*

Sonilo Task Recovery

Every Sonilo generation that runs asynchronously on the backend (SFX, ducking, video-to-video, video-to-sound, dubbing, proofread, video-analysis, and video_to_music(preserve_speech=true)) is already charged the moment it's accepted — a client-side timeout does not stop it or refund it. This tool checks a task's status and, once finished, downloads its result. It never itself charges anything.

Setup: See the setup-api-key skill.

This tool is a safety net, not something to call speculatively. Only use it when you actually have a task_id — from a timeout error message, or from the [sonilo-mcp] task submitted: <id> line a host prints to stderr the moment a task is submitted (this survives even a cancelled call).

Transport: MCP or CLI

Pick one at the start of the session and stay on it. Do not mix the two inside a single job, and do not announce the choice.

  1. Sonilo MCP tools visible in this session (get_sfx_task and friends) — use them. This is the preferred path: it needs no shell, and it is the only one that survives a very long generation. If a call fails to authenticate — rather than failing on its inputs — this transport is not usable in this session: go to 2 instead of retrying it.
  2. No usable Sonilo MCP tools, but sonilo account exits 0 — use the CLI commands below. Same API, same account, same credential file. Probe with sonilo account, not sonilo whoami: whoami exits 0 even when signed out, so it cannot tell the two states apart.
  3. Neither — stop and run the setup-api-key skill. Do not call api.sonilo.com with curl to work around it; both transports handle uploads, polling and retries that a bare request does not.

Quick Start

MCP tool call (recommended)

get_sfx_task(task_id="a1b2c3d4-...")

The tool has two names. The local sonilo-mcp server calls it get_sfx_task; the hosted OAuth server (the sonilo-claude-plugin path) calls it get_generation_task(task_id). Same job, same arguments — call whichever one the connected server actually exposes rather than assuming, since only one of the two exists in any given session.

Python (pip install sonilo)

from sonilo import Sonilo

client = Sonilo()  # reads SONILO_API_KEY

status = client.tasks.get("a1b2c3d4-...")   # single check, never raises on failure
result = client.tasks.wait("a1b2c3d4-...")  # polls until terminal; raises TaskFailedError/TaskTimeoutError
result.save("recovered.wav")

tasks.get/tasks.wait default to parsing an SFX-shaped result. For a task from dubbing, video_to_sound/video_to_video_sound, analyze_video, or async video_to_music, pass the matching parser explicitly (from sonilo.resources.tasks import parse_music_result, parse_sound_result, parse_dubbing_result, parse_video_analysis_result) — see sonilo-python's README for the exact call shape per task type.

JavaScript / TypeScript (npm install sonilo)

import { SoniloClient } from "sonilo";

const client = new SoniloClient(); // reads SONILO_API_KEY

const status = await client.tasks.get("a1b2c3d4-...");   // single check
const result = await client.tasks.wait("a1b2c3d4-...", { pollInterval: 2000, timeout: 600_000 });

Same caveat as Python: pass the task's actual result type as wait<T>()'s generic (e.g. wait<MusicTaskResult>(...)) for a non-SFX task — see sonilo-js's README.

CLI (npm install -g sonilo-cli or pip install sonilo-cli)

sonilo tasks get a1b2c3d4-...

# npm's sonilo-cli: --poll-interval/--timeout are milliseconds
sonilo tasks wait a1b2c3d4-... --poll-interval 2000 --timeout 120000

# pip's sonilo-cli: the same flags are seconds
sonilo tasks wait a1b2c3d4-... --poll-interval 2 --timeout 600

The two sonilo-cli packages (npm and pip) aren't the same codebase — double-check which one is installed before assuming a flag's units.

cURL (raw REST API, no MCP host)

curl "https://api.sonilo.com/v1/tasks/a1b2c3d4-..." \
  -H "Authorization: Bearer $SONILO_API_KEY"

The MCP tool does one status check and, if status is terminal, downloads and saves the resulting file(s) for you — it does not poll in a loop.

Tool

Tool Description
get_sfx_task(task_id, output_directory?) Check a task; if it succeeded, download and save its result file(s).

Behavior by Status

Status What happens
processing Returns a "still processing, try again later" message. No file saved. Call again after a short wait.
succeeded Downloads and saves the result — audio for text_to_sfx/video_to_sfx; a single .wav or .mp4 for audio_ducking; a single .mp4 for video_to_video_music/video_to_video_sfx/video_to_video_sound; a single .wav for video_to_sound; one .mp4 per language for dubbing, plus one .srt beside each when the call asked for re-timed subtitles (export_srt) — a language whose export was blocked still gets its video and is reported as a note, never a failure; one .srt per language for proofread, always including the detected source language, followed by that language and the source script's cue count; for a video_to_music(preserve_speech=true) task, the music stream(s) plus the vocals stem plus the mux. An analyze_video task is the exception: it has no file at all, so the creative brief comes back inline as JSON and nothing is written to disk.
failed Raises an error including the backend's error code/message and whether the charge was refunded — check this before telling the user they've been billed for nothing.
task id not found (404) The id is wrong/typo'd, or belongs to a purely streaming call (text_to_music in its default streaming form — no wav, no variants_num above 1, no stems — or video_to_music without preserve_speech/ducking/stems/output_format="wav") — those have no task at all and can't be recovered this way. Nothing to retry.
any other status (not processing/succeeded/failed) Raised as an "unexpected task status" error naming the task id. Treat as transient — this is a backend state this tool doesn't otherwise special-case — and call get_sfx_task(task_id) again shortly.

Workflow Tips

  • Safe to call repeatedly. If a result was already downloaded to disk, a later call reports "Already downloaded" instead of re-fetching a duplicate copy — you won't accumulate -1/-2 suffixed files from checking twice.
  • Don't confuse this with get_account_services/get_usage (the account skill) — this tool is about recovering one specific generation's output, not account-level info.
  • If a failed task shows refunded: false, point the user at get_usage to reconcile billing, and note the charge stands.
  • output_directory defaults to SONILO_MCP_BASE_PATH, same as every generation tool — pass the same directory you'd have used for the original call if you want the recovered file alongside other output.

Error Handling

A transient failure while checking (e.g. backend 5xx) does not mean the result is lost — re-run get_sfx_task(task_id) shortly after. A 401/402 here means the check failed (key rotated, account suspended) — the task itself was already charged and its result is still on the backend; resolve the auth/billing issue, then call get_sfx_task again.

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 直接解决用户在 Sonilo 生成任务超时或被中断后恢复结果的核心痛点
  • 避免重复计费和重复生成,显著提升用户体验和效率
  • 适用于多种 Sonilo 异步生成任务,覆盖面广
触发精准90/100

亮点

  • 触发词精准完整,覆盖多种变体,边界清晰
  • description 明确列出了适用的任务类型和场景
  • 提供了清晰的何时使用指南
结构规范85/100

亮点

  • Phase/步骤清晰,有出口条件,含端到端示例
  • frontmatter完整,单文件≤500行
  • 文档结构良好,有详细的步骤、示例和错误处理说明
执行可靠90/100

亮点

  • 工具来源明确,参数正确,覆盖主要异常
  • 不可逆操作有确认机制
  • 详细说明了不同状态下的行为和错误处理,包括重试机制和计费说明
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

  • 保存或修改文件

    先确认输出目录和同名文件是否会被覆盖;重要文件保留备份,优先写入新的输出目录。

    主文档提及 · 第 49 行
  • 安装或获取外部依赖

    使用官方来源并锁定版本,在隔离环境检查安装脚本。当前文档检查不覆盖后续下载的代码。

    主文档提及 · 第 40, 54, 67 行
  • 账号、密钥或授权

    使用专用、最小权限账号,不把密钥粘贴到公开内容或命令日志;核对接收数据的服务与租户。

    主文档提及 · 第 5, 13, 23, 24, 35 行
文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • api.sonilo.com
  • github.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。