Skip to content

Commit c88a3d5

Browse files
committed
fix(ci): restore split seam type exports
1 parent 94a90fc commit c88a3d5

7 files changed

Lines changed: 272 additions & 5 deletions

File tree

src/agents/sandbox/ssh-backend.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import path from "node:path";
22
import { normalizeLowercaseStringOrEmpty } from "../../shared/string-coerce.js";
33
import type {
4-
CreateSandboxBackendParams,
54
SandboxBackendCommandParams,
65
SandboxBackendCommandResult,
6+
} from "./backend-handle.types.js";
7+
import type {
8+
CreateSandboxBackendParams,
79
SandboxBackendHandle,
810
SandboxBackendManager,
911
} from "./backend.types.js";

src/auto-reply/reply/commands-models.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const modelAuthLabelMocks = vi.hoisted(() => ({
1818
}));
1919

2020
vi.mock("../../agents/model-catalog.js", () => ({
21-
loadModelCatalog: (...args: unknown[]) => modelCatalogMocks.loadModelCatalog(...args),
21+
loadModelCatalog: (params: unknown) => modelCatalogMocks.loadModelCatalog(params),
2222
}));
2323

2424
vi.mock("../../agents/model-auth-label.js", () => ({
@@ -268,7 +268,7 @@ describe("handleModelsCommand", () => {
268268
providerOverride: "target-provider",
269269
modelOverride: "target-model",
270270
},
271-
} as HandleCommandsParams["sessionStore"];
271+
};
272272

273273
const result = await handleModelsCommand(params, true);
274274

src/channels/plugins/setup-wizard-types.ts

Lines changed: 263 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,269 @@ export type ChannelSetupPlugin = {
1818
config: ChannelConfigAdapter<unknown>;
1919
setup?: ChannelSetupAdapter;
2020
setupWizard?: ChannelSetupWizard | ChannelSetupWizardAdapter;
21-
setupWizard?: ChannelSetupWizard | ChannelSetupWizardAdapter;
21+
};
22+
23+
export type ChannelSetupWizardStatus = {
24+
configuredLabel: string;
25+
unconfiguredLabel: string;
26+
configuredHint?: string;
27+
unconfiguredHint?: string;
28+
configuredScore?: number;
29+
unconfiguredScore?: number;
30+
resolveConfigured: (params: {
31+
cfg: OpenClawConfig;
32+
accountId?: string;
33+
}) => boolean | Promise<boolean>;
34+
resolveStatusLines?: (params: {
35+
cfg: OpenClawConfig;
36+
accountId?: string;
37+
configured: boolean;
38+
}) => string[] | Promise<string[]>;
39+
resolveSelectionHint?: (params: {
40+
cfg: OpenClawConfig;
41+
accountId?: string;
42+
configured: boolean;
43+
}) => string | undefined | Promise<string | undefined>;
44+
resolveQuickstartScore?: (params: {
45+
cfg: OpenClawConfig;
46+
accountId?: string;
47+
configured: boolean;
48+
}) => number | undefined | Promise<number | undefined>;
49+
};
50+
51+
export type ChannelSetupWizardCredentialState = {
52+
accountConfigured: boolean;
53+
hasConfiguredValue: boolean;
54+
resolvedValue?: string;
55+
envValue?: string;
56+
};
57+
58+
export type ChannelSetupWizardCredentialValues = Partial<Record<string, string>>;
59+
60+
export type ChannelSetupWizardNote = {
61+
title: string;
62+
lines: string[];
63+
shouldShow?: (params: {
64+
cfg: OpenClawConfig;
65+
accountId: string;
66+
credentialValues: ChannelSetupWizardCredentialValues;
67+
}) => boolean | Promise<boolean>;
68+
};
69+
70+
export type ChannelSetupWizardEnvShortcut = {
71+
prompt: string;
72+
preferredEnvVar?: string;
73+
isAvailable: (params: { cfg: OpenClawConfig; accountId: string }) => boolean;
74+
apply: (params: {
75+
cfg: OpenClawConfig;
76+
accountId: string;
77+
}) => OpenClawConfig | Promise<OpenClawConfig>;
78+
};
79+
80+
export type ChannelSetupWizardCredential = {
81+
inputKey: keyof ChannelSetupInput;
82+
providerHint: string;
83+
credentialLabel: string;
84+
preferredEnvVar?: string;
85+
helpTitle?: string;
86+
helpLines?: string[];
87+
envPrompt: string;
88+
keepPrompt: string;
89+
inputPrompt: string;
90+
allowEnv?: (params: { cfg: OpenClawConfig; accountId: string }) => boolean;
91+
inspect: (params: {
92+
cfg: OpenClawConfig;
93+
accountId: string;
94+
}) => ChannelSetupWizardCredentialState;
95+
shouldPrompt?: (params: {
96+
cfg: OpenClawConfig;
97+
accountId: string;
98+
credentialValues: ChannelSetupWizardCredentialValues;
99+
currentValue?: string;
100+
state: ChannelSetupWizardCredentialState;
101+
}) => boolean | Promise<boolean>;
102+
applyUseEnv?: (params: {
103+
cfg: OpenClawConfig;
104+
accountId: string;
105+
}) => OpenClawConfig | Promise<OpenClawConfig>;
106+
applySet?: (params: {
107+
cfg: OpenClawConfig;
108+
accountId: string;
109+
credentialValues: ChannelSetupWizardCredentialValues;
110+
value: unknown;
111+
resolvedValue: string;
112+
}) => OpenClawConfig | Promise<OpenClawConfig>;
113+
};
114+
115+
export type ChannelSetupWizardTextInput = {
116+
inputKey: keyof ChannelSetupInput;
117+
message: string;
118+
placeholder?: string;
119+
required?: boolean;
120+
applyEmptyValue?: boolean;
121+
helpTitle?: string;
122+
helpLines?: string[];
123+
confirmCurrentValue?: boolean;
124+
keepPrompt?: string | ((value: string) => string);
125+
currentValue?: (params: {
126+
cfg: OpenClawConfig;
127+
accountId: string;
128+
credentialValues: ChannelSetupWizardCredentialValues;
129+
}) => string | undefined | Promise<string | undefined>;
130+
initialValue?: (params: {
131+
cfg: OpenClawConfig;
132+
accountId: string;
133+
credentialValues: ChannelSetupWizardCredentialValues;
134+
}) => string | undefined | Promise<string | undefined>;
135+
shouldPrompt?: (params: {
136+
cfg: OpenClawConfig;
137+
accountId: string;
138+
credentialValues: ChannelSetupWizardCredentialValues;
139+
currentValue?: string;
140+
}) => boolean | Promise<boolean>;
141+
applyCurrentValue?: boolean;
142+
validate?: (params: {
143+
value: string;
144+
cfg: OpenClawConfig;
145+
accountId: string;
146+
credentialValues: ChannelSetupWizardCredentialValues;
147+
}) => string | undefined;
148+
normalizeValue?: (params: {
149+
value: string;
150+
cfg: OpenClawConfig;
151+
accountId: string;
152+
credentialValues: ChannelSetupWizardCredentialValues;
153+
}) => string;
154+
applySet?: (params: {
155+
cfg: OpenClawConfig;
156+
accountId: string;
157+
value: string;
158+
}) => OpenClawConfig | Promise<OpenClawConfig>;
159+
};
160+
161+
export type ChannelSetupWizardAllowFromEntry = {
162+
input: string;
163+
resolved: boolean;
164+
id: string | null;
165+
};
166+
167+
export type ChannelSetupWizardAllowFrom = {
168+
helpTitle?: string;
169+
helpLines?: string[];
170+
credentialInputKey?: keyof ChannelSetupInput;
171+
message: string;
172+
placeholder: string;
173+
invalidWithoutCredentialNote: string;
174+
parseInputs?: (raw: string) => string[];
175+
parseId: (raw: string) => string | null;
176+
resolveEntries: (params: {
177+
cfg: OpenClawConfig;
178+
accountId: string;
179+
credentialValues: ChannelSetupWizardCredentialValues;
180+
entries: string[];
181+
}) => Promise<ChannelSetupWizardAllowFromEntry[]>;
182+
apply: (params: {
183+
cfg: OpenClawConfig;
184+
accountId: string;
185+
allowFrom: string[];
186+
}) => OpenClawConfig | Promise<OpenClawConfig>;
187+
};
188+
189+
export type ChannelSetupWizardGroupAccess = {
190+
label: string;
191+
placeholder: string;
192+
helpTitle?: string;
193+
helpLines?: string[];
194+
skipAllowlistEntries?: boolean;
195+
currentPolicy: (params: { cfg: OpenClawConfig; accountId: string }) => ChannelAccessPolicy;
196+
currentEntries: (params: { cfg: OpenClawConfig; accountId: string }) => string[];
197+
updatePrompt: (params: { cfg: OpenClawConfig; accountId: string }) => boolean;
198+
setPolicy: (params: {
199+
cfg: OpenClawConfig;
200+
accountId: string;
201+
policy: ChannelAccessPolicy;
202+
}) => OpenClawConfig;
203+
resolveAllowlist?: (params: {
204+
cfg: OpenClawConfig;
205+
accountId: string;
206+
credentialValues: ChannelSetupWizardCredentialValues;
207+
entries: string[];
208+
prompter: Pick<WizardPrompter, "note">;
209+
}) => Promise<unknown>;
210+
applyAllowlist?: (params: {
211+
cfg: OpenClawConfig;
212+
accountId: string;
213+
resolved: unknown;
214+
}) => OpenClawConfig;
215+
};
216+
217+
export type ChannelSetupWizardPrepare = (params: {
218+
cfg: OpenClawConfig;
219+
accountId: string;
220+
credentialValues: ChannelSetupWizardCredentialValues;
221+
runtime: ChannelSetupConfigureContext["runtime"];
222+
prompter: WizardPrompter;
223+
options?: ChannelSetupConfigureContext["options"];
224+
}) =>
225+
| {
226+
cfg?: OpenClawConfig;
227+
credentialValues?: ChannelSetupWizardCredentialValues;
228+
}
229+
| void
230+
| Promise<{
231+
cfg?: OpenClawConfig;
232+
credentialValues?: ChannelSetupWizardCredentialValues;
233+
} | void>;
234+
235+
export type ChannelSetupWizardFinalize = (params: {
236+
cfg: OpenClawConfig;
237+
accountId: string;
238+
credentialValues: ChannelSetupWizardCredentialValues;
239+
runtime: ChannelSetupConfigureContext["runtime"];
240+
prompter: WizardPrompter;
241+
options?: ChannelSetupConfigureContext["options"];
242+
forceAllowFrom: boolean;
243+
}) =>
244+
| {
245+
cfg?: OpenClawConfig;
246+
credentialValues?: ChannelSetupWizardCredentialValues;
247+
}
248+
| void
249+
| Promise<{
250+
cfg?: OpenClawConfig;
251+
credentialValues?: ChannelSetupWizardCredentialValues;
252+
} | void>;
253+
254+
export type ChannelSetupWizard = {
255+
channel: string;
256+
status: ChannelSetupWizardStatus;
257+
introNote?: ChannelSetupWizardNote;
258+
envShortcut?: ChannelSetupWizardEnvShortcut;
259+
resolveAccountIdForConfigure?: (params: {
260+
cfg: OpenClawConfig;
261+
prompter: WizardPrompter;
262+
options?: ChannelSetupConfigureContext["options"];
263+
accountOverride?: string;
264+
shouldPromptAccountIds: boolean;
265+
listAccountIds: ChannelSetupPlugin["config"]["listAccountIds"];
266+
defaultAccountId: string;
267+
}) => string | Promise<string>;
268+
resolveShouldPromptAccountIds?: (params: {
269+
cfg: OpenClawConfig;
270+
options?: ChannelSetupConfigureContext["options"];
271+
shouldPromptAccountIds: boolean;
272+
}) => boolean;
273+
prepare?: ChannelSetupWizardPrepare;
274+
stepOrder?: "credentials-first" | "text-first";
275+
credentials: ChannelSetupWizardCredential[];
276+
textInputs?: ChannelSetupWizardTextInput[];
277+
finalize?: ChannelSetupWizardFinalize;
278+
completionNote?: ChannelSetupWizardNote;
279+
dmPolicy?: ChannelSetupDmPolicy;
280+
allowFrom?: ChannelSetupWizardAllowFrom;
281+
groupAccess?: ChannelSetupWizardGroupAccess;
282+
disable?: (cfg: OpenClawConfig) => OpenClawConfig;
283+
onAccountRecorded?: ChannelSetupWizardAdapter["onAccountRecorded"];
22284
};
23285

24286
export type SetupChannelsOptions = {

src/channels/plugins/types.adapters.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,6 @@ export type ChannelApprovalDeliveryAdapter = {
669669
request: ExecApprovalRequest;
670670
}) => boolean;
671671
};
672-
export type { ChannelApprovalKind } from "../../infra/approval-types.js";
673672

674673
export type ChannelApproveCommandBehavior =
675674
| { kind: "allow" }

src/infra/approval-handler-runtime-types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import type { ExecApprovalChannelRuntimeEventKind } from "./exec-approval-channe
1111
import type { ExecApprovalRequest, ExecApprovalResolved } from "./exec-approvals.js";
1212
import type { PluginApprovalRequest, PluginApprovalResolved } from "./plugin-approvals.js";
1313

14+
export type { ChannelApprovalKind } from "./approval-types.js";
15+
1416
export type ApprovalRequest = ExecApprovalRequest | PluginApprovalRequest;
1517
export type ApprovalResolved = ExecApprovalResolved | PluginApprovalResolved;
1618

src/infra/outbound/deliver.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import type { NormalizedOutboundPayload } from "./payloads.js";
3939
import { normalizeReplyPayloadsForDelivery } from "./payloads.js";
4040
import { resolveOutboundSendDep, type OutboundSendDeps } from "./send-deps.js";
4141
import type { OutboundSessionContext } from "./session-context.js";
42+
import type { OutboundChannel } from "./targets.js";
4243

4344
export type { OutboundDeliveryResult } from "./deliver-types.js";
4445
export type { NormalizedOutboundPayload } from "./payloads.js";

src/tts/tts-config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from "node:path";
33
import type { OpenClawConfig } from "../config/types.js";
44
import type { TtsAutoMode, TtsMode } from "../config/types.tts.js";
55
import { resolveConfigDir, resolveUserPath } from "../utils.js";
6+
import { normalizeTtsAutoMode } from "./tts-auto-mode.js";
67
export { normalizeTtsAutoMode } from "./tts-auto-mode.js";
78

89
export function resolveConfiguredTtsMode(cfg: OpenClawConfig): TtsMode {

0 commit comments

Comments
 (0)