Muse Code 1.4.16
新功能 10 項
編輯器可透過預設開啟的 muse acp 直接呼叫 Muse
平常在編輯器裡想直接叫出代理幫忙,還得先手動開啟介面往往多了一道工。現在 muse acp 改為預設開啟,像是 Zed 這類支援 Agent Client Protocol(讓編輯器與代理溝通的標準協定)的編輯器,都能直接把 Muse 當作代理來運作。當你打開 Zed 準備修改手邊的筆記或程式時,不用再另外開啟開關就能立即指派 Muse 執行任務,不過這組介面目前仍屬實驗性質,後續版本可能會再調整。⟦就像新買的設備出廠就已插好通用規格的轉接頭,以前得自己接線打開開關才能配對,現在只要編輯器支援同一套插座就能直接連上。⟧
官方原文
muse acp is on by default, so editors that support the Agent Client Protocol (like Zed) can run Muse as their agent; the surface is experimental and may change in a later release
支援以 prompt.surfaces 與空白設定關閉開發者提示詞
對話剛起步時若想關掉一部分預設提示,過去較難照個別需要一一拿掉。在全域或專案設定裡加入 prompt.surfaces(可附帶選用的 default 預設值),或是透過工作階段設定覆寫,就能依 ID 關閉指定的開發者提示詞區塊。目前有五個受保護的區塊會繼續維持開啟,如果設定裡填了不認識的 ID,啟動時會跳過並顯示通知,而由工作階段直接送出未知 ID 則會遭到拒絕。當你想在特定專注寫作的工作階段完全退出 Muse 內建的開發者脈絡,只要在工作階段設定中把 developerPrompt 設為 null 或空字串即可。⟦跟點餐時勾選客製化選項一樣,以前固定配料會整盤端上桌,現在能按編號拿掉不要的區塊,或乾脆整份不加預設底料。⟧
官方原文
A prompt.surfaces setting turns developer-prompt blocks off by id (with an optional default) in global or project settings, and per session through session settings overrides; the five protected blocks stay on for now, and an unknown id is skipped with a startup notice (refused when a session sends it)
Setting developerPrompt to a null or empty value in a session config now opts that session out of Muse's own developer context
重開終端機工作階段可保存並套用新版開發者指令
中斷對話後想改掉背景規範再接著聊,以前重開工作階段往往還是沿用舊指令。現在每次工作階段啟動時都會先記錄開發者指令,只要你在設定裡修改 run.developer_prompt,再於終端機透過 --resume、--continue 或 tbh exec --session-id 重開工作階段,Muse 就會存下新版內容並從下一輪開始套用。對於由這一版建立或更新過開發者指令的工作階段,若某次執行正處於第一步,遠端的傳送、開啟、列表或輪詢操作可能會等到該步驟的檢查點完成,但絕不會超過呼叫本身的期限。其他既有工作階段則不受影響,不過現在新建立的工作階段無法用關閉此功能的舊版本開啟。⟦就像登機前先在櫃檯建檔規範,修改後重辦登機便會換上新版,起飛第一步完成前遠端查詢會稍等檢查紀錄,只是舊版閘門還讀不懂新檔案。⟧
官方原文
Muse now records each session's developer instructions when it starts. When you reopen a session in the terminal (--resume, --continue or tbh exec --session-id) after changing run.developer_prompt in your settings, Muse saves the new text and uses it from the next turn. On a session whose developer instructions were set by this release's start or update, a remote send, open, list or poll made while a run is in its first step can wait until that step's checkpoint, never past the call's own deadline; other sessions see no change. Sessions created now cannot be opened by an older build that has this off
精簡長工作階段大量子代理的存檔與記憶體佔用
接手跑了很久、中途派過不少子代理分頭做事的對話時,以前重開畫面常覺得越跑越沉,甚至等半天才看到回覆。⟦彷彿爬山途中把已經吃完的乾糧包裝收進回收袋輕裝上路,過去空盒子全都繼續背在肩上越走越沉,現在只留沿途還用得上的補給。⟧
啟動大量子代理的長工作階段不會再突然停止儲存檢查點:只要某個子代理已經結束、主代理也已讀過它的結果(例如等待它完成),就算沒人手動關閉,只要對話不再提及它就會自動從存檔的工作階段中移除。
重開長工作階段時佔用的記憶體變少了,因為保留在記憶體裡的每筆工具任務紀錄體積都更小。
重開包含長串子代理歷史的工作階段後,畫面顯示回覆的延遲也獲得縮減。
重開帶有許多已完成子代理的工作階段時,首次讀取每個子代理會耗用更少記憶體並減少處理工時,因為已完成子代理的工具歷史不再被複製進追蹤子代理嘗試次數的紀錄簿裡。
官方原文
Long sessions that start many subagents no longer stop saving checkpoints: a subagent that finished and whose result the main agent already read, for example by waiting for it, now drops out of the saved session once the conversation no longer mentions it, even if nobody closed it
Resuming a long session uses less memory, because each tool-task record kept in memory is smaller
Reduce reply display delays after resuming sessions with long subagent histories
Resuming a session with many finished subagents uses less memory and does less work when it first reads each of them, because a finished subagent's tool history is no longer copied into the bookkeeping that tracks subagent attempts
工作階段協定為用戶端補齊狀態、錯誤與回執欄位
開發自己的操作介面時,若想即時掌握背景執行進度或失敗原因,這套通訊規範(session protocol)現在提供更明確的訊號。
父工作階段在同伺服器開啟時,讀取子代理 session/read 會帶 modelTurnRunning,標明是否仍在跑模型回合。
TurnErrorKind 新增兩個不可重試類型:reasoningReplayRefused 為換模型後無法接續,contextOverflow 為超出脈絡視窗,既有比對會由預設分支接住。
開啟 Bash 標題時,殼層指令 toolCall 會帶安全顯示的短 bashTitle,免解析模型原文即可標記。
主體完成回執會以專屬歷史列送達,逾時、被插話轉向或被壓縮的工具主體都能保住結果與展開狀態。
官方原文
session/read of a subagent session now carries modelTurnRunning, which says whether the subagent is still running a model turn, when its parent session is open on the same server
TurnErrorKind gains reasoningReplayRefused (a chat that cannot continue after a model switch) and contextOverflow (a turn that cannot fit the model's context window), both not retryable, so session-protocol clients can tell these two failures apart; existing matches receive them in their catch-all arm
A session protocol toolCall item of a shell command now carries a short, display-safe title for the command (bashTitle) while Bash titles are on, so a client can label the row without parsing the model's raw text
Body-completion receipts now reach session-protocol clients as dedicated history rows, so a timed-out, steered, or compacted-away tool body keeps its result and expansion state on the client instead of dropping them
TypeScript SDK 支援傳入模擬主機函式進行測試
撰寫整合 TypeScript SDK 的工具時,如果測試流程一定得啟動真實的 muse 程序,在本機驗證時會綁手綁腳。⟦彷彿飛行員在地面用模擬駕駛艙練習起降流程,不必每次驗證儀表都把真飛機開上跑道。⟧現在 MuseClient.spawn 與 spawnMspConnection 都接受 spawnFn 選項,讓你能直接對記憶體內的模擬主機跑完交握與工作階段。當你準備測試用戶端與工具之間的連線流程時,只要透過 spawnFn 接入假主機,就能在記憶體中直接跑完整套工作階段互動,不必真的啟動 muse 程序。
官方原文
TypeScript SDK: MuseClient.spawn and spawnMspConnection accept a spawnFn option, so you can run the handshake and sessions against an in-memory fake host instead of a real muse process
特定主機工作階段可依管理政策於啟動時調整沙盒與網路
如果用戶端需要讓工作階段在更寬鬆的環境下運行,這項權限現在能在連線之初提出申請。由 muse serve --per-session 或 muse attach --stdio 啟動的主機上,只要用戶端選擇啟用實驗性 API,工作階段就能在 session/start 時關閉沙盒(隔離執行的安全環境)或開啟網路,前提是不能超出管理政策允許的範圍。在團隊允許連網存取特定資源的情境下,用戶端便能在啟動階段直接完成這項調整。⟦試想進大樓實驗室申請開放外網與解除隔離區,就算手上拿著專案的實驗通行證,能開關的幅度依然受到管理規章限制。⟧
官方原文
A session on a host that muse serve --per-session or muse attach --stdio starts can turn its sandbox off or open its network at session/start, within what managed policy allows, when its client opts into the experimental API
當機或啟動中斷後可正常重開並列出取消呼叫
萬一工作階段在啟動途中被中斷,或程式突然當機,重新接續時最怕既進不去也搞不清楚剛剛卡在哪。現在啟動期間遭到中斷的工作階段,重新開啟時會恢復正常進入,不再直接失敗。當機後重新接續工作階段時,畫面會顯示一則通知,列出當機當時被取消的呼叫;如果現場有印出異常結束通知,這份清單會併入其中,沒有異常結束通知時則會單獨以警告方式出現。⟦好比停電復電後重啟作業台,開機時不再因為上次沒啟動完就卡死,螢幕還會印出一張紙條列出斷電當下被迫取消的通話。⟧
官方原文
Resuming a session after a crash now shows one notice listing the calls the crash cancelled, joined to the abnormal-exit notice when one prints, or on its own as a warning when it does not
Sessions interrupted during startup now reopen normally instead of failing
執行 /goal resume 可直接顯示答案不必重開對話
用目標功能整理專案重點、等著看指令的答案時,若還得重新打開原本的對話才能看到結果,手上的工作就多了一道操作。使用 /goal resume 後,現在能直接看到該指令的答案,不必重新開啟對話。⟦好比在服務櫃檯等答覆,以前得重新推門進接待室才能聽到回答,現在站在櫃檯就能直接聽見;不必為了得到這句答覆,再把剛才離開的房門打開一次。⟧
官方原文
Show answers from /goal resume without reopening the conversation
訊息核准預覽完整保留比較運算子與底線
準備核准代理送出的訊息前,螢幕上的預覽畫面是你確認文字有沒有出錯的唯一依據。如果待送出的內容裡包含比較運算子(例如用來判斷大小的 < 或 > 符號)或是像 user_name 這樣帶有底線的字詞,現在的訊息核准預覽都會原樣保留這些符號與底線。⟦假想印刷廠送印前給你一張校對樣張,過去某些大於小於記號和底線常在樣張上漏印,現在每個符號都安安穩穩印在紙面上供你逐字確認。⟧
官方原文
Message approval previews preserve comparison operators and underscores
修正 13 項
工作階段語言鎖定改依使用者訊息於首段輸出宣告
專案夾雜大量英文程式碼或名詞時,你可能擔心對話回覆被裡頭的字詞帶偏語言。⟦好比飯店櫃檯直接聽住客本人說什麼語言就用那種語言回應,而不是看護照夾裡的英文備註或行李標籤亂猜,從第一句問候就說對語言,住客還沒開口前則先用英文招呼。⟧在符合條件的主執行流程中,Muse 現在會從第一段可見輸出就明確宣告你的工作階段語言釘選(鎖定這段對話該使用的回覆語言)。這個語言設定會固定依據你在該工作階段發送的訊息推算出來,不會再從名稱、程式碼或工具輸出推斷語言。當你輸入的內容還沒有明顯語言訊號時,則會採用英文作為預設語言。
官方原文
Muse now states your session language pin on eligible main runs from the first visible output, deriving the pin deterministically from your own messages in the session (English when your input carries no language signal yet) instead of inferring a language from names, code, or tool output
動手修改前核對更嚴謹並於受阻時先停下詢問
把專案交給代理查問題或修程式,最怕它太快下結論說找不到檔案,或自己繞過限制硬闖。⟦宛如老練的水電師傅進屋檢修,找不到管線先換幾個角落巡一遍、確認哪一戶報修、照原況重試一次再動扳手,碰到社區禁令或斷水閥門就停下來問屋主,絕不擅自繞道。⟧現在 Muse 動手前會把每一步核對得更仔細:宣告東西不存在前,會先試別種拼法與更寬的路徑;著手修復前,會先確認回報指向哪一份程式碼複本,並在原本出錯的環境設定下重跑具名的失敗測試。查案時也會讀取版本庫自己的歷史紀錄與上游分支。若變動受到版本庫規則禁止或管制,或是網路政策擋住某個步驟,它都會停下來詢問你,不再自己繞道處理。
官方原文
Muse checks its work more carefully: it tries other spellings and wider paths before saying something does not exist, finds which copy of the code a report is about before fixing it, reruns named failing tests in the setup they failed in, asks before a change a repository rule forbids or gates, reads the repository's own history and upstream branch, and stops to ask when a network policy blocks a step instead of routing around it
產出結果若落在別處直接補進指定位置
有時請代理產出內容,它卻把結果做在你最初指定以外的地方,還得你多點一次確認才肯搬過來。現在就算 Muse 把成果建在別的畫面、分頁、頁面或檔案裡,它也不會停下來問你要不要移過去,而是繼續完成並直接加進你當初要求的位置。當你在寫報告或整理筆記,指定要把段落補進某份檔案時,不用再多回一句「好,幫我放進去」就能直接看到結果到位。⟦猶如請人把整理好的資料放進指定抽屜,以前做完留在餐桌上還要問一聲要不要搬,現在會直接放進你說的抽屜才收工。⟧
官方原文
Muse keeps working when it built a result somewhere other than the screen, tab, page, or file you named, and adds it where you asked instead of offering to
長工作階段接近容量上限時改要簡短回覆
同一段對話聊久了、貼入的資料一多,最掃興的就是準備收尾時突然被一句超出容量擋在半路。⟦恰似裝行李快到登機箱極限時,工作人員不再直接拒收整箱物件,而是改請你挑最精簡的幾件塞進剩餘空間。⟧過去長工作階段只要輸入內容加上請求的輸出長度超過模型的脈絡視窗(模型單次能同時處理的文字容量),就會跳出錯誤並強制停下。現在當脈絡視窗快滿時,Muse 會主動請模型改給較簡短的回覆,讓工作階段繼續進行而不致中斷。
官方原文
A long session no longer stops with an error that its input plus the requested output exceeds the model's context window: when the window is nearly full, Muse asks the model for a shorter reply instead
含大量截圖的工作階段壓縮後最多保留約八張近期原圖
除錯或做設計時常在對話裡貼進一張張螢幕截圖,以前這類工作階段一旦執行壓縮,很容易直接跳過存檔,導致後面想接續對話無從接起。現在壓縮近期回合含大量完整尺寸圖片(例如截圖)的工作階段時,多數情況都能順利存下檢查點,讓你從該處繼續接續工作階段。壓縮後的脈絡會原封不動保留最近最多約八張完整尺寸的圖片;較早的圖片會改為摘要;若單批超過八張,該整批也會改為摘要。⟦如同整理旅行相簿,以前塞滿高畫質相片就整本卡住封存不了,現在可留下部分近期原片,把舊相片改寫成摘要;單批超過八張則整批摘要歸檔。⟧
官方原文
Compacting a session whose recent turns hold many full-size images, such as screenshots, now saves its checkpoint in most cases instead of skipping it, so the session can resume from that point; the compacted context keeps up to about eight recent full-size images as they are; older images, and a single batch of more than eight, are summarized
工作階段壓縮後分支或重開保留目標與背景復原
工作階段經過壓縮後,無論是從中開出新分支還是重新打開接續,過去都容易在交接處出錯。⟦想像把長篇筆記精簡裝訂成精華冊,以前拆成新副本或重翻頁面時總會掉頁失聯,現在關鍵的索引與行程紀錄都穩穩留在冊子裡。⟧
在 muse serve 中針對已壓縮的工作階段分支對話(包括從它啟動的子代理),即使後續回合的指令只留在壓縮檢查點裡,現在也不再因為被判成格式錯誤的工作階段日誌而失敗。
設有目標的工作階段重新開啟後再進行分支時,就算該工作階段曾經在某個回合進行到一半時執行壓縮,現在也能順利分支而不報錯。
把工作階段壓縮並重新開啟之後,原本在背後運行的背景代理復原能力現在也能完整保留下來。
官方原文
On a muse serve session that has compacted, forking the conversation, including a subagent that starts from it, no longer fails as a malformed session log when a later turn's instructions are kept only by the compaction checkpoint
Preserve background agent recovery after compacting and reopening a session
Forking a resumed session that has a goal no longer fails when the session compacted in the middle of a turn
補齊工作流程取消拒絕原因與暫停重開狀態
操作工作流程遇到取消被拒、暫停或重開接續時,以前往往摸不清失敗原因或弄丟額度設定。
當 muse serve 拒絕取消某個工作流程時,錯誤訊息裡新增的 stopRefusal 欄位會直接寫出確切的拒絕原因,例如 stale_revision。
如果取消工作流程的動作遇上工作階段儲存錯誤,muse serve 現在會附帶原因正式拒絕,不再直接回傳內部錯誤。
重新接續同一個 Workflow 時,使用者設定的 token(AI 處理與計費的文字單位)上限會原封不動保留下來。
暫停工作流程時,還沒跑完的背景工作不會再被誤報成遺失結果。過去在取消遇錯時只見內部錯誤、暫停時被報遺失結果,現在每種狀況都有清楚交代與保留。
官方原文
A workflow cancel that muse serve refuses now names the exact stop refusal in the error's new stopRefusal field, for example stale_revision
A workflow cancel that hits a session storage error is now refused with a reason by muse serve instead of failing with an internal error
Resuming the same Workflow preserves the user's token limit
Pausing a workflow no longer reports unfinished background work as a missing result
修正忙碌時的訊息排隊、收回與中斷重送行為
代理正在忙著處理任務時,你送出的新指令、插話或停止訊號以前常卡在交接空檔裡。⟦拿客滿時段的咖啡廳吧台來說,點單慢一點確認也不會把點單紙退回客人手裡,真要抽單而吧台塞滿時會等一下再請你重試,喊停時服務生也會再喊一聲確保停下。⟧
當代理忙碌時送出或排隊的訊息,若代理確認較慢,不會再跳出「steer failed」並退回輸入框,而是會維持在排隊狀態並順利送達一次。
用來中斷子代理的訊息,在替代的子代理啟動後,就會停止顯示為排隊中。
在 muse serve 裡,若某個卡住的工作階段指令佇列已滿,你想收回排隊中的訊息時,不會一直等到工作階段復原,改成在 30 秒後回傳可重試的忙碌錯誤。
按下停止(Stop)時,如果主機回報正在忙碌,Stop 會再次送出中斷訊號,讓執行中的回合真正停下來,不會繼續往下跑。
官方原文
In muse serve, taking back a queued message on a stuck session whose command queue is full now fails after 30 seconds with a busy error you can retry, instead of waiting until the session recovers
Messages that interrupt a subagent stop showing as queued when its replacement starts
Stop sends its interrupt again when the host says it is busy, so the running turn stops instead of running on
A message sent or queued while the agent is busy no longer shows "steer failed" and comes back to the input box when the agent is slow to confirm it; it stays queued and is delivered once
muse serve 支援符號連結工作區以載入自訂代理
不少人習慣把專案資料夾放在別顆硬碟,再用捷徑掛進工作目錄,以前在 muse serve 裡這條捷徑卻會直接把工作階段擋在門外。現在只要受信任的工作區路徑是指向資料夾的符號連結(symlink,指向另一個位置的捷徑檔),muse serve 啟動工作階段時就能正常載入該專案的自訂代理,不會再跳出「source root is a symlink」的失敗錯誤。⟦就像把門市入口設在轉角的連通道,過去警衛看到招牌後面是通道就拒收貨件,現在只要確認屬於信任範圍,照樣放行店內的專屬團隊進駐。⟧
官方原文
A muse serve session whose trusted workspace path is a symlink to a folder now starts with the project's custom agents instead of failing with "source root is a symlink"
工作階段使用外掛期間重裝不再因權限差異失敗
外掛正被某個工作階段使用中卻想重新安裝,過去常因為執行環境不同而直接碰壁。⟦恰似更換大樓電梯的保養零件,若只因早晚班技師設定的檢查權限略有不同,不會當場停用退件,而是先讓正在搭乘的這一趟安全運行,等乘客全數離開後下次保養再換新。⟧現在如果兩次安裝只是因為執行時的 umask(決定新檔案預設權限的環境遮罩)不同,例如一次從背景服務安裝、一次從終端機安裝,造成外掛頂層資料夾權限有差異,重裝時就不會再失敗。使用中的外掛複本會暫時保留不動,等那些工作階段都結束後,在下一次安裝時才會替換。
官方原文
Reinstalling a plugin while a session is using it no longer fails when the only difference is the permissions of the plugin's top folder, which can differ when installs run under different umasks (for example one from a background service and one from a terminal); the copy in use is left alone and replaced at the next install after those sessions end
回合存檔曾失敗時的日誌寫入降級提示不再遺失
執行回合的半途若曾發生存檔失敗,結尾原本該顯示的警告提示過去在幾種情況下會悄悄不見。現在回合結束時的「session log flush degraded」提示不會再遺失。無論是回合稍早存檔失敗後中途由檢查點把工作階段日誌寫出,或是存檔失敗後該回合接著送出影片、結算了一筆跨重啟等待的工具核准,這則警示都會在回合結束時照常留下。⟦跟帳房在每日結算對帳一樣,只要當天曾有過寫帳失敗,不管中途有無補登或後來又附了影像與隔夜簽呈,結帳時依舊會把警示便條留在頁尾。⟧
官方原文
The "session log flush degraded" note at the end of a turn no longer goes missing when a checkpoint flushed the session log after a save had failed earlier in the turn
The "session log flush degraded" note at the end of a turn no longer goes missing when a save failed earlier in the turn and the turn then sent a video or settled a tool approval that waited across a restart
非 UTF-8 路徑下的工作階段索引不再卡死關機
把工作階段資料夾放在含有非 UTF-8 字元的路徑底下時,以前一關掉程式就容易陷入停不下來的僵局。⟦猶如車用導航遇到認不得的亂碼路名時,不斷在原地重新計算路線而遲遲無法熄火停車,現在碰到這種奇怪路徑不再無止境重算。⟧當 sessions 資料夾位於不是有效 UTF-8(一種常見的電腦文字編碼標準)的路徑底下時,工作階段索引過去會反覆不斷地重寫自己,連帶讓整個程式卡在關機步驟。這項錯誤已經修好,現在工作階段索引不會再無止境重寫並卡死關機流程。
官方原文
Session index no longer rewrites itself forever and hangs shutdown when the sessions folder is under a path that is not valid UTF-8
終端機程式狀態在背景回合完成後正確回到閒置
自家回合曾執行失敗後,就算後續的背景排程已經順利跑完,終端機的狀態燈號以前還是會卡在舊錯誤上。在支援顯示程式狀態(OSC 7501,終端機用來接收程式狀態訊號的控制規格)的終端機裡,現在當你原本的回合失敗、之後有排程或其他背景回合完成時,狀態會正常回到閒置,不會在每次背景回合結束後又把那個舊錯誤重秀一遍。⟦若把終端機狀態燈比作洗衣機面板上的提示燈,以前上一次脫水故障亮過紅燈後,之後每次背景自動烘衣結束都會再亮一次舊故障燈,現在背景程序完成便會乖乖切回待機狀態。⟧
官方原文
Terminals that show program status (OSC 7501) now return to idle when a scheduled or other background turn completes after one of your turns failed, instead of showing that old error again after every background turn