gooseworks-ai/goose-skills / skills/video/media-proxy
media-proxy
UnverifiedShared helper that routes ALL paid media generation (FAL image/video, ElevenLabs music) through the GooseWorks proxies so every call is charged to your GooseWorks credits — never a provider SDK's default host. Host-swaps the FAL queue URLs, loads the agent token from the sandbox env (GW_MEDIA_PROXY_TOKEN) or ~/.gooseworks/credentials.json, and returns the result CDN URL. Every video-ad media capability imports this; templates never call a provider directly.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 15.2 KB |
| scripts/media_proxy.py | script | 56.8 KB |
| scripts/resume.py | script | 2.2 KB |
| skill.meta.json | config | 126 B |
| tests/smoke-test.md | markdown | 655 B |
| tests/test_call_query.py | script | 2.9 KB |
| tests/test_media_proxy_policy.py | script | 25.3 KB |
scripts/resume.py
View on GitHub#!/usr/bin/env python3
"""Re-attach to an already-submitted FAL job after a backend/proxy blip.
A FAL submit BILLS immediately; if the local backend (:5999) crashes mid-poll, the
render is still running on fal — you just lost the poller. media_proxy persists each
submit's request-id, so you can re-attach here instead of re-firing (which would
double-bill). This NEVER re-submits.
resume.py --list # pending (submitted, not-yet-finished) jobs
resume.py --request-id <id> # poll it to completion, print the result URL
resume.py --request-id <id> --out final.mp4 # ...and download the result
"""
import argparse
import json
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent))
from media_proxy import resume_fal, list_pending, download # noqa: E402
def _result_url(result):
if not isinstance(result, dict):
return None
if result.get("images"):
return result["images"][0].get("url")
if result.get("video"):
return (result["video"] or {}).get("url")
if result.get("videos"):
return result["videos"][0].get("url")
if result.get("audio"):
return (result["audio"] or {}).get("url")
return None
def main():
ap = argparse.ArgumentParser()
ap.add_argument("--list", action="store_true", help="show resumable pending jobs")
ap.add_argument("--request-id", help="the FAL request-id to re-attach to")
ap.add_argument("--out", help="download the result to this path")
ap.add_argument("--timeout", type=int, default=900)
a = ap.parse_args()
if a.list:
pend = list_pending()
if not pend:
print("no pending FAL jobs")
for j in pend:
print(f"{j['request_id']} {j['model_path']} (submitted ts={j.get('ts')})")
return 0
if not a.request_id:
sys.exit("pass --request-id <id> (or --list to see resumable jobs)")
result = resume_fal(a.request_id, timeout_s=a.timeout)
url = _result_url(result)
print(json.dumps({"request_id": a.request_id, "url": url}))
if a.out and url:
download(url, a.out)
print(f"downloaded -> {a.out}")
return 0
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |