Loading...
Loading...
Compare original and translation side by side
Softlaunch notice: This skill targets the Mimiry softlaunch environment (). It is an early beta — APIs, pricing, and features may change without notice. Report issues to the Mimiry team.softlaunch.mimiry.com
软发布说明: 本技能适配Mimiry软发布环境 ()。这是早期测试版本,API、定价和功能可能会在未通知的情况下发生变动。如有问题请反馈给Mimiry团队。softlaunch.mimiry.com
scripts/~/.agents/skills/mimiry-softlaunch/~/.claude/skills/mimiry-softlaunch/SKILL_DIRscripts/~/.agents/skills/mimiry-softlaunch/~/.claude/skills/mimiry-softlaunch/SKILL_DIRDo you have an SSH key registered on your Mimiry account?
.pubssh-keygen -t ed25519 -f ~/.ssh/mimiry -C "mimiry-softlaunch"~/.ssh/mimiry.pubhttps://softlaunch.mimiry.comcurljqssh-keygenopenssl你是否已在Mimiry账户上注册了SSH密钥?
.pubssh-keygen -t ed25519 -f ~/.ssh/mimiry -C "mimiry-softlaunch"~/.ssh/mimiry.pubhttps://softlaunch.mimiry.comcurljqssh-keygenopensslsource SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path>source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path>
Tokens expire after 1 hour — re-authenticate if you get 401s.
**API base:** `https://softlaunch.mimiry.com`
**Compute prefix:** `/api/compute/v1`
> **CRITICAL — All commands MUST be wrapped in `bash -c`.**
> The Bash tool loads the user's shell profile, which can interfere with
> command execution. Always wrap the entire command in `bash -c '...'` to
> run in a clean, non-interactive shell.
>
> Shell state does not persist between Bash tool calls. Each call spawns a
> **new shell**. You MUST include `source` in every `bash -c` invocation.
> Never run `source` in one Bash call and use `$MIMIRY_API` / `$MIMIRY_TOKEN`
> in a separate one.
令牌有效期为1小时,如果返回401错误请重新验证。
**API根地址:** `https://softlaunch.mimiry.com`
**计算服务前缀:** `/api/compute/v1`
> **重要提示:所有命令必须包裹在`bash -c`中。**
> Bash工具会加载用户的shell配置文件,可能会干扰命令执行。请始终将完整命令包裹在`bash -c '...'`中,在干净的非交互式shell中运行。
>
> 不同Bash工具调用之间的shell状态不会持久化,每次调用都会生成一个**新的shell**。你必须在每次`bash -c`调用中都包含`source`命令,不要在一次Bash调用中运行`source`,然后在另一次调用中使用`$MIMIRY_API` / `$MIMIRY_TOKEN`。These commands are for the agent's own shell. Always include theline. Never copy these verbatim into user-facing output — the variables won't exist in the user's terminal. When printing commands for the user, follow the "After Session Creation" section.source
bash -csourcebash -c 'curl -s "https://softlaunch.mimiry.com/api/compute/v1/availability?gpu_types=T4,V100,A100" | jq .'gpu_typesbash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/balance" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/sessions" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/sessions/$SESSION_ID" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'runningbash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/sessions/$SESSION_ID/logs?tail=50" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq -r .logs'retry_after_secondsbash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s -X DELETE "${MIMIRY_API}/sessions/$SESSION_ID" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/quota" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/transactions" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'这些命令是供Agent内部shell使用的,始终需要包含行。请不要直接复制这些命令到面向用户的输出中,这些变量在用户的终端中不存在。为用户打印命令时,请参考「会话创建完成后」部分的说明。source
bash -csourcebash -c 'curl -s "https://softlaunch.mimiry.com/api/compute/v1/availability?gpu_types=T4,V100,A100" | jq .'gpu_typesbash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/balance" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/sessions" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/sessions/$SESSION_ID" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'runningbash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/sessions/$SESSION_ID/logs?tail=50" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq -r .logs'retry_after_secondsbash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s -X DELETE "${MIMIRY_API}/sessions/$SESSION_ID" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/quota" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && curl -s "${MIMIRY_API}/transactions" -H "Authorization: Bearer $MIMIRY_TOKEN" | jq .'AskUserQuestionAskUserQuestionnvcr.io/nvidia/pytorch:24.01-py3nvcr.io/nvidia/tensorflow:24.01-tf2-py3nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu22.04T4V100A100/availabilitytruefalsenvcr.io/nvidia/pytorch:24.01-py3nvcr.io/nvidia/tensorflow:24.01-tf2-py3nvcr.io/nvidia/cuda:12.3.1-devel-ubuntu22.04T4V100A100/availabilitytruefalseAgent-internal code — do not print this block to the user. All commands MUST be wrapped in.bash -c '...'
bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && PUB_KEY=$(cat "<ssh_key_path>.pub") && curl -s -X POST "${MIMIRY_API}/sessions" -H "Authorization: Bearer $MIMIRY_TOKEN" -H "Content-Type: application/json" -d '"'"'{"name": "<session_name>", "image": {"uri": "<image_uri>"}, "gpu": {"types": ["<gpu_type>"], "count": 1}, "ssh_enabled": true, "ssh_public_key": "'"'"'"'"'"'"'"'"'$PUB_KEY'"'"'"'"'"'"'"'"'", "command": "<command_or_null>", "auto_terminate": <true|false>}'"'"' | jq .'bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && PUB_KEY=$(cat "<ssh_key_path>.pub") && JSON=$(jq -n --arg name "<session_name>" --arg image "<image_uri>" --arg gpu "<gpu_type>" --arg key "$PUB_KEY" --arg cmd "<command>" '"'"'{name: $name, image: {uri: $image}, gpu: {types: [$gpu], count: 1}, ssh_enabled: true, ssh_public_key: $key, command: $cmd, auto_terminate: false}'"'"') && curl -s -X POST "${MIMIRY_API}/sessions" -H "Authorization: Bearer $MIMIRY_TOKEN" -H "Content-Type: application/json" -d "$JSON" | jq .'| Field | When | Value |
|---|---|---|
| User has a script to run | The command string |
| Interactive access | Omit entirely |
| Has a command | |
| Interactive / long-running | |
| Only terminate on success | |
| Always required | Contents of |
| User doesn't specify | |
| User needs env config | |
| Org billing | |
Agent内部代码——不要把这段代码打印给用户。所有命令必须包裹在中。bash -c '...'
bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && PUB_KEY=$(cat "<ssh_key_path>.pub") && curl -s -X POST "${MIMIRY_API}/sessions" -H "Authorization: Bearer $MIMIRY_TOKEN" -H "Content-Type: application/json" -d '"'"'{"name": "<session_name>", "image": {"uri": "<image_uri>"}, "gpu": {"types": ["<gpu_type>"], "count": 1}, "ssh_enabled": true, "ssh_public_key": "'"'"'"'"'"'"'"'"'$PUB_KEY'"'"'"'"'"'"'"'"'", "command": "<command_or_null>", "auto_terminate": <true|false>}'"'"' | jq .'bash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && PUB_KEY=$(cat "<ssh_key_path>.pub") && JSON=$(jq -n --arg name "<session_name>" --arg image "<image_uri>" --arg gpu "<gpu_type>" --arg key "$PUB_KEY" --arg cmd "<command>" '"'"'{name: $name, image: {uri: $image}, gpu: {types: [$gpu], count: 1}, ssh_enabled: true, ssh_public_key: $key, command: $cmd, auto_terminate: false}'"'"') && curl -s -X POST "${MIMIRY_API}/sessions" -H "Authorization: Bearer $MIMIRY_TOKEN" -H "Content-Type: application/json" -d "$JSON" | jq .'| 字段 | 场景 | 值 |
|---|---|---|
| 用户有要运行的脚本 | 命令字符串 |
| 交互式访问 | 完全省略该字段 |
| 有运行命令 | |
| 交互式/长期运行 | |
| 仅成功时终止 | |
| 始终必填 | |
| 用户未指定 | |
| 用户需要环境配置 | |
| 组织计费 | |
statesubmitted → provisioned → started → completed/failed/stopped → terminatedstatusprovisioningpulling_imagestarting_containerrunningstopping_containerterminatingPOST /sessions → state:submitted → state:provisioned → state:started → state:completed
status:provisioning status:pulling_image status:starting_container status:running ↓
state:terminated
DELETE /sessions/{id}
↓
state:stopped → state:terminated
On error at any stage → state:failed or state:provision_failedstartedbash -cbash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && while true; do RESP=$(curl -s "${MIMIRY_API}/sessions/$SESSION_ID" -H "Authorization: Bearer $MIMIRY_TOKEN"); STATE=$(echo "$RESP" | jq -r .state); STATUS=$(echo "$RESP" | jq -r .status); echo "State: $STATE | Status: $STATUS"; case "$STATE" in started) break ;; failed|provision_failed) echo "FAILED: $(echo $RESP | jq -r .error)"; break ;; completed|terminated|stopped) echo "Session ended unexpectedly"; break ;; esac; sleep 5; done'$RESPundefinedstatesubmitted → provisioned → started → completed/failed/stopped → terminatedstatusprovisioningpulling_imagestarting_containerrunningstopping_containerterminatingPOST /sessions → state:submitted → state:provisioned → state:started → state:completed
status:provisioning status:pulling_image status:starting_container status:running ↓
state:terminated
DELETE /sessions/{id}
↓
state:stopped → state:terminated
任何阶段出错 → state:failed 或 state:provision_failedstartedbash -cbash -c 'source SKILL_DIR/scripts/mimiry-auth.sh <ssh_key_path> && while true; do RESP=$(curl -s "${MIMIRY_API}/sessions/$SESSION_ID" -H "Authorization: Bearer $MIMIRY_TOKEN"); STATE=$(echo "$RESP" | jq -r .state); STATUS=$(echo "$RESP" | jq -r .status); echo "State: $STATE | Status: $STATUS"; case "$STATE" in started) break ;; failed|provision_failed) echo "FAILED: $(echo $RESP | jq -r .error)"; break ;; completed|terminated|stopped) echo "Session ended unexpectedly"; break ;; esac; sleep 5; done'$RESPundefined
> **Note:** SSH sessions connect through the ssh-proxy on port 22 (the
> default SSH port), which lands users directly inside their container.
> No special port or username is needed — just `ssh -i <key> <host>`.
---
> **注意:** SSH会话通过22端口的ssh-proxy连接(默认SSH端口),用户会直接进入自己的容器。不需要特殊端口或用户名,只需执行`ssh -i <key> <host>`即可。
---${MIMIRY_API}$MIMIRY_TOKENmirc${MIMIRY_API}$MIMIRY_TOKENmirc<session_id><key_path>undefined<session_id><key_path>undefined
The `--key` flag is only needed on the first command — the path is cached
for subsequent calls. If the user has already run a `mirc` command in this
terminal session, `--key` can be omitted entirely.
The helper script lives at:
`SKILL_DIR/scripts/mirc.sh`
If the user hasn't added it to their PATH, print the full path on first use.
For convenience, suggest:
```bash
alias mirc='SKILL_DIR/scripts/mirc.sh'
`--key`参数仅在第一个命令中需要,后续调用会缓存路径。如果用户已经在当前终端会话中运行过`mirc`命令,可以完全省略`--key`。
辅助脚本的路径为:`SKILL_DIR/scripts/mirc.sh`
如果用户没有将它添加到PATH中,第一次使用时打印完整路径。为了方便,可以建议:
```bash
alias mirc='SKILL_DIR/scripts/mirc.sh'undefinedundefined
Note: in raw commands, always use the fully resolved URL
(`https://softlaunch.mimiry.com/api/compute/v1/...`), never `${MIMIRY_API}`.
The only variable that's acceptable is `$MIMIRY_TOKEN` because the `source`
command on the line above defines it.
注意:在原生命令中,始终使用完全解析的URL(`https://softlaunch.mimiry.com/api/compute/v1/...`),不要使用`${MIMIRY_API}`。唯一可以接受的变量是`$MIMIRY_TOKEN`,因为上一行的`source`命令已经定义了它。mircsourcemircsource| Error | Meaning | Fix |
|---|---|---|
| Auth algorithm wrong | Ensure the bundled auth script is being used |
| Clock drift > 5 min | Sync system clock |
| Key not on account | Register key in Mimiry portal |
| No credits | Ask admin to add credits |
| No billing account | Ask admin to create one |
| VM booting | Retry after |
| Wrong session state for operation | Check session status |
| 错误 | 含义 | 解决方案 |
|---|---|---|
| 身份验证算法错误 | 确保使用了打包的身份验证脚本 |
| 时钟偏差超过5分钟 | 同步系统时钟 |
| 密钥未在账户中注册 | 在Mimiry门户注册密钥 |
| 额度不足 | 请管理员添加额度 |
| 没有计费账户 | 请管理员创建计费账户 |
| 虚拟机正在启动 | 等待 |
| 会话状态不支持当前操作 | 检查会话状态 |
bash -c '...'bash -cT4V100A100mircsource${MIMIRY_API}$MIMIRY_TOKENbash -c '...'bash -cT4V100A100mircsource${MIMIRY_API}$MIMIRY_TOKEN