fix: ship prebuilt lib and drop prepare for one-click git install

Avoids pnpm allowBuilds block on dsh plugin add; README install steps expanded for first-time users.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
owo
2026-08-14 17:16:25 +08:00
co-authored by Cursor
parent c2c0db7597
commit 8ef1622822
15 changed files with 869 additions and 62 deletions
+42
View File
@@ -0,0 +1,42 @@
import type { Context } from '@deepseek-ai/cordis';
import { type TelegramClientLike, type TelegramUpdate } from './client.js';
export interface TelegramBridgeOptions {
token: string;
allowedUserIds: number[];
allowAllUsers: boolean;
client?: TelegramClientLike;
sleep?: (ms: number) => Promise<void>;
maxMessageLength?: number;
pollingTimeoutSec?: number;
}
export declare class TelegramBridge {
private readonly ctx;
private readonly token;
private readonly allowedUserIds;
private readonly allowAllUsers;
private readonly client;
private readonly sleep;
private readonly maxMessageLength;
private readonly bindings;
private polling;
private offset;
private pollPromise;
private pollAbort;
private disposeSessionListener;
constructor(ctx: Context, options: TelegramBridgeOptions);
start(): void;
stop(): Promise<void>;
processUpdate(update: TelegramUpdate): Promise<void>;
private handleCallback;
private liveAgents;
private findLiveAgent;
private sendSessionPicker;
private sendStatus;
private followupBound;
private pollLoop;
private interruptibleDelay;
private interruptibleSleep;
private onSessionEvent;
private deliver;
private redact;
}