mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
chore(deadcode): delete unused route wrappers
This commit is contained in:
@@ -523,17 +523,13 @@ export async function hasRecentWorkspaceAttestation(
|
||||
}
|
||||
}
|
||||
|
||||
export async function isWorkspaceAttestationMarker(attestationPath: string): Promise<boolean> {
|
||||
return (await readWorkspaceAttestationMarkerStatus(attestationPath)) === "marker";
|
||||
}
|
||||
|
||||
export async function shouldRemoveWorkspaceAttestation(
|
||||
attestationPath: string,
|
||||
opts?: { trustUnknown?: boolean },
|
||||
): Promise<boolean> {
|
||||
try {
|
||||
return (
|
||||
(await isWorkspaceAttestationMarker(attestationPath)) ||
|
||||
(await readWorkspaceAttestationMarkerStatus(attestationPath)) === "marker" ||
|
||||
(await hasRecentWorkspaceAttestation(attestationPath, opts))
|
||||
);
|
||||
} catch {
|
||||
|
||||
@@ -3,10 +3,7 @@ import type {
|
||||
ConversationRef,
|
||||
SessionBindingRecord,
|
||||
} from "../infra/outbound/session-binding-service.js";
|
||||
import {
|
||||
normalizeChannelRouteRef,
|
||||
type ChannelRouteRef,
|
||||
} from "../plugin-sdk/channel-route.js";
|
||||
import { normalizeChannelRouteRef, type ChannelRouteRef } from "../plugin-sdk/channel-route.js";
|
||||
import {
|
||||
normalizeConversationTargetParams,
|
||||
type ConversationTargetParams,
|
||||
@@ -63,11 +60,6 @@ export function resolveConversationDeliveryTarget(params: ConversationTargetPara
|
||||
return { to };
|
||||
}
|
||||
|
||||
/** Converts a channel route back to legacy delivery context metadata. */
|
||||
export function deliveryContextFromRoute(route?: ChannelRouteRef): DeliveryContext | undefined {
|
||||
return deliveryContextFromChannelRoute(route);
|
||||
}
|
||||
|
||||
/** Converts a persisted conversation reference into a channel route. */
|
||||
export function routeFromConversationRef(
|
||||
conversation?: ConversationRef | null,
|
||||
@@ -104,7 +96,7 @@ export function routeToDeliveryFields(route?: ChannelRouteRef): {
|
||||
accountId?: string;
|
||||
threadId?: string | number;
|
||||
} {
|
||||
const deliveryContext = deliveryContextFromRoute(route);
|
||||
const deliveryContext = deliveryContextFromChannelRoute(route);
|
||||
return {
|
||||
...(deliveryContext ? { deliveryContext } : {}),
|
||||
...(deliveryContext?.channel ? { channel: deliveryContext.channel } : {}),
|
||||
|
||||
Reference in New Issue
Block a user