SYMBOL INDEX (250 symbols across 38 files) FILE: packages/example-openai/main.ts function main (line 23) | async function main() { FILE: packages/example-openai/src/openai-agent.ts type OpenAIAgentOptions (line 15) | type OpenAIAgentOptions = { type Message (line 27) | type Message = OpenAI.ChatCompletionMessageParam; class OpenAIAgent (line 29) | class OpenAIAgent implements Agent { method constructor (line 36) | constructor(opts: OpenAIAgentOptions) { method chat (line 43) | async chat(request: ChatRequest): Promise { FILE: packages/sdk/src/agent/interface.ts type Agent (line 9) | interface Agent { type ChatRequest (line 16) | interface ChatRequest { type ChatResponse (line 33) | interface ChatResponse { FILE: packages/sdk/src/api/api.ts type WeixinApiOptions (line 21) | type WeixinApiOptions = { function readChannelVersion (line 33) | function readChannelVersion(): string { constant CHANNEL_VERSION (line 44) | const CHANNEL_VERSION = readChannelVersion(); function buildBaseInfo (line 47) | function buildBaseInfo(): BaseInfo { constant DEFAULT_LONG_POLL_TIMEOUT_MS (line 52) | const DEFAULT_LONG_POLL_TIMEOUT_MS = 35_000; constant DEFAULT_API_TIMEOUT_MS (line 54) | const DEFAULT_API_TIMEOUT_MS = 15_000; constant DEFAULT_CONFIG_TIMEOUT_MS (line 56) | const DEFAULT_CONFIG_TIMEOUT_MS = 10_000; function ensureTrailingSlash (line 58) | function ensureTrailingSlash(url: string): string { function randomWechatUin (line 63) | function randomWechatUin(): string { function buildCommonHeaders (line 69) | function buildCommonHeaders(): Record { function buildHeaders (line 78) | function buildHeaders(opts: { token?: string; body: string }): Record {} type ResolvedWeixinAccount (line 245) | type ResolvedWeixinAccount = { function listWeixinAccountIds (line 256) | function listWeixinAccountIds(): string[] { function resolveWeixinAccount (line 261) | function resolveWeixinAccount(accountId?: string | null): ResolvedWeixin... FILE: packages/sdk/src/auth/login-qr.ts type ActiveLogin (line 7) | type ActiveLogin = { constant ACTIVE_LOGIN_TTL_MS (line 20) | const ACTIVE_LOGIN_TTL_MS = 5 * 60_000; constant GET_QRCODE_TIMEOUT_MS (line 22) | const GET_QRCODE_TIMEOUT_MS = 5_000; constant QR_LONG_POLL_TIMEOUT_MS (line 24) | const QR_LONG_POLL_TIMEOUT_MS = 35_000; constant DEFAULT_ILINK_BOT_TYPE (line 27) | const DEFAULT_ILINK_BOT_TYPE = "3"; constant FIXED_BASE_URL (line 30) | const FIXED_BASE_URL = "https://ilinkai.weixin.qq.com"; type QRCodeResponse (line 34) | interface QRCodeResponse { type StatusResponse (line 39) | interface StatusResponse { function isLoginFresh (line 50) | function isLoginFresh(login: ActiveLogin): boolean { function purgeExpiredLogins (line 55) | function purgeExpiredLogins(): void { function fetchQRCode (line 63) | async function fetchQRCode(apiBaseUrl: string, botType: string): Promise... function pollQRStatus (line 74) | async function pollQRStatus(apiBaseUrl: string, qrcode: string): Promise... type WeixinQrStartResult (line 96) | type WeixinQrStartResult = { type WeixinQrWaitResult (line 102) | type WeixinQrWaitResult = { function startWeixinLoginWithQr (line 112) | async function startWeixinLoginWithQr(opts: { constant MAX_QR_REFRESH_COUNT (line 167) | const MAX_QR_REFRESH_COUNT = 3; function waitForWeixinLogin (line 169) | async function waitForWeixinLogin(opts: { FILE: packages/sdk/src/auth/pairing.ts function resolveCredentialsDir (line 11) | function resolveCredentialsDir(): string { function safeKey (line 20) | function safeKey(raw: string): string { function resolveFrameworkAllowFromPath (line 33) | function resolveFrameworkAllowFromPath(accountId: string): string { type AllowFromFileContent (line 39) | type AllowFromFileContent = { function readFrameworkAllowFromList (line 48) | function readFrameworkAllowFromList(accountId: string): string[] { function registerUserInAllowFromStore (line 66) | function registerUserInAllowFromStore(params: { FILE: packages/sdk/src/bot.ts constant MEDIA_TEMP_DIR (line 27) | const MEDIA_TEMP_DIR = path.join(os.tmpdir(), "weixin-agent/media"); type LoginOptions (line 29) | type LoginOptions = { type StartOptions (line 36) | type StartOptions = { function login (line 51) | async function login(opts?: LoginOptions): Promise { function logout (line 107) | function logout(opts?: { log?: (msg: string) => void }): void { function isLoggedIn (line 121) | function isLoggedIn(): boolean { class Bot (line 134) | class Bot { method constructor (line 143) | constructor(params: { method wait (line 168) | async wait(): Promise { method sendMessage (line 181) | async sendMessage(message: string | ChatResponse): Promise { function start (line 238) | function start(agent: Agent, opts?: StartOptions): Bot { FILE: packages/sdk/src/cdn/aes-ecb.ts function encryptAesEcb (line 7) | function encryptAesEcb(plaintext: Buffer, key: Buffer): Buffer { function decryptAesEcb (line 13) | function decryptAesEcb(ciphertext: Buffer, key: Buffer): Buffer { function aesEcbPaddedSize (line 19) | function aesEcbPaddedSize(plaintextSize: number): number { FILE: packages/sdk/src/cdn/cdn-upload.ts constant UPLOAD_MAX_RETRIES (line 7) | const UPLOAD_MAX_RETRIES = 3; function uploadBufferToCdn (line 14) | async function uploadBufferToCdn(params: { FILE: packages/sdk/src/cdn/cdn-url.ts function buildCdnDownloadUrl (line 6) | function buildCdnDownloadUrl(encryptedQueryParam: string, cdnBaseUrl: st... function buildCdnUploadUrl (line 11) | function buildCdnUploadUrl(params: { FILE: packages/sdk/src/cdn/pic-decrypt.ts function fetchCdnBytes (line 8) | async function fetchCdnBytes(url: string, label: string): Promise { function parseAesKey (line 40) | function parseAesKey(aesKeyBase64: string, label: string): Buffer { function downloadAndDecryptBuffer (line 58) | async function downloadAndDecryptBuffer( function downloadPlainCdnBuffer (line 78) | async function downloadPlainCdnBuffer( FILE: packages/sdk/src/cdn/upload.ts type UploadedFileInfo (line 14) | type UploadedFileInfo = { function downloadRemoteImageToTemp (line 30) | async function downloadRemoteImageToTemp(url: string, destDir: string): ... function uploadMediaToCdn (line 52) | async function uploadMediaToCdn(params: { function uploadFileToWeixin (line 114) | async function uploadFileToWeixin(params: { function uploadVideoToWeixin (line 128) | async function uploadVideoToWeixin(params: { function uploadFileAttachmentToWeixin (line 145) | async function uploadFileAttachmentToWeixin(params: { FILE: packages/sdk/src/media/media-download.ts constant WEIXIN_MEDIA_MAX_BYTES (line 12) | const WEIXIN_MEDIA_MAX_BYTES = 100 * 1024 * 1024; type SaveMediaFn (line 15) | type SaveMediaFn = ( function downloadMediaFromItem (line 27) | async function downloadMediaFromItem( FILE: packages/sdk/src/media/mime.ts constant EXTENSION_TO_MIME (line 3) | const EXTENSION_TO_MIME: Record = { constant MIME_TO_EXTENSION (line 32) | const MIME_TO_EXTENSION: Record = { function getMimeFromFilename (line 56) | function getMimeFromFilename(filename: string): string { function getExtensionFromMime (line 62) | function getExtensionFromMime(mimeType: string): string { function getExtensionFromContentTypeOrUrl (line 68) | function getExtensionFromContentTypeOrUrl(contentType: string | null, ur... FILE: packages/sdk/src/media/silk-transcode.ts constant SILK_SAMPLE_RATE (line 4) | const SILK_SAMPLE_RATE = 24_000; function pcmBytesToWav (line 10) | function pcmBytesToWav(pcm: Uint8Array, sampleRate: number): Buffer { function silkToWav (line 57) | async function silkToWav(silkBuf: Buffer): Promise { FILE: packages/sdk/src/messaging/debug-mode.ts type DebugModeState (line 16) | interface DebugModeState { function resolveDebugModePath (line 20) | function resolveDebugModePath(): string { function loadState (line 24) | function loadState(): DebugModeState { function saveState (line 35) | function saveState(state: DebugModeState): void { function toggleDebugMode (line 42) | function toggleDebugMode(accountId: string): boolean { function isDebugMode (line 55) | function isDebugMode(accountId: string): boolean { function _resetForTest (line 63) | function _resetForTest(): void { FILE: packages/sdk/src/messaging/error-notice.ts function sendWeixinErrorNotice (line 9) | async function sendWeixinErrorNotice(params: { FILE: packages/sdk/src/messaging/inbound.ts function contextTokenKey (line 18) | function contextTokenKey(accountId: string, userId: string): string { function setContextToken (line 23) | function setContextToken(accountId: string, userId: string, token: strin... function getContextToken (line 30) | function getContextToken(accountId: string, userId: string): string | un... function generateMessageSid (line 43) | function generateMessageSid(): string { type WeixinMsgContext (line 48) | type WeixinMsgContext = { function isMediaItem (line 72) | function isMediaItem(item: MessageItem): boolean { function bodyFromItemList (line 81) | function bodyFromItemList(itemList?: MessageItem[]): string { type WeixinInboundMediaOpts (line 108) | type WeixinInboundMediaOpts = { function weixinMessageToMsgContext (line 129) | function weixinMessageToMsgContext( function getContextTokenFromMsgContext (line 169) | function getContextTokenFromMsgContext(ctx: WeixinMsgContext): string | ... FILE: packages/sdk/src/messaging/process-message.ts constant MEDIA_TEMP_DIR (line 21) | const MEDIA_TEMP_DIR = path.join(os.tmpdir(), "weixin-agent/media"); function saveMediaBuffer (line 24) | async function saveMediaBuffer( type ProcessMessageDeps (line 46) | type ProcessMessageDeps = { function extractTextBody (line 58) | function extractTextBody(itemList?: MessageItem[]): string { function findMediaItem (line 69) | function findMediaItem(itemList?: MessageItem[]): MessageItem | undefined { function processOneMessage (line 108) | async function processOneMessage( FILE: packages/sdk/src/messaging/send-media.ts function sendWeixinMediaFile (line 17) | async function sendWeixinMediaFile(params: { FILE: packages/sdk/src/messaging/send.ts function generateClientId (line 9) | function generateClientId(): string { function markdownToPlainText (line 17) | function markdownToPlainText(text: string): string { function buildTextMessageReq (line 43) | function buildTextMessageReq(params: { function buildSendMessageReq (line 67) | function buildSendMessageReq(params: { function sendMessageWeixin (line 81) | async function sendMessageWeixin(params: { function sendMediaItems (line 116) | async function sendMediaItems(params: { function sendImageMessageWeixin (line 173) | async function sendImageMessageWeixin(params: { function sendVideoMessageWeixin (line 208) | async function sendVideoMessageWeixin(params: { function sendFileMessageWeixin (line 240) | async function sendFileMessageWeixin(params: { FILE: packages/sdk/src/messaging/slash-commands.ts type SlashCommandResult (line 15) | interface SlashCommandResult { type SlashCommandContext (line 20) | interface SlashCommandContext { function sendReply (line 33) | async function sendReply(ctx: SlashCommandContext, text: string): Promis... function handleEcho (line 43) | async function handleEcho( function handleSlashCommand (line 69) | async function handleSlashCommand( FILE: packages/sdk/src/monitor/monitor.ts constant DEFAULT_LONG_POLL_TIMEOUT_MS (line 10) | const DEFAULT_LONG_POLL_TIMEOUT_MS = 35_000; constant MAX_CONSECUTIVE_FAILURES (line 11) | const MAX_CONSECUTIVE_FAILURES = 3; constant BACKOFF_DELAY_MS (line 12) | const BACKOFF_DELAY_MS = 30_000; constant RETRY_DELAY_MS (line 13) | const RETRY_DELAY_MS = 2_000; type MonitorWeixinOpts (line 15) | type MonitorWeixinOpts = { function monitorWeixinProvider (line 30) | async function monitorWeixinProvider(opts: MonitorWeixinOpts): Promise { FILE: packages/sdk/src/storage/state-dir.ts function resolveStateDir (line 5) | function resolveStateDir(): string { FILE: packages/sdk/src/storage/sync-buf.ts function resolveAccountsDir (line 8) | function resolveAccountsDir(): string { function getSyncBufFilePath (line 16) | function getSyncBufFilePath(accountId: string): string { function getLegacySyncBufDefaultJsonPath (line 21) | function getLegacySyncBufDefaultJsonPath(): string { type SyncBufData (line 32) | type SyncBufData = { function readSyncBufFile (line 36) | function readSyncBufFile(filePath: string): string | undefined { function loadGetUpdatesBuf (line 56) | function loadGetUpdatesBuf(filePath: string): string | undefined { function saveGetUpdatesBuf (line 77) | function saveGetUpdatesBuf(filePath: string, getUpdatesBuf: string): void { FILE: packages/sdk/src/util/logger.ts constant MAIN_LOG_DIR (line 11) | const MAIN_LOG_DIR = path.join(os.tmpdir(), "openclaw"); constant SUBSYSTEM (line 12) | const SUBSYSTEM = "gateway/channels/openclaw-weixin"; constant RUNTIME (line 13) | const RUNTIME = "node"; constant RUNTIME_VERSION (line 14) | const RUNTIME_VERSION = process.versions.node; constant HOSTNAME (line 15) | const HOSTNAME = os.hostname() || "unknown"; constant PARENT_NAMES (line 16) | const PARENT_NAMES = ["openclaw"]; constant LEVEL_IDS (line 19) | const LEVEL_IDS: Record = { constant DEFAULT_LOG_LEVEL (line 28) | const DEFAULT_LOG_LEVEL = "INFO"; function resolveMinLevel (line 30) | function resolveMinLevel(): number { function setLogLevel (line 39) | function setLogLevel(level: string): void { function toLocalISO (line 48) | function toLocalISO(now: Date): string { function localDateKey (line 56) | function localDateKey(now: Date): string { function resolveMainLogPath (line 60) | function resolveMainLogPath(): string { type Logger (line 67) | type Logger = { function buildLoggerName (line 79) | function buildLoggerName(accountId?: string): string { function writeLog (line 83) | function writeLog(level: string, message: string, accountId?: string): v... function createLogger (line 117) | function createLogger(accountId?: string): Logger { FILE: packages/sdk/src/util/random.ts function generateId (line 7) | function generateId(prefix: string): string { function tempFileName (line 15) | function tempFileName(prefix: string, ext: string): string { FILE: packages/sdk/src/util/redact.ts constant DEFAULT_BODY_MAX_LEN (line 1) | const DEFAULT_BODY_MAX_LEN = 200; constant DEFAULT_TOKEN_PREFIX_LEN (line 2) | const DEFAULT_TOKEN_PREFIX_LEN = 6; function truncate (line 8) | function truncate(s: string | undefined, max: number): string { function redactToken (line 18) | function redactToken(token: string | undefined, prefixLen = DEFAULT_TOKE... function redactBody (line 28) | function redactBody(body: string | undefined, maxLen = DEFAULT_BODY_MAX_... function redactUrl (line 38) | function redactUrl(rawUrl: string): string { FILE: packages/weixin-acp/main.ts constant BUILTIN_AGENTS (line 21) | const BUILTIN_AGENTS: Record = { function ensureLoggedIn (line 28) | async function ensureLoggedIn() { function startAgent (line 35) | async function startAgent(acpCommand: string, acpArgs: string[] = []) { function main (line 54) | async function main() { FILE: packages/weixin-acp/src/acp-agent.ts function log (line 9) | function log(msg: string) { class AcpAgent (line 17) | class AcpAgent implements Agent { method constructor (line 22) | constructor(options: AcpAgentOptions) { method chat (line 30) | async chat(request: ChatRequest): Promise { method getOrCreateSession (line 59) | private async getOrCreateSession( method clearSession (line 80) | clearSession(conversationId: string): void { method dispose (line 92) | dispose(): void { FILE: packages/weixin-acp/src/acp-connection.ts function log (line 15) | function log(msg: string) { function describeToolCall (line 19) | function describeToolCall(update: { class AcpConnection (line 30) | class AcpConnection { method constructor (line 38) | constructor(private options: AcpAgentOptions, onExit?: () => void) { method registerCollector (line 42) | registerCollector(sessionId: SessionId, collector: ResponseCollector):... method unregisterCollector (line 46) | unregisterCollector(sessionId: SessionId): void { method ensureReady (line 53) | async ensureReady(): Promise { method dispose (line 133) | dispose(): void { FILE: packages/weixin-acp/src/content-converter.ts function convertRequestToContentBlocks (line 9) | async function convertRequestToContentBlocks( FILE: packages/weixin-acp/src/response-collector.ts constant ACP_MEDIA_OUT_DIR (line 9) | const ACP_MEDIA_OUT_DIR = path.join(os.tmpdir(), "weixin-agent/media/acp... class ResponseCollector (line 15) | class ResponseCollector { method handleUpdate (line 22) | handleUpdate(notification: SessionNotification): void { method toResponse (line 42) | async toResponse(): Promise { FILE: packages/weixin-acp/src/types.ts type AcpAgentOptions (line 1) | type AcpAgentOptions = {