Skip to content

Commit f943971

Browse files
committed
refactor(acp): hide helper types
1 parent 8ad3564 commit f943971

11 files changed

Lines changed: 14 additions & 14 deletions

src/acp/control-plane/manager.backend-failover.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export type BackendAttempt = {
1111
};
1212

1313
/** Ordered backend candidates plus display helper for diagnostics. */
14-
export type BackendCandidatePlan = {
14+
type BackendCandidatePlan = {
1515
candidateBackends: string[];
1616
describeBackendCandidate: (backend: string) => string;
1717
};

src/acp/control-plane/manager.background-task.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const ACP_BACKGROUND_TASK_TEXT_MAX_LENGTH = 160;
1717
const ACP_BACKGROUND_TASK_PROGRESS_MAX_LENGTH = 240;
1818

1919
/** Context needed to mirror a child ACP turn into the requester task registry. */
20-
export type BackgroundTaskContext = {
20+
type BackgroundTaskContext = {
2121
requesterSessionKey: string;
2222
requesterOrigin?: DeliveryContext;
2323
childSessionKey: string;

src/acp/control-plane/manager.turn-stream.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import { normalizeAcpErrorCode } from "./manager.utils.js";
1010
import { normalizeText } from "./runtime-options.js";
1111

1212
/** Mutable gate used to suppress late events after timeout/cancel races. */
13-
export type AcpTurnEventGate = {
13+
type AcpTurnEventGate = {
1414
open: boolean;
1515
};
1616

1717
/** Summary of whether a turn stream emitted user-visible output or terminal events. */
18-
export type AcpTurnStreamOutcome = {
18+
type AcpTurnStreamOutcome = {
1919
sawOutput: boolean;
2020
sawTerminalEvent: boolean;
2121
};

src/acp/control-plane/manager.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export type AcpRunTurnInput = {
7070
onEvent?: (event: AcpRuntimeEvent) => Promise<void> | void;
7171
};
7272

73-
export type AcpTurnLifecycleEvent = {
73+
type AcpTurnLifecycleEvent = {
7474
type: "prompt_submitted";
7575
at: number;
7676
};

src/acp/control-plane/runtime-cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type RuntimeCacheEntry = {
2323
};
2424

2525
/** Snapshot entry used for idle eviction and cache diagnostics. */
26-
export type CachedRuntimeSnapshot = {
26+
type CachedRuntimeSnapshot = {
2727
actorKey: string;
2828
state: CachedRuntimeState;
2929
lastTouchedAt: number;

src/acp/event-ledger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const FILE_LEDGER_LOCK_OPTIONS = {
2929
stale: 15_000,
3030
} as const;
3131

32-
export type AcpEventLedgerEntry = {
32+
type AcpEventLedgerEntry = {
3333
seq: number;
3434
at: number;
3535
sessionId: string;

src/acp/policy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const ACP_DISABLED_MESSAGE = "ACP is disabled by policy (`acp.enabled=false`).";
77
const ACP_DISPATCH_DISABLED_MESSAGE =
88
"ACP dispatch is disabled by policy (`acp.dispatch.enabled=false`).";
99

10-
export type AcpDispatchPolicyState = "enabled" | "acp_disabled" | "dispatch_disabled";
10+
type AcpDispatchPolicyState = "enabled" | "acp_disabled" | "dispatch_disabled";
1111

1212
/** Returns whether ACP is globally enabled by config policy. */
1313
export function isAcpEnabledByPolicy(cfg: OpenClawConfig): boolean {

src/acp/translator.presentation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,20 @@ export type GatewaySessionPresentationRow = Pick<
6464
>;
6565

6666
/** ACP session controls and modes shown to the client. */
67-
export type SessionPresentation = {
67+
type SessionPresentation = {
6868
configOptions: SessionConfigOption[];
6969
modes: SessionModeState;
7070
};
7171

7272
/** ACP session metadata plus lineage information. */
73-
export type SessionMetadata = {
73+
type SessionMetadata = {
7474
title?: string | null;
7575
updatedAt?: string | null;
7676
_meta?: AcpSessionLineageMeta;
7777
};
7878

7979
/** Context/token usage snapshot for ACP clients that expose progress meters. */
80-
export type SessionUsageSnapshot = {
80+
type SessionUsageSnapshot = {
8181
size: number;
8282
used: number;
8383
};

src/acp/translator.replay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type GatewayChatContentBlock = {
1010
thinking?: string;
1111
};
1212

13-
export type ReplayChunk = {
13+
type ReplayChunk = {
1414
sessionUpdate: "user_message_chunk" | "agent_message_chunk" | "agent_thought_chunk";
1515
text: string;
1616
};

src/acp/translator.session-list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const ACP_LIST_SESSIONS_MAX_FETCH_LIMIT =
1212
ACP_LIST_SESSIONS_MAX_CURSOR_OFFSET + ACP_LIST_SESSIONS_MAX_PAGE_SIZE + 1;
1313

1414
/** Opaque cursor payload used to page ACP session list results. */
15-
export type ListSessionsCursor = {
15+
type ListSessionsCursor = {
1616
offset: number;
1717
cwd?: string;
1818
};

0 commit comments

Comments
 (0)