diff --git a/src/agents/bash-tools.exec-runtime.test.ts b/src/agents/bash-tools.exec-runtime.test.ts index 4b55ebd161a..b3035970536 100644 --- a/src/agents/bash-tools.exec-runtime.test.ts +++ b/src/agents/bash-tools.exec-runtime.test.ts @@ -441,6 +441,7 @@ describe("emitExecSystemEvent", () => { to: "telegram:-100123:topic:47", threadId: 47, }, + trusted: false, }); expect(requestHeartbeatMock).toHaveBeenCalledWith( expect.objectContaining({ @@ -460,6 +461,7 @@ describe("emitExecSystemEvent", () => { expect(enqueueSystemEventMock).toHaveBeenCalledWith("Exec finished", { sessionKey: "global", contextKey: "exec:run-global", + trusted: false, }); expect(requestHeartbeatMock).toHaveBeenCalledWith( expect.objectContaining({ diff --git a/src/agents/bash-tools.exec-runtime.ts b/src/agents/bash-tools.exec-runtime.ts index 059f4c498a0..169d92e753c 100644 --- a/src/agents/bash-tools.exec-runtime.ts +++ b/src/agents/bash-tools.exec-runtime.ts @@ -426,6 +426,7 @@ export function emitExecSystemEvent( sessionKey, contextKey: opts.contextKey, deliveryContext: opts.deliveryContext, + trusted: false, }); requestHeartbeat( scopedHeartbeatWakeOptions(sessionKey, { diff --git a/src/plugins/runtime/index.test.ts b/src/plugins/runtime/index.test.ts index 7165e001ce8..21b98dc02c8 100644 --- a/src/plugins/runtime/index.test.ts +++ b/src/plugins/runtime/index.test.ts @@ -185,7 +185,7 @@ describe("plugin runtime command execution", () => { expectRuntimeValue(readValue, expected); }); - it("maps deprecated runtime.system.requestHeartbeatNow to a structured event wake", async () => { + it("maps deprecated runtime.system.requestHeartbeatNow to an immediate compatibility wake", async () => { vi.useFakeTimers(); resetHeartbeatWakeStateForTests(); const handler = vi.fn(async () => ({ status: "skipped" as const, reason: "disabled" })); @@ -199,7 +199,7 @@ describe("plugin runtime command execution", () => { expect(handler).toHaveBeenCalledWith( expect.objectContaining({ source: "other", - intent: "event", + intent: "immediate", reason: "legacy-plugin", }), ); diff --git a/src/plugins/runtime/runtime-system.ts b/src/plugins/runtime/runtime-system.ts index 52034a77177..8a3b204dab9 100644 --- a/src/plugins/runtime/runtime-system.ts +++ b/src/plugins/runtime/runtime-system.ts @@ -18,7 +18,7 @@ export function createRuntimeSystem(): PluginRuntime["system"] { const requestHeartbeatNow: PluginRuntime["system"]["requestHeartbeatNow"] = (opts) => requestHeartbeat({ source: opts?.source ?? "other", - intent: opts?.intent ?? "event", + intent: opts?.intent ?? "immediate", reason: opts?.reason, coalesceMs: opts?.coalesceMs, agentId: opts?.agentId,