串流 JSON 讓外部程式續用同一段對話
你要讓外部程式連續把多筆問題交給 Antigravity 時,現在可在 print mode(把回答直接印出的模式)加上 --input-format stream-json。它會從 stdin(程式接收輸入的管道)讀取每行一筆 JSON 提示,每則訊息在同一段對話跑一回合。驅動程式可以讓這段工作階段一直開著,不必每筆都另起對話。
發布日期:2026-08-19
你要讓外部程式連續把多筆問題交給 Antigravity 時,現在可在 print mode(把回答直接印出的模式)加上 --input-format stream-json。它會從 stdin(程式接收輸入的管道)讀取每行一筆 JSON 提示,每則訊息在同一段對話跑一回合。驅動程式可以讓這段工作階段一直開著,不必每筆都另起對話。
替代理安排規則時,可以在 Markdown agent frontmatter(檔案開頭的欄位區)直接加 rules:,列出要套用的規則檔。被這樣點名的規則一定會套用,不必再承接整棵 rule tree。外掛也能在最上層放 rules.json,宣告它隨附的規則檔,方式與既有 skill 宣告一致。
代理正在跑工具時,轉圈那行現在會說出正在跑哪個 tool call(代理請工具執行的動作)。快速接連呼叫工具的空檔,它也不再閃回通用標籤。
這讓你能看懂代理此刻在忙什麼,而非只盯著一個轉圈符號。看著這行時,也不用猜它是否真的仍在處理工作,更加方便判讀。
有些主機會用 LD_PRELOAD(啟動前指定要載入程式庫的環境變數)。它會先載入自己的記憶體配置元件(allocator,決定程式如何取得記憶體)。CLI(在終端機裡操作的工具)以前會在介面出現前就中止,例如 Cloud TPU VM images。現在這類主機不會在啟動時把 CLI 擋在門外。
登入資料從系統 keyring(保存登入憑證的地方)還原時,個人帳號不再在啟動就撞上資源耗盡錯誤,後續重複的帳號檢查也減少。CLI 重新啟動後,計費專案與它選定的授權級別也會保留,不需因為重開工具再重新選擇,這些選擇會一起保留。
企業使用者若透過 Application Default Credentials(應用程式預設憑證)登入,現在不會再看到錯誤的「Out of credits」訊息。這一項修正處理的正是這個誤報。
登入時曾看見這個提示的企業使用者,現在不會再看到錯誤的「Out of credits」訊息。
終端機高度不夠顯示全部模型時,/model 選擇器不再把模型或自己的標頭截掉,清單可以捲動。模型名稱含非 ASCII 字元時,欄位也改按顯示格數計寬度,不再按位元組數量算錯位置。
你能看完整清單,也較容易讀對每列資訊,不必猜被截掉的模型或欄位內容。
回覆以串流方式一段段送出時,非 ASCII 字元以前可能被毀成替代字元。互動式畫面與 --output-format stream-json 的文字增量都受影響。現在兩處都會保留原來的字元,不會把讀到一半的文字換成看不懂的符號,內容可照原樣讀下去。
對話產生的檔案若放在 artifact directory 的子資料夾,例如 scratch/,以前不會出現在 artifact list(產物清單)。artifact directory 是對話產物的存放處。現在這些子資料夾裡的產物也會被列出。
這讓放進 scratch/ 的檔案能和其他對話產物一起找到。
讀取 .wav 音檔時,原本可能因不支援的媒體類型而失敗。現在會先正規化非標準的 MIME type(檔案內容類型標記),例如 audio/wave,再交給模型處理。
因此 .wav 不會只因標記寫法不同就被當成不支援的媒體,不會在中途被擋下。
When an external program needs to send Antigravity a run of prompts, print mode can now take --input-format stream-json. It reads one newline-delimited JSON prompt from stdin for each turn in one conversation. A driver can keep that session open instead of starting a new conversation for every message.
When setting rules for an agent, add rules: to its Markdown frontmatter and name rule files directly. A rule named there always applies, without inheriting whole rule tree. A plugin can also put rules.json at top level to declare rule files it ships, as it already declares skills.
While agent runs tool, spinner line now names current tool call. It also no longer flickers back to generic label in gaps between quick tool calls.
You can see what agent is doing instead of only watching spinner.
Some hosts use LD_PRELOAD to load own allocator before program starts. CLI used to abort before interface appeared on those hosts, including Cloud TPU VM images. CLI now starts on these hosts.
When saved credentials return from system keyring, personal accounts no longer hit resource-exhausted error at startup and repeated account checks are cut. After CLI restarts, billing project and license tier it selects also stay put.
Enterprise users signed in through Application Default Credentials no longer see spurious "Out of credits" message. This update fixes that false alert.
Enterprise users who saw this message no longer see spurious "Out of credits" message.
If terminal is too short to show every model, /model picker now scrolls instead of cutting off models or own header. For model names beyond plain ASCII, columns measure display cells rather than bytes and stay aligned.
You can read whole list and each row more clearly.
When reply arrives as stream, non-ASCII characters used to become replacement characters. Both interactive display and text deltas from --output-format stream-json were affected. They now preserve original characters instead of changing text midstream into unreadable symbols.
A file written under subdirectory of conversation artifact directory, such as scratch/, used to miss artifact list. Artifact directory stores conversation artifacts. Those artifacts now appear in list too.
Files in scratch/ can be found with other conversation artifacts.
Reading .wav file could fail as unsupported media type. It now normalizes non-canonical MIME types such as audio/wave before they reach model.
A .wav is not rejected only because type label uses different form.
Added `--input-format stream-json` to print mode, which reads newline-delimited JSON prompts from stdin and runs one turn per message in a single conversation, so a driver can keep a session open.Added a `rules:` key to markdown agent frontmatter, so an agent can name rule files directly instead of inheriting your whole rule tree; a rule named this way always applies.
Added plugin support for a top-level `rules.json`, so a plugin can declare the rule files it ships the same way it already declares its skills.Added a more specific hint on the spinner line, which now names the tool call the agent is currently running.
Fixed the spinner line flickering to a generic label between quick tool calls.Fixed the CLI aborting at startup on hosts that preload their own allocator through `LD_PRELOAD`, such as Cloud TPU VM images, where it died before the interface appeared.Fixed personal accounts hitting a resource-exhausted error at startup when saved credentials were restored from the system keyring, and cut the repeated account checks that followed.
Fixed your billing project, and the license tier it selects, being lost when the CLI restarted and restored saved credentials from the system keyring.Fixed a spurious "Out of credits" message for enterprise users signed in through Application Default Credentials.Fixed the `/model` picker cutting off models, and its own header, on terminals too short to show every model; the list now scrolls.
Fixed the `/model` picker misaligning its columns for model names that are not plain ASCII, by measuring column widths in display cells rather than bytes.Fixed streamed text corrupting non-ASCII characters into replacement characters, in both the interactive display and `--output-format stream-json` text deltas.Fixed artifacts written into a subdirectory of a conversation's artifact directory, such as `scratch/`, never appearing in the artifact list.Fixed reading a `.wav` file failing as an unsupported media type, by normalizing non-canonical MIME types such as `audio/wave` before they reach the model.