From e6f2f2cfd1c15c0122ade91ef7149151320aa497 Mon Sep 17 00:00:00 2001 From: gengruilin Date: Mon, 19 Oct 2026 12:04:06 +0800 Subject: [PATCH] feat(tencent-meeting): add the Tencent Meeting plugin on the CLI account kit The bundle inserts the tencent-meeting Host row and the ui-tencent-meeting page row; all three packages are optional in the product package policy. The Host row pins @tencentcloud/tmeet 1.0.18, whose bin is a Node launcher over executables named per platform, and links this platform's executable as tmeet in a DSH cache directory on the private Shell PATH; binDir replaces the link. Repository installs deny the package's install script, which runs tmeet auth logout. One tencent-meeting skill indexes the guide and tells the agent to use the plugin's tmeet, skip the guide's installation check and agent_init.py, and send sign-in to the plugin page. The tencentMeeting Remote checks the account by reading the plain-text auth status, signs in through the browser authorization page and confirms that the server accepts the sign-in, and signs out. The page shows the sign-in steps, the signed-in user, and a sign-out confirmation. Three jscpd:ignore blocks cover the imports, Remote methods, and page actions that the CLI app plugins share by design. --- THIRD_PARTY_NOTICES.md | 1 + package.json | 2 + .../client/ui-tencent-meeting/locale/en.json | 6 + .../client/ui-tencent-meeting/locale/zh.json | 6 + .../client/ui-tencent-meeting/package.json | 74 ++++++++++++ .../src/client/TencentMeetingConnection.tsx | 85 +++++++++++++ .../src/client/connection.ts | 97 +++++++++++++++ .../ui-tencent-meeting/src/client/index.ts | 59 +++++++++ .../ui-tencent-meeting/src/client/locales.ts | 97 +++++++++++++++ .../client/ui-tencent-meeting/src/index.ts | 4 + .../client/ui-tencent-meeting/tsconfig.json | 54 +++++++++ .../ui-tencent-meeting/tsdown.config.ts | 3 + .../tencent-meeting-cli/locale/en.json | 6 + .../tencent-meeting-cli/locale/zh.json | 6 + .../tencent-meeting-cli/package.json | 69 +++++++++++ .../skills/tencent-meeting/SKILL.md | 24 ++++ .../tencent-meeting-cli/src/account.ts | 90 ++++++++++++++ .../tencent-meeting-cli/src/directory.ts | 58 +++++++++ .../tencent-meeting-cli/src/index.ts | 114 ++++++++++++++++++ .../tencent-meeting-cli/src/types.ts | 22 ++++ .../tencent-meeting-cli/tsconfig.json | 42 +++++++ .../tencent-meeting/cordis.patch.yml | 5 + .../connector/tencent-meeting/locale/en.json | 6 + .../connector/tencent-meeting/locale/zh.json | 6 + .../connector/tencent-meeting/package.json | 48 ++++++++ .../connector/tencent-meeting/src/index.ts | 2 + .../connector/tencent-meeting/tsconfig.json | 15 +++ pnpm-lock.yaml | 114 ++++++++++++++++++ pnpm-workspace.yaml | 3 + scripts/check-workspace-constraints.ts | 2 + scripts/product-package-policy.ts | 3 + tsconfig.base.json | 3 + tsconfig.client.json | 1 + tsconfig.host.json | 2 + 34 files changed, 1129 insertions(+) create mode 100644 packages/client/ui-tencent-meeting/locale/en.json create mode 100644 packages/client/ui-tencent-meeting/locale/zh.json create mode 100644 packages/client/ui-tencent-meeting/package.json create mode 100644 packages/client/ui-tencent-meeting/src/client/TencentMeetingConnection.tsx create mode 100644 packages/client/ui-tencent-meeting/src/client/connection.ts create mode 100644 packages/client/ui-tencent-meeting/src/client/index.ts create mode 100644 packages/client/ui-tencent-meeting/src/client/locales.ts create mode 100644 packages/client/ui-tencent-meeting/src/index.ts create mode 100644 packages/client/ui-tencent-meeting/tsconfig.json create mode 100644 packages/client/ui-tencent-meeting/tsdown.config.ts create mode 100644 packages/connector/tencent-meeting-cli/locale/en.json create mode 100644 packages/connector/tencent-meeting-cli/locale/zh.json create mode 100644 packages/connector/tencent-meeting-cli/package.json create mode 100644 packages/connector/tencent-meeting-cli/skills/tencent-meeting/SKILL.md create mode 100644 packages/connector/tencent-meeting-cli/src/account.ts create mode 100644 packages/connector/tencent-meeting-cli/src/directory.ts create mode 100644 packages/connector/tencent-meeting-cli/src/index.ts create mode 100644 packages/connector/tencent-meeting-cli/src/types.ts create mode 100644 packages/connector/tencent-meeting-cli/tsconfig.json create mode 100644 packages/connector/tencent-meeting/cordis.patch.yml create mode 100644 packages/connector/tencent-meeting/locale/en.json create mode 100644 packages/connector/tencent-meeting/locale/zh.json create mode 100644 packages/connector/tencent-meeting/package.json create mode 100644 packages/connector/tencent-meeting/src/index.ts create mode 100644 packages/connector/tencent-meeting/tsconfig.json diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index a1a13b2200..9779549b9b 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -67,6 +67,7 @@ External packages installed for runtime use or embedded in distributed Host or b | [`@shikijs/langs`](https://github.com/shikijs/shiki) | MIT | | [`@standard-schema/spec`](https://github.com/standard-schema/standard-schema) | MIT | | [`@tanstack/react-virtual`](https://github.com/TanStack/virtual) | MIT | +| [`@tencentcloud/tmeet`](https://github.com/TencentCloud/tencentmeeting-cli) | MIT | | [`@trycua/cua-driver`](https://github.com/trycua/cua) | MIT | | [`@vscode/ripgrep`](https://github.com/microsoft/vscode-ripgrep) | MIT | | [`@xterm/addon-fit`](https://github.com/xtermjs/xterm.js/tree/master/addons/addon-fit) | MIT | diff --git a/package.json b/package.json index 229ba8880c..4e2cc7df36 100644 --- a/package.json +++ b/package.json @@ -243,6 +243,8 @@ "@deepseek-ai/dsh-llm-replay": "workspace:*", "@deepseek-ai/dsh-subagent-dsh-sdk": "workspace:*", "@deepseek-ai/dsh-llm": "workspace:*", + "@deepseek-ai/dsh-tencent-meeting": "workspace:*", + "@deepseek-ai/dsh-tencent-meeting-cli": "workspace:*", "@deepseek-ai/dsh-mcp-client": "workspace:*", "@deepseek-ai/dsh-tool-session-query": "workspace:*", "@deepseek-ai/dsh-web-fetch-http": "workspace:*", diff --git a/packages/client/ui-tencent-meeting/locale/en.json b/packages/client/ui-tencent-meeting/locale/en.json new file mode 100644 index 0000000000..0a3c02ca86 --- /dev/null +++ b/packages/client/ui-tencent-meeting/locale/en.json @@ -0,0 +1,6 @@ +{ + "meta": { + "title": "Tencent Meeting plugin page", + "description": "Connect, check, and sign out of the Tencent Meeting account from the Plugins page" + } +} diff --git a/packages/client/ui-tencent-meeting/locale/zh.json b/packages/client/ui-tencent-meeting/locale/zh.json new file mode 100644 index 0000000000..08792fa675 --- /dev/null +++ b/packages/client/ui-tencent-meeting/locale/zh.json @@ -0,0 +1,6 @@ +{ + "meta": { + "title": "腾讯会议插件页面", + "description": "在插件页连接、检查和退出腾讯会议账号" + } +} diff --git a/packages/client/ui-tencent-meeting/package.json b/packages/client/ui-tencent-meeting/package.json new file mode 100644 index 0000000000..3236fd25be --- /dev/null +++ b/packages/client/ui-tencent-meeting/package.json @@ -0,0 +1,74 @@ +{ + "name": "@deepseek-ai/dsh-client-ui-tencent-meeting", + "description": "Tencent Meeting plugin page: connect, check, and sign out of the Tencent Meeting account from the Plugins page", + "version": "0.2.1-rc.2", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/deepseek-ai/deepseek-harness.git", + "directory": "packages/client/ui-tencent-meeting" + }, + "type": "module", + "main": "lib/index.js", + "types": "lib/types/index.d.ts", + "exports": { + ".": { + "types": "./lib/types/index.d.ts", + "default": "./lib/index.js" + }, + "./src/*": "./src/*", + "./package.json": "./package.json", + "./locale/*.json": "./locale/*.json", + "./client": { + "types": "./lib/types/client/index.d.ts", + "default": "./lib/client.js" + } + }, + "files": [ + "locale/*.json", + "lib/index.js", + "lib/client.js", + "lib/types/**/*.d.ts" + ], + "license": "MIT", + "dsh": { + "client": { + "inject": [ + "@deepseek-ai/dsh-api-remotes", + "@deepseek-ai/dsh-client-locale", + "@deepseek-ai/dsh-client-ui-layout", + "@deepseek-ai/dsh-client-ui-plugin-manager" + ], + "platform": "web" + } + }, + "scripts": { + "bundle": "tsdown", + "watch": "tsdown --watch" + }, + "peerDependencies": { + "@deepseek-ai/cordis": "workspace:~" + }, + "devDependencies": { + "@deepseek-ai/cordis": "workspace:~", + "@deepseek-ai/dsh-api-gateway": "workspace:*", + "@deepseek-ai/dsh-api-remotes": "workspace:*", + "@deepseek-ai/dsh-cli-account": "workspace:*", + "@deepseek-ai/dsh-client-locale": "workspace:*", + "@deepseek-ai/dsh-client-store": "workspace:*", + "@deepseek-ai/dsh-client-test-runtime": "workspace:*", + "@deepseek-ai/dsh-client-ui-cli-account": "workspace:*", + "@deepseek-ai/dsh-client-ui-layout": "workspace:*", + "@deepseek-ai/dsh-client-ui-plugin-manager": "workspace:*", + "@deepseek-ai/dsh-client-ui-renderer": "workspace:*", + "@deepseek-ai/dsh-client-ui-slots": "workspace:*", + "@deepseek-ai/dsh-typert-protocol": "workspace:*", + "@deepseek-ai/dsh-util-values": "workspace:*", + "@deepseek-ai/dsh-tencent-meeting-cli": "workspace:*", + "@testing-library/react": "^16.3.3", + "react": "^18.2.0", + "react-dom": "^18.2.0" + } +} diff --git a/packages/client/ui-tencent-meeting/src/client/TencentMeetingConnection.tsx b/packages/client/ui-tencent-meeting/src/client/TencentMeetingConnection.tsx new file mode 100644 index 0000000000..6173266bba --- /dev/null +++ b/packages/client/ui-tencent-meeting/src/client/TencentMeetingConnection.tsx @@ -0,0 +1,85 @@ +/** Tencent Meeting account surfaces on the Plugins page: the bundle section, title tag, activation guidance, and notices. */ +import { useState, type ReactNode } from 'react' +import { + CliAccountActivation, CliAccountBadge, CliAccountConfirm, CliAccountSection, CliAccountToast, type CliAccountAction, +} from '@deepseek-ai/dsh-client-ui-cli-account' +import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots' +import type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client' +import { TENCENT_MEETING_PACKAGE, presentConnection, type ConnectionFace } from './connection.ts' +import type { NS } from './locales.ts' + +type FaceProps = InjectFace & PropsLocale + +/** + * The account section on the Tencent Meeting bundle's page. + * @param props - the shared connection face and the Tencent Meeting dictionary. + * @returns the status line, its actions, and the sign-out confirmation. + */ +export function TencentMeetingConnectionSection(props: FaceProps): ReactNode { + const { useTencentMeetingConnection, check, signIn, signOut, cancel, openAuthorization, retry, t } = props + const snapshot = useTencentMeetingConnection(value => value) + const [confirming, setConfirming] = useState(false) + const shown = presentConnection(snapshot) + const actions: CliAccountAction[] = [] + let status: string | undefined + let detail: string | undefined + /* jscpd:ignore-start -- CLI app plugin pages map the shared phases to the same retry, open-link, and cancel actions. */ + switch (shown.phase) { + case 'connected': + actions.push({ label: t('action.signOut'), onClick: () => { setConfirming(true) } }) + detail = t('detail.connected', { name: shown.userName }) + break + case 'disconnected': actions.push({ label: t('action.connect'), onClick: signIn, variant: 'primary' }); detail = t('detail.disconnected'); break + case 'unavailable': actions.push({ label: t('action.retry'), onClick: check }); detail = t('detail.unavailable'); break + case 'stopped': actions.push({ label: t('action.retry'), onClick: retry }); detail = t('detail.stopped'); break + case 'connecting': + status = t(`step.${shown.step}`) + if (shown.step === 'authorizing' && shown.url !== undefined) { + actions.push({ label: t('action.open'), onClick: openAuthorization, variant: 'primary' }) + detail = t('detail.authorizing') + } + if (shown.cancellable) actions.push({ label: t('action.cancel'), onClick: cancel, variant: 'ghost' }) + break + case 'checking': break + } + /* jscpd:ignore-end */ + const failed = 'failed' in shown ? shown.failed : undefined + return ( + + { setConfirming(false) }} onConfirm={signOut} /> + + ) +} + +/** + * The account tag beside the Tencent Meeting bundle's title. + * @param props - the open detail page's subject, the connection face, and the dictionary. + * @returns the tag for the Tencent Meeting bundle, or null on any other page. + */ +export function TencentMeetingConnectionBadge({ subject, useTencentMeetingConnection, t }: FaceProps & PropsRuntime<'plugins.detail.badge'>): ReactNode { + const phase = useTencentMeetingConnection(value => presentConnection(value).phase) + return +} + +/** + * Guidance after the user switches the Tencent Meeting bundle on while the account is not connected. + * @param props - activation callbacks, the connection face, and the dictionary. + * @returns a dismissible prompt that starts the sign-in from the bundle's page. + */ +export function TencentMeetingConnectionActivation(props: FaceProps & PropsRuntime<'plugins.bundle.activation'>): ReactNode { + const { useTencentMeetingConnection, signIn, onDismiss, onOpenDetails, t } = props + const phase = useTencentMeetingConnection(value => presentConnection(value).phase) + return { onOpenDetails(); signIn() }} /> +} + +/** + * Account outcomes reported outside the Plugins panel's lifetime. + * @param props - the shared notice, its dismissal, and the dictionary. + * @returns the toast for the latest notice, or null. + */ +export function TencentMeetingConnectionToast({ useTencentMeetingConnection, dismissNotice, t }: FaceProps): ReactNode { + const notice = useTencentMeetingConnection(value => value.notice) + return +} diff --git a/packages/client/ui-tencent-meeting/src/client/connection.ts b/packages/client/ui-tencent-meeting/src/client/connection.ts new file mode 100644 index 0000000000..2eb8f32f29 --- /dev/null +++ b/packages/client/ui-tencent-meeting/src/client/connection.ts @@ -0,0 +1,97 @@ +/** Browser mirror of the Host's Tencent Meeting account and the Plugins page's account actions. */ +import type { Context } from '@deepseek-ai/cordis' +import type {} from '@deepseek-ai/dsh-api-remotes/client' +import { CliAccountConnection, type CliAccountSnapshot } from '@deepseek-ai/dsh-client-ui-cli-account' +import type { HostObservable } from '@deepseek-ai/dsh-client-ui-slots' +import type { TencentMeetingState } from '@deepseek-ai/dsh-tencent-meeting-cli/types' +import { assertNever } from '@deepseek-ai/dsh-util-values' + +/** The npm package whose bundle page carries the account section. */ +export const TENCENT_MEETING_PACKAGE = '@deepseek-ai/dsh-tencent-meeting' + +/** Outcomes the page reports after an operation this browser started succeeds. */ +export type TencentMeetingNotice = 'connected' | 'signed-out' + +/** The page's whole view: the Host's account view plus this browser's stream, pending action, and notice. */ +export type ConnectionSnapshot = CliAccountSnapshot + +/** The step a sign-in or sign-out in progress shows. */ +export type ConnectionStep = 'authorizing' | 'connecting' | 'signing-out' + +type Failed = TencentMeetingState['result'] + +/** What the user sees about the account, derived from the Host's view alone. */ +export type ConnectionPresentation = + | { readonly phase: 'checking' | 'stopped' | 'disconnected' | 'unavailable'; readonly failed: Failed } + | { readonly phase: 'connected'; readonly userName: string; readonly failed: Failed } + | { readonly phase: 'connecting'; readonly step: ConnectionStep; readonly url: string | undefined; readonly cancellable: boolean } + +/** Page-facing actions and the snapshot hook the slot entries inject. */ +export interface ConnectionFace { + hooks: { tencentMeetingConnection: HostObservable } + /** Check the account again. */ + check(): void + /** Sign in through the authorization page. */ + signIn(): void + /** Sign out after the page confirms it. */ + signOut(): void + cancel(): void + openAuthorization(): void + /** Reopen the Host stream after it stopped. */ + retry(): void + dismissNotice(): void +} + +function step(operation: NonNullable): ConnectionStep { + if (operation.kind === 'sign-out') return 'signing-out' + return operation.phase === 'authorizing' ? 'authorizing' : 'connecting' +} + +/** + * Derive the account the page shows from the Host's view. + * @param snapshot - the view as the Host last reported it, and whether the Host stream stopped. + * @returns the phase, with the operation in progress, the signed-in user, or the last failed result. + */ +export function presentConnection(snapshot: Pick): ConnectionPresentation { + const view = snapshot.view + if (snapshot.stopped) return { phase: 'stopped', failed: undefined } + if (view === undefined || view.operation?.kind === 'check') return { phase: 'checking', failed: undefined } + const { account, operation, result } = view + if (operation !== undefined) { + return { phase: 'connecting', step: step(operation), url: operation.authorizationUrl, cancellable: operation.cancellable } + } + const failed = result?.outcome === 'failed' ? result : undefined + switch (account.state) { + case 'unchecked': return { phase: failed === undefined ? 'checking' : 'unavailable', failed } + case 'signed-out': return { phase: 'disconnected', failed } + case 'unverified': return { phase: 'unavailable', failed } + case 'connected': return { phase: 'connected', userName: account.userName, failed } + /* v8 ignore next -- closed account state union */ + default: return assertNever(account) + } +} + +/** + * Mirror the `tencentMeeting` Remote and bind the page's actions to it. + * @param ctx - the browser plugin context whose Remote the connection follows. + * @returns the connection to dispose with the plugin, and the face the slot entries inject. + */ +export function createConnection(ctx: Context): { + connection: CliAccountConnection + face: ConnectionFace +} { + const connection = new CliAccountConnection(ctx, { + name: 'Tencent Meeting connection', + follow: signal => ctx.remote.tencentMeeting.follow(signal), + cancel: id => ctx.remote.tencentMeeting.cancel(id), + notices: { 'sign-in': 'connected', 'sign-out': 'signed-out' }, + }) + const face: ConnectionFace = { + hooks: { tencentMeetingConnection: connection.state }, + check: () => { connection.start(() => ctx.remote.tencentMeeting.check()) }, + signIn: () => { connection.start(() => ctx.remote.tencentMeeting.signIn()) }, + signOut: () => { connection.start(() => ctx.remote.tencentMeeting.signOut()) }, + ...connection.actions, + } + return { connection, face } +} diff --git a/packages/client/ui-tencent-meeting/src/client/index.ts b/packages/client/ui-tencent-meeting/src/client/index.ts new file mode 100644 index 0000000000..50626e0fb9 --- /dev/null +++ b/packages/client/ui-tencent-meeting/src/client/index.ts @@ -0,0 +1,59 @@ +/** + * Tencent Meeting plugin, browser half: the account section on the Tencent Meeting bundle's page, the tag beside its + * title, guidance after the bundle is switched on, and notices. The Host's `tencentMeeting` Remote owns the account + * operations; this half mounts that Remote itself because the on-demand package stays out of the shipped Remote assembly. + */ +import type { Context } from '@deepseek-ai/cordis' +import type {} from '@deepseek-ai/dsh-api-remotes/client' +import type {} from '@deepseek-ai/dsh-client-locale/client' +import type {} from '@deepseek-ai/dsh-client-ui-layout/client' +import type {} from '@deepseek-ai/dsh-client-ui-plugin-manager/client' +import type {} from '@deepseek-ai/dsh-client-ui-renderer/client' +import tencentMeetingRemote from '@deepseek-ai/dsh-tencent-meeting-cli/remote' +import { TENCENT_MEETING_PACKAGE, createConnection } from './connection.ts' +import { en, NS, zh } from './locales.ts' +import { + TencentMeetingConnectionActivation, + TencentMeetingConnectionBadge, + TencentMeetingConnectionSection, + TencentMeetingConnectionToast, +} from './TencentMeetingConnection.tsx' + +/** Services the Remote mount and the slot registrations need. */ +export const inject = ['remote', 'slots', 'locale'] + +function registerUi(ctx: Context): void { + ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'tencent-meeting: dictionaries') + const { connection, face } = createConnection(ctx) + ctx.effect(() => async () => { await connection.dispose() }, 'tencent-meeting: connection') + ctx.slots.inject('plugins.bundle.config', () => ctx.slots.register({ + name: 'plugins.bundle.config', key: TENCENT_MEETING_PACKAGE, locale: NS, inject: () => face, + }, TencentMeetingConnectionSection)) + ctx.slots.inject('plugins.bundle.activation', () => ctx.slots.register({ + name: 'plugins.bundle.activation', key: TENCENT_MEETING_PACKAGE, locale: NS, inject: () => face, + }, TencentMeetingConnectionActivation)) + ctx.slots.inject('plugins.detail.badge', () => ctx.slots.register({ + name: 'plugins.detail.badge', id: 'tencent-meeting.connection', locale: NS, inject: () => face, + }, TencentMeetingConnectionBadge)) + ctx.slots.inject('shell.overlay', () => ctx.slots.register({ + name: 'shell.overlay', id: 'tencent-meeting.connection-toast', locale: NS, inject: () => face, + }, TencentMeetingConnectionToast)) +} + +/** + * Mount the Tencent Meeting Remote, then register the account surfaces for as long as the Tencent Meeting row is on. + * @param ctx - the browser plugin context. + * @returns a disposer that withdraws the surfaces, then the Remote. + */ +export async function apply(ctx: Context): Promise<() => Promise> { + const disposeRemote = await ctx.remote.$mount(tencentMeetingRemote) + const ui = ctx.inject(['remote.tencentMeeting', 'slots', 'locale'], registerUi) + try { + await ui + } catch (error) { + await ui.dispose() + await disposeRemote() + throw error + } + return async () => { await ui.dispose(); await disposeRemote() } +} diff --git a/packages/client/ui-tencent-meeting/src/client/locales.ts b/packages/client/ui-tencent-meeting/src/client/locales.ts new file mode 100644 index 0000000000..d7ddf1e7be --- /dev/null +++ b/packages/client/ui-tencent-meeting/src/client/locales.ts @@ -0,0 +1,97 @@ +/** Locale-owned copy for the Tencent Meeting plugin's account on the Plugins page. */ +import type {} from '@deepseek-ai/dsh-client-ui-slots' + +/** Dictionary namespace for every Tencent Meeting account surface. */ +export const NS = 'tencent-meeting' + +/** Chinese dictionary and key source. */ +export const zh = { + 'section.title': '腾讯会议账号', + 'status.checking': '正在检查连接', + 'status.disconnected': '未连接', + 'status.unavailable': '暂时无法确认登录状态', + 'status.connected': '已连接', + 'status.stopped': '腾讯会议组件未运行', + 'step.authorizing': '等待在腾讯会议页面授权', + 'step.connecting': '正在连接', + 'step.signing-out': '正在退出登录', + 'detail.disconnected': '登录腾讯会议账号后,就可以在对话中使用会议、录制、纪要和会议报告等功能。', + 'detail.unavailable': '已保留现有登录,可以稍后重试。', + 'detail.stopped': '“腾讯会议 CLI 与技能”组件没有运行,可以在下方组件列表查看原因,处理后重试。', + 'detail.connected': '已登录为 {name}。可以在对话中直接请 Agent 使用腾讯会议。', + 'detail.authorizing': '在打开的腾讯会议页面中确认授权,完成后回到这里查看结果。页面没有打开时,点击“打开腾讯会议页面”。', + hint: '腾讯会议账号与这台电脑终端里的 tmeet 共用;关闭插件不会退出登录。', + failed: '操作未完成,请重试', + 'failure.details': '排障信息:{details}', + 'failure.exitCode': '退出码 {code}', + 'action.connect': '连接腾讯会议', + 'action.open': '打开腾讯会议页面', + 'action.cancel': '取消', + 'action.signOut': '退出登录', + 'action.retry': '重试', + 'badge.connected': '已连接', + 'badge.disconnected': '未连接', + 'badge.connecting': '连接中', + 'badge.unavailable': '待确认', + 'badge.stopped': '未运行', + 'signOut.title': '退出腾讯会议登录?', + 'signOut.body': '将退出 tmeet 的登录,这台电脑终端里的 tmeet 也会一起退出。', + 'activation.title': '连接腾讯会议账号', + 'activation.body': '腾讯会议插件已开启。连接你的腾讯会议账号后,就可以在对话中使用它。', + 'activation.later': '稍后', + 'notice.connected': '腾讯会议已连接', + 'notice.signed-out': '已退出腾讯会议登录', + 'notice.action-failed': '操作未完成,请重试', + close: '关闭', +} + +/** Every key the Tencent Meeting account surfaces translate. */ +export type TencentMeetingKey = keyof typeof zh + +/** English dictionary. */ +export const en: Record = { + 'section.title': 'Tencent Meeting account', + 'status.checking': 'Checking connection', + 'status.disconnected': 'Not connected', + 'status.unavailable': 'Cannot confirm sign-in right now', + 'status.connected': 'Connected', + 'status.stopped': 'Tencent Meeting component not running', + 'step.authorizing': 'Waiting for authorization on the Tencent Meeting page', + 'step.connecting': 'Connecting', + 'step.signing-out': 'Signing out', + 'detail.disconnected': 'Sign in to Tencent Meeting to use meetings, recordings, minutes, meeting reports, and other features in conversations.', + 'detail.unavailable': 'The existing sign-in is kept. Try again later.', + 'detail.stopped': 'The Tencent Meeting CLI and skills component is not running. See the component list below for the reason, then retry.', + 'detail.connected': 'Signed in as {name}. Ask the agent to use Tencent Meeting directly in a conversation.', + 'detail.authorizing': 'Confirm the authorization on the Tencent Meeting page that opened, then come back here to see the result. If the page did not open, select Open Tencent Meeting page.', + hint: 'The Tencent Meeting account is shared with tmeet in this computer\'s terminal. Turning the plugin off does not sign it out.', + failed: 'The action did not finish. Try again.', + 'failure.details': 'Diagnostic: {details}', + 'failure.exitCode': 'Exit code {code}', + 'action.connect': 'Connect Tencent Meeting', + 'action.open': 'Open Tencent Meeting page', + 'action.cancel': 'Cancel', + 'action.signOut': 'Sign out', + 'action.retry': 'Retry', + 'badge.connected': 'Connected', + 'badge.disconnected': 'Not connected', + 'badge.connecting': 'Connecting', + 'badge.unavailable': 'Unconfirmed', + 'badge.stopped': 'Not running', + 'signOut.title': 'Sign out of Tencent Meeting?', + 'signOut.body': 'This signs out tmeet, including tmeet in this computer\'s terminal.', + 'activation.title': 'Connect your Tencent Meeting account', + 'activation.body': 'The Tencent Meeting plugin is on. Connect your Tencent Meeting account to use it in conversations.', + 'activation.later': 'Later', + 'notice.connected': 'Tencent Meeting connected', + 'notice.signed-out': 'Signed out of Tencent Meeting', + 'notice.action-failed': 'The action did not finish. Try again.', + close: 'Close', +} + +declare module '@deepseek-ai/dsh-client-ui-slots' { + interface LocaleNamespaceMap { + /** Tencent Meeting account section, tag, guidance, and notices on the Plugins page. */ + 'tencent-meeting': TencentMeetingKey + } +} diff --git a/packages/client/ui-tencent-meeting/src/index.ts b/packages/client/ui-tencent-meeting/src/index.ts new file mode 100644 index 0000000000..7412de188a --- /dev/null +++ b/packages/client/ui-tencent-meeting/src/index.ts @@ -0,0 +1,4 @@ +/** Host marker for the Tencent Meeting plugin page; the browser behavior is the client export. */ + +/** The page has no Host behavior; the `tencent-meeting-cli` row owns the account operations. */ +export function apply(): void {} diff --git a/packages/client/ui-tencent-meeting/tsconfig.json b/packages/client/ui-tencent-meeting/tsconfig.json new file mode 100644 index 0000000000..e94bf20679 --- /dev/null +++ b/packages/client/ui-tencent-meeting/tsconfig.json @@ -0,0 +1,54 @@ +{ + "extends": "../../../tsconfig.base.client.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "lib/types" + }, + "include": [ + "src" + ], + "references": [ + { + "path": "../../../vendor/cordis" + }, + { + "path": "../../api/gateway/tsconfig.client.json" + }, + { + "path": "../../api/remotes/tsconfig.client.json" + }, + { + "path": "../locale/tsconfig.client.json" + }, + { + "path": "../store" + }, + { + "path": "../ui-layout" + }, + { + "path": "../ui-plugin-manager/tsconfig.client.json" + }, + { + "path": "../ui-renderer" + }, + { + "path": "../ui-slots" + }, + { + "path": "../../connector/tencent-meeting-cli" + }, + { + "path": "../../typert/protocol" + }, + { + "path": "../../util/values" + }, + { + "path": "../ui-cli-account" + }, + { + "path": "../../connector/cli-account" + } + ] +} diff --git a/packages/client/ui-tencent-meeting/tsdown.config.ts b/packages/client/ui-tencent-meeting/tsdown.config.ts new file mode 100644 index 0000000000..7aa03cebc1 --- /dev/null +++ b/packages/client/ui-tencent-meeting/tsdown.config.ts @@ -0,0 +1,3 @@ +import { clientBundle } from '../tsdown.client.ts' + +export default clientBundle(import.meta.dirname, ['lib/types/index.js']) diff --git a/packages/connector/tencent-meeting-cli/locale/en.json b/packages/connector/tencent-meeting-cli/locale/en.json new file mode 100644 index 0000000000..5b74aefa14 --- /dev/null +++ b/packages/connector/tencent-meeting-cli/locale/en.json @@ -0,0 +1,6 @@ +{ + "meta": { + "title": "Tencent Meeting CLI and skills", + "description": "The official tmeet, its skill, and the account connection the Plugins page uses" + } +} diff --git a/packages/connector/tencent-meeting-cli/locale/zh.json b/packages/connector/tencent-meeting-cli/locale/zh.json new file mode 100644 index 0000000000..223727f1e4 --- /dev/null +++ b/packages/connector/tencent-meeting-cli/locale/zh.json @@ -0,0 +1,6 @@ +{ + "meta": { + "title": "腾讯会议 CLI 与技能", + "description": "官方 tmeet、它的技能,以及插件页使用的账号连接" + } +} diff --git a/packages/connector/tencent-meeting-cli/package.json b/packages/connector/tencent-meeting-cli/package.json new file mode 100644 index 0000000000..5db9fa067e --- /dev/null +++ b/packages/connector/tencent-meeting-cli/package.json @@ -0,0 +1,69 @@ +{ + "name": "@deepseek-ai/dsh-tencent-meeting-cli", + "description": "Tencent Meeting through the official tmeet: the CLI on the Shell PATH, its skill, and account operations over Remote", + "version": "0.2.1-rc.2", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/deepseek-ai/deepseek-harness.git", + "directory": "packages/connector/tencent-meeting-cli" + }, + "type": "module", + "main": "lib/index.js", + "types": "lib/types/index.d.ts", + "exports": { + ".": { + "types": "./lib/types/index.d.ts", + "default": "./lib/index.js" + }, + "./remote": { + "types": "./lib/typert.remote-client.d.ts", + "default": "./lib/typert.remote-client.js" + }, + "./typert": { + "types": "./lib/typert.host.d.ts", + "default": "./lib/typert.host.js" + }, + "./types": { + "types": "./lib/types/types.d.ts" + }, + "./locale/*.json": "./locale/*.json", + "./src/*": "./src/*", + "./package.json": "./package.json" + }, + "files": [ + "locale/*.json", + "lib/index.js", + "skills", + "lib/types/**/*.d.ts", + "lib/typert.host.js", + "lib/typert.host.d.ts", + "lib/typert.remote-client.js", + "lib/typert.remote-client.d.ts" + ], + "license": "MIT", + "dependencies": { + "@deepseek-ai/dsh-cli-account": "workspace:*", + "@deepseek-ai/dsh-home-paths": "workspace:*", + "@deepseek-ai/dsh-skill-filesystem": "workspace:*", + "@deepseek-ai/dsh-util-values": "workspace:*", + "@deepseek-ai/schemastery": "workspace:~", + "@tencentcloud/tmeet": "1.0.18" + }, + "peerDependencies": { + "@deepseek-ai/cordis": "workspace:~", + "@deepseek-ai/dsh-shell-env": "workspace:*", + "@deepseek-ai/dsh-skill": "workspace:*", + "@deepseek-ai/dsh-subprocess": "workspace:*", + "@deepseek-ai/dsh-typert-protocol": "workspace:*" + }, + "devDependencies": { + "@deepseek-ai/cordis": "workspace:~", + "@deepseek-ai/dsh-shell-env": "workspace:*", + "@deepseek-ai/dsh-skill": "workspace:*", + "@deepseek-ai/dsh-subprocess": "workspace:*", + "@deepseek-ai/dsh-typert-protocol": "workspace:*" + } +} diff --git a/packages/connector/tencent-meeting-cli/skills/tencent-meeting/SKILL.md b/packages/connector/tencent-meeting-cli/skills/tencent-meeting/SKILL.md new file mode 100644 index 0000000000..7d7080f5cc --- /dev/null +++ b/packages/connector/tencent-meeting-cli/skills/tencent-meeting/SKILL.md @@ -0,0 +1,24 @@ +--- +name: tencent-meeting +description: 腾讯会议插件:通过 tmeet 使用腾讯会议的会议创建与查询、受邀者管理、录制与转写、智能纪要和元宝纪要、会议报告、会中控制和事件订阅。用户提到腾讯会议、会议号、会议录制或纪要时,先加载本技能,再读取 tmeet-skill 子指南。 +--- + +# 腾讯会议插件 + +## DSH 指引 + +- 在面向用户的回复中,把这项集成称为“腾讯会议插件”。`tmeet` 由腾讯会议插件安装并加入 Host Shell 的 PATH,直接按名称运行。不要执行 `npm install -g @tencentcloud/tmeet`,也不要用其他方式另装或升级 `tmeet`。 +- `tmeet` 的登录保存在这台电脑的默认配置目录,与用户自己终端里的 `tmeet` 共用。除非用户要求,不要执行 `tmeet auth logout`。 +- 首次运行 `tmeet` 业务命令前,先读 `tmeet-skill` 子指南。本节与该子指南冲突时以本节为准:跳过它“安装与初始化”一节的安装检查;跳过运行 `scripts/agent_init.py` 的要求,DSH 不提供这个脚本,`tmeet` 不依赖它。 +- 命令提示未登录或需要重新登录(例如 `user config is empty`、`user identity expired`、`refresh token failed`)时,先请用户在「插件」中打开腾讯会议插件页面,点击“连接腾讯会议”并完成授权;用户完成后再继续。只有用户要求在本次对话中完成登录时,才执行 `tmeet auth login --no-browser`:它先输出授权链接,再最多等待 5 分钟,把链接完整告诉用户。它会把登录凭据写到工作区之外,保存被拒绝时这次授权也会作废:第一次运行就把 Shell 工具的 `sandbox_permissions` 设为能写工作区之外的最窄模式,并填写 `justification`。 +- 其他 `tmeet` 命令在现有沙箱中运行;只有凭据、锁或日志写入被拒绝时,才设置 `sandbox_permissions`。 +- 不要索取或输出 AccessToken、RefreshToken 等凭据。 + +## 子指南索引 + +- `tmeet-skill`:腾讯会议官方 CLI 的使用说明,涵盖全部命令、查询命令的选择准则、安全规则、需要用户二次确认的操作和常见错误;首次运行 `tmeet` 业务命令前先读。会议、录制、报告、通讯录、会中控制、纪要、应用信息、事件和问题排查各模块的参数与示例在它的 `references/` 中。 + +## 打开子指南 + +- 子指南不是独立的 skill,不要用 `skill` 工具加载;用文件读取工具打开本技能目录下的 `guides/tmeet-skill/SKILL.md`。 +- 子指南中的相对路径(例如 `references/tmeet-meeting.md`)相对子指南自己的目录 `guides/tmeet-skill/`。 diff --git a/packages/connector/tencent-meeting-cli/src/account.ts b/packages/connector/tencent-meeting-cli/src/account.ts new file mode 100644 index 0000000000..5f61354f75 --- /dev/null +++ b/packages/connector/tencent-meeting-cli/src/account.ts @@ -0,0 +1,90 @@ +/** Host-owned check, sign-in, and sign-out of the default tmeet account that the user's terminal shares. */ + +import type { Context } from '@deepseek-ai/cordis' +import { CliAccountRuntime, exitFailure, type CliCommandExecutor, type CliOperationControl } from '@deepseek-ai/dsh-cli-account' +import { assertNever } from '@deepseek-ai/dsh-util-values' +import type { TencentMeetingAccountState, TencentMeetingOperationFailure, TencentMeetingOperationKind, TencentMeetingPhase } from './types.ts' + +const LOGIN_LINK = /^authorize url: (https:\/\/\S+)[ \t]*$/u + +type Control = CliOperationControl + +/** + * Read the text `auth status` prints; tmeet 1.0.18 has no machine-readable status and exits 0 whether or not a user is + * signed in. `Logged in` alone does not show that the server accepts the sign-in: the CLI prints the user name only + * after its user-info request succeeds, refreshing the token first when needed. + * @returns the account, or undefined for output this version does not print. + */ +function readStatus(stdout: string): TencentMeetingAccountState | undefined { + if (/^[ \t]*(?:Not logged in|Session has expired)\./mu.test(stdout)) return { state: 'signed-out' } + if (!/^Logged in$/mu.test(stdout)) return undefined + if (/^[ \t]*RefreshToken:[ \t]+expired\b/mu.test(stdout)) return { state: 'signed-out' } + const userName = /^[ \t]*UserName:[ \t]+(\S.*?)[ \t]*$/mu.exec(stdout)?.[1] + return userName === undefined ? { state: 'unverified' } : { state: 'connected', userName } +} + +/** Runs at most one account operation at a time; subscribers observe it without owning it. */ +export class TencentMeetingAccount extends CliAccountRuntime< + TencentMeetingAccountState, TencentMeetingOperationKind, TencentMeetingPhase, TencentMeetingOperationFailure +> { + /** + * @param cli - the tmeet executor the account runs commands with and disposes. + * @param logger - receives classified operation failures. + */ + constructor(cli: CliCommandExecutor, logger: Context['logger']) { + super({ + name: 'tencent-meeting', + cli, + logger, + account: { state: 'unchecked' }, + check: 'check', + cancellable: ['authorizing'], + authorizationHosts: ['meeting.tencent.com'], + classify: exitFailure, + }) + } + + protected async perform(kind: TencentMeetingOperationKind, control: Control, signal: AbortSignal): Promise { + switch (kind) { + case 'check': + await this.check(control, signal) + return + case 'sign-in': return this.signIn(control, signal) + case 'sign-out': return this.signOut(control, signal) + /* v8 ignore next -- closed operation kind union */ + default: return assertNever(kind) + } + } + + /** Sign in through the CLI's authorization page, then confirm that the server accepts the new sign-in. */ + private async signIn(control: Control, signal: AbortSignal): Promise { + control.stage('authorizing') + const login = await control.run('auth-login', ['auth', 'login', '--no-browser'], signal, { + awaitsUser: true, + onLine: (stream, line) => { + const link = stream === 'stdout' ? LOGIN_LINK.exec(line) : null + if (link !== null) control.offer(link[1] as string) + }, + }) + if (login.exitCode !== 0) throw new Error(`tencent-meeting: auth login exited with ${String(login.exitCode)}`) + control.stage('checking') + if ((await this.check(control, signal)).state !== 'connected') throw new Error('tencent-meeting: auth login left no verified sign-in') + } + + /** Clear the default sign-in, which also signs out the user's own terminal, then check again. */ + private async signOut(control: Control, signal: AbortSignal): Promise { + control.stage('signing-out') + const logout = await control.run('auth-logout', ['auth', 'logout'], signal) + if (logout.exitCode !== 0) throw new Error(`tencent-meeting: auth logout exited with ${String(logout.exitCode)}`) + await this.check(control, signal) + } + + /** Read the default account, publish it, and return it. */ + private async check(control: Control, signal: AbortSignal): Promise { + const result = await control.run('auth-status', ['auth', 'status'], signal) + const account = result.exitCode === 0 ? readStatus(result.stdout) : undefined + if (account === undefined) throw new Error(`tencent-meeting: auth status exited with ${String(result.exitCode)} or printed an unknown status`) + this.publish(account) + return account + } +} diff --git a/packages/connector/tencent-meeting-cli/src/directory.ts b/packages/connector/tencent-meeting-cli/src/directory.ts new file mode 100644 index 0000000000..58e9ec28a6 --- /dev/null +++ b/packages/connector/tencent-meeting-cli/src/directory.ts @@ -0,0 +1,58 @@ +/** Managed tmeet location: a `tmeet` link to the platform executable that `@tencentcloud/tmeet` ships under its own name. */ + +import { createHash, randomUUID } from 'node:crypto' +import { accessSync, constants, mkdirSync, renameSync, symlinkSync } from 'node:fs' +import { dirname, join } from 'node:path' +import { fileURLToPath } from 'node:url' +import { dshCachePath } from '@deepseek-ai/dsh-home-paths' + +/** The executable name the plugin resolves on its private PATH. */ +export const PROGRAM = 'tmeet' + +/** Platform executables in the package's `dist`, named as the package's own launcher maps them. */ +const PLATFORM_EXECUTABLES: Readonly>> = { + 'darwin-arm64': 'tmeet-macOS-AppleSilicon', + 'darwin-x64': 'tmeet-macOS-Intel', + 'linux-arm64': 'tmeet-Linux-ARM64', + 'linux-x64': 'tmeet-Linux-x86_64', +} + +function requireExecutable(program: string, remedy: string): void { + try { + accessSync(program, constants.X_OK) + } catch (error) { + throw new Error(`tencent-meeting: ${program} is not executable; ${remedy}`, { cause: error }) + } +} + +/** + * Link the platform executable as `tmeet` in a cache directory owned by that executable's path, replacing any earlier link + * atomically, so installations with different paths never share a link. + */ +function linkPlatformExecutable(): string { + const executable = PLATFORM_EXECUTABLES[`${process.platform}-${process.arch}`] + if (executable === undefined) { + throw new Error(`tencent-meeting: @tencentcloud/tmeet has no executable for ${process.platform}-${process.arch}; set binDir`) + } + const target = join(dirname(fileURLToPath(import.meta.resolve('@tencentcloud/tmeet/package.json'))), 'dist', executable) + requireExecutable(target, 'reinstall the plugin or set binDir') + const directory = dshCachePath('tencent-meeting', createHash('sha256').update(target).digest('hex').slice(0, 16)) + mkdirSync(directory, { recursive: true }) + const staged = join(directory, `.${PROGRAM}-${randomUUID()}`) + symlinkSync(target, staged) + renameSync(staged, join(directory, PROGRAM)) + return directory +} + +/** + * Locate the directory to put on the private PATH. + * @param binDir - absolute override holding an executable `tmeet`; defaults to a cache directory linking the installed + * `@tencentcloud/tmeet` executable for this platform. + * @returns the directory containing an executable `tmeet`. + * @throws when the platform has no packaged executable or the executable is missing or not executable. + */ +export function resolveCliDirectory(binDir: string | undefined): string { + if (binDir === undefined) return linkPlatformExecutable() + requireExecutable(join(binDir, PROGRAM), 'set binDir to a directory containing an executable tmeet') + return binDir +} diff --git a/packages/connector/tencent-meeting-cli/src/index.ts b/packages/connector/tencent-meeting-cli/src/index.ts new file mode 100644 index 0000000000..25ac3ad161 --- /dev/null +++ b/packages/connector/tencent-meeting-cli/src/index.ts @@ -0,0 +1,114 @@ +/** + * Tencent Meeting plugin: puts the managed tmeet on the private Shell PATH, registers its skill, and serves the + * Plugins page's account operations over Remote. The CLI's default sign-in is shared with the user's own terminal. + * @module @deepseek-ai/dsh-tencent-meeting-cli + */ + +/* jscpd:ignore-start -- CLI app plugins compose the same kit, Remote, and skill-loading imports. */ +import { fileURLToPath } from 'node:url' +import type { Context } from '@deepseek-ai/cordis' +import type z from '@deepseek-ai/schemastery' +import { CliAccountConfig, CliCommandExecutor, type CliOperationId } from '@deepseek-ai/dsh-cli-account' +import * as SkillFilesystem from '@deepseek-ai/dsh-skill-filesystem' +import { Remote, TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol' +import type {} from '@deepseek-ai/dsh-shell-env' +import type {} from '@deepseek-ai/dsh-skill' +import type {} from '@deepseek-ai/dsh-subprocess' +import { TencentMeetingAccount } from './account.ts' +import { PROGRAM, resolveCliDirectory } from './directory.ts' +import type { TencentMeetingState } from './types.ts' +/* jscpd:ignore-end */ + +export type * from './types.ts' + +declare module '@deepseek-ai/cordis' { + interface Context { + /** Tencent Meeting account operations for the Plugins page. */ + tencentMeeting: TencentMeeting + } +} + +/** Where tmeet is and how long a command that does not wait for the user may run. */ +export type Config = CliAccountConfig + +/** Registers the CLI and its skill, and owns the account operations the Plugins page drives. */ +export default class TencentMeeting extends TypertRemoteService { + static inject = ['skills', 'subprocess', 'shellEnv'] + static Config: z = CliAccountConfig + + private readonly account: TencentMeetingAccount + + /** + * @param ctx - Context carrying the skill registry, subprocess runtime, and Shell environment. + * @param config - CLI location and command deadline. + * @throws when the subprocess runtime does not run on this Host or `tmeet` cannot be made executable on the PATH. + */ + constructor(ctx: Context, config: Config) { + super(ctx, 'tencentMeeting') + if (!ctx.subprocess.runsOnHost) { + throw new Error('tencent-meeting: tmeet and its default sign-in are local to this Host; mount a Host subprocess runtime') + } + ctx.shellEnv.registerPath({ name: 'tencent-meeting', directories: [resolveCliDirectory(config.binDir)], programs: [PROGRAM] }) + const cli = new CliCommandExecutor(ctx.subprocess, ctx.shellEnv, { program: PROGRAM, commandTimeoutMs: config.commandTimeoutMs }) + this.account = new TencentMeetingAccount(cli, ctx.logger) + ctx.effect(() => () => this.account.dispose()) + ctx.plugin(SkillFilesystem, { + providerName: 'tencent-meeting', + includeDefaultRoots: false, + watch: false, + bundledSkillDir: fileURLToPath(new URL('../skills/', import.meta.url)), + }) + } + + /* jscpd:ignore-start -- CLI app plugins declare the same Remote methods, each delegating to its own account runtime. */ + /** + * Check the account again without changing it. + * @returns the operation identity. + * @throws while another operation runs. + */ + @Remote + check(): CliOperationId { + return this.account.start('check') + } + + /** + * Sign in through the CLI's authorization page. + * @returns the operation identity. + * @throws while another operation runs. + */ + @Remote + signIn(): CliOperationId { + return this.account.start('sign-in') + } + + /** + * Sign the default account out, which also signs out the user's own terminal. + * @returns the operation identity. + * @throws while another operation runs. + */ + @Remote + signOut(): CliOperationId { + return this.account.start('sign-out') + } + + /** + * Cancel a sign-in while it waits for the user's authorization, and wait for its command to exit. + * @param id - the operation to cancel; a finished one or another step is ignored. + * @returns after the operation settles, or at once when nothing is cancelled. + */ + @Remote + cancel(id: CliOperationId): Promise { + return this.account.cancel(id) + } + + /** + * Follow the account and its operations independently of any page; each new subscriber starts a check when none runs. + * @param signal - the Client's observation lifetime. + * @returns the current view, then each changed view. + */ + @Remote({ mode: 'stream' }) + async *follow(signal: AbortSignal): AsyncIterable { + yield* this.account.follow(signal) + } + /* jscpd:ignore-end */ +} diff --git a/packages/connector/tencent-meeting-cli/src/types.ts b/packages/connector/tencent-meeting-cli/src/types.ts new file mode 100644 index 0000000000..89eae5f493 --- /dev/null +++ b/packages/connector/tencent-meeting-cli/src/types.ts @@ -0,0 +1,22 @@ +/** Credential-free Tencent Meeting account and operation views for Remote clients. */ + +import type { CliAccountView, CliCommandFailure } from '@deepseek-ai/dsh-cli-account/types' + +/** The default tmeet account as the latest `auth status` observed it. */ +export type TencentMeetingAccountState = + | { readonly state: 'unchecked' | 'signed-out' | 'unverified' } + | { readonly state: 'connected'; readonly userName: string } + +/** The account operations the Plugins page starts. */ +export type TencentMeetingOperationKind = 'check' | 'sign-in' | 'sign-out' + +/** Tencent Meeting steps of an operation, besides the runtime's `checking` and `cancelling`. */ +export type TencentMeetingPhase = 'authorizing' | 'signing-out' + +/** The command and exit code of a failed operation's last command. */ +export type TencentMeetingOperationFailure = CliCommandFailure<'auth-status' | 'auth-login' | 'auth-logout'> + +/** The complete Tencent Meeting view a Remote client replaces on every change. */ +export type TencentMeetingState = CliAccountView< + TencentMeetingAccountState, TencentMeetingOperationKind, TencentMeetingPhase, TencentMeetingOperationFailure +> diff --git a/packages/connector/tencent-meeting-cli/tsconfig.json b/packages/connector/tencent-meeting-cli/tsconfig.json new file mode 100644 index 0000000000..ddbffca7a3 --- /dev/null +++ b/packages/connector/tencent-meeting-cli/tsconfig.json @@ -0,0 +1,42 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "lib/types" + }, + "include": [ + "src" + ], + "references": [ + { + "path": "../../../vendor/cordis" + }, + { + "path": "../../../vendor/schemastery" + }, + { + "path": "../../skill/skill-filesystem" + }, + { + "path": "../../util/values" + }, + { + "path": "../../typert/protocol" + }, + { + "path": "../../shell/shell-env" + }, + { + "path": "../../skill/skill" + }, + { + "path": "../../subprocess/subprocess" + }, + { + "path": "../../util/home-paths" + }, + { + "path": "../cli-account" + } + ] +} diff --git a/packages/connector/tencent-meeting/cordis.patch.yml b/packages/connector/tencent-meeting/cordis.patch.yml new file mode 100644 index 0000000000..116f488a11 --- /dev/null +++ b/packages/connector/tencent-meeting/cordis.patch.yml @@ -0,0 +1,5 @@ +- insert: + - id: tencent-meeting + name: '@deepseek-ai/dsh-tencent-meeting-cli' + - id: ui-tencent-meeting + name: '@deepseek-ai/dsh-client-ui-tencent-meeting' diff --git a/packages/connector/tencent-meeting/locale/en.json b/packages/connector/tencent-meeting/locale/en.json new file mode 100644 index 0000000000..90ad995431 --- /dev/null +++ b/packages/connector/tencent-meeting/locale/en.json @@ -0,0 +1,6 @@ +{ + "meta": { + "title": "Tencent Meeting Plugin", + "description": "Use Tencent Meeting meetings, recordings, minutes, and meeting reports in conversations" + } +} diff --git a/packages/connector/tencent-meeting/locale/zh.json b/packages/connector/tencent-meeting/locale/zh.json new file mode 100644 index 0000000000..2e8752fe7d --- /dev/null +++ b/packages/connector/tencent-meeting/locale/zh.json @@ -0,0 +1,6 @@ +{ + "meta": { + "title": "腾讯会议插件", + "description": "在对话中使用腾讯会议的会议、录制、纪要和会议报告" + } +} diff --git a/packages/connector/tencent-meeting/package.json b/packages/connector/tencent-meeting/package.json new file mode 100644 index 0000000000..fbc08ad2b4 --- /dev/null +++ b/packages/connector/tencent-meeting/package.json @@ -0,0 +1,48 @@ +{ + "name": "@deepseek-ai/dsh-tencent-meeting", + "description": "Tencent Meeting plugin: the official tmeet with its skill, and account connection from the Plugins page", + "version": "0.2.1-rc.2", + "publishConfig": { + "access": "public" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/deepseek-ai/deepseek-harness.git", + "directory": "packages/connector/tencent-meeting" + }, + "type": "module", + "main": "lib/index.js", + "types": "lib/types/index.d.ts", + "exports": { + ".": { + "types": "./lib/types/index.d.ts", + "default": "./lib/index.js" + }, + "./src/*": "./src/*", + "./package.json": "./package.json", + "./cordis.patch.yml": "./cordis.patch.yml", + "./locale/*.json": "./locale/*.json" + }, + "files": [ + "locale/*.json", + "lib/index.js", + "cordis.patch.yml", + "lib/types/**/*.d.ts" + ], + "license": "MIT", + "dependencies": { + "@deepseek-ai/dsh-tencent-meeting-cli": "workspace:*", + "@deepseek-ai/dsh-client-ui-tencent-meeting": "workspace:*" + }, + "peerDependencies": { + "@deepseek-ai/cordis": "workspace:~" + }, + "devDependencies": { + "@deepseek-ai/cordis": "workspace:~" + }, + "dsh": { + "bundle": { + "patch": "./cordis.patch.yml" + } + } +} diff --git a/packages/connector/tencent-meeting/src/index.ts b/packages/connector/tencent-meeting/src/index.ts new file mode 100644 index 0000000000..adc6521e6a --- /dev/null +++ b/packages/connector/tencent-meeting/src/index.ts @@ -0,0 +1,2 @@ +/** Tencent Meeting plugin composition; runtime rows live in cordis.patch.yml. */ +export {} diff --git a/packages/connector/tencent-meeting/tsconfig.json b/packages/connector/tencent-meeting/tsconfig.json new file mode 100644 index 0000000000..f1a449634c --- /dev/null +++ b/packages/connector/tencent-meeting/tsconfig.json @@ -0,0 +1,15 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "lib/types" + }, + "include": [ + "src" + ], + "references": [ + { + "path": "../../../vendor/cordis" + } + ] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 789d1ee6c4..85bcfcf8de 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6553,6 +6553,63 @@ importers: specifier: ^18.2.0 version: 18.3.1(react@18.3.1) + packages/client/ui-tencent-meeting: + devDependencies: + '@deepseek-ai/cordis': + specifier: workspace:~ + version: link:../../../vendor/cordis + '@deepseek-ai/dsh-api-gateway': + specifier: workspace:* + version: link:../../api/gateway + '@deepseek-ai/dsh-api-remotes': + specifier: workspace:* + version: link:../../api/remotes + '@deepseek-ai/dsh-cli-account': + specifier: workspace:* + version: link:../../connector/cli-account + '@deepseek-ai/dsh-client-locale': + specifier: workspace:* + version: link:../locale + '@deepseek-ai/dsh-client-store': + specifier: workspace:* + version: link:../store + '@deepseek-ai/dsh-client-test-runtime': + specifier: workspace:* + version: link:../../test-support/client-runtime + '@deepseek-ai/dsh-client-ui-cli-account': + specifier: workspace:* + version: link:../ui-cli-account + '@deepseek-ai/dsh-client-ui-layout': + specifier: workspace:* + version: link:../ui-layout + '@deepseek-ai/dsh-client-ui-plugin-manager': + specifier: workspace:* + version: link:../ui-plugin-manager + '@deepseek-ai/dsh-client-ui-renderer': + specifier: workspace:* + version: link:../ui-renderer + '@deepseek-ai/dsh-client-ui-slots': + specifier: workspace:* + version: link:../ui-slots + '@deepseek-ai/dsh-tencent-meeting-cli': + specifier: workspace:* + version: link:../../connector/tencent-meeting-cli + '@deepseek-ai/dsh-typert-protocol': + specifier: workspace:* + version: link:../../typert/protocol + '@deepseek-ai/dsh-util-values': + specifier: workspace:* + version: link:../../util/values + '@testing-library/react': + specifier: ^16.3.3 + version: 16.3.3(@testing-library/dom@10.4.2)(@types/react-dom@18.3.7(@types/react@18.3.31))(@types/react@18.3.31)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: + specifier: ^18.2.0 + version: 18.3.1 + react-dom: + specifier: ^18.2.0 + version: 18.3.1(react@18.3.1) + packages/client/ui-theme: dependencies: '@deepseek-ai/schemastery': @@ -7282,6 +7339,56 @@ importers: specifier: workspace:* version: link:../../core/system-prompt + packages/connector/tencent-meeting: + dependencies: + '@deepseek-ai/dsh-client-ui-tencent-meeting': + specifier: workspace:* + version: link:../../client/ui-tencent-meeting + '@deepseek-ai/dsh-tencent-meeting-cli': + specifier: workspace:* + version: link:../tencent-meeting-cli + devDependencies: + '@deepseek-ai/cordis': + specifier: workspace:~ + version: link:../../../vendor/cordis + + packages/connector/tencent-meeting-cli: + dependencies: + '@deepseek-ai/dsh-cli-account': + specifier: workspace:* + version: link:../cli-account + '@deepseek-ai/dsh-home-paths': + specifier: workspace:* + version: link:../../util/home-paths + '@deepseek-ai/dsh-skill-filesystem': + specifier: workspace:* + version: link:../../skill/skill-filesystem + '@deepseek-ai/dsh-util-values': + specifier: workspace:* + version: link:../../util/values + '@deepseek-ai/schemastery': + specifier: link:../../../vendor/schemastery + version: link:../../../vendor/schemastery + '@tencentcloud/tmeet': + specifier: 1.0.18 + version: 1.0.18 + devDependencies: + '@deepseek-ai/cordis': + specifier: workspace:~ + version: link:../../../vendor/cordis + '@deepseek-ai/dsh-shell-env': + specifier: workspace:* + version: link:../../shell/shell-env + '@deepseek-ai/dsh-skill': + specifier: workspace:* + version: link:../../skill/skill + '@deepseek-ai/dsh-subprocess': + specifier: workspace:* + version: link:../../subprocess/subprocess + '@deepseek-ai/dsh-typert-protocol': + specifier: workspace:* + version: link:../../typert/protocol + packages/connector/upstream-skills: dependencies: '@deepseek-ai/dsh-home-paths': @@ -20928,6 +21035,11 @@ packages: '@tanstack/virtual-core@3.17.8': resolution: {integrity: sha512-BfEvehNpOT75r5Ksc5xW6NZuXujTfb7nlSEyVu4XHG3gdxNg1KqXruWbDewXOUaUYIo4oRbSfkjIajz4MAT8tA==} + '@tencentcloud/tmeet@1.0.18': + resolution: {integrity: sha512-YFePEDfYhJp95mwOv8GEQ0Q5rqm2tdqHuuCKlgULI7kQicU59a2KkAYnQQgRWhHsxyxTsuWYfeQYG6qZJ6pObw==} + engines: {node: '>=14'} + hasBin: true + '@testing-library/dom@10.4.2': resolution: {integrity: sha512-yzr2S9HyAIdhz2/6qHgbs665Q7PKVcDF05vsOlHPxG1mo36gKVesdYVeDLnXgfjJ03CrKRk08knc6+E/9m8v2Q==} engines: {node: '>=18'} @@ -28347,6 +28459,8 @@ snapshots: '@tanstack/virtual-core@3.17.8': {} + '@tencentcloud/tmeet@1.0.18': {} + '@testing-library/dom@10.4.2': dependencies: '@babel/code-frame': 7.29.7 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 59b31eb46b..e84ad5de45 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -53,6 +53,9 @@ allowBuilds: electron-winstaller: false # Store-index rewriting only needs msgpackr's portable JavaScript codec. msgpackr-extract: false + # The Tencent Meeting plugin's CLI ships executable binaries; its install script only + # restores their mode and runs `tmeet auth logout`, so repository installs skip it. + '@tencentcloud/tmeet@1.0.18': false minimumReleaseAgeExclude: # Native Codex and Claude tests qualify this exact release with its local patches. diff --git a/scripts/check-workspace-constraints.ts b/scripts/check-workspace-constraints.ts index c3868da130..bf70a371fc 100644 --- a/scripts/check-workspace-constraints.ts +++ b/scripts/check-workspace-constraints.ts @@ -209,6 +209,8 @@ const packageFileExtras: Readonly> = { '@deepseek-ai/dsh-client-ui-theme': ['lib/styles'], // The physical-key protocol is a public entry usable without the browser service. '@deepseek-ai/dsh-client-shortcuts': ['lib/protocol.js'], + // The Tencent Meeting plugin ships its skill with the official guide upstream publishes only in its repository. + '@deepseek-ai/dsh-tencent-meeting-cli': ['skills'], // The CPython side ships as source .py files, published as-is rather than built. '@deepseek-ai/dsh-experimental-ptc-runtime-python': ['py/**/*.py'], '@deepseek-ai/dsh-experimental-speech-to-text-sensevoice': ['runtime/assets.json'], diff --git a/scripts/product-package-policy.ts b/scripts/product-package-policy.ts index 7003b0a158..69759cb64b 100644 --- a/scripts/product-package-policy.ts +++ b/scripts/product-package-policy.ts @@ -38,6 +38,9 @@ export const PRODUCT_PACKAGE_POLICY: Readonly