跳到正文
实时
Amp News·· 1 天前

Amp News 推出热插拔和临时 orbs 以提升灵活性与安全性

Hot-Swappable Orbs

要点速览

Amp 允许在运行中途切换 orbs 的大小或提供商,并设置 7 天不活动后自动删除 orbs 的文件系统,以增强灵活性和安全性。切换 orbs 时,Amp 会保存 Git 变更和智能体所需的文件,并在新 orbs 中恢复工作空间。闲置 orbs 在到期前 3 天会收到提示,可通过发送消息或自动化任务来保留 orbs,否则 7 天后将被删除。

正文

We're making orbs hot-swappable and temporary, for flexibility and security.

Hot-swappable means you can switch a thread to a different orb size or provider mid-flight, one of our biggest requests. Temporary means Amp deletes an orb's file system after 7 days of inactivity.

Either way, Amp saves your Git changes and the files the agent needs before deleting the old orb. On your next message, Amp starts a fresh orb and restores your saved workspace so the agent picks up right where it left off.

Your thread stays untouched across the timeline while its orb swaps underneath. 1. When you swap an orb or after 7 days of inactivity, Amp saves your Git changes and .amp/in/orb-backup/ into a saved workspace and deletes the old orb. 2. On your next message, Amp starts a new orb (such as a1.large or self-hosted) and restores your saved workspace into it.

Swapping an Orb

Need a bigger machine mid-flight, or want to move a thread between Amp and your own infrastructure? Open the thread's Orb menu and choose Change Orb…, or ask the agent to swap it for you.

The Change Orb dialog with Provider set to our-k8s-orbs (Self-hosted) and Size set to large (8 CPU, 16GB memory).

Your uncommitted Git changes and the files in .amp/in/orb-backup/ are restored into the new orb. Everything else (running servers, installed packages, and files outside your repository or ignored by git) is not kept. Read Swapping an Orb for the details.

Orb Cleanup

An orb holds a copy of your repository and the secrets your setup put on it. When a vulnerability hits, patching an old orb means booting it up on the vulnerable image first, and only 2% of orbs are woken after 7 days anyway. Cleaning up idle orbs means your threads always land on fresh, patched environments instead of aging disks.

Three days before an idle orb expires, the thread shows a notice above the message box. Send a message (or let a scheduled automation run) to keep the orb. After 7 days, Amp deletes it and restores your workspace on your next message, the same way as a swap.

The warning above the message box, opened. Its title is Orb expires in 2d 5h. Below, it says how long the orb has been inactive, that Git changes and the files in .amp/in/orb-backup are saved before deletion, and to send a message in the thread to prevent deletion.

Read When an Orb Is Deleted for the full details.

Self-Hosted Orbs

Self-hosted orbs are not cleaned up by default. To delete idle self-hosted orbs too, turn on Idle Orb Cleanup in your workspace or personal settings, and Amp will send your dispatch program a delete job for each idle orb.

The Idle Orb Cleanup setting of an orb provider, turned on and set to delete orbs after 7 days of inactivity

来源: Amp News · ampcode.com