From fb7fc4d8dfe9483177d8f02919903b1fa2274a24 Mon Sep 17 00:00:00 2001 From: August Lilleaas Date: Wed, 18 Nov 2026 12:24:44 +0100 Subject: [PATCH 1/2] fix(provider-muse): restore Auto review for Muse threads Restore Muse Auto support using its native :auto-review profile while retaining promptUnmatched and sandbox enforcement. Cover start, resume, and advertised runtime modes, and update permission guidance. Based on pingdotgg/t3code#23232. Co-authored-by: Victor Vogel Co-authored-by: Claude Opus 5.5 --- docs/user/permission-modes.md | 9 +-- docs/user/providers-muse.md | 7 +- .../provider-muse/src/server/adapter.test.ts | 73 ++++++++++--------- packages/provider-muse/src/server/sdk.ts | 5 +- .../provider-muse/src/server/status.test.ts | 1 + packages/provider-muse/src/server/status.ts | 4 +- 6 files changed, 52 insertions(+), 47 deletions(-) diff --git a/docs/user/permission-modes.md b/docs/user/permission-modes.md index 796e3f316122d..de06e461f9905 100644 --- a/docs/user/permission-modes.md +++ b/docs/user/permission-modes.md @@ -27,12 +27,11 @@ the parent conversation with the subagent's name, so you can respond without swi ## Provider differences Providers enforce permissions differently. Some read-only actions can proceed in **Supervised**. -**Auto** uses automatic review on Codex, Claude, Cursor, Grok, and fx; providers without an equivalent, -including OpenCode and Antigravity, fall back to asking. On Grok, commands its review blocks come -to you for approval. On fx, prompts it still sends also come to you. +**Auto** uses automatic review on Codex, Claude, Cursor, Grok, Muse Code, and fx; providers without an +equivalent, including OpenCode and Antigravity, fall back to asking. On Grok, commands its review +blocks come to you for approval. On fx, prompts it still sends also come to you. -Muse Code offers only **Supervised** and **Full access**. A Muse thread already set to another mode -runs in **Supervised**. +Muse Code offers no **Auto-accept edits**. A Muse thread already set to it runs in **Supervised**. T3 Code offers no **Auto-accept edits** or **Full access** for fx. An fx thread already set to either runs in **Supervised**. diff --git a/docs/user/providers-muse.md b/docs/user/providers-muse.md index df506e678bcc1..b25ec46aa8a8b 100644 --- a/docs/user/providers-muse.md +++ b/docs/user/providers-muse.md @@ -45,9 +45,10 @@ can use under **Custom models** in the instance settings. ## Permissions and limitations -Muse offers two [permission modes](./permission-modes.md): **Supervised** asks -before commands and edits, and **Full access** runs them without asking. Muse has -no equivalent of **Auto-accept edits** or **Auto**, so they are not offered. +Muse offers three [permission modes](./permission-modes.md): **Supervised** asks +before commands and edits, **Auto** lets Muse's own auto-review decide eligible +actions, and **Full access** runs them without asking. Muse has no equivalent of +**Auto-accept edits**, so it is not offered. Muse can use T3 Code's tools. If Muse cannot reach them, the turn continues without them. Switching providers can pass conversation context as a handoff. diff --git a/packages/provider-muse/src/server/adapter.test.ts b/packages/provider-muse/src/server/adapter.test.ts index 76b46715c6020..fc78f2a78a1f0 100644 --- a/packages/provider-muse/src/server/adapter.test.ts +++ b/packages/provider-muse/src/server/adapter.test.ts @@ -420,6 +420,7 @@ describe("MuseAdapterV2", () => { Effect.gen(function* () { for (const [runtimeMode, profile, approvalMode] of [ ["approval-required", ":ask-me", "promptUnmatched"], + ["auto", ":auto-review", "promptUnmatched"], ["full-access", ":unrestricted", "allowAll"], ] as const) { const policy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({ @@ -1347,41 +1348,43 @@ describe("MuseAdapterV2", () => { }).pipe(Effect.scoped, Effect.provide(testLayer)), ); - it.effect("keeps a workflow child's approval pending for the user past the turn's end", () => - Effect.gen(function* () { - const fake = yield* makeFakeMuse(); - const policy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({ - ...runtimePolicy, - runtimeMode: "approval-required", - }); - const harness = yield* makeHarness( - fake, - INSTANCE_ID, - undefined, - undefined, - undefined, - policy, - ); - const { nativeId } = yield* startConversation(harness, fake); - const childApproval = { ...approval("child-run-1"), subagentOrigin: { subagentId: "a7" } }; - yield* fake.emit("approval/requested", childApproval); - const asked = yield* harness.takeEvent("runtime_request.updated"); - assert.isNull(asked.runtimeRequest.providerTurnId); - yield* fake.emit("turn/completed", { turnId: nativeId, terminal: "completed" }); - yield* harness.takeEvent("turn.terminal"); - assert.isFalse( - harness.allEvents.some( - (event) => - event.type === "runtime_request.updated" && event.runtimeRequest.status !== "pending", - ), - ); - yield* harness.runtime.respondToRuntimeRequest({ - requestId: asked.runtimeRequest.id, - decision: "decline", - }); - const decision = yield* fake.takeCall("approval/decide"); - assert.strictEqual(decision.params.choiceId, "deny"); - }).pipe(Effect.scoped, Effect.provide(testLayer)), + it.effect.each([{ runtimeMode: "approval-required" }, { runtimeMode: "auto" }] as const)( + "keeps a workflow child's approval pending past the turn's end in $runtimeMode", + ({ runtimeMode }) => + Effect.gen(function* () { + const fake = yield* makeFakeMuse(); + const policy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({ + ...runtimePolicy, + runtimeMode, + }); + const harness = yield* makeHarness( + fake, + INSTANCE_ID, + undefined, + undefined, + undefined, + policy, + ); + const { nativeId } = yield* startConversation(harness, fake); + const childApproval = { ...approval("child-run-1"), subagentOrigin: { subagentId: "a7" } }; + yield* fake.emit("approval/requested", childApproval); + const asked = yield* harness.takeEvent("runtime_request.updated"); + assert.isNull(asked.runtimeRequest.providerTurnId); + yield* fake.emit("turn/completed", { turnId: nativeId, terminal: "completed" }); + yield* harness.takeEvent("turn.terminal"); + assert.isFalse( + harness.allEvents.some( + (event) => + event.type === "runtime_request.updated" && event.runtimeRequest.status !== "pending", + ), + ); + yield* harness.runtime.respondToRuntimeRequest({ + requestId: asked.runtimeRequest.id, + decision: "decline", + }); + const decision = yield* fake.takeCall("approval/decide"); + assert.strictEqual(decision.params.choiceId, "deny"); + }).pipe(Effect.scoped, Effect.provide(testLayer)), ); it.effect("validates structured answers and preserves selected labels with a custom note", () => diff --git a/packages/provider-muse/src/server/sdk.ts b/packages/provider-muse/src/server/sdk.ts index 6d6b4d5d51050..b960c8c28ad0a 100644 --- a/packages/provider-muse/src/server/sdk.ts +++ b/packages/provider-muse/src/server/sdk.ts @@ -137,9 +137,10 @@ export function museApprovalMode(runtimeMode: RuntimeMode) { return runtimeMode === "full-access" ? "allowAll" : "promptUnmatched"; } -// Select explicitly; Muse defaults may let an AI reviewer decide approvals. +// Select explicitly; Muse's default profile need not match the chosen runtime mode. export function musePermissionProfile(runtimeMode: RuntimeMode) { - return runtimeMode === "full-access" ? ":unrestricted" : ":ask-me"; + if (runtimeMode === "full-access") return ":unrestricted"; + return runtimeMode === "auto" ? ":auto-review" : ":ask-me"; } export function museServeArgs( diff --git a/packages/provider-muse/src/server/status.test.ts b/packages/provider-muse/src/server/status.test.ts index a5e51cf9369f1..6879a1919b7d3 100644 --- a/packages/provider-muse/src/server/status.test.ts +++ b/packages/provider-muse/src/server/status.test.ts @@ -100,6 +100,7 @@ it.layer(NodeServices.layer)("Muse status", (it) => { expect(snapshot.message).toBeUndefined(); expect(snapshot.slashCommands).toEqual([COMPACT_SLASH_COMMAND]); expect(snapshot.auth).toEqual({ status: "unknown" }); + expect(snapshot.supportedRuntimeModes).toEqual(["approval-required", "auto", "full-access"]); expect(snapshot.version).toBe("1.0.3-R2198.1"); expect(snapshot.models.map((model) => model.slug)).toEqual([ "muse-wonder-1.0", diff --git a/packages/provider-muse/src/server/status.ts b/packages/provider-muse/src/server/status.ts index 344ae1d1a684e..318e78c3327d9 100644 --- a/packages/provider-muse/src/server/status.ts +++ b/packages/provider-muse/src/server/status.ts @@ -31,8 +31,8 @@ const MUSE_PRESENTATION = { displayName: "Muse Code", showInteractionModeToggle: false, reportsContextWindow: true, - // Muse has no accept-edits mode; map only :ask-me and :unrestricted. - supportedRuntimeModes: ["approval-required", "full-access"], + // Muse has no accept-edits mode. + supportedRuntimeModes: ["approval-required", "auto", "full-access"], } as const; const FALLBACK_CAPABILITIES = museModelCapabilities(); From a6d1385ae06c7299dbc1ab9cb32f2d1f72ede2ba Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Wed, 18 Nov 2026 12:25:08 +0000 Subject: [PATCH 2/2] test(provider-muse): keep only the Auto profile regression case The parametrized workflow-child case and the status assertion on the supported-modes constant duplicated coverage the profile table already gives. Co-Authored-By: Claude Opus 5.5 --- .../provider-muse/src/server/adapter.test.ts | 72 +++++++++---------- .../provider-muse/src/server/status.test.ts | 1 - 2 files changed, 35 insertions(+), 38 deletions(-) diff --git a/packages/provider-muse/src/server/adapter.test.ts b/packages/provider-muse/src/server/adapter.test.ts index fc78f2a78a1f0..ea9b55e878694 100644 --- a/packages/provider-muse/src/server/adapter.test.ts +++ b/packages/provider-muse/src/server/adapter.test.ts @@ -1348,43 +1348,41 @@ describe("MuseAdapterV2", () => { }).pipe(Effect.scoped, Effect.provide(testLayer)), ); - it.effect.each([{ runtimeMode: "approval-required" }, { runtimeMode: "auto" }] as const)( - "keeps a workflow child's approval pending past the turn's end in $runtimeMode", - ({ runtimeMode }) => - Effect.gen(function* () { - const fake = yield* makeFakeMuse(); - const policy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({ - ...runtimePolicy, - runtimeMode, - }); - const harness = yield* makeHarness( - fake, - INSTANCE_ID, - undefined, - undefined, - undefined, - policy, - ); - const { nativeId } = yield* startConversation(harness, fake); - const childApproval = { ...approval("child-run-1"), subagentOrigin: { subagentId: "a7" } }; - yield* fake.emit("approval/requested", childApproval); - const asked = yield* harness.takeEvent("runtime_request.updated"); - assert.isNull(asked.runtimeRequest.providerTurnId); - yield* fake.emit("turn/completed", { turnId: nativeId, terminal: "completed" }); - yield* harness.takeEvent("turn.terminal"); - assert.isFalse( - harness.allEvents.some( - (event) => - event.type === "runtime_request.updated" && event.runtimeRequest.status !== "pending", - ), - ); - yield* harness.runtime.respondToRuntimeRequest({ - requestId: asked.runtimeRequest.id, - decision: "decline", - }); - const decision = yield* fake.takeCall("approval/decide"); - assert.strictEqual(decision.params.choiceId, "deny"); - }).pipe(Effect.scoped, Effect.provide(testLayer)), + it.effect("keeps a workflow child's approval pending for the user past the turn's end", () => + Effect.gen(function* () { + const fake = yield* makeFakeMuse(); + const policy = ProviderAdapter.ProviderAdapterV2RuntimePolicy.make({ + ...runtimePolicy, + runtimeMode: "approval-required", + }); + const harness = yield* makeHarness( + fake, + INSTANCE_ID, + undefined, + undefined, + undefined, + policy, + ); + const { nativeId } = yield* startConversation(harness, fake); + const childApproval = { ...approval("child-run-1"), subagentOrigin: { subagentId: "a7" } }; + yield* fake.emit("approval/requested", childApproval); + const asked = yield* harness.takeEvent("runtime_request.updated"); + assert.isNull(asked.runtimeRequest.providerTurnId); + yield* fake.emit("turn/completed", { turnId: nativeId, terminal: "completed" }); + yield* harness.takeEvent("turn.terminal"); + assert.isFalse( + harness.allEvents.some( + (event) => + event.type === "runtime_request.updated" && event.runtimeRequest.status !== "pending", + ), + ); + yield* harness.runtime.respondToRuntimeRequest({ + requestId: asked.runtimeRequest.id, + decision: "decline", + }); + const decision = yield* fake.takeCall("approval/decide"); + assert.strictEqual(decision.params.choiceId, "deny"); + }).pipe(Effect.scoped, Effect.provide(testLayer)), ); it.effect("validates structured answers and preserves selected labels with a custom note", () => diff --git a/packages/provider-muse/src/server/status.test.ts b/packages/provider-muse/src/server/status.test.ts index 6879a1919b7d3..a5e51cf9369f1 100644 --- a/packages/provider-muse/src/server/status.test.ts +++ b/packages/provider-muse/src/server/status.test.ts @@ -100,7 +100,6 @@ it.layer(NodeServices.layer)("Muse status", (it) => { expect(snapshot.message).toBeUndefined(); expect(snapshot.slashCommands).toEqual([COMPACT_SLASH_COMMAND]); expect(snapshot.auth).toEqual({ status: "unknown" }); - expect(snapshot.supportedRuntimeModes).toEqual(["approval-required", "auto", "full-access"]); expect(snapshot.version).toBe("1.0.3-R2198.1"); expect(snapshot.models.map((model) => model.slug)).toEqual([ "muse-wonder-1.0",