chore(deadcode): delete unused route wrappers

This commit is contained in:
Vincent Koc 2026-06-20 22:12:27 +08:00
parent 6ad7f66af2
commit a977dc843d
No known key found for this signature in database
2 changed files with 3 additions and 15 deletions

View file

@ -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 {

View file

@ -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 } : {}),