diff --git a/src/lib/onboard/managed-workload/onboard-orchestration.test.ts b/src/lib/onboard/managed-workload/onboard-orchestration.test.ts index fa31c0cfaa6..55eb0e8b094 100644 --- a/src/lib/onboard/managed-workload/onboard-orchestration.test.ts +++ b/src/lib/onboard/managed-workload/onboard-orchestration.test.ts @@ -99,41 +99,57 @@ describe("managed workload onboard orchestration", () => { expect( shouldActivateStockManagedRuntime({ portableLifecycle: false, + hermesPortableLifecycle: false, agentName: "openclaw", }), ).toBe(true); expect( shouldActivateStockManagedRuntime({ portableLifecycle: false, + hermesPortableLifecycle: false, agentName: "hermes", }), ).toBe(true); expect( shouldActivateStockManagedRuntime({ portableLifecycle: false, + hermesPortableLifecycle: false, agentName: "langchain-deepagents-code", }), ).toBe(true); expect( shouldActivateStockManagedRuntime({ portableLifecycle: true, + hermesPortableLifecycle: false, agentName: "openclaw", }), ).toBe(false); expect( shouldActivateStockManagedRuntime({ portableLifecycle: false, + hermesPortableLifecycle: false, agentName: "nemocua", }), ).toBe(false); expect( shouldActivateStockManagedRuntime({ portableLifecycle: false, + hermesPortableLifecycle: false, agentName: "pi", }), ).toBe(false); }); + it("does not activate stock managed images for Hermes Portable (#9634)", () => { + expect( + shouldActivateStockManagedRuntime({ + portableLifecycle: false, + hermesPortableLifecycle: true, + agentName: "hermes", + }), + ).toBe(false); + }); + it("selects only the shipped Hermes Dockerfile fallback without profile or prebuild work", async () => { const expectedDockerfilePath = "/workspace/agents/hermes/Dockerfile"; const ensurePreparedProfile = vi.fn(() => null); diff --git a/src/lib/onboard/managed-workload/onboard-orchestration.ts b/src/lib/onboard/managed-workload/onboard-orchestration.ts index e7bb2ef47a5..bdf12aff70b 100644 --- a/src/lib/onboard/managed-workload/onboard-orchestration.ts +++ b/src/lib/onboard/managed-workload/onboard-orchestration.ts @@ -148,9 +148,14 @@ export interface ManagedWorkloadOnboardRuntime { export function shouldActivateStockManagedRuntime(input: { readonly portableLifecycle: boolean; + readonly hermesPortableLifecycle: boolean; readonly agentName: string; }): boolean { - return !input.portableLifecycle && isShippedManagedImageAgent(input.agentName); + return ( + !input.portableLifecycle && + !input.hermesPortableLifecycle && + isShippedManagedImageAgent(input.agentName) + ); } export function assertPortableManagedBootstrapNotSelected( diff --git a/src/lib/onboard/sandbox-create/orchestration.ts b/src/lib/onboard/sandbox-create/orchestration.ts index 432fe5c808f..ad5a1d9862a 100644 --- a/src/lib/onboard/sandbox-create/orchestration.ts +++ b/src/lib/onboard/sandbox-create/orchestration.ts @@ -406,6 +406,7 @@ export function createSandboxWithBaseImageResolution(runtime: SandboxCreateOrche tempManagedRuntime || managedWorkloadOnboard.shouldActivateStockManagedRuntime({ portableLifecycle: sandboxGpuCreateFlow.resolvePortableLifecycleMode(agent), + hermesPortableLifecycle: agentCreateInput.hermesPortableLifecycle, agentName: requestedAgentName, }), tempManagedRuntimeCatalog,