diff --git a/src/agents/session-transcript-repair.ts b/src/agents/session-transcript-repair.ts index 4532f86f073..dd75c281959 100644 --- a/src/agents/session-transcript-repair.ts +++ b/src/agents/session-transcript-repair.ts @@ -13,8 +13,6 @@ import { normalizeAllowedToolNames, } from "./tool-call-shared.js"; -export { isRedactedSessionsSpawnAttachment } from "./tool-call-shared.js"; - type RawToolCallBlock = { type?: unknown; id?: unknown; @@ -285,7 +283,7 @@ export function stripToolResultDetails(messages: AgentMessage[]): AgentMessage[] return touched ? out : messages; } -export function repairToolCallInputs( +function repairToolCallInputs( messages: AgentMessage[], options?: ToolCallInputRepairOptions, ): ToolCallInputRepairReport { diff --git a/src/agents/subagent-announce-delivery.ts b/src/agents/subagent-announce-delivery.ts index d4fcde6d789..f6ce7090b80 100644 --- a/src/agents/subagent-announce-delivery.ts +++ b/src/agents/subagent-announce-delivery.ts @@ -47,8 +47,6 @@ import { getSubagentDepthFromSessionStore } from "./subagent-depth.js"; import { resolveRequesterStoreKey } from "./subagent-requester-store-key.js"; import type { SpawnSubagentMode } from "./subagent-spawn.types.js"; -export { resolveAnnounceOrigin } from "./subagent-announce-origin.js"; - const DEFAULT_SUBAGENT_ANNOUNCE_TIMEOUT_MS = 120_000; const MAX_TIMER_SAFE_TIMEOUT_MS = 2_147_000_000; diff --git a/src/agents/subagent-announce-dispatch.ts b/src/agents/subagent-announce-dispatch.ts index 58be10d7c20..b5d557c70af 100644 --- a/src/agents/subagent-announce-dispatch.ts +++ b/src/agents/subagent-announce-dispatch.ts @@ -1,4 +1,4 @@ -export type SubagentDeliveryPath = +type SubagentDeliveryPath = | "queued" | "steered" | "direct" @@ -6,7 +6,7 @@ export type SubagentDeliveryPath = | "direct-thread-fallback" | "none"; -export type SubagentAnnounceQueueOutcome = "steered" | "queued" | "none" | "dropped"; +type SubagentAnnounceQueueOutcome = "steered" | "queued" | "none" | "dropped"; export type SubagentAnnounceDeliveryResult = { delivered: boolean; @@ -15,9 +15,9 @@ export type SubagentAnnounceDeliveryResult = { phases?: SubagentAnnounceDispatchPhaseResult[]; }; -export type SubagentAnnounceDispatchPhase = "queue-primary" | "direct-primary" | "queue-fallback"; +type SubagentAnnounceDispatchPhase = "queue-primary" | "direct-primary" | "queue-fallback"; -export type SubagentAnnounceDispatchPhaseResult = { +type SubagentAnnounceDispatchPhaseResult = { phase: SubagentAnnounceDispatchPhase; delivered: boolean; path: SubagentDeliveryPath; diff --git a/src/agents/subagent-control.ts b/src/agents/subagent-control.ts index c3daf4b6e32..9559347482e 100644 --- a/src/agents/subagent-control.ts +++ b/src/agents/subagent-control.ts @@ -21,16 +21,7 @@ import { waitForAgentRunAndReadUpdatedAssistantReply, } from "./run-wait.js"; import { resolveStoredSubagentCapabilities } from "./subagent-capabilities.js"; -import { - buildLatestSubagentRunIndex, - buildSubagentList, - createPendingDescendantCounter, - isActiveSubagentRun, - resolveSessionEntryForKey, - type BuiltSubagentList, - type SessionEntryResolution, - type SubagentListItem, -} from "./subagent-list.js"; +import { buildLatestSubagentRunIndex, resolveSessionEntryForKey } from "./subagent-list.js"; import { subagentRuns } from "./subagent-registry-memory.js"; import { getLatestSubagentRunByChildSessionKey, @@ -50,8 +41,8 @@ import { resolveInternalSessionKey, resolveMainSessionAlias } from "./tools/sess export const DEFAULT_RECENT_MINUTES = 30; export const MAX_RECENT_MINUTES = 24 * 60; export const MAX_STEER_MESSAGE_CHARS = 4_000; -export const STEER_RATE_LIMIT_MS = 2_000; -export const STEER_ABORT_SETTLE_TIMEOUT_MS = 5_000; +const STEER_RATE_LIMIT_MS = 2_000; +const STEER_ABORT_SETTLE_TIMEOUT_MS = 5_000; const SUBAGENT_REPLY_HISTORY_LIMIT = 50; const steerRateLimit = new Map(); @@ -104,14 +95,6 @@ export type ResolvedSubagentController = { callerIsSubagent: boolean; controlScope: "children" | "none"; }; -export type { BuiltSubagentList, SessionEntryResolution, SubagentListItem }; -export { - buildSubagentList, - createPendingDescendantCounter, - isActiveSubagentRun, - resolveSessionEntryForKey, -}; - export function resolveSubagentController(params: { cfg: OpenClawConfig; agentSessionKey?: string; diff --git a/src/agents/subagent-recovery-state.ts b/src/agents/subagent-recovery-state.ts index 06d03c2f947..9ba208bc921 100644 --- a/src/agents/subagent-recovery-state.ts +++ b/src/agents/subagent-recovery-state.ts @@ -1,7 +1,7 @@ import type { SessionEntry } from "../config/sessions.js"; -export const SUBAGENT_RECOVERY_MAX_AUTOMATIC_ATTEMPTS = 2; -export const SUBAGENT_RECOVERY_REWEDGE_WINDOW_MS = 2 * 60_000; +const SUBAGENT_RECOVERY_MAX_AUTOMATIC_ATTEMPTS = 2; +const SUBAGENT_RECOVERY_REWEDGE_WINDOW_MS = 2 * 60_000; export type SubagentRecoveryGate = | { diff --git a/src/agents/subagent-registry-helpers.ts b/src/agents/subagent-registry-helpers.ts index 140fa73fc0f..0ee340bd4ef 100644 --- a/src/agents/subagent-registry-helpers.ts +++ b/src/agents/subagent-registry-helpers.ts @@ -29,7 +29,7 @@ export { } from "./subagent-session-metrics.js"; export const MIN_ANNOUNCE_RETRY_DELAY_MS = 1_000; -export const MAX_ANNOUNCE_RETRY_DELAY_MS = 8_000; +const MAX_ANNOUNCE_RETRY_DELAY_MS = 8_000; export const MAX_ANNOUNCE_RETRY_COUNT = 3; export const ANNOUNCE_EXPIRY_MS = 5 * 60_000; export const ANNOUNCE_COMPLETION_HARD_EXPIRY_MS = 30 * 60_000;