diff --git a/src/agents/tools/sessions-access.ts b/src/agents/tools/sessions-access.ts index 02bf2c239ac0..892965b03cd2 100644 --- a/src/agents/tools/sessions-access.ts +++ b/src/agents/tools/sessions-access.ts @@ -11,10 +11,8 @@ import { resolveInternalSessionKey, resolveMainSessionAlias } from "./sessions-r export { createAgentToAgentPolicy, - createSessionVisibilityChecker, createSessionVisibilityGuard, createSessionVisibilityRowChecker, - listSpawnedSessionKeys, resolveEffectiveSessionToolsVisibility, } from "../../plugin-sdk/session-visibility.js"; diff --git a/src/agents/tools/sessions-helpers.ts b/src/agents/tools/sessions-helpers.ts index 9cbfe12a3913..94ef8d7f8788 100644 --- a/src/agents/tools/sessions-helpers.ts +++ b/src/agents/tools/sessions-helpers.ts @@ -30,10 +30,10 @@ import { getRuntimeConfig } from "../../config/config.js"; import type { OpenClawConfig } from "../../config/types.openclaw.js"; /** Coarse session category used by session list/status tools. */ -export type SessionKind = "main" | "group" | "cron" | "hook" | "node" | "other"; +type SessionKind = "main" | "group" | "cron" | "hook" | "node" | "other"; /** Delivery target metadata attached to session rows. */ -export type SessionListDeliveryContext = { +type SessionListDeliveryContext = { channel?: string; to?: string; accountId?: string; diff --git a/src/agents/tools/sessions-resolution.ts b/src/agents/tools/sessions-resolution.ts index 1e4ca7df1cde..e49ba5c15835 100644 --- a/src/agents/tools/sessions-resolution.ts +++ b/src/agents/tools/sessions-resolution.ts @@ -88,8 +88,6 @@ export function resolveCurrentSessionClientAlias(params: { return requesterKey; } -export { listSpawnedSessionKeys }; - export async function isRequesterSpawnedSessionVisible(params: { requesterSessionKey: string; targetSessionKey: string; @@ -190,7 +188,7 @@ export function shouldResolveSessionIdInput(value: string): boolean { return looksLikeSessionId(value) || !looksLikeSessionKey(value); } -export type SessionReferenceResolution = +type SessionReferenceResolution = | { ok: true; key: string; @@ -199,7 +197,7 @@ export type SessionReferenceResolution = } | { ok: false; status: "error" | "forbidden"; error: string }; -export type VisibleSessionReferenceResolution = +type VisibleSessionReferenceResolution = | { ok: true; key: string; @@ -508,8 +506,6 @@ export async function resolveVisibleSessionReference(params: { return { ok: true, key: resolvedKey, displayKey }; } -export const normalizeOptionalKey: (value?: string) => string | undefined = normalizeOptionalString; - export const testing = { setDepsForTest(overrides?: Partial<{ callGateway: GatewayCaller }>) { sessionsResolutionDeps = overrides