From 5bf170f3351c7ffd3055ab4422decdcb6acc52e3 Mon Sep 17 00:00:00 2001 From: Eva Date: Wed, 29 Apr 2026 16:42:57 +0700 Subject: [PATCH] fix(context-engine): derive prompt authority type --- src/agents/pi-embedded-runner/run/attempt.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/agents/pi-embedded-runner/run/attempt.ts b/src/agents/pi-embedded-runner/run/attempt.ts index b655034ed55..8741ac4fade 100644 --- a/src/agents/pi-embedded-runner/run/attempt.ts +++ b/src/agents/pi-embedded-runner/run/attempt.ts @@ -10,6 +10,7 @@ import { import { isAcpRuntimeSpawnAvailable } from "../../../acp/runtime/availability.js"; import { filterHeartbeatPairs } from "../../../auto-reply/heartbeat-filter.js"; import { getRuntimeConfig } from "../../../config/config.js"; +import type { AssembleResult } from "../../../context-engine/types.js"; import { emitTrustedDiagnosticEvent } from "../../../infra/diagnostic-events.js"; import { createChildDiagnosticTraceContext, @@ -1527,7 +1528,8 @@ export async function runEmbeddedAttempt( } let prePromptMessageCount = activeSession.messages.length; let unwindowedContextEngineMessagesForPrecheck: AgentMessage[] | undefined; - let contextEnginePromptAuthority: "assembled" | "preassembly_may_overflow" = "assembled"; + let contextEnginePromptAuthority: NonNullable = + "assembled"; abortSessionForYield = () => { yieldAbortSettled = Promise.resolve(activeSession.abort()); };