fix(diagnostics): clear embedded-run activity when recovery declares … · openclaw/openclaw@c0195f7
openperf
·
2026-06-01
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import fs from "node:fs/promises"; |
2 | 2 | import os from "node:os"; |
3 | 3 | import path from "node:path"; |
4 | | -import type { OpenKeyedStoreOptions } from "openclaw/plugin-sdk/plugin-state-runtime"; |
5 | | -import type { PluginStateKeyedStore } from "openclaw/plugin-sdk/plugin-state-runtime"; |
| 4 | +import type { |
| 5 | +OpenKeyedStoreOptions, |
| 6 | +PluginStateKeyedStore, |
| 7 | +} from "openclaw/plugin-sdk/plugin-state-runtime"; |
6 | 8 | import { |
7 | 9 | createPluginStateKeyedStoreForTests, |
8 | 10 | resetPluginStateStoreForTests, |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-contracts"; |
2 | 1 | import { |
3 | 2 | asDateTimestampMs, |
4 | 3 | resolveExpiresAtMsFromDurationMs, |
@@ -166,7 +165,7 @@ async function disarmNow(params: {
|
166 | 165 | if (!state) { |
167 | 166 | return { changed: false, restored: [], removed: [] }; |
168 | 167 | } |
169 | | -const cfg = api.runtime.config.current() as OpenClawConfig; |
| 168 | +const cfg = api.runtime.config.current(); |
170 | 169 | const allow = new Set(normalizeAllowList(cfg)); |
171 | 170 | const deny = new Set(normalizeDenyList(cfg)); |
172 | 171 | const removed: string[] = []; |
@@ -430,7 +429,7 @@ export default definePluginEntry({
|
430 | 429 | } |
431 | 430 | |
432 | 431 | const commands = resolveCommandsForGroup(group); |
433 | | -const cfg = api.runtime.config.current() as OpenClawConfig; |
| 432 | +const cfg = api.runtime.config.current(); |
434 | 433 | const allowSet = new Set(normalizeAllowList(cfg)); |
435 | 434 | const denySet = new Set(normalizeDenyList(cfg)); |
436 | 435 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1101,6 +1101,10 @@ export function emitInternalDiagnosticEvent(event: DiagnosticEventInput) {
|
1101 | 1101 | emitDiagnosticEventWithTrust(event, false, { internal: true }); |
1102 | 1102 | } |
1103 | 1103 | |
| 1104 | +export function getInternalDiagnosticEventSequence(): number { |
| 1105 | +return getDiagnosticEventsState().seq; |
| 1106 | +} |
| 1107 | + |
1104 | 1108 | export function emitTrustedDiagnosticEvent(event: DiagnosticEventInput) { |
1105 | 1109 | emitDiagnosticEventWithTrust(event, true); |
1106 | 1110 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。