diff --git a/openclaw b/openclaw new file mode 160000 index 000000000..0639c7bf1 --- /dev/null +++ b/openclaw @@ -0,0 +1 @@ +Subproject commit 0639c7bf1f37bafeb847afc9e422f05f3bb084a3 diff --git a/src/commands/onboard-auth.credentials.ts b/src/commands/onboard-auth.credentials.ts index fbf6dbfb9..08dba7fee 100644 --- a/src/commands/onboard-auth.credentials.ts +++ b/src/commands/onboard-auth.credentials.ts @@ -10,8 +10,9 @@ export async function writeOAuthCredentials( agentDir?: string, ): Promise { // Write to resolved agent dir so gateway finds credentials on startup. + const emailStr = typeof creds.email === "string" ? creds.email : "default"; upsertAuthProfile({ - profileId: `${provider}:${creds.email ?? "default"}`, + profileId: `${provider}:${emailStr}`, credential: { type: "oauth", provider, diff --git a/src/infra/heartbeat-runner.ts b/src/infra/heartbeat-runner.ts index 7388df870..f40f52e7c 100644 --- a/src/infra/heartbeat-runner.ts +++ b/src/infra/heartbeat-runner.ts @@ -506,7 +506,7 @@ export async function runHeartbeatOnce(opts: { // Check if this is an exec event with pending exec completion system events. // If so, use a specialized prompt that instructs the model to relay the result // instead of the standard heartbeat prompt with "reply HEARTBEAT_OK". - const isExecEvent = opts.reason === "exec-event"; + const _isExecEvent = opts.reason === "exec-event"; const pendingEvents = peekSystemEvents(sessionKey); const hasExecCompletion = pendingEvents.some((evt) => evt.includes("Exec finished")); // Check for generic (non-exec) system events that may require action (e.g., from cron jobs). diff --git a/src/telegram-gramjs/auth.test.ts b/src/telegram-gramjs/auth.test.ts index 0460884d8..19d50cb40 100644 --- a/src/telegram-gramjs/auth.test.ts +++ b/src/telegram-gramjs/auth.test.ts @@ -4,7 +4,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { AuthFlow, verifySession } from "./auth.js"; -import type { AuthState } from "./types.js"; // Mock readline to avoid stdin/stdout in tests const mockPrompt = vi.fn(); diff --git a/src/telegram-gramjs/client.ts b/src/telegram-gramjs/client.ts index cbc37f0c6..1b342304c 100644 --- a/src/telegram-gramjs/client.ts +++ b/src/telegram-gramjs/client.ts @@ -13,12 +13,7 @@ import { StringSession } from "telegram/sessions"; import { NewMessage, type NewMessageEvent } from "telegram/events"; import type { Api } from "telegram"; import { createSubsystemLogger } from "../logging/subsystem.js"; -import type { - ConnectionState, - GramJSMessageContext, - SendMessageParams, - SessionOptions, -} from "./types.js"; +import type { ConnectionState, GramJSMessageContext, SendMessageParams } from "./types.js"; const log = createSubsystemLogger("telegram-gramjs:client"); @@ -45,7 +40,7 @@ export class GramJSClient { apiId, apiHash, sessionString = "", - proxy, + proxy: _proxy, connectionRetries = 5, timeout = 30, } = options; diff --git a/src/telegram-gramjs/config.ts b/src/telegram-gramjs/config.ts index 21ff04221..06097251a 100644 --- a/src/telegram-gramjs/config.ts +++ b/src/telegram-gramjs/config.ts @@ -8,10 +8,7 @@ */ import type { OpenClawConfig } from "../config/config.js"; -import type { - TelegramGramJSAccountConfig, - TelegramGramJSConfig, -} from "../config/types.telegram-gramjs.js"; +import type { TelegramGramJSConfig } from "../config/types.telegram-gramjs.js"; import type { ChannelConfigAdapter } from "../channels/plugins/types.adapters.js"; import type { ResolvedGramJSAccount } from "./types.js"; import { createSubsystemLogger } from "../logging/subsystem.js"; diff --git a/src/telegram-gramjs/handlers.ts b/src/telegram-gramjs/handlers.ts index 7fec55b5a..b5b0b25d7 100644 --- a/src/telegram-gramjs/handlers.ts +++ b/src/telegram-gramjs/handlers.ts @@ -169,8 +169,8 @@ export function buildSessionKey(gramjsContext: GramJSMessageContext, accountId: * - Checking message.entities for mentions */ export function wasMessageMentioned( - gramjsContext: GramJSMessageContext, - botUsername?: string, + _gramjsContext: GramJSMessageContext, + _botUsername?: string, ): boolean { // TODO: Implement mention detection // For now, return false (rely on requireMention config) diff --git a/src/telegram-gramjs/types.ts b/src/telegram-gramjs/types.ts index a90fb0d7b..f569255b0 100644 --- a/src/telegram-gramjs/types.ts +++ b/src/telegram-gramjs/types.ts @@ -3,7 +3,6 @@ */ import type { TelegramGramJSAccountConfig } from "../config/types.telegram-gramjs.js"; -import type { OpenClawConfig } from "../config/config.js"; /** * Resolved account configuration with all necessary fields populated.