mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-22 02:15:26 -06:00
e2ec8283c4
* refactor(deadcode): trim auto-reply and CLI exports * refactor(deadcode): trim cron and task exports * refactor(deadcode): trim fleet and process exports * test(deadcode): exercise live task and process seams * test(fleet): cover stream redaction through owner module * refactor(security): trim dead internal exports * refactor(secrets): trim dead internal exports * refactor(deadcode): trim remaining src exports * refactor(deadcode): remove test-only runtime exports * refactor(deadcode): trim pairing test exports * refactor(deadcode): reconcile refreshed baseline * test(auto-reply): deduplicate queue state imports
28 lines
854 B
TypeScript
28 lines
854 B
TypeScript
import { runOpenClawStateWriteTransaction } from "../state/openclaw-state-db.js";
|
|
import {
|
|
readChannelPairingState,
|
|
sqliteOptionsForEnv,
|
|
writeChannelPairingStateToDatabase,
|
|
} from "./pairing-store-sqlite.js";
|
|
import type { PairingChannel } from "./pairing-store.types.js";
|
|
|
|
type ChannelPairingState = ReturnType<typeof readChannelPairingState>;
|
|
|
|
export function readChannelPairingStateSnapshot(
|
|
channel: PairingChannel,
|
|
env: NodeJS.ProcessEnv = process.env,
|
|
): ChannelPairingState {
|
|
return readChannelPairingState(channel, env);
|
|
}
|
|
|
|
export function writeChannelPairingStateSnapshot(
|
|
channel: PairingChannel,
|
|
state: ChannelPairingState,
|
|
env: NodeJS.ProcessEnv = process.env,
|
|
): void {
|
|
runOpenClawStateWriteTransaction(
|
|
(database) => writeChannelPairingStateToDatabase(database, channel, state),
|
|
sqliteOptionsForEnv(env),
|
|
);
|
|
}
|