chore: scaffold dsh-telegram-channel package

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
owo
2026-08-14 15:57:41 +08:00
co-authored by Cursor
commit f9d8ae7c6f
7 changed files with 134 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import type { Context } from '@deepseek-ai/cordis'
import Schema from '@deepseek-ai/schemastery'
export const name = 'dsh-telegram-channel'
export const inject = ['agents']
export interface TelegramChannelConfig {
token?: string
allowedUserIds?: number[]
allowAllUsers?: boolean
provider?: string
model?: string
maxMessageLength?: number
pollingTimeoutSec?: number
cwd?: string
}
export const Config: Schema<TelegramChannelConfig> = Schema.object({
token: Schema.string().default(''),
allowedUserIds: Schema.array(Schema.number()).default([]),
allowAllUsers: Schema.boolean().default(false),
provider: Schema.string().default('deepseek-official'),
model: Schema.string().default('deepseek-v4-flash'),
maxMessageLength: Schema.number().default(4096),
pollingTimeoutSec: Schema.number().default(30),
cwd: Schema.string(),
})
export function apply(_ctx: Context, _config: TelegramChannelConfig): void {
// Task 6 fills this in
}