mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 15:14:45 +00:00
fix: satisfy room-event strict smoke types
This commit is contained in:
@@ -1622,19 +1622,23 @@ export async function runAgentTurnWithFallback(params: {
|
||||
abortSignal: params.replyOperation?.abortSignal ?? params.opts?.abortSignal,
|
||||
replyOperation: params.replyOperation,
|
||||
});
|
||||
const result = isRoomEventCliTurn
|
||||
? {
|
||||
...rawResult,
|
||||
meta: {
|
||||
...rawResult.meta,
|
||||
agentMeta: {
|
||||
...rawResult.meta?.agentMeta,
|
||||
sessionId: "",
|
||||
cliSessionBinding: undefined,
|
||||
},
|
||||
},
|
||||
}
|
||||
: rawResult;
|
||||
const result: EmbeddedAgentRunResult =
|
||||
isRoomEventCliTurn && rawResult.meta.agentMeta
|
||||
? (() => {
|
||||
const { cliSessionBinding: _cliSessionBinding, ...agentMeta } =
|
||||
rawResult.meta.agentMeta;
|
||||
return {
|
||||
...rawResult,
|
||||
meta: {
|
||||
...rawResult.meta,
|
||||
agentMeta: {
|
||||
...agentMeta,
|
||||
sessionId: "",
|
||||
},
|
||||
},
|
||||
};
|
||||
})()
|
||||
: rawResult;
|
||||
bootstrapPromptWarningSignaturesSeen = resolveBootstrapWarningSignaturesSeen(
|
||||
result.meta?.systemPromptReport,
|
||||
);
|
||||
|
||||
@@ -232,6 +232,7 @@ function collectSummaryRuntimeMetadata(items: FollowupRun[]): FollowupRuntimeMet
|
||||
}
|
||||
|
||||
function clearFollowupQueueSummaryState(queue: {
|
||||
dropPolicy: "summarize" | "old" | "new";
|
||||
droppedCount: number;
|
||||
summaryLines: string[];
|
||||
summarySources?: FollowupRun[];
|
||||
|
||||
@@ -1 +1 @@
|
||||
export type { InboundTurnKind } from "./types.js";
|
||||
export type InboundTurnKind = "user_request" | "room_event";
|
||||
|
||||
@@ -21,6 +21,8 @@ import type { InboundLastRouteUpdate, RecordInboundSession } from "../session.ty
|
||||
import type { ChannelBotLoopProtectionFacts } from "./bot-loop-protection.js";
|
||||
import type { InboundTurnKind } from "./kind.js";
|
||||
|
||||
export type { InboundTurnKind } from "./kind.js";
|
||||
|
||||
export type ChannelTurnAdmission =
|
||||
| { kind: "dispatch"; reason?: string }
|
||||
| { kind: "observeOnly"; reason: string }
|
||||
|
||||
Reference in New Issue
Block a user