mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 20:35:39 -06:00
refactor(reef): centralize peer trust in SQLite (#108375)
* feat(plugin-sdk): support removing pairing requests * refactor(reef): centralize peer trust in SQLite * chore: defer Reef release note * fix(reef): share runtime state across module instances * refactor(reef): narrow trust store boundary * test(reef): pass config to account description
This commit is contained in:
committed by
GitHub
parent
e41585fb0c
commit
f810fb35d5
@@ -81,6 +81,7 @@ import { saveMediaBuffer } from "../../media/store.js";
|
||||
import { buildPairingReply } from "../../pairing/pairing-messages.js";
|
||||
import {
|
||||
readChannelAllowFromStore,
|
||||
removeChannelAllowFromStoreEntry,
|
||||
upsertChannelPairingRequest,
|
||||
} from "../../pairing/pairing-store.js";
|
||||
import { buildAgentSessionKey, resolveAgentRoute } from "../../routing/resolve-route.js";
|
||||
@@ -133,6 +134,14 @@ export function createRuntimeChannel(): PluginRuntime["channel"] {
|
||||
buildPairingReply,
|
||||
readAllowFromStore: ({ channel, accountId, env }) =>
|
||||
readChannelAllowFromStore(channel, env, accountId),
|
||||
removeAllowFromStoreEntry: ({ channel, entry, accountId, env, pairingAdapter }) =>
|
||||
removeChannelAllowFromStoreEntry({
|
||||
channel,
|
||||
entry,
|
||||
accountId,
|
||||
env,
|
||||
pairingAdapter,
|
||||
}),
|
||||
upsertPairingRequest: ({ channel, id, accountId, meta, env, pairingAdapter }) =>
|
||||
upsertChannelPairingRequest({
|
||||
channel,
|
||||
|
||||
@@ -26,6 +26,7 @@ import type {
|
||||
} from "../../config/sessions/runtime-types.js";
|
||||
import type {
|
||||
ReadChannelAllowFromStoreForAccount,
|
||||
RemoveChannelAllowFromStoreEntryForAccount,
|
||||
UpsertChannelPairingRequestForAccount,
|
||||
} from "../../pairing/pairing-store.types.js";
|
||||
|
||||
@@ -129,6 +130,7 @@ export type PluginRuntimeChannel = {
|
||||
pairing: {
|
||||
buildPairingReply: typeof import("../../pairing/pairing-messages.js").buildPairingReply;
|
||||
readAllowFromStore: ReadChannelAllowFromStoreForAccount;
|
||||
removeAllowFromStoreEntry: RemoveChannelAllowFromStoreEntryForAccount;
|
||||
upsertPairingRequest: UpsertChannelPairingRequestForAccount;
|
||||
};
|
||||
media: {
|
||||
|
||||
Reference in New Issue
Block a user