跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
金融

senpi-strategy-ops

Deploy / monitor / close a NAMED Senpi trading strategy. Use when the user names a strategy to run — "install spider", "deploy polar", "set up kodiak", "run the spider strategy", "is my strategy live?", "what am I running", "list my strategies" (→ status.py), "are my positions protected? / do they have a stop-loss (DSL)?", "stop/close/uninstall polar" — and for teardown like "close all strategies", "return funds to main", "tear everything down" (→ close.py --all). ALWAYS tear down via close.py, never a raw strategy_close (that strands the runtime). ops deploys / closes / monitors; it does NOT author or edit strategy files — an edit ("make my live strategy more aggressive", change leverage/sizing/DSL) is authored in senpi-strategy-author, the only skill that knows the scanner / yaml / DSL schema. A strategy is a PACKAGE (strategy.yaml + one runtime.yaml per instance + scanners/) the runtime supervises in-process — no scanner daemon. `deploy.py create <id> --budget <usd>` takes a package

Senpi-ai · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add Senpi-ai/senpi-skills --skill senpi-strategy-ops

技能说明


name: senpi-strategy-ops description: >- Deploy / monitor / close a NAMED Senpi trading strategy. Use when the user names a strategy to run — "install spider", "deploy polar", "set up kodiak", "run the spider strategy", "is my strategy live?", "what am I running", "list my strategies" (→ status.py), "are my positions protected? / do they have a stop-loss (DSL)?", "stop/close/uninstall polar" — and for teardown like "close all strategies", "return funds to main", "tear everything down" (→ close.py --all). ALWAYS tear down via close.py, never a raw strategy_close (that strands the runtime). ops deploys / closes / monitors; it does NOT author or edit strategy files — an edit ("make my live strategy more aggressive", change leverage/sizing/DSL) is authored in senpi-strategy-author, the only skill that knows the scanner / yaml / DSL schema. A strategy is a PACKAGE (strategy.yaml + one runtime.yaml per instance + scanners/) the runtime supervises in-process — no scanner daemon. deploy.py create <id> --budget <usd> takes a package live end to end (it gates the package, then runs the runtime's detached deploy job; watch with senpi deploy status); close.py tears down (stop runtime + strategy_close → flattens positions, returns funds). The id (spider, polar, kodiak) is the package folder. NOT for choosing WHICH strategy (senpi-strategy-discover) or authoring / editing the strategy files themselves (senpi-strategy-author). license: Apache-2.0 metadata: author: Senpi version: "3.6.24" platform: senpi exchange: hyperliquid requires: - senpi-trading-runtime

Senpi Strategy Ops — deploy, monitor, close

A strategy is a package: strategy.yaml (the deploy manifest) + one runtime.yaml per instance + <instance>/scanners/. The runtime spawns and supervises each scanners/scan.py, calling scan(inputs, ctx) every interval_seconds and owning everything downstream — signal validation, sizing/execution, the two-phase DSL exit, risk guard-rails. There is no separate scanner daemon, no push_signal. Ops owns the deployed lifecycle. Deploy is one verb, run as a detached job: funds preflight → wallet create+fund → runtime install → one observed scanner tick. It returns in ~1s and you poll until it is terminal.

openclaw senpi validate <recipe-dir>                                    # 0a. does it RUN? records the proof create needs
python3 senpi-strategy-ops/scripts/deploy.py validate <id>              # 0b. preflight — structurally deploy-ready? (no money, nothing installed; a bare id is fetched to disk)
python3 senpi-strategy-ops/scripts/deploy.py create <id> --budget <usd> # 1. THE FUNDED PATH: validates, then starts the deploy
openclaw senpi deploy status                                            # 2. poll until terminal; read the verified report
python3 senpi-strategy-ops/scripts/status.py                            # what am I running? (+ health)
python3 senpi-strategy-ops/scripts/close.py <id> | --all                # teardown one strategy | EVERY open strategy

Fund through deploy.py create|runtime <id>, not through the bare verb. Both resolve the package, run the structural preflight, then start the runtime's senpi deploy job, poll it, and relay its report verbatim. The wrapper's value is resolution, that structural pass and the verbatim relay — not a gate the verb lacks: the live-universe gate is the verb's own and it fires pre-money. Use the bare verb for the read-only openclaw senpi deploy status, and whenever resolution is not needed. Always tear down through close.py (one <id> or --all) — it deletes the runtime and closes the strategy. A raw strategy_close MCP call closes the strategy but leaves the runtime registered, which collides on the next deploy. Pass the strategy id for a CATALOG strategy (what senpi-strategy-discover hands over, e.g. spider), fetched from the remote if not on disk; for a locally-authored package, pass its DIRECTORY path. Either way the package belongs in the durable strategies root (SENPI_STRATEGIES_DIR if set, else the agent workspace strategies/ dir — normally /data/workspace/strategies) and never inside a skill directory: a package written there is destroyed on the next skill update. An on-disk package is authoritative; an invalid one surfaces its real errors and is never silently replaced by a remote fetch. Mechanics + state machine: references/lifecycle.md · manifest schema: references/strategy-yaml-schema.md.

Deploy — one lifecycle: start the verb, poll status until terminal

status is the gate, not a suggestion. A strategy is LIVE only when the deploy report's overall is live — every instance created + installed + a verified scanner tick observed. installed-unobserved means the tick was NOT seen inside the wait window — not failure and not success; say exactly that. Never report "live" off a started job, a running phase, or an install alone.

Step 0 — resolve which strategy. The user's word ("spider") is a strategy id. Confirm it exists against the registry (curl -s https://raw.githubusercontent.com/Senpi-ai/senpi-skills/refs/heads/main/strategies/catalog.json); no match → hand to senpi-strategy-discover.

Step 0.5 — preflight (required). deploy.py validate <id> reports every structural + render issue in one pass, with no money moved and nothing installed — a bare catalog id is fetched to disk, which is also how it resolves that id to a package directory. It also reports the live universe, the gate the deploy verb enforces pre-money, so validate is the cheap early read of it, not the thing holding it. That read is a network call (market_list_instruments) needing SENPI_AUTH_TOKEN, and it can take a few seconds.

Preflight is two questions, two commands. `

阅读完整来源 ↗