use-instavm
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUse InstaVM
使用InstaVM
InstaVM resource model
InstaVM资源模型
- Session is a short-lived execution sandbox.
- VM is a durable machine for longer-running work, SSH access, shares, or mounted volumes.
- Snapshot is a reusable machine image created from a VM or an OCI image.
- Share exposes a port from a session or VM.
- Volume is persistent storage mounted into a VM.
- Platform APIs include computer-use, audit, webhooks, API keys, and related control-plane features.
- Session是短期执行沙箱。
- VM是用于长期运行任务、SSH访问、共享或挂载卷的持久化机器。
- Snapshot是从VM或OCI镜像创建的可复用机器镜像。
- Share用于公开会话或VM的端口。
- Volume是挂载到VM中的持久化存储。
- Platform APIs包括计算机使用、审计、Webhooks、API密钥及相关控制平面功能。
Preflight
预检查
Before any mutation:
- For live deploy, host, create, update, snapshot, or delete requests, verify authentication first.
- If no API key or authenticated CLI path is available, stop and ask for credentials. Do not spend time generating deploy scripts, repo changes, or long offline setup unless the user explicitly asks for offline preparation.
- After auth is confirmed, probe the installed SDK surface before assuming helper names.
- If a native CLI exists later, prefer it only when it is clearly the shortest path.
instavm
Load for exact install, auth, and surface-probe steps.
references/setup.md在执行任何变更操作前:
- 对于实时部署、托管、创建、更新、快照或删除请求,首先验证身份认证。
- 如果没有可用的API密钥或已认证的CLI路径,请停止操作并请求凭据。除非用户明确要求离线准备,否则不要花费时间生成部署脚本、修改仓库或进行长时间的离线设置。
- 确认认证后,先探测已安装的SDK接口,再假设辅助工具的名称。
- 如果后续推出原生CLI,仅当它明显是最短路径时才优先使用。
instavm
加载获取确切的安装、认证和接口探测步骤。
references/setup.mdRouting
路由
Load only the reference you need. Two references are usually enough, even for multi-step tasks.
- : install, auth, choose session vs VM, create or delete compute.
references/setup.md - : host or deploy an app, including static sites, simple web apps, long-lived servers, shares, and deploy verification.
references/hosting.md - : run code, transfer files, snapshot, clone, or build from OCI.
references/compute.md - : connect to a machine or expose it to the network.
references/access.md - : persist or move data with volumes, checkpoints, and mounts.
references/storage.md - : advanced APIs and REST fallback.
references/platform.md - : prefer or inspect a future native CLI.
references/cli.md
仅加载所需的参考文档。即使是多步骤任务,通常两个参考文档就足够。
- :安装、认证、选择Session或VM、创建或删除计算资源。
references/setup.md - :托管或部署应用,包括静态站点、简单Web应用、长期运行的服务器、共享及部署验证。
references/hosting.md - :运行代码、传输文件、创建快照、克隆或从OCI镜像构建。
references/compute.md - :连接到机器或将其暴露到网络。
references/access.md - :通过卷、检查点和挂载来持久化或迁移数据。
references/storage.md - :高级API和REST降级方案。
references/platform.md - :优先使用或检查未来的原生CLI。
references/cli.md
Execution rules
执行规则
- Trust the live product surface over skill text: start with the installed SDK, actual CLI help if a CLI exists, and read-back state from the API after mutations.
- Detect capability before use. For SDK, inspect attributes or method signatures.
For CLI, use only if the binary exists. Fetch the latest OpenAPI or live docs only when capability is unclear, a field may be unsupported, or you need a REST fallback.
--help - Use a session for short-lived execution. Use a VM for SSH, shares, mounted volumes, or user-facing hosting.
- Keep egress narrow and shares private unless the user explicitly wants broader access.
- For live infrastructure requests, a quick repo inspection is fine, but do not do multi-minute offline scaffolding before auth is confirmed.
- After mutation, read the resource back. If a field is ignored or missing in the follow-up state, treat that capability as unsupported in the current environment.
- If the installed SDK lacks the needed helper, use raw HTTP only after checking the latest schema.
- 优先信任实时产品接口而非技能文本:从已安装的SDK开始,如果存在CLI则查看实际的CLI帮助,变更操作后从API读取返回状态。
- 使用前先检测功能。对于SDK,检查属性或方法签名;对于CLI,仅当二进制文件存在时使用。仅当功能不明确、字段可能不支持或需要REST降级方案时,才获取最新的OpenAPI或实时文档。
--help - 短期执行任务使用Session。SSH访问、共享、挂载卷或面向用户的托管使用VM。
- 除非用户明确要求更广泛的访问权限,否则保持出口规则严格、共享私有。
- 对于实时基础设施请求,快速检查仓库即可,但在确认认证前不要进行耗时数分钟的离线脚手架搭建。
- 变更操作后,读取资源的返回状态。如果后续状态中某个字段被忽略或缺失,则认为当前环境不支持该功能。
- 如果已安装的SDK缺少所需的辅助工具,在检查最新的Schema后再使用原始HTTP请求。
Composition patterns
组合模式
- Bootstrap a working VM: setup -> compute -> access
- Host a static site or small web app: setup -> hosting -> access
- Create a reusable base image: setup -> compute
- Create a persistent worker: setup -> storage -> access
- Handle an SDK gap: relevant operational reference -> platform
- Add future CLI support: cli -> relevant operational reference
- 引导可用VM:setup -> compute -> access
- 托管静态站点或小型Web应用:setup -> hosting -> access
- 创建可复用基础镜像:setup -> compute
- 创建持久化工作节点:setup -> storage -> access
- 处理SDK缺口:相关操作参考文档 -> platform
- 添加未来CLI支持:cli -> 相关操作参考文档
Response format
响应格式
For operational responses, return:
- What was done and where.
- The result: IDs, URLs, status, or key output.
- What to do next, or confirmation that the task is complete.
对于操作类响应,返回以下内容:
- 已执行的操作及操作位置。
- 结果:ID、URL、状态或关键输出。
- 下一步操作建议,或任务完成的确认信息。