Skip to content

Commit 792653d

Browse files
committed
fix(ci): clear residual tsgo blockers
1 parent a16331c commit 792653d

8 files changed

Lines changed: 37 additions & 23 deletions

File tree

src/auto-reply/reply/directive-handling.mixed-inline.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ describe("mixed inline directives", () => {
5757
const fastLane = await applyInlineDirectivesFastLane({
5858
directives,
5959
commandAuthorized: true,
60+
senderIsOwner: false,
6061
ctx: { Surface: "whatsapp" } as never,
6162
cfg,
6263
agentId: "main",
@@ -129,6 +130,7 @@ describe("mixed inline directives", () => {
129130
const fastLane = await applyInlineDirectivesFastLane({
130131
directives,
131132
commandAuthorized: true,
133+
senderIsOwner: false,
132134
ctx: { Surface: "discord" } as never,
133135
cfg,
134136
agentId: "main",

src/channels/plugins/legacy-config.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ const {
77
} = vi.hoisted(() => ({
88
loadBundledChannelDoctorContractApiMock: vi.fn(),
99
getBootstrapChannelPluginMock: vi.fn(),
10-
listPluginDoctorLegacyConfigRulesMock: vi.fn(() => []),
10+
listPluginDoctorLegacyConfigRulesMock: vi.fn<() => Array<{ path: string[]; message: string }>>(
11+
() => [],
12+
),
1113
}));
1214

1315
vi.mock("./doctor-contract-api.js", () => ({

src/cli/daemon-cli/install.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const resolveGatewayPortMock = vi.hoisted(() => vi.fn(() => 18789));
1010
const writeConfigFileMock = vi.hoisted(() => vi.fn());
1111
const resolveIsNixModeMock = vi.hoisted(() => vi.fn(() => false));
1212
const resolveSecretInputRefMock = vi.hoisted(() =>
13-
vi.fn((): { ref: unknown } => ({ ref: undefined })),
13+
vi.fn((_value?: unknown): { ref: unknown } => ({ ref: undefined })),
1414
);
1515
const hasConfiguredSecretInputMock = vi.hoisted(() =>
1616
vi.fn((value: unknown): boolean => {

src/commands/agent.runtime-config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ describe("agentCommand runtime config", () => {
135135
telegram: {
136136
botToken: { source: "env", provider: "default", id: "TELEGRAM_BOT_TOKEN" },
137137
},
138-
} as OpenClawConfig["channels"];
138+
} as unknown as OpenClawConfig["channels"];
139139
const resolveConfigWithSecretsSpy = vi
140140
.spyOn(commandConfigResolutionRuntimeModule, "resolveCommandConfigWithSecrets")
141141
.mockResolvedValueOnce({

src/cron/isolated-agent/run.auth-profile-cold-path.test.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,14 @@ function makeParams(overrides?: Record<string, unknown>) {
2323
job: {
2424
id: "cron-auth-cold-path",
2525
name: "Auth Cold Path",
26-
schedule: { kind: "cron", expr: "0 * * * *", tz: "UTC" },
27-
sessionTarget: "isolated",
28-
payload: { kind: "agentTurn", message: "run task" },
26+
enabled: true,
27+
createdAtMs: 0,
28+
updatedAtMs: 0,
29+
schedule: { kind: "cron" as const, expr: "0 * * * *", tz: "UTC" },
30+
sessionTarget: "isolated" as const,
31+
state: {},
32+
wakeMode: "next-heartbeat" as const,
33+
payload: { kind: "agentTurn" as const, message: "run task" },
2934
},
3035
message: "run task",
3136
sessionKey: "cron:auth-cold-path",

src/cron/isolated-agent/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ type PreparedCronRunContext = {
240240
persistSessionEntry: PersistCronSessionEntry;
241241
withRunSession: WithRunSession;
242242
agentPayload: Extract<CronJob["payload"], { kind: "agentTurn" }> | null;
243-
resolvedDelivery: Awaited<ReturnType<typeof resolveDeliveryTarget>>;
243+
resolvedDelivery: ResolvedCronDeliveryTarget;
244244
deliveryRequested: boolean;
245245
toolPolicy: ReturnType<typeof resolveCronToolPolicy>;
246246
skillsSnapshot: SkillSnapshot;

src/mcp/channel-server.shutdown-unhandled-rejection.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const transportState = vi.hoisted(() => ({
44
lastTransport: null as { onclose?: (() => void) | undefined } | null,
55
}));
66
const serverState = vi.hoisted(() => ({
7-
connect: vi.fn(async () => {}),
7+
connect: vi.fn(async (_transport?: unknown) => {}),
88
close: vi.fn(async () => {}),
99
}));
1010
const bridgeState = vi.hoisted(() => ({
@@ -13,7 +13,7 @@ const bridgeState = vi.hoisted(() => ({
1313
throw new Error("close boom");
1414
}),
1515
setServer: vi.fn(),
16-
handleClaudePermissionRequest: vi.fn(async () => {}),
16+
handleClaudePermissionRequest: vi.fn(async (_payload?: unknown) => {}),
1717
}));
1818

1919
vi.mock("@modelcontextprotocol/sdk/server/stdio.js", () => ({

src/wizard/setup.ts

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -484,20 +484,25 @@ export async function runSetupWizard(
484484
let nextConfig: OpenClawConfig = applyLocalSetupWorkspaceConfig(baseConfig, workspaceDir);
485485

486486
const authChoiceFromPrompt = opts.authChoice === undefined;
487-
let authChoice = opts.authChoice;
488-
if (authChoiceFromPrompt) {
489-
const { ensureAuthProfileStore } = await import("../agents/auth-profiles.runtime.js");
490-
const { promptAuthChoiceGrouped } = await import("../commands/auth-choice-prompt.js");
491-
const authStore = ensureAuthProfileStore(undefined, {
492-
allowKeychainPrompt: false,
493-
});
494-
authChoice = await promptAuthChoiceGrouped({
495-
prompter,
496-
store: authStore,
497-
includeSkip: true,
498-
config: nextConfig,
499-
workspaceDir,
500-
});
487+
const promptedAuthChoice = authChoiceFromPrompt
488+
? await (async () => {
489+
const { ensureAuthProfileStore } = await import("../agents/auth-profiles.runtime.js");
490+
const { promptAuthChoiceGrouped } = await import("../commands/auth-choice-prompt.js");
491+
const authStore = ensureAuthProfileStore(undefined, {
492+
allowKeychainPrompt: false,
493+
});
494+
return await promptAuthChoiceGrouped({
495+
prompter,
496+
store: authStore,
497+
includeSkip: true,
498+
config: nextConfig,
499+
workspaceDir,
500+
});
501+
})()
502+
: undefined;
503+
const authChoice = opts.authChoice ?? promptedAuthChoice;
504+
if (!authChoice) {
505+
throw new Error("Failed to resolve auth choice.");
501506
}
502507

503508
if (authChoice === "custom-api-key") {

0 commit comments

Comments
 (0)