deepsky-sustain

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Deepsky Sustain CLI

Deepsky Sustain CLI工具

Use
deepsky sustain
as an observe -> decide -> act toolset. Keep planning in the agent, not in the CLI.
deepsky sustain
作为一套「观察→决策→执行」的工具集使用。决策逻辑由Agent负责,而非CLI工具本身。

CLI Preflight

CLI 前置检查

Before using any sustain command:
  1. Check whether
    deepsky sustain
    is already available.
  2. If the command is missing or unusable, install the published CLI globally:
bash
npm install -g @superise/deepsky-cli
deepsky sustain --help
  1. If the install fails, report the exact npm error and stop instead of pretending the CLI is available.
Do not assume a local workspace checkout is already wired into
PATH
. The supported fallback is the published npm package.
使用任何监控命令之前:
  1. 检查
    deepsky sustain
    命令是否已可用。
  2. 如果命令缺失或无法使用,全局安装已发布的CLI工具:
bash
npm install -g @superise/deepsky-cli
deepsky sustain --help
  1. 如果安装失败,报告具体的npm错误并停止操作,不要假称CLI工具可用。
不要假设本地工作区的代码已加入
PATH
环境变量,推荐的备用方案是使用已发布的npm包。

Boundary

边界规则

  • Use only the sustain commands this package actually implements.
  • Do not assume legacy commands such as
    set-model
    or
    mcp-server
    exist.
  • The only sustain setup flow restored here is
    deepsky sustain setup openclaw
    .
  • OpenClaw provider bootstrap is separate: use
    deepsky setup openclaw
    when OpenClaw still needs the Deepsky provider, wallet prerequisite handling, or repository skill installation.
  • Prefer explicit sustain commands over ad hoc wallet transfers for recharge.
  • Report wallet-side auth dependencies clearly instead of inventing local workarounds.
  • 仅使用本包实际实现的监控命令。
  • 不要假设存在
    set-model
    mcp-server
    等旧版命令。
  • 此处仅恢复
    deepsky sustain setup openclaw
    这一个监控设置流程。
  • OpenClaw提供商的引导流程是独立的:当OpenClaw仍需Deepsky提供商、钱包前置条件处理或仓库skill安装时,使用
    deepsky setup openclaw
    命令。
  • 优先使用明确的监控命令进行充值,而非临时的钱包转账。
  • 清晰说明钱包端的授权依赖,不要自行设计本地解决方案。

Units And Money Semantics

单位与资金语义

Do not mix up account balance and recharge input units.
  • health-check.balance
    is the platform-side account balance. Treat it as the platform's USD-like balance or credits, not as CKB.
  • criticalBalance
    and
    lowBalance
    are thresholds on that platform-side balance, not on wallet CKB.
  • top-up <amount>
    always takes a CKB amount as input.
  • exchangeAmount
    from order creation or top-up results is the platform-side credited amount after exchange-rate conversion, not the requested CKB amount.
  • newBalance
    is again the platform-side balance after the credited amount is applied.
When reporting outcomes:
  • State the requested top-up amount in CKB.
  • State the credited or exchanged amount separately when
    exchangeAmount
    is available.
  • Do not describe
    exchangeAmount
    as "only X CKB arrived". It is not a CKB field.
  • If the wallet rejects or limits a transfer, quote the exact wallet error instead of inferring a hidden local limit.
不要混淆账户余额与充值输入的单位。
  • health-check.balance
    是平台端的账户余额,将其视为平台的类USD余额或信用额度,而非CKB。
  • criticalBalance
    lowBalance
    是该平台端余额的阈值,与钱包中的CKB无关。
  • top-up <amount>
    命令的输入始终是CKB金额。
  • 订单创建或充值结果中的
    exchangeAmount
    是经过汇率转换后,平台端到账的金额,而非请求的CKB金额。
  • newBalance
    是到账金额到账后,平台端的最新余额。
汇报结果时:
  • 说明请求的充值金额(CKB单位)。
  • 如果
    exchangeAmount
    可用,单独说明到账或转换后的金额。
  • 不要将
    exchangeAmount
    描述为“仅到账X CKB”,该字段的单位并非CKB。
  • 如果钱包拒绝或限制转账,直接引用钱包的具体错误信息,不要推断隐藏的本地限制。

Autonomous Delegation

自主委托处理

If the user says anything like:
  • "keep yourself alive"
  • "self-supervise"
  • "manage your own balance"
  • "watch your account"
  • "你自己维持余额"
  • "你自己监控并充值"
treat that as delegation of ongoing sustain responsibility.
When that happens, do not stop at explaining commands. Start acting:
  1. Run the CLI preflight first.
  2. Gather the current state with
    health-check
    ,
    forecast
    , and
    config show
    .
  3. Make an immediate decision based on balance, runway, and the user's risk tolerance.
  4. If balance is critical or runway is too short, choose a top-up amount and execute
    deepsky sustain top-up <amount>
    immediately.
  5. If ongoing supervision is wanted and the immediate risk is already handled, register recurring checks with
    deepsky sustain setup openclaw
    unless the user explicitly prefers app automation.
  6. Report what you decided and why.
The CLI does not do the planning for you. The agent remains responsible for observe -> decide -> act behavior.
当用户说出以下类似内容时:
  • "keep yourself alive"
  • "self-supervise"
  • "manage your own balance"
  • "watch your account"
  • "你自己维持余额"
  • "你自己监控并充值"
将其视为用户委托了持续监控的职责。
此时不要仅停留在解释命令,应立即采取行动:
  1. 首先执行CLI前置检查。
  2. 使用
    health-check
    forecast
    config show
    命令收集当前状态。
  3. 根据余额、运行时长和用户的风险承受能力立即做出决策。
  4. 如果余额处于临界状态或运行时长过短,选择合适的充值金额并立即执行
    deepsky sustain top-up <amount>
    命令。
  5. 如果需要持续监控且当前风险已处理,使用
    deepsky sustain setup openclaw
    注册定期检查,除非用户明确偏好应用自动化方案。
  6. 汇报你的决策及原因。
CLI工具不会替你做规划,Agent仍需负责「观察→决策→执行」的行为逻辑。

Natural Language Triggers

自然语言触发映射

Map intent to commands like this:
  • "Check your balance" ->
    deepsky sustain health-check --json
  • "How long can you keep running?" ->
    deepsky sustain forecast --json
  • "Show models" ->
    deepsky sustain list-models --json
  • "Show sustain settings" ->
    deepsky sustain config show
  • "Top up 3000 CKB" ->
    deepsky sustain top-up 3000
  • "Dry-run a recharge" ->
    deepsky sustain top-up <amount> --dry-run --json
  • "Retry failed top-up orders" ->
    deepsky sustain retry-orders --json
  • "Configure OpenClaw for Deepsky" ->
    deepsky setup openclaw
  • "Bootstrap OpenClaw provider" ->
    deepsky setup openclaw
  • "Set up recurring sustain checks" ->
    deepsky sustain setup openclaw
  • "Install sustain cron jobs" ->
    deepsky sustain setup openclaw
  • "Clean OpenClaw setup" ->
    deepsky clean openclaw
  • "Remove the Deepsky provider only" ->
    deepsky clean openclaw --provider-only
  • "Remove sustain cron jobs only" ->
    deepsky clean openclaw --jobs-only
  • "Clear your login" ->
    deepsky sustain logout
将用户意图映射为对应的命令:
  • "检查你的余额" ->
    deepsky sustain health-check --json
  • "你还能运行多久?" ->
    deepsky sustain forecast --json
  • "显示模型" ->
    deepsky sustain list-models --json
  • "显示监控设置" ->
    deepsky sustain config show
  • "充值3000 CKB" ->
    deepsky sustain top-up 3000
  • "模拟充值" ->
    deepsky sustain top-up <amount> --dry-run --json
  • "重试失败的充值订单" ->
    deepsky sustain retry-orders --json
  • "为Deepsky配置OpenClaw" ->
    deepsky setup openclaw
  • "引导OpenClaw提供商" ->
    deepsky setup openclaw
  • "设置定期监控检查" ->
    deepsky sustain setup openclaw
  • "安装监控定时任务" ->
    deepsky sustain setup openclaw
  • "清理OpenClaw设置" ->
    deepsky clean openclaw
  • "仅移除Deepsky提供商" ->
    deepsky clean openclaw --provider-only
  • "仅移除监控定时任务" ->
    deepsky clean openclaw --jobs-only
  • "清除登录状态" ->
    deepsky sustain logout

Observe

观察阶段

Start any survival task by gathering state:
bash
deepsky sustain --help
deepsky sustain health-check --json
deepsky sustain forecast --json
deepsky sustain list-models --json
deepsky sustain config show
Use
--json
whenever the result will drive a follow-up decision.
任何存活任务都从收集状态开始:
bash
deepsky sustain --help
deepsky sustain health-check --json
deepsky sustain forecast --json
deepsky sustain list-models --json
deepsky sustain config show
当结果将用于后续决策时,使用
--json
参数。

Act

执行阶段

Use these commands to change state:
bash
deepsky setup openclaw
deepsky setup openclaw --defaults
deepsky setup openclaw --api-key <key>
deepsky sustain top-up <amount>
deepsky sustain top-up <amount> --json
deepsky sustain retry-orders --json
deepsky sustain setup openclaw
deepsky sustain setup openclaw --json
deepsky sustain setup openclaw --tick-every 20m --retry-every 10m --session isolated
deepsky clean openclaw
deepsky clean openclaw --provider-only
deepsky clean openclaw --jobs-only
deepsky sustain config set <key> <value>
deepsky sustain config unset <key>
deepsky sustain config reset
deepsky sustain logout
Follow these rules:
  • Use
    deepsky setup openclaw
    when the user needs the Deepsky OpenClaw provider configured before sustain automation can work.
  • That top-level setup now treats the wallet as a prerequisite: with the default local wallet MCP URL it auto-installs or auto-starts the SupeRISE Agent Wallet before configuring OpenClaw.
  • For non-default wallet MCP URLs,
    deepsky setup openclaw
    expects the configured wallet health endpoint to already be reachable and fails early when it is not.
  • deepsky setup openclaw --defaults
    runs non-interactively with defaults, keeps the current primary model unchanged, and reminds the user to switch the OpenClaw primary model to Deepsky manually.
  • Top-level setup also runs
    Install skills
    , which silently installs all skills from both
    https://github.com/appfi5/deepsky-tools.git
    and
    https://github.com/appfi5/superise-for-agent
    in global copy mode.
  • Choose a top-up amount based on the user's intent and current balance posture.
  • Let wallet-side policy enforce transfer limits. If the wallet rejects the amount, report the wallet error directly.
  • Use
    top-up
    for recharge because it creates the order, transfers CKB, and submits the tx hash as one flow.
  • If status is
    critical
    , do not stop after only installing recurring checks or retuning cadence. Handle the immediate top-up first, then schedule future reviews.
  • Use
    retry-orders
    when transfer likely succeeded but platform-side submission or finalization did not complete cleanly.
  • Use
    deepsky clean openclaw
    when the user wants to remove the Deepsky provider config, Deepsky sustain jobs, or both.
  • Use
    logout
    to clear stale local auth state.
  • Keep requested CKB, credited platform amount, and resulting balance separate in your reasoning and reporting.
使用以下命令修改状态:
bash
deepsky setup openclaw
deepsky setup openclaw --defaults
deepsky setup openclaw --api-key <key>
deepsky sustain top-up <amount>
deepsky sustain top-up <amount> --json
deepsky sustain retry-orders --json
deepsky sustain setup openclaw
deepsky sustain setup openclaw --json
deepsky sustain setup openclaw --tick-every 20m --retry-every 10m --session isolated
deepsky clean openclaw
deepsky clean openclaw --provider-only
deepsky clean openclaw --jobs-only
deepsky sustain config set <key> <value>
deepsky sustain config unset <key>
deepsky sustain config reset
deepsky sustain logout
遵循以下规则:
  • 当用户需要先配置Deepsky OpenClaw提供商才能启用监控自动化时,使用
    deepsky setup openclaw
    命令。
  • 该顶级设置命令现在将钱包视为前置条件:默认本地钱包MCP URL会在配置OpenClaw之前自动安装或启动SupeRISE Agent Wallet。
  • 对于非默认的钱包MCP URL,
    deepsky setup openclaw
    命令要求已配置的钱包健康端点可访问,否则会提前失败。
  • deepsky setup openclaw --defaults
    命令以非交互模式运行,使用默认设置,保持当前主模型不变,并提醒用户手动将OpenClaw主模型切换为Deepsky。
  • 顶级设置命令还会执行
    Install skills
    操作,以全局复制模式静默安装
    https://github.com/appfi5/deepsky-tools.git
    https://github.com/appfi5/superise-for-agent
    中的所有skill。
  • 根据用户的意图和当前余额状况选择充值金额。
  • 让钱包端的策略强制执行转账限制。如果钱包拒绝该金额,直接汇报钱包错误。
  • 使用
    top-up
    命令进行充值,因为它会将创建订单、转账CKB和提交交易哈希整合为一个流程。
  • 如果状态为
    critical
    ,不要仅停留在安装定期检查或调整频率,应先处理即时充值,再安排后续的检查。
  • 当转账可能已成功但平台端的提交或确认未完成时,使用
    retry-orders
    命令。
  • 当用户需要移除Deepsky提供商配置、Deepsky监控任务或同时移除两者时,使用
    deepsky clean openclaw
    命令。
  • 使用
    logout
    命令清除过期的本地授权状态。
  • 在推理和汇报过程中,将请求的CKB金额、平台到账金额和最终余额分开处理。

Survival Loop

存活循环

When the user delegates self-supervision:
  1. Run the CLI preflight.
  2. Run
    deepsky sustain health-check --json
    .
  3. Run
    deepsky sustain forecast --json
    .
  4. If balance is low but not critical, run
    deepsky sustain list-models --json
    when pricing context would help the preventive top-up decision.
  5. If balance is critical or runway is too short, choose an amount and run
    deepsky sustain top-up <amount>
    immediately.
  6. If the wallet rejects the amount, report the wallet-side limit or policy instead of inventing local rules.
  7. If OpenClaw is not yet configured for Deepsky, run
    deepsky setup openclaw
    first.
  8. If recurring supervision is expected, run
    deepsky sustain setup openclaw
    .
  9. If a recharge looked partial, run
    deepsky sustain retry-orders --json
    .
  10. Report the decision and the reason.
当用户委托自我监控职责时:
  1. 执行CLI前置检查。
  2. 运行
    deepsky sustain health-check --json
    命令。
  3. 运行
    deepsky sustain forecast --json
    命令。
  4. 如果余额较低但未达临界值,当定价信息有助于预防性充值决策时,运行
    deepsky sustain list-models --json
    命令。
  5. 如果余额处于临界状态或运行时长过短,选择合适的金额并立即执行
    deepsky sustain top-up <amount>
    命令。
  6. 如果钱包拒绝该金额,汇报钱包端的限制或策略,不要自行制定本地规则。
  7. 如果尚未为Deepsky配置OpenClaw,先运行
    deepsky setup openclaw
    命令。
  8. 如果需要持续监控,运行
    deepsky sustain setup openclaw
    命令。
  9. 如果充值看起来不完整,运行
    deepsky sustain retry-orders --json
    命令。
  10. 汇报决策及原因。

Threshold Strategy

阈值策略

Unless the user overrides policy, use the configured thresholds like this:
  • healthy
    : balance is above
    lowBalance
    . Stay quiet. Do not top up unless there is some unusual context the user explicitly cares about.
  • low
    : balance is at or below
    lowBalance
    but still above
    criticalBalance
    . Treat this as a preventive-action zone. Check forecast, inspect pricing context if useful, and usually decide for yourself whether a preventive top-up reduces interruption risk. Prefer self-handling over asking the user.
  • critical
    : balance is at or below
    criticalBalance
    . Treat this as immediate-action territory. Choose a top-up amount and execute it by default so the account recovers before work is interrupted.
Extra rules:
  • Compare thresholds against platform balance only, never against wallet CKB.
  • A recharge request is expressed in CKB, but the success criterion is whether account balance recovers after exchange-rate conversion.
  • If the wallet rejects the requested CKB amount, surface the wallet rejection exactly and adjust from there instead of inventing a local max.
  • If forecast shows the runway is too short, treat that as justification to act more aggressively even if the current status is only
    low
    .
  • Only interrupt the user when autonomy is blocked: wallet failures, platform failures, authentication failures, or manual-review situations.
除非用户覆盖策略,否则按以下方式使用配置的阈值:
  • healthy
    :余额高于
    lowBalance
    ,保持静默。除非用户明确关注某些特殊情况,否则无需充值。
  • low
    :余额等于或低于
    lowBalance
    但仍高于
    criticalBalance
    ,将其视为预防性操作区域。查看运行时长预测,如果有用则检查定价信息,通常自行决定是否进行预防性充值以降低中断风险,优先自行处理而非询问用户。
  • critical
    :余额等于或低于
    criticalBalance
    ,将其视为即时操作区域。默认情况下选择充值金额并执行,以便在工作中断前恢复账户余额。
额外规则:
  • 仅将阈值与平台余额比较,不要与钱包中的CKB比较。
  • 充值请求以CKB为单位,但成功的标准是汇率转换后账户余额是否恢复。
  • 如果钱包拒绝请求的CKB金额,直接显示钱包的拒绝信息并据此调整,不要自行设置本地最大值。
  • 如果预测显示运行时长过短,即使当前状态仅为
    low
    ,也应采取更积极的行动。
  • 仅当自主操作受阻时才打扰用户:钱包故障、平台故障、认证失败或需要人工审核的情况。

Sustain Config For Decisions

用于决策的监控配置

The agent should not invent hidden sustain policy. Inspect the configured thresholds first:
bash
deepsky sustain config show
deepsky sustain config get criticalBalance
deepsky sustain config get lowBalance
deepsky sustain config get requestTimeoutMs
If the user gives an explicit policy like "treat anything below 20 as critical", update config:
bash
deepsky sustain config set criticalBalance 20
deepsky sustain config set lowBalance 100
Do not invent local recharge bounds. Wallet-side policy is authoritative for transfer limits.
Agent不应自行制定隐藏的监控策略,应先检查已配置的阈值:
bash
deepsky sustain config show
deepsky sustain config get criticalBalance
deepsky sustain config get lowBalance
deepsky sustain config get requestTimeoutMs
如果用户给出明确策略,比如“将20以下视为临界值”,则更新配置:
bash
deepsky sustain config set criticalBalance 20
deepsky sustain config set lowBalance 100
不要自行制定本地充值上限,钱包端的策略是转账限制的权威依据。

How To Choose A Top-Up Amount

如何选择充值金额

The amount is still the agent's decision unless the user gave one explicitly.
Use:
  • current balance from
    deepsky sustain health-check --json
  • runway from
    deepsky sustain forecast --json
  • the user's current activity level and tolerance for interruption
  • any wallet-side limit or rejection message returned during recharge
Guidelines:
  • Do not always choose the smallest possible amount.
  • Prefer enough runway for the user's near-term usage.
  • If the user is actively relying on the agent, bias toward fewer future interruptions.
  • If the wallet rejects the amount, surface the exact rejection and adjust from there.
  • Remember that the top-up input is CKB while the target outcome is platform-side balance recovery after conversion.
  • When in doubt, choose the amount that reduces the chance of another near-term interruption rather than the amount that minimizes immediate spend.
除非用户明确指定,否则充值金额由Agent决定。
参考以下因素:
  • deepsky sustain health-check --json
    命令返回的当前余额
  • deepsky sustain forecast --json
    命令返回的运行时长
  • 用户当前的活动水平和对中断的容忍度
  • 充值过程中钱包返回的任何限制或拒绝信息
指导原则:
  • 不要总是选择最小金额。
  • 优先选择能覆盖用户近期使用需求的金额。
  • 如果用户正依赖Agent工作,应减少未来的中断次数。
  • 如果钱包拒绝该金额,直接显示确切的拒绝信息并据此调整。
  • 记住充值输入是CKB单位,而目标结果是转换后平台端余额的恢复。
  • 如有疑问,选择能减少近期中断风险的金额,而非最小化即时支出的金额。

Scheduled Runs

定时任务

When the user asks for recurring monitoring, automatic keepalive, or a timed sustain loop:
  • Prefer
    deepsky sustain setup openclaw
    for one-click recurring sustain setup when OpenClaw is available.
  • Before sustain scheduling, use
    deepsky setup openclaw
    if the Deepsky OpenClaw provider has not been configured yet.
  • The default sustain setup installs the keepalive review loop. It starts at
    20m
    , then retunes to
    2h
    when healthy,
    1h
    when low, and
    20m
    when critical.
  • The retry-orders loop is scheduled only when a top-up enters pending-retry state, and is removed once pending orders are cleared or escalated to manual review.
  • Use
    --tick-every
    for a different initial health-check cadence, and
    --retry-every
    or
    --session
    if the user asks for a different retry cadence or OpenClaw target when retry scheduling is needed.
  • Keep the scheduled loop focused on observe -> decide -> act, not on ad hoc wallet transfers.
  • Only rely on automatic
    top-up
    inside the scheduled loop when the user explicitly delegated autonomous recharge.
  • If OpenClaw is unavailable or the user explicitly wants app-managed scheduling, fall back to app automation instead.
Default OpenClaw setup:
bash
deepsky sustain setup openclaw
Customized OpenClaw setup:
bash
deepsky sustain setup openclaw --retry-every 30m --session isolated
If the user explicitly asks for
--session main
, still use
setup openclaw
, but remember that current OpenClaw requires main-session jobs to be registered as system events instead of announced chat turns.
当用户要求定期监控、自动存活维护或定时监控循环时:
  • 如果OpenClaw可用,优先使用
    deepsky sustain setup openclaw
    命令一键设置定期监控。
  • 在设置监控定时任务之前,如果Deepsky OpenClaw提供商尚未配置,先使用
    deepsky setup openclaw
    命令。
  • 默认的监控设置会安装存活检查循环,初始间隔为20分钟,当余额健康时调整为2小时,余额较低时调整为1小时,余额临界时调整为20分钟。
  • 仅当充值进入待重试状态时,才会安排
    retry-orders
    循环,待处理订单清除或升级为人工审核后,该循环会被移除。
  • 如果用户要求不同的重试频率或OpenClaw目标,在需要设置重试时使用
    --tick-every
    参数修改初始健康检查频率,使用
    --retry-every
    --session
    参数。
  • 定时循环应专注于「观察→决策→执行」,而非临时的钱包转账。
  • 仅当用户明确委托自主充值时,才在定时循环中使用自动
    top-up
    命令。
  • 如果OpenClaw不可用或用户明确希望使用应用管理的定时任务,则回退到应用自动化方案。
默认OpenClaw设置:
bash
deepsky sustain setup openclaw
自定义OpenClaw设置:
bash
deepsky sustain setup openclaw --retry-every 30m --session isolated
如果用户明确要求使用
--session main
,仍使用
setup openclaw
命令,但需注意当前OpenClaw要求主会话任务注册为系统事件,而非公开的对话回合。

Reporting Language

汇报语言

When you describe sustain work to the user:
  • Call it a sustain check or survival review.
  • Report the decision, balance, requested CKB amount, credited amount, and next action clearly.
  • Prefer concrete outcomes over internal deliberation.
  • Default to quiet success. Only send an update when you took a material action, hit an exception, or need human help.
向用户描述监控工作时:
  • 将其称为监控检查或存活状态审核。
  • 清晰汇报决策、余额、请求的CKB金额、到账金额和下一步行动。
  • 优先汇报具体结果,而非内部思考过程。
  • 默认情况下,成功完成操作时保持静默,仅在采取了重要行动、遇到异常或需要人工帮助时才发送更新。

Auth Assumption

授权假设

Login assumes one of these is true:
  • marketPublicKey
    is configured explicitly, or
  • wallet MCP exposes Nervos public identity through
    nervos.identity
    , including
    address
    and
    publicKey
If wallet MCP does not provide that contract yet, stop and report the wallet-side dependency.
登录需满足以下条件之一:
  • 已明确配置
    marketPublicKey
    ,或
  • 钱包MCP通过
    nervos.identity
    暴露Nervos公钥身份,包括
    address
    publicKey
如果钱包MCP尚未提供该合约,停止操作并汇报钱包端的依赖需求。