fix: satisfy room-event strict smoke types · openclaw/openclaw@903e246
steipete
·
2026-05-16
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1622,19 +1622,23 @@ export async function runAgentTurnWithFallback(params: {
|
1622 | 1622 | abortSignal: params.replyOperation?.abortSignal ?? params.opts?.abortSignal, |
1623 | 1623 | replyOperation: params.replyOperation, |
1624 | 1624 | }); |
1625 | | -const result = isRoomEventCliTurn |
1626 | | - ? { |
1627 | | - ...rawResult, |
1628 | | -meta: { |
1629 | | - ...rawResult.meta, |
1630 | | -agentMeta: { |
1631 | | - ...rawResult.meta?.agentMeta, |
1632 | | -sessionId: "", |
1633 | | -cliSessionBinding: undefined, |
1634 | | -}, |
1635 | | -}, |
1636 | | -} |
1637 | | - : rawResult; |
| 1625 | +const result: EmbeddedAgentRunResult = |
| 1626 | +isRoomEventCliTurn && rawResult.meta.agentMeta |
| 1627 | + ? (() => { |
| 1628 | +const { cliSessionBinding: _cliSessionBinding, ...agentMeta } = |
| 1629 | +rawResult.meta.agentMeta; |
| 1630 | +return { |
| 1631 | + ...rawResult, |
| 1632 | +meta: { |
| 1633 | + ...rawResult.meta, |
| 1634 | +agentMeta: { |
| 1635 | + ...agentMeta, |
| 1636 | +sessionId: "", |
| 1637 | +}, |
| 1638 | +}, |
| 1639 | +}; |
| 1640 | +})() |
| 1641 | + : rawResult; |
1638 | 1642 | bootstrapPromptWarningSignaturesSeen = resolveBootstrapWarningSignaturesSeen( |
1639 | 1643 | result.meta?.systemPromptReport, |
1640 | 1644 | ); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -232,6 +232,7 @@ function collectSummaryRuntimeMetadata(items: FollowupRun[]): FollowupRuntimeMet
|
232 | 232 | } |
233 | 233 | |
234 | 234 | function clearFollowupQueueSummaryState(queue: { |
| 235 | +dropPolicy: "summarize" | "old" | "new"; |
235 | 236 | droppedCount: number; |
236 | 237 | summaryLines: string[]; |
237 | 238 | summarySources?: FollowupRun[]; |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -export type { InboundTurnKind } from "./types.js"; |
| 1 | +export type InboundTurnKind = "user_request" | "room_event"; |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -21,6 +21,8 @@ import type { InboundLastRouteUpdate, RecordInboundSession } from "../session.ty
|
21 | 21 | import type { ChannelBotLoopProtectionFacts } from "./bot-loop-protection.js"; |
22 | 22 | import type { InboundTurnKind } from "./kind.js"; |
23 | 23 | |
| 24 | +export type { InboundTurnKind } from "./kind.js"; |
| 25 | + |
24 | 26 | export type ChannelTurnAdmission = |
25 | 27 | | { kind: "dispatch"; reason?: string } |
26 | 28 | | { kind: "observeOnly"; reason: string } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。