Skip to content

Commit 2e27a37

Browse files
committed
refactor(runtime): remove unused helper exports
1 parent 9d04064 commit 2e27a37

7 files changed

Lines changed: 0 additions & 68 deletions

File tree

src/infra/bonjour-discovery.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,6 @@ export function resolveGatewayDiscoveryEndpoint(
6262
};
6363
}
6464

65-
export function pickResolvedGatewayHost(beacon: GatewayBonjourBeacon): string | null {
66-
return resolveGatewayDiscoveryEndpoint(beacon)?.host ?? null;
67-
}
68-
69-
export function pickResolvedGatewayPort(beacon: GatewayBonjourBeacon): number | null {
70-
return resolveGatewayDiscoveryEndpoint(beacon)?.port ?? null;
71-
}
72-
7365
type GatewayBonjourDiscoverOpts = {
7466
timeoutMs?: number;
7567
domains?: string[];

src/llm/utils/overflow.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,3 @@ export function isContextOverflow(message: AssistantMessage, contextWindow?: num
150150

151151
return false;
152152
}
153-
154-
/**
155-
* Get the overflow patterns for testing purposes.
156-
*/
157-
export function getOverflowPatterns(): RegExp[] {
158-
return [...OVERFLOW_PATTERNS];
159-
}

src/shared/chat-message-content.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,6 @@ export function parseAssistantTextSignature(
5454
}
5555
}
5656

57-
/** Encodes versioned assistant text metadata stored alongside streamed text blocks. */
58-
export function encodeAssistantTextSignature(params: {
59-
id: string;
60-
phase?: AssistantPhase;
61-
}): string {
62-
return JSON.stringify({
63-
v: 1,
64-
id: params.id,
65-
...(params.phase ? { phase: params.phase } : {}),
66-
});
67-
}
68-
6957
/** Resolves a message phase only when the top-level phase or all explicit blocks agree. */
7058
export function resolveAssistantMessagePhase(message: unknown): AssistantPhase | undefined {
7159
if (!message || typeof message !== "object") {

src/skills/loading/workspace.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -256,10 +256,6 @@ function resolveSkillsLimits(config?: OpenClawConfig, agentId?: string): Resolve
256256
};
257257
}
258258

259-
export function resolveSkillRootScanLimit(config?: OpenClawConfig): number {
260-
return config?.skills?.limits?.maxCandidatesPerRoot ?? DEFAULT_MAX_CANDIDATES_PER_ROOT;
261-
}
262-
263259
function listChildDirectories(
264260
dir: string,
265261
opts?: {
@@ -1698,13 +1694,6 @@ export async function syncSkillsToWorkspace(params: {
16981694
});
16991695
}
17001696

1701-
export function filterWorkspaceSkillEntries(
1702-
entries: SkillEntry[],
1703-
config?: OpenClawConfig,
1704-
): SkillEntry[] {
1705-
return filterSkillEntries(entries, config);
1706-
}
1707-
17081697
export function filterWorkspaceSkillEntriesWithOptions(
17091698
entries: SkillEntry[],
17101699
opts?: {

src/tasks/task-executor.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
isParentFlowLinkError,
1616
linkTaskToFlowById,
1717
listTasksForFlowId,
18-
markTaskLostById,
1918
markTaskRunningByRunId,
2019
finalizeTaskRunByRunId as finalizeTaskRunByRunIdInRegistry,
2120
recordTaskProgressByRunId,
@@ -207,16 +206,6 @@ export function failTaskRunByRunId(params: {
207206
});
208207
}
209208

210-
export function markTaskRunLostById(params: {
211-
taskId: string;
212-
endedAt: number;
213-
lastEventAt?: number;
214-
error?: string;
215-
cleanupAfter?: number;
216-
}) {
217-
return markTaskLostById(params);
218-
}
219-
220209
export function setDetachedTaskDeliveryStatusByRunId(params: {
221210
runId: string;
222211
runtime?: TaskRuntime;
@@ -362,15 +351,6 @@ export function retryBlockedFlowAsQueuedTaskRun(
362351
});
363352
}
364353

365-
export function retryBlockedFlowAsRunningTaskRun(
366-
params: Omit<RetryBlockedFlowParams, "status">,
367-
): RetryBlockedFlowResult {
368-
return retryBlockedFlowTask({
369-
...params,
370-
status: "running",
371-
});
372-
}
373-
374354
type CancelFlowResult = {
375355
found: boolean;
376356
cancelled: boolean;

src/tasks/task-registry.maintenance.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,8 +1253,3 @@ export function configureTaskRegistryMaintenance(options: {
12531253
configuredRuntimeAuthoritative = options.runtimeAuthoritative;
12541254
}
12551255
}
1256-
1257-
export function getReconciledTaskById(taskId: string): TaskRecord | undefined {
1258-
const task = getTaskById(taskId);
1259-
return task ? reconcileTaskRecordForOperatorInspection(task) : undefined;
1260-
}

src/tasks/task-registry.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,11 +2283,6 @@ function listTasksFromIndex(index: Map<string, Set<string>>, key: string): TaskR
22832283
.map(({ insertionIndex: _, ...task }) => task);
22842284
}
22852285

2286-
export function findLatestTaskForSessionKey(sessionKey: string): TaskRecord | undefined {
2287-
const task = listTasksForSessionKey(sessionKey)[0];
2288-
return task ? cloneTaskRecord(task) : undefined;
2289-
}
2290-
22912286
export function listTasksForSessionKey(sessionKey: string): TaskRecord[] {
22922287
ensureTaskRegistryReady();
22932288
const key = normalizeOptionalString(sessionKey);

0 commit comments

Comments
 (0)