From aea7f82dee26f905298f33e6f7fbbc884e7fd10d Mon Sep 17 00:00:00 2001 From: gengruilin Date: Wed, 28 Oct 2026 15:25:55 +0800 Subject: [PATCH] feat(tencent-meeting): download the official guide at run time instead of bundling a copy The tencent-meeting skill's guide is skills/tmeet-skill/ of TencentCloud/tencentmeeting-cli at v1.0.18 (e631b35), without scripts/agent_init.py. Instead of carrying that copy, the plugin pins the commit with the size and digest of those files and registers its entry skill through @deepseek-ai/dsh-upstream-skills, which downloads, verifies, and caches them when the plugin loads and lists the skill once they are in place. The account view carries the download state, and the plugin page shows a downloading or failed note beside the account; each check restarts a failed download without waiting for it, so signing in never waits for GitHub. skillsDir points the tests, the recorded session, and the Web e2e at local directories, so none of them downloads anything. --- .../tests/tencent-meeting-connection.e2e.ts | 5 +- docs/config-catalog.md | 8 +-- docs/config-catalog.zh.md | 8 +-- .../ui-tencent-meeting/README.i18n.yaml | 4 +- packages/client/ui-tencent-meeting/README.md | 2 + .../client/ui-tencent-meeting/README.zh.md | 2 + .../client/ui-tencent-meeting/package.json | 1 + .../src/client/TencentMeetingConnection.tsx | 21 +++++++- .../ui-tencent-meeting/src/client/locales.ts | 4 ++ .../tests/components.client.spec.tsx | 19 +++++-- .../tests/connection.client.spec.ts | 12 ++--- .../client/ui-tencent-meeting/tsconfig.json | 3 ++ .../tencent-meeting-cli/README.i18n.yaml | 28 +++++----- .../connector/tencent-meeting-cli/README.md | 21 +++++--- .../tencent-meeting-cli/README.zh.md | 21 +++++--- .../tencent-meeting-cli/package.json | 2 +- .../skills/tencent-meeting/SKILL.md | 4 +- .../tencent-meeting-cli/src/account.ts | 28 +++++++--- .../tencent-meeting-cli/src/index.ts | 31 +++++------ .../tencent-meeting-cli/src/skills.ts | 21 ++++++++ .../tencent-meeting-cli/src/types.ts | 9 +++- .../tencent-meeting-cli/tests/account.spec.ts | 51 ++++++++++++++----- .../tencent-meeting-cli/tests/plugin.spec.ts | 33 ++++++++++-- .../tencent-meeting-cli/tests/skills.spec.ts | 13 ++--- .../tencent-meeting-cli/tsconfig.json | 2 +- .../extensions/tool-cordis/src/api-catalog.ts | 10 +++- pnpm-lock.yaml | 7 ++- .../cordis.snapshot.yml | 1 + .../session/tencent-meeting-skills/cordis.yml | 1 + .../workspace/tmeet-skills/.gitkeep | 0 30 files changed, 264 insertions(+), 108 deletions(-) create mode 100644 packages/connector/tencent-meeting-cli/src/skills.ts create mode 100644 snapshots/session/tencent-meeting-skills/workspace/tmeet-skills/.gitkeep diff --git a/apps/web/tests/tencent-meeting-connection.e2e.ts b/apps/web/tests/tencent-meeting-connection.e2e.ts index 7c9a4d43c2..cfea5a9b5a 100644 --- a/apps/web/tests/tencent-meeting-connection.e2e.ts +++ b/apps/web/tests/tencent-meeting-connection.e2e.ts @@ -1,6 +1,6 @@ // Tencent Meeting sign-in, failure, and sign-out through the real Host/Remote/browser composition. // A stand-in CLI waits for each authorization page visit and keeps the sign-in on disk. -import { chmod, mkdtemp, rm, writeFile } from 'node:fs/promises' +import { chmod, mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join } from 'node:path' import { fileURLToPath } from 'node:url' @@ -68,8 +68,9 @@ describe.skipIf(process.platform === 'win32')('web e2e: Tencent Meeting plugin a binDir = await mkdtemp(join(tmpdir(), 'dsh-tencent-meeting-e2e-')) await writeFile(join(binDir, 'tmeet'), TMEET) await chmod(join(binDir, 'tmeet'), 0o755) + await mkdir(join(binDir, 'skills')) const overlay = join(binDir, 'tencent-meeting.overlay.yml') - await writeFile(overlay, `- id: tencent-meeting\n config:\n binDir: ${JSON.stringify(binDir)}\n`) + await writeFile(overlay, `- id: tencent-meeting\n config:\n binDir: ${JSON.stringify(binDir)}\n skillsDir: ${JSON.stringify(join(binDir, 'skills'))}\n`) scaffold = await launchWebScaffold({ extraOverlayPath: [fileURLToPath(new URL('./pin-browse-picker.overlay.yml', import.meta.url)), overlay], profile: { packages: [{ dir: TENCENT_MEETING_DIR, enabled: true }] }, diff --git a/docs/config-catalog.md b/docs/config-catalog.md index 304a40fc62..b748e64153 100644 --- a/docs/config-catalog.md +++ b/docs/config-catalog.md @@ -3801,12 +3801,12 @@ export interface Config { ## `@deepseek-ai/dsh-tencent-meeting-cli` - `inject`: `skills` · `subprocess` · `systemPrompt` -- `refs`: [`CliAccountConfig`](../packages/connector/cli-account/src/index.ts) -- `source`: [`packages/connector/tencent-meeting-cli/src/index.ts:32`](../packages/connector/tencent-meeting-cli/src/index.ts) +- `refs`: [`CliAccountConfig`](../packages/connector/cli-account/src/index.ts) · [`UpstreamSkillsConfig`](../packages/connector/upstream-skills/src/index.ts) +- `source`: [`packages/connector/tencent-meeting-cli/src/index.ts:33`](../packages/connector/tencent-meeting-cli/src/index.ts) ```ts config-catalog -/** Where tmeet is and how long a command that does not wait for the user may run. */ -export type Config = CliAccountConfig +/** Where tmeet and the upstream guide come from, a command's deadline, and a download's time limit. */ +export type Config = CliAccountConfig & UpstreamSkillsConfig ``` diff --git a/docs/config-catalog.zh.md b/docs/config-catalog.zh.md index 407454e58e..a9d22b9542 100644 --- a/docs/config-catalog.zh.md +++ b/docs/config-catalog.zh.md @@ -3803,12 +3803,12 @@ export interface Config { ## `@deepseek-ai/dsh-tencent-meeting-cli` - `inject`: `skills` · `subprocess` · `systemPrompt` -- `refs`: [`CliAccountConfig`](../packages/connector/cli-account/src/index.ts) -- `source`: [`packages/connector/tencent-meeting-cli/src/index.ts:32`](../packages/connector/tencent-meeting-cli/src/index.ts) +- `refs`: [`CliAccountConfig`](../packages/connector/cli-account/src/index.ts) · [`UpstreamSkillsConfig`](../packages/connector/upstream-skills/src/index.ts) +- `source`: [`packages/connector/tencent-meeting-cli/src/index.ts:33`](../packages/connector/tencent-meeting-cli/src/index.ts) ```ts config-catalog -/** Where tmeet is and how long a command that does not wait for the user may run. */ -export type Config = CliAccountConfig +/** Where tmeet and the upstream guide come from, a command's deadline, and a download's time limit. */ +export type Config = CliAccountConfig & UpstreamSkillsConfig ``` diff --git a/packages/client/ui-tencent-meeting/README.i18n.yaml b/packages/client/ui-tencent-meeting/README.i18n.yaml index 7ecf0a98cd..1af954ba1c 100644 --- a/packages/client/ui-tencent-meeting/README.i18n.yaml +++ b/packages/client/ui-tencent-meeting/README.i18n.yaml @@ -15,8 +15,8 @@ en: d152484eb41ac6b4 zh: 09388d293f9be9cb /deepseek-ai-dsh-client-ui-tencent-meeting/use-this-package: - en: 941cdfda096234af - zh: c78fcc7a5a32f423 + en: 8abed8cce6f6e6a3 + zh: b8be0ab0d7e3530f /deepseek-ai-dsh-client-ui-tencent-meeting/understand-the-implementation: en: 4589918951a2376f zh: cdae54a9a128c0b4 diff --git a/packages/client/ui-tencent-meeting/README.md b/packages/client/ui-tencent-meeting/README.md index 289594355f..fe7901e7bd 100644 --- a/packages/client/ui-tencent-meeting/README.md +++ b/packages/client/ui-tencent-meeting/README.md @@ -38,6 +38,8 @@ Install the [Tencent Meeting plugin bundle](../../connector/tencent-meeting/READ | Cannot confirm sign-in right now | **Retry** checks the account again | | Tencent Meeting component not running | The Host's `tencent-meeting` row did not load; the section points to the component list for the reason, and **Retry** subscribes to the Host again | +Below the status, a row reports the Tencent Meeting skill while its guide is not in place: one row while the Host downloads it from GitHub, and after a failed download, one row with **Retry**, which checks the account and restarts the download without waiting for it. Neither row appears once the guide is in place. + Leaving the page does not cancel a sign-in, which the Host owns. The authorization page opens from the user's own click, because browsers block a window that opens long after it. A failed sign-in, sign-out, or check shows the general failure notice with the command and exit code; a failed page action shows a toast, and so does a finished sign-in or sign-out. The section notes that the account is shared with `tmeet` in the computer's terminal and that turning the plugin off does not sign it out, and the sign-out confirmation says that the terminal is signed out too. ----- diff --git a/packages/client/ui-tencent-meeting/README.zh.md b/packages/client/ui-tencent-meeting/README.zh.md index 8f3ecc34ab..3ad87addca 100644 --- a/packages/client/ui-tencent-meeting/README.zh.md +++ b/packages/client/ui-tencent-meeting/README.zh.md @@ -38,6 +38,8 @@ kind: "package-reference" | 暂时无法确认登录状态 | **重试** 重新检查账号 | | 腾讯会议组件未运行 | Host 的 `tencent-meeting` 行没有加载;区块提示到组件列表查看原因,**重试** 会重新订阅 Host | +状态下方有一行在子指南尚未就位时报告腾讯会议技能:Host 从 GitHub 下载时显示一行;下载失败后显示带 **重试** 的一行,它会检查账号,并在不等待的情况下重新开始下载。子指南就位后两行都不出现。 + 离开页面不会取消登录,登录由 Host 持有。授权页面由用户自己的点击打开,因为浏览器会拦截点击很久之后才打开的窗口。登录、退出登录或检查失败时,显示通用失败提示及命令和退出码;页面操作失败时显示 toast,登录或退出登录完成时也会显示。区块会说明账号与这台电脑终端里的 `tmeet` 共用,关闭插件不会退出登录;退出登录的确认框会说明终端也会一起退出。 ----- diff --git a/packages/client/ui-tencent-meeting/package.json b/packages/client/ui-tencent-meeting/package.json index 762a4bfc6a..71a933e1f5 100644 --- a/packages/client/ui-tencent-meeting/package.json +++ b/packages/client/ui-tencent-meeting/package.json @@ -67,6 +67,7 @@ "@deepseek-ai/dsh-typert-protocol": "workspace:*", "@deepseek-ai/dsh-util-values": "workspace:*", "@deepseek-ai/dsh-tencent-meeting-cli": "workspace:*", + "@deepseek-ai/dsh-upstream-skills": "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 index 6173266bba..b35ecfc562 100644 --- a/packages/client/ui-tencent-meeting/src/client/TencentMeetingConnection.tsx +++ b/packages/client/ui-tencent-meeting/src/client/TencentMeetingConnection.tsx @@ -1,15 +1,31 @@ /** 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, + CliAccountActivation, CliAccountBadge, CliAccountConfirm, CliAccountSection, CliAccountToast, type CliAccountAction, type CliAccountNote, } 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 type { UpstreamSkillsState } from '@deepseek-ai/dsh-upstream-skills/types' +import { assertNever } from '@deepseek-ai/dsh-util-values' import { TENCENT_MEETING_PACKAGE, presentConnection, type ConnectionFace } from './connection.ts' import type { NS } from './locales.ts' type FaceProps = InjectFace & PropsLocale +/* jscpd:ignore-start -- CLI app plugins whose guides download report the same states, each from its own dictionary. */ +/** The row that reports a guide that is not in place yet; a failed download offers a check, which restarts it. */ +function skillsNotes(skills: UpstreamSkillsState | undefined, t: FaceProps['t'], check: () => void): CliAccountNote[] { + switch (skills) { + case undefined: + case 'installed': return [] + case 'downloading': return [{ text: t('skills.downloading') }] + case 'failed': return [{ text: t('skills.failed'), action: { label: t('action.retry'), onClick: check } }] + /* v8 ignore next -- closed skills state union */ + default: return assertNever(skills) + } +} +/* jscpd:ignore-end */ + /** * The account section on the Tencent Meeting bundle's page. * @param props - the shared connection face and the Tencent Meeting dictionary. @@ -46,7 +62,8 @@ export function TencentMeetingConnectionSection(props: FaceProps): ReactNode { const failed = 'failed' in shown ? shown.failed : undefined return ( + linked={snapshot.linked} actions={actions} detail={detail} notes={skillsNotes(snapshot.view?.account.skills, t, check)} + failure={failed === undefined ? undefined : { text: t('failed'), command: failed.failure }}> { setConfirming(false) }} onConfirm={signOut} /> diff --git a/packages/client/ui-tencent-meeting/src/client/locales.ts b/packages/client/ui-tencent-meeting/src/client/locales.ts index d7ddf1e7be..2c56c9f242 100644 --- a/packages/client/ui-tencent-meeting/src/client/locales.ts +++ b/packages/client/ui-tencent-meeting/src/client/locales.ts @@ -20,6 +20,8 @@ export const zh = { 'detail.stopped': '“腾讯会议 CLI 与技能”组件没有运行,可以在下方组件列表查看原因,处理后重试。', 'detail.connected': '已登录为 {name}。可以在对话中直接请 Agent 使用腾讯会议。', 'detail.authorizing': '在打开的腾讯会议页面中确认授权,完成后回到这里查看结果。页面没有打开时,点击“打开腾讯会议页面”。', + 'skills.downloading': '正在从 GitHub 下载腾讯会议技能,下载完成后即可在对话中使用。', + 'skills.failed': '腾讯会议技能没能下载,Agent 暂时用不了腾讯会议的子指南。请确认这台电脑能访问 GitHub,然后重试。', hint: '腾讯会议账号与这台电脑终端里的 tmeet 共用;关闭插件不会退出登录。', failed: '操作未完成,请重试', 'failure.details': '排障信息:{details}', @@ -64,6 +66,8 @@ export const en: Record = { '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.', + 'skills.downloading': 'Downloading the Tencent Meeting skill from GitHub. It becomes available in conversations when the download finishes.', + 'skills.failed': 'The Tencent Meeting skill could not be downloaded, so the agent cannot use the Tencent Meeting guide yet. Check that this computer can reach GitHub, then retry.', 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}', diff --git a/packages/client/ui-tencent-meeting/tests/components.client.spec.tsx b/packages/client/ui-tencent-meeting/tests/components.client.spec.tsx index 6563ec5f13..673f12c7b7 100644 --- a/packages/client/ui-tencent-meeting/tests/components.client.spec.tsx +++ b/packages/client/ui-tencent-meeting/tests/components.client.spec.tsx @@ -18,8 +18,8 @@ afterEach(cleanup) const OP = 'op' as CliOperationId const LINK = 'https://meeting.tencent.com/marketplace/tencentmeeting-cli-auth.html?code=fixture' -const SIGNED_OUT: TencentMeetingState = { account: { state: 'signed-out' } } -const CONNECTED: TencentMeetingState = { account: { state: 'connected', userName: '测试用户' } } +const SIGNED_OUT: TencentMeetingState = { account: { state: 'signed-out', skills: 'installed' } } +const CONNECTED: TencentMeetingState = { account: { state: 'connected', userName: '测试用户', skills: 'installed' } } function fixture(view?: TencentMeetingState, copy: typeof zh = zh) { const state = createSnapshotStore({ view, linked: true, stopped: false, busy: false, notice: undefined }) @@ -93,13 +93,26 @@ it.each([['zh', zh], ['en', en]] as const)('reports a failed sign-in with its co }) it('retries an unconfirmed sign-in by checking again', () => { - const b = fixture({ account: { state: 'unverified' } }) + const b = fixture({ account: { state: 'unverified', skills: 'installed' } }) render() expect(screen.getByText(zh['detail.unavailable'])).toBeTruthy() fireEvent.click(button(zh['action.retry'])) expect(b.face.check).toHaveBeenCalledOnce() }) +it('reports a guide that is downloading, and retries a failed download by checking again', () => { + const b = fixture({ account: { state: 'signed-out', skills: 'downloading' } }) + render() + expect(screen.getByText(zh['skills.downloading'])).toBeTruthy() + expect(screen.queryByRole('button', { name: zh['action.retry'] })).toBeNull() + b.set({ view: { account: { state: 'signed-out', skills: 'failed' } } }) + expect(screen.queryByText(zh['skills.downloading'])).toBeNull() + fireEvent.click(button(zh['action.retry'])) + expect(b.face.check).toHaveBeenCalledOnce() + b.set({ view: { account: { state: 'signed-out', skills: 'installed' } } }) + expect(screen.queryByText(zh['skills.failed'])).toBeNull() +}) + it('explains a stopped Host component and retries even while the stream is offline', () => { const b = fixture(undefined) render() diff --git a/packages/client/ui-tencent-meeting/tests/connection.client.spec.ts b/packages/client/ui-tencent-meeting/tests/connection.client.spec.ts index 5f2f824076..a31b6446a4 100644 --- a/packages/client/ui-tencent-meeting/tests/connection.client.spec.ts +++ b/packages/client/ui-tencent-meeting/tests/connection.client.spec.ts @@ -12,8 +12,8 @@ type Operation = NonNullable const OP = 'op-1' as CliOperationId const LINK = 'https://meeting.tencent.com/marketplace/tencentmeeting-cli-auth.html?code=fixture' -const SIGNED_OUT: TencentMeetingState = { account: { state: 'signed-out' } } -const CONNECTED: TencentMeetingState = { account: { state: 'connected', userName: '测试用户' } } +const SIGNED_OUT: TencentMeetingState = { account: { state: 'signed-out', skills: 'installed' } } +const CONNECTED: TencentMeetingState = { account: { state: 'connected', userName: '测试用户', skills: 'installed' } } const FAILED_SIGN_IN: NonNullable = { id: OP, kind: 'sign-in', outcome: 'failed', failure: { command: 'auth-login', exitCode: 1 } } const FAILED_CHECK: NonNullable = { id: OP, kind: 'check', outcome: 'failed', failure: { command: 'auth-status', exitCode: 1 } } @@ -24,13 +24,13 @@ function operation(kind: Operation['kind'], phase: Operation['phase'], cancellab it.each<[string, TencentMeetingState | undefined, ConnectionPresentation]>([ ['a stopped stream', SIGNED_OUT, { phase: 'stopped', failed: undefined }], ['no view yet', undefined, { phase: 'checking', failed: undefined }], - ['an unchecked account', { account: { state: 'unchecked' } }, { phase: 'checking', failed: undefined }], + ['an unchecked account', { account: { state: 'unchecked', skills: 'installed' } }, { phase: 'checking', failed: undefined }], ['a check', { ...SIGNED_OUT, operation: operation('check', 'checking') }, { phase: 'checking', failed: undefined }], - ['a first check that failed', { account: { state: 'unchecked' }, result: FAILED_CHECK }, { phase: 'unavailable', failed: FAILED_CHECK }], + ['a first check that failed', { account: { state: 'unchecked', skills: 'installed' }, result: FAILED_CHECK }, { phase: 'unavailable', failed: FAILED_CHECK }], ['no sign-in', SIGNED_OUT, { phase: 'disconnected', failed: undefined }], ['a failed sign-in', { ...SIGNED_OUT, result: FAILED_SIGN_IN }, { phase: 'disconnected', failed: FAILED_SIGN_IN }], ['a cancelled sign-in', { ...SIGNED_OUT, result: { id: OP, kind: 'sign-in', outcome: 'cancelled' } }, { phase: 'disconnected', failed: undefined }], - ['an unconfirmed sign-in', { account: { state: 'unverified' } }, { phase: 'unavailable', failed: undefined }], + ['an unconfirmed sign-in', { account: { state: 'unverified', skills: 'installed' } }, { phase: 'unavailable', failed: undefined }], ['a signed-in user', CONNECTED, { phase: 'connected', userName: '测试用户', failed: undefined }], ['an authorization', { ...SIGNED_OUT, operation: operation('sign-in', 'authorizing', true, LINK) }, { phase: 'connecting', step: 'authorizing', url: LINK, cancellable: true }], @@ -125,7 +125,7 @@ it('signs out through the Remote and reports it', async () => { it('checks again without a notice', async () => { const b = fixture() - await b.publish({ account: { state: 'unverified' } }) + await b.publish({ account: { state: 'unverified', skills: 'installed' } }) b.face.check() await settle(b) expect(b.remote.check).toHaveBeenCalledOnce() diff --git a/packages/client/ui-tencent-meeting/tsconfig.json b/packages/client/ui-tencent-meeting/tsconfig.json index e94bf20679..eeb191ecfb 100644 --- a/packages/client/ui-tencent-meeting/tsconfig.json +++ b/packages/client/ui-tencent-meeting/tsconfig.json @@ -49,6 +49,9 @@ }, { "path": "../../connector/cli-account" + }, + { + "path": "../../connector/upstream-skills" } ] } diff --git a/packages/connector/tencent-meeting-cli/README.i18n.yaml b/packages/connector/tencent-meeting-cli/README.i18n.yaml index 9aa11c9ec4..f6f6eebc16 100644 --- a/packages/connector/tencent-meeting-cli/README.i18n.yaml +++ b/packages/connector/tencent-meeting-cli/README.i18n.yaml @@ -9,8 +9,8 @@ en: a37eed6cf33fd52b zh: fd1582f4f9f799df /deepseek-ai-dsh-tencent-meeting-cli/summary: - en: 9f3d06bf6610e7c7 - zh: 09e5096e01aa4a47 + en: ec3f2d43c3a0f5cb + zh: e03af3ad74c30c58 /deepseek-ai-dsh-tencent-meeting-cli/table-of-contents: en: d152484eb41ac6b4 zh: 09388d293f9be9cb @@ -21,17 +21,17 @@ en: 7a51a132f89610d5 zh: ceac278e59a9569c /deepseek-ai-dsh-tencent-meeting-cli/use-this-package/what-you-get: - en: 1131c50cb367e352 - zh: 0a831d7d14d47397 + en: f9db1b7cc4d55262 + zh: 6f2f568d4074d33e /deepseek-ai-dsh-tencent-meeting-cli/use-this-package/account-operations: en: ea83411e51508537 zh: e7523c08f654c347 /deepseek-ai-dsh-tencent-meeting-cli/use-this-package/configure: - en: 37a2b1092bf95ed3 - zh: f8008013bf562158 + en: d328064a9a1e719d + zh: 66dc0533b987d458 /deepseek-ai-dsh-tencent-meeting-cli/understand-the-implementation: - en: b08be5e5a3124cb0 - zh: b5670394d90f0de1 + en: bbdcbec918b8d321 + zh: 5248787bf2f2d916 /deepseek-ai-dsh-tencent-meeting-cli/further-exploration: en: 6232f06705a34722 zh: 1bd00144dee0cf3d @@ -54,8 +54,8 @@ en: 8955ac196848e69f zh: 698bcd0773a8f094 /deepseek-ai-dsh-tencent-meeting-cli/model-experience/loaded-skill-body/what-the-model-sees: - en: c3b2da40c8a72b87 - zh: 99343c184419bbed + en: d1671b06d763895e + zh: c267463e85e4cfad /deepseek-ai-dsh-tencent-meeting-cli/model-experience/loaded-skill-body/token-effect: en: 374e05c93f33526c zh: 3e36d6182358bb55 @@ -78,8 +78,8 @@ en: 67398dd4e4b02db9 zh: a873eacd006fa656 /deepseek-ai-dsh-tencent-meeting-cli/known-limitations-and-deferred-work: - en: aee62a5ae1d5e7b1 - zh: ad15071a53da57c3 + en: 51dabb3ec8484f15 + zh: 8e454e1dbbf48aa9 /deepseek-ai-dsh-tencent-meeting-cli/known-limitations-and-deferred-work/dev-note: - en: c745030d6dd7a0a7 - zh: 8e1a6f935c2c8a7a + en: d67cf464f2df6693 + zh: ff08f0d56a5ea79d diff --git a/packages/connector/tencent-meeting-cli/README.md b/packages/connector/tencent-meeting-cli/README.md index 8523de047e..e86b44630e 100644 --- a/packages/connector/tencent-meeting-cli/README.md +++ b/packages/connector/tencent-meeting-cli/README.md @@ -9,7 +9,7 @@ English | [中文](README.zh.md) ## Summary -This package is the Host row of the [Tencent Meeting plugin](../tencent-meeting/README.md). It installs a pinned `@tencentcloud/tmeet`, gives the model the absolute path of its platform executable in runtime context, and registers one `tencent-meeting` skill whose guide is the official `tmeet-skill`. Its `tencentMeeting` Remote checks the CLI's sign-in, signs in through the CLI's authorization page, signs out, and cancels, for the [Tencent Meeting plugin page](../../client/ui-tencent-meeting/README.md). The CLI keeps the sign-in in its default configuration, which the user's own terminal shares. Only macOS is supported. +This package is the Host row of the [Tencent Meeting plugin](../tencent-meeting/README.md). It installs a pinned `@tencentcloud/tmeet`, gives the model the absolute path of its platform executable in runtime context, and registers one `tencent-meeting` skill whose guide is the official `tmeet-skill`, which it downloads from the Tencent Meeting CLI repository on GitHub. Its `tencentMeeting` Remote checks the CLI's sign-in, signs in through the CLI's authorization page, signs out, and cancels, for the [Tencent Meeting plugin page](../../client/ui-tencent-meeting/README.md). The CLI keeps the sign-in in its default configuration, which the user's own terminal shares. Only macOS is supported. ## Table of Contents @@ -33,7 +33,9 @@ Install the [Tencent Meeting plugin bundle](../tencent-meeting/README.md), which After the plugin loads, one `tencent-meeting` skill joins the skill catalog. The agent loads it with the `skill` tool, opens the `tmeet-skill` guide and its references with the file tools, and runs `tmeet` by that path through the ordinary Shell tools under the current sandbox and approval policy. When a command reports a missing or expired sign-in, the agent asks the user to connect Tencent Meeting on the plugin page; it runs `tmeet auth login --no-browser` only when the user asks to finish it in the conversation, and requests `sandbox_permissions` with a `justification` on the first attempt because the command writes outside the workspace. -Turning the row off in Plugin Manager withdraws the skill and the path from runtime context. The CLI sign-in stays in place. +The guide comes from `skills/tmeet-skill/` of `TencentCloud/tencentmeeting-cli` at tag `v1.0.18` (commit `e631b35`), without `scripts/agent_init.py`. The row downloads that commit's archive when it loads and keeps the verified files in `$DSH_HOME/cache/tencent-meeting/`; until they are in place, the catalog has no `tencent-meeting` skill and the plugin page reports the download. A failed download is retried by the page's check. + +Turning the row off in Plugin Manager withdraws the skill and the path from runtime context. The CLI sign-in and the downloaded guide stay in place. ### Account operations @@ -56,6 +58,9 @@ A check runs `auth status`, which in tmeet 1.0.18 prints plain text and exits wi |---|---|---| | `binDir` | unset, which runs the installed `@tencentcloud/tmeet` executable for this platform | Absolute directory containing an executable `tmeet` | | `commandTimeoutMs` | `30000` | Deadline for one account check or sign-out, including executable lookup | +| `skillsDir` | none | Directory holding the files of `skills/tmeet-skill/` at their repository paths; when set, the guide is not downloaded | +| `skillsUrls` | `['https://codeload.github.com']` | Archive download prefixes tried in order | +| `skillsTimeoutMs` | `120000` | How long one prefix may take to deliver the whole archive | Sign-in waits up to 10 minutes for the user, and each command keeps at most 1 MiB of stdout; the [CLI account library](../cli-account/README.md) fixes both limits. tmeet itself stops waiting for authorization after 5 minutes. @@ -69,9 +74,9 @@ The generated [config catalog](../../../docs/config-catalog.md#deepseek-aidsh-te
Implementation internals — click to expand -[`src/index.ts`](src/index.ts) is a Remote service registered as `ctx.tencentMeeting`. It resolves the `tmeet` executable, gives its path to the model in runtime context, and mounts a [filesystem skill provider](../../skill/skill-filesystem/README.md) named `tencent-meeting` over this package's `skills/` directory, without the default roots or watching. `@tencentcloud/tmeet` ships one executable per platform under `dist/`, each named for its platform, and its `bin` is a Node launcher. [`src/directory.ts`](src/directory.ts) therefore picks the executable for `process.platform` and `process.arch` with the same names the launcher uses, and both the runtime context and the plugin's own commands use that path. The [CLI account library](../cli-account/README.md) registers that runtime context, runs each command by the same path, and runs one operation at a time. [`src/account.ts`](src/account.ts) extends that runtime with the tmeet commands, reads the authorization link from the output lines of `auth login`, and parses the `auth status` text. Disposal cancels the active operation, aborts running commands, and settles after their processes exit. +[`src/index.ts`](src/index.ts) is a Remote service registered as `ctx.tencentMeeting`. It resolves the `tmeet` executable, gives its path to the model in runtime context, and registers the `tencent-meeting` skill through the [upstream skills library](../upstream-skills/README.md) with the pin in [`src/skills.ts`](src/skills.ts). The account view carries the download state, and each check restarts a failed download without waiting for it. `@tencentcloud/tmeet` ships one executable per platform under `dist/`, each named for its platform, and its `bin` is a Node launcher. [`src/directory.ts`](src/directory.ts) therefore picks the executable for `process.platform` and `process.arch` with the same names the launcher uses, and both the runtime context and the plugin's own commands use that path. The [CLI account library](../cli-account/README.md) registers that runtime context, runs each command by the same path, and runs one operation at a time. [`src/account.ts`](src/account.ts) extends that runtime with the tmeet commands, reads the authorization link from the output lines of `auth login`, and parses the `auth status` text. Disposal cancels the active operation, aborts running commands, and settles after their processes exit. -[`skills/tencent-meeting/SKILL.md`](skills/tencent-meeting/SKILL.md) is the only skill: the DSH guidance, an index of the guide, and how to open it. [`skills/tencent-meeting/guides/tmeet-skill/`](skills/tencent-meeting/guides/tmeet-skill) is an unchanged copy of `SKILL.md` and `references/` from `skills/tmeet-skill/` in `TencentCloud/tencentmeeting-cli` at tag `v1.0.18` (commit `e631b35`), because upstream publishes the skill only in that repository and not in the npm package. Its `scripts/agent_init.py`, which records the calling agent and model in the CLI configuration for upstream telemetry, is not copied. The filesystem provider discovers only `//SKILL.md`, so the guide is not a separate skill. Where the DSH guidance and the guide disagree, the entry tells the agent to follow the DSH guidance: it uses the plugin's `tmeet` instead of installing one, skips `agent_init.py`, and sends sign-in to the plugin page. References are ordinary files in the guide's directory. +[`skills/tencent-meeting/SKILL.md`](skills/tencent-meeting/SKILL.md) is the only skill this package carries: the DSH guidance, an index of the guide, and how to open it. Upstream publishes the guide only in its repository and not in the npm package, so the library downloads it; it is a set of files under the skill's base directory, not a separate skill. The pin excludes `scripts/agent_init.py`, which records the calling agent and model in the CLI configuration for upstream telemetry. Where the DSH guidance and the guide disagree, the entry tells the agent to follow the DSH guidance: it uses the plugin's `tmeet` instead of installing one, skips `agent_init.py`, and sends sign-in to the plugin page. References are ordinary files in the guide's directory.
@@ -109,7 +114,7 @@ The catalog is fixed for one plugin version. Loading or unloading the plugin cha #### What the model sees -A `skill` tool result for `tencent-meeting` contains about 1,200 characters: the DSH guidance, a one-sentence index of the `tmeet-skill` guide, and how to open it. The DSH guidance tells the agent to run the plugin's `tmeet` by the absolute path from the current runtime context, to skip the guide's installation check and its `agent_init.py` step, to ask the user to connect on the plugin page before running `tmeet auth login --no-browser` itself, and to request `sandbox_permissions` for that command from its first attempt; it takes precedence over the guide where they disagree. Its resource base is `skills/tencent-meeting`, so the agent opens `guides/tmeet-skill/SKILL.md` with the file tools rather than the `skill` tool and resolves the guide's relative paths against the guide's own directory. +A `skill` tool result for `tencent-meeting` contains about 1,200 characters: the DSH guidance, a one-sentence index of the `tmeet-skill` guide, and how to open it. The DSH guidance tells the agent to run the plugin's `tmeet` by the absolute path from the current runtime context, to skip the guide's installation check and its `agent_init.py` step, to ask the user to connect on the plugin page before running `tmeet auth login --no-browser` itself, and to request `sandbox_permissions` for that command from its first attempt; it takes precedence over the guide where they disagree. Its resource base is the downloaded directory, `skillsDir` or `$DSH_HOME/cache/tencent-meeting/skills-`, so the agent opens `skills/tmeet-skill/SKILL.md` with the file tools rather than the `skill` tool and resolves the guide's relative paths against the guide's own directory. #### Token effect @@ -147,7 +152,9 @@ The system prompt does not change; loading or unloading the row, or a changed pa - Commands must run on this Host. When a composition runs them elsewhere, such as over SSH, the plugin still loads, and each command that runs `tmeet` fails because the path does not exist there. - The plugin uses the CLI's default configuration. Signing in or out from DSH affects the user's own terminal, and there is no DSH-private account or account picker. - The account state comes from the plain-text output of tmeet 1.0.18's `auth status`, and the sign-in link from its `authorize url:` line; a CLI version that changes that text fails the check or the sign-in with a retryable result. An account for which the server returns no user name reads as unconfirmed. -- The guide follows upstream tag `v1.0.18`; updating it is a manual copy, after which the entry's index and DSH guidance must be checked against the new guide. +- The guide follows upstream tag `v1.0.18`; updating it means a new pin from `scripts/upstream-skills-digest.ts`, after which the entry's index and DSH guidance must be checked against the new guide. +- The first load after a new pin needs access to GitHub or a configured mirror; until a download succeeds, the agent has no `tencent-meeting` skill. +- The downloaded guide stays in `$DSH_HOME/cache/tencent-meeting/` after the plugin is removed or pins another commit. ### Dev Note @@ -155,6 +162,6 @@ The system prompt does not change; loading or unloading the row, or a changed pa
Working context for maintainers — click to expand -The guide keeps upstream whitespace, including one whitespace-only line in `SKILL.md` and four files without a final newline, and no whitespace exemption covers it: a commit that adds upstream lines with trailing whitespace fails the pre-commit `git diff --cached --check`. Specs and the `tencent-meeting-skills` session snapshot use stand-in executables through `binDir`. +Specs, the `tencent-meeting-skills` session snapshot, and the Web e2e use stand-in executables through `binDir` and local directories through `skillsDir`, so none of them downloads the guide.
diff --git a/packages/connector/tencent-meeting-cli/README.zh.md b/packages/connector/tencent-meeting-cli/README.zh.md index c5a5c64628..ddc287c561 100644 --- a/packages/connector/tencent-meeting-cli/README.zh.md +++ b/packages/connector/tencent-meeting-cli/README.zh.md @@ -9,7 +9,7 @@ kind: "package-reference" ## 概述 -本包是[腾讯会议插件](../tencent-meeting/README.zh.md)的 Host 行。它安装固定版本的 `@tencentcloud/tmeet`,在运行时上下文中把其平台可执行文件的绝对路径告诉模型,并注册一个 `tencent-meeting` skill,其子指南是官方 `tmeet-skill`。它的 `tencentMeeting` Remote 为[腾讯会议插件页面](../../client/ui-tencent-meeting/README.zh.md)检查 CLI 的登录、通过 CLI 的授权页面登录、退出登录,以及取消操作。CLI 把登录保存在默认配置中,与用户自己的终端共用。仅支持 macOS。 +本包是[腾讯会议插件](../tencent-meeting/README.zh.md)的 Host 行。它安装固定版本的 `@tencentcloud/tmeet`,在运行时上下文中把其平台可执行文件的绝对路径告诉模型,并注册一个 `tencent-meeting` skill,其子指南是官方 `tmeet-skill`,从 GitHub 上的腾讯会议 CLI 仓库下载。它的 `tencentMeeting` Remote 为[腾讯会议插件页面](../../client/ui-tencent-meeting/README.zh.md)检查 CLI 的登录、通过 CLI 的授权页面登录、退出登录,以及取消操作。CLI 把登录保存在默认配置中,与用户自己的终端共用。仅支持 macOS。 ## 目录 @@ -33,7 +33,9 @@ kind: "package-reference" 插件加载后,技能目录中会多一个 `tencent-meeting` skill。Agent 用 `skill` 工具加载它,用文件工具打开 `tmeet-skill` 子指南及其参考文件,并在当前沙箱和审批策略下通过普通 Shell 工具按这个路径运行 `tmeet`。命令报告未登录或登录过期时,Agent 会请用户在插件页面连接腾讯会议;只有用户要求在对话中完成时,它才运行 `tmeet auth login --no-browser`,并且因为该命令会写入工作区之外,第一次尝试就带 `justification` 申请 `sandbox_permissions`。 -在 Plugin Manager 中关闭该行会撤下这个 skill,并从运行时上下文中移除这个路径。CLI 的登录会保留。 +子指南来自 `TencentCloud/tencentmeeting-cli` 标签 `v1.0.18`(提交 `e631b35`)中的 `skills/tmeet-skill/`,不含 `scripts/agent_init.py`。该行加载时下载这个提交的归档,并把校验后的文件保存在 `$DSH_HOME/cache/tencent-meeting/`;文件就位之前,skill 目录中没有 `tencent-meeting` skill,插件页会报告下载状态。下载失败时,由插件页的检查重试。 + +在 Plugin Manager 中关闭该行会撤下这个 skill,并从运行时上下文中移除这个路径。CLI 的登录和已下载的子指南会保留。 ### 账号操作 @@ -56,6 +58,9 @@ kind: "package-reference" |---|---|---| | `binDir` | 不设置,此时运行当前平台已安装的 `@tencentcloud/tmeet` 可执行文件 | 包含可执行 `tmeet` 的绝对目录 | | `commandTimeoutMs` | `30000` | 一次账号检查或退出登录的截止时间,包含可执行文件查找 | +| `skillsDir` | 无 | 按仓库路径存放 `skills/tmeet-skill/` 文件的目录;设置后不下载子指南 | +| `skillsUrls` | `['https://codeload.github.com']` | 按顺序尝试的归档下载前缀 | +| `skillsTimeoutMs` | `120000` | 一个前缀送达完整归档的时限 | 登录最多等待用户 10 分钟,每条命令最多保留 1 MiB stdout;这两个上限由 [CLI 账号库](../cli-account/README.zh.md)固定。tmeet 自身在 5 分钟后停止等待授权。 @@ -69,9 +74,9 @@ kind: "package-reference"
实现细节 — 点击展开 -[`src/index.ts`](src/index.ts) 是注册为 `ctx.tencentMeeting` 的 Remote 服务。它解析 `tmeet` 可执行文件,在运行时上下文中把它的路径告诉模型,并在本包的 `skills/` 目录上挂载一个名为 `tencent-meeting` 的[文件系统 skill provider](../../skill/skill-filesystem/README.zh.md),不包含默认根目录,也不监听变化。`@tencentcloud/tmeet` 在 `dist/` 下为每个平台提供一个按平台命名的可执行文件,其 `bin` 是一个 Node 启动器。因此 [`src/directory.ts`](src/directory.ts) 按 `process.platform` 和 `process.arch`,用与该启动器相同的文件名选出可执行文件,运行时上下文和插件自己的命令都使用这个路径。[CLI 账号库](../cli-account/README.zh.md)注册这条运行时上下文,按同一路径运行每条命令,并且同一时间只运行一个操作。[`src/account.ts`](src/account.ts) 在该运行时上实现 tmeet 命令,从 `auth login` 的输出行读取授权链接,并解析 `auth status` 的文本。释放时会取消进行中的操作、中止正在运行的命令,并在其进程退出后结束。 +[`src/index.ts`](src/index.ts) 是注册为 `ctx.tencentMeeting` 的 Remote 服务。它解析 `tmeet` 可执行文件,在运行时上下文中把它的路径告诉模型,并通过[上游技能库](../upstream-skills/README.zh.md)按 [`src/skills.ts`](src/skills.ts) 中的固定信息注册 `tencent-meeting` skill。账号视图携带下载状态,每次检查都会在不等待的情况下重新开始失败的下载。`@tencentcloud/tmeet` 在 `dist/` 下为每个平台提供一个按平台命名的可执行文件,其 `bin` 是一个 Node 启动器。因此 [`src/directory.ts`](src/directory.ts) 按 `process.platform` 和 `process.arch`,用与该启动器相同的文件名选出可执行文件,运行时上下文和插件自己的命令都使用这个路径。[CLI 账号库](../cli-account/README.zh.md)注册这条运行时上下文,按同一路径运行每条命令,并且同一时间只运行一个操作。[`src/account.ts`](src/account.ts) 在该运行时上实现 tmeet 命令,从 `auth login` 的输出行读取授权链接,并解析 `auth status` 的文本。释放时会取消进行中的操作、中止正在运行的命令,并在其进程退出后结束。 -[`skills/tencent-meeting/SKILL.md`](skills/tencent-meeting/SKILL.md) 是唯一的 skill:DSH 指引、子指南索引,以及打开子指南的方式。[`skills/tencent-meeting/guides/tmeet-skill/`](skills/tencent-meeting/guides/tmeet-skill) 是 `TencentCloud/tencentmeeting-cli` 标签 `v1.0.18`(提交 `e631b35`)中 `skills/tmeet-skill/` 的 `SKILL.md` 和 `references/` 的原样副本,因为上游只在该仓库中发布这个 skill,npm 包里没有。其中的 `scripts/agent_init.py` 用于把调用方 Agent 和模型记录到 CLI 配置中供上游统计,没有复制。文件系统 provider 只发现 `//SKILL.md`,因此子指南不是独立的 skill。DSH 指引与子指南不一致时,入口要求 Agent 以 DSH 指引为准:使用插件提供的 `tmeet` 而不是自行安装,跳过 `agent_init.py`,并把登录交给插件页面。参考文件是子指南目录中的普通文件。 +[`skills/tencent-meeting/SKILL.md`](skills/tencent-meeting/SKILL.md) 是本包携带的唯一 skill:DSH 指引、子指南索引,以及打开子指南的方式。上游只在其仓库中发布这个子指南,npm 包里没有,因此由该库下载;它是 skill 基础目录下的一组文件,不是独立的 skill。固定信息排除了 `scripts/agent_init.py`,它用于把调用方 Agent 和模型记录到 CLI 配置中供上游统计。DSH 指引与子指南不一致时,入口要求 Agent 以 DSH 指引为准:使用插件提供的 `tmeet` 而不是自行安装,跳过 `agent_init.py`,并把登录交给插件页面。参考文件是子指南目录中的普通文件。
@@ -109,7 +114,7 @@ kind: "package-reference" #### 模型看到的内容 -`tencent-meeting` 的 `skill` 工具结果约 1,200 个字符:DSH 指引、一句话的 `tmeet-skill` 子指南索引,以及打开方式。DSH 指引要求 Agent 按当前运行时上下文给出的绝对路径运行插件提供的 `tmeet`,跳过子指南的安装检查和 `agent_init.py` 步骤,在自己运行 `tmeet auth login --no-browser` 之前先请用户在插件页面连接,并在该命令第一次尝试时就申请 `sandbox_permissions`;两者不一致时以 DSH 指引为准。它的资源目录是 `skills/tencent-meeting`,因此 Agent 用文件工具而不是 `skill` 工具打开 `guides/tmeet-skill/SKILL.md`,并以子指南自己的目录解析其中的相对路径。 +`tencent-meeting` 的 `skill` 工具结果约 1,200 个字符:DSH 指引、一句话的 `tmeet-skill` 子指南索引,以及打开方式。DSH 指引要求 Agent 按当前运行时上下文给出的绝对路径运行插件提供的 `tmeet`,跳过子指南的安装检查和 `agent_init.py` 步骤,在自己运行 `tmeet auth login --no-browser` 之前先请用户在插件页面连接,并在该命令第一次尝试时就申请 `sandbox_permissions`;两者不一致时以 DSH 指引为准。它的资源目录是下载目录,即 `skillsDir` 或 `$DSH_HOME/cache/tencent-meeting/skills-<摘要>`,因此 Agent 用文件工具而不是 `skill` 工具打开 `skills/tmeet-skill/SKILL.md`,并以子指南自己的目录解析其中的相对路径。 #### Token 影响 @@ -147,7 +152,9 @@ Tencent Meeting CLI: run `tmeet` by its absolute path ""; the bare n - 命令必须在本 Host 上运行。组合把命令放到别处运行(例如通过 SSH)时,插件仍会加载,但每条运行 `tmeet` 的命令都会因为那里没有这个路径而失败。 - 插件使用 CLI 的默认配置。在 DSH 中登录或退出登录会影响用户自己的终端,没有 DSH 专用的账号,也没有账号选择。 - 账号状态来自 tmeet 1.0.18 `auth status` 的纯文本输出,登录链接来自它的 `authorize url:` 行;改变这些文本的 CLI 版本会使检查或登录失败,并给出可重试的结果。服务端没有返回用户名的账号会显示为待确认。 -- 子指南对应上游标签 `v1.0.18`;更新它需要手工复制,之后要对照新的子指南检查入口的索引和 DSH 指引。 +- 子指南对应上游标签 `v1.0.18`;更新它要用 `scripts/upstream-skills-digest.ts` 生成新的固定信息,之后对照新的子指南检查入口的索引和 DSH 指引。 +- 换用新的固定提交后,首次加载需要能访问 GitHub 或配置的镜像;下载成功之前,Agent 没有 `tencent-meeting` skill。 +- 插件卸载或改为固定其他提交后,已下载的子指南仍留在 `$DSH_HOME/cache/tencent-meeting/`。 ### 开发备注 @@ -155,6 +162,6 @@ Tencent Meeting CLI: run `tmeet` by its absolute path ""; the bare n
维护者工作上下文 — 点击展开 -子指南保留上游的空白字符,包括 `SKILL.md` 中一行只含空格的行和四个没有末尾换行的文件,且没有任何空白豁免:提交新增带行尾空白的上游内容时,pre-commit 的 `git diff --cached --check` 会失败。单元测试和 `tencent-meeting-skills` 会话快照通过 `binDir` 使用替身可执行文件。 +单元测试、`tencent-meeting-skills` 会话快照和 Web 端到端测试通过 `binDir` 使用替身可执行文件,通过 `skillsDir` 使用本地目录,因此都不会下载子指南。
diff --git a/packages/connector/tencent-meeting-cli/package.json b/packages/connector/tencent-meeting-cli/package.json index a680005d8b..81b2915191 100644 --- a/packages/connector/tencent-meeting-cli/package.json +++ b/packages/connector/tencent-meeting-cli/package.json @@ -46,7 +46,7 @@ "license": "MIT", "dependencies": { "@deepseek-ai/dsh-cli-account": "workspace:*", - "@deepseek-ai/dsh-skill-filesystem": "workspace:*", + "@deepseek-ai/dsh-upstream-skills": "workspace:*", "@deepseek-ai/dsh-util-values": "workspace:*", "@deepseek-ai/schemastery": "workspace:~", "@tencentcloud/tmeet": "1.0.18" diff --git a/packages/connector/tencent-meeting-cli/skills/tencent-meeting/SKILL.md b/packages/connector/tencent-meeting-cli/skills/tencent-meeting/SKILL.md index d15010def2..4caac69dd0 100644 --- a/packages/connector/tencent-meeting-cli/skills/tencent-meeting/SKILL.md +++ b/packages/connector/tencent-meeting-cli/skills/tencent-meeting/SKILL.md @@ -20,5 +20,5 @@ description: 腾讯会议插件:通过 tmeet 使用腾讯会议的会议创建 ## 打开子指南 -- 子指南不是独立的 skill,不要用 `skill` 工具加载;用文件读取工具打开本技能目录下的 `guides/tmeet-skill/SKILL.md`。 -- 子指南中的相对路径(例如 `references/tmeet-meeting.md`)相对子指南自己的目录 `guides/tmeet-skill/`。 +- 子指南不是独立的 skill,不要用 `skill` 工具加载;用文件读取工具打开本技能目录下的 `skills/tmeet-skill/SKILL.md`。 +- 子指南中的相对路径(例如 `references/tmeet-meeting.md`)相对子指南自己的目录 `skills/tmeet-skill/`。 diff --git a/packages/connector/tencent-meeting-cli/src/account.ts b/packages/connector/tencent-meeting-cli/src/account.ts index 5f61354f75..1a4465f700 100644 --- a/packages/connector/tencent-meeting-cli/src/account.ts +++ b/packages/connector/tencent-meeting-cli/src/account.ts @@ -2,8 +2,11 @@ import type { Context } from '@deepseek-ai/cordis' import { CliAccountRuntime, exitFailure, type CliCommandExecutor, type CliOperationControl } from '@deepseek-ai/dsh-cli-account' +import type { UpstreamSkills, UpstreamSkillsState } from '@deepseek-ai/dsh-upstream-skills' import { assertNever } from '@deepseek-ai/dsh-util-values' -import type { TencentMeetingAccountState, TencentMeetingOperationFailure, TencentMeetingOperationKind, TencentMeetingPhase } from './types.ts' +import type { + TencentMeetingAccountState, TencentMeetingOperationFailure, TencentMeetingOperationKind, TencentMeetingPhase, TencentMeetingSignIn, +} from './types.ts' const LOGIN_LINK = /^authorize url: (https:\/\/\S+)[ \t]*$/u @@ -15,7 +18,7 @@ type Control = CliOperationControl) { super({ name: 'tencent-meeting', cli, logger, - account: { state: 'unchecked' }, + account: { state: 'unchecked', skills: skills.state }, check: 'check', cancellable: ['authorizing'], authorizationHosts: ['meeting.tencent.com'], @@ -44,6 +48,14 @@ export class TencentMeetingAccount extends CliAccountRuntime< }) } + /** + * Report the upstream guide's new state with the current account. + * @param skills - the state after a download started or settled. + */ + showSkills(skills: UpstreamSkillsState): void { + this.publish({ ...this.snapshot().account, skills }) + } + protected async perform(kind: TencentMeetingOperationKind, control: Control, signal: AbortSignal): Promise { switch (kind) { case 'check': @@ -79,11 +91,13 @@ export class TencentMeetingAccount extends CliAccountRuntime< await this.check(control, signal) } - /** Read the default account, publish it, and return it. */ + /** Restart a failed download of the guide without waiting for it, then read the default account, publish it, and return it. */ private async check(control: Control, signal: AbortSignal): Promise { + this.skills.retry() 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`) + const signIn = result.exitCode === 0 ? readStatus(result.stdout) : undefined + if (signIn === undefined) throw new Error(`tencent-meeting: auth status exited with ${String(result.exitCode)} or printed an unknown status`) + const account: TencentMeetingAccountState = { ...signIn, skills: this.skills.state } this.publish(account) return account } diff --git a/packages/connector/tencent-meeting-cli/src/index.ts b/packages/connector/tencent-meeting-cli/src/index.ts index 0aecc2b0b8..a87105b7f9 100644 --- a/packages/connector/tencent-meeting-cli/src/index.ts +++ b/packages/connector/tencent-meeting-cli/src/index.ts @@ -1,21 +1,22 @@ /** - * Tencent Meeting plugin: tells the model the managed tmeet's absolute 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. + * Tencent Meeting plugin: tells the model the managed tmeet's absolute path, registers its skill over the upstream guide + * it downloads, 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 z from '@deepseek-ai/schemastery' import { CliAccountConfig, CliCommandExecutor, registerCliPathContext, type CliOperationId } from '@deepseek-ai/dsh-cli-account' -import * as SkillFilesystem from '@deepseek-ai/dsh-skill-filesystem' +import { registerUpstreamSkills, UpstreamSkillsConfig } from '@deepseek-ai/dsh-upstream-skills' import { Remote, TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol' import type {} from '@deepseek-ai/dsh-skill' import type {} from '@deepseek-ai/dsh-subprocess' import type {} from '@deepseek-ai/dsh-system-prompt' import { TencentMeetingAccount } from './account.ts' import { PROGRAM, resolveCliExecutable } from './directory.ts' +import { ENTRY, TMEET_SKILLS } from './skills.ts' import type { TencentMeetingState } from './types.ts' /* jscpd:ignore-end */ @@ -28,34 +29,30 @@ declare module '@deepseek-ai/cordis' { } } -/** Where tmeet is and how long a command that does not wait for the user may run. */ -export type Config = CliAccountConfig +/** Where tmeet and the upstream guide come from, a command's deadline, and a download's time limit. */ +export type Config = CliAccountConfig & UpstreamSkillsConfig /** 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', 'systemPrompt'] - static Config: z = CliAccountConfig + static Config: z = z.intersect([CliAccountConfig, UpstreamSkillsConfig]) private readonly account: TencentMeetingAccount /** * @param ctx - Context carrying the skill registry, subprocess runtime, and system prompt. - * @param config - CLI location and command deadline. - * @throws when this platform has no packaged `tmeet` or `tmeet` is not executable. + * @param config - CLI location, command deadline, and where the upstream guide comes from. + * @throws when this platform has no packaged `tmeet`, `tmeet` is not executable, or `skillsDir` is not a directory. */ constructor(ctx: Context, config: Config) { super(ctx, 'tencentMeeting') const executable = resolveCliExecutable(config.binDir) registerCliPathContext(ctx, { name: 'tencent-meeting:cli', product: 'Tencent Meeting', program: PROGRAM, executable }) const cli = new CliCommandExecutor(ctx.subprocess, { program: PROGRAM, executable, commandTimeoutMs: config.commandTimeoutMs }) - this.account = new TencentMeetingAccount(cli, ctx.logger) + const skills = registerUpstreamSkills(ctx, { name: 'tencent-meeting', entry: ENTRY, set: TMEET_SKILLS, config }) + this.account = new TencentMeetingAccount(cli, ctx.logger, skills) ctx.effect(() => () => this.account.dispose()) - ctx.plugin(SkillFilesystem, { - providerName: 'tencent-meeting', - includeDefaultRoots: false, - watch: false, - bundledSkillDir: fileURLToPath(new URL('../skills/', import.meta.url)), - }) + ctx.effect(() => skills.watch((state) => { this.account.showSkills(state) })) } /* jscpd:ignore-start -- CLI app plugins declare the same Remote methods, each delegating to its own account runtime. */ diff --git a/packages/connector/tencent-meeting-cli/src/skills.ts b/packages/connector/tencent-meeting-cli/src/skills.ts new file mode 100644 index 0000000000..a49209ce29 --- /dev/null +++ b/packages/connector/tencent-meeting-cli/src/skills.ts @@ -0,0 +1,21 @@ +/** The packaged `tencent-meeting` entry skill and the upstream guide it indexes. */ + +import { fileURLToPath } from 'node:url' +import type { UpstreamSkillSet } from '@deepseek-ai/dsh-upstream-skills' + +/** The packaged entry, which opens the guide by its repository path `skills/tmeet-skill/SKILL.md`. */ +export const ENTRY = fileURLToPath(new URL('../skills/tencent-meeting/SKILL.md', import.meta.url)) + +/** + * The official tmeet guide at the release the plugin installs, without `scripts/agent_init.py`, which the entry tells the + * agent to skip because DSH runs `tmeet` by its absolute path. + */ +export const TMEET_SKILLS: UpstreamSkillSet = { + repository: 'TencentCloud/tencentmeeting-cli', + commit: 'e631b355da2b001d24b82f453b65d96f39c59865', + directory: 'skills/tmeet-skill', + exclude: ['skills/tmeet-skill/scripts/agent_init.py'], + license: 'LICENSE', + bytes: 181_429, + sha256: '9bbdf81af17a49e1610063acd2a29f274313411e64a91e028588e3feb55bb7db', +} diff --git a/packages/connector/tencent-meeting-cli/src/types.ts b/packages/connector/tencent-meeting-cli/src/types.ts index 89eae5f493..1a82db1093 100644 --- a/packages/connector/tencent-meeting-cli/src/types.ts +++ b/packages/connector/tencent-meeting-cli/src/types.ts @@ -1,12 +1,19 @@ /** Credential-free Tencent Meeting account and operation views for Remote clients. */ import type { CliAccountView, CliCommandFailure } from '@deepseek-ai/dsh-cli-account/types' +import type { UpstreamSkillsState } from '@deepseek-ai/dsh-upstream-skills/types' /** The default tmeet account as the latest `auth status` observed it. */ -export type TencentMeetingAccountState = +export type TencentMeetingSignIn = | { readonly state: 'unchecked' | 'signed-out' | 'unverified' } | { readonly state: 'connected'; readonly userName: string } +/** The default tmeet account and where the upstream guide stands. */ +export type TencentMeetingAccountState = TencentMeetingSignIn & { + /** Whether the guide the `tencent-meeting` skill indexes is in place, downloading, or unavailable until a check retries it. */ + readonly skills: UpstreamSkillsState +} + /** The account operations the Plugins page starts. */ export type TencentMeetingOperationKind = 'check' | 'sign-in' | 'sign-out' diff --git a/packages/connector/tencent-meeting-cli/tests/account.spec.ts b/packages/connector/tencent-meeting-cli/tests/account.spec.ts index cb6c3c0a70..8fe0b95085 100644 --- a/packages/connector/tencent-meeting-cli/tests/account.spec.ts +++ b/packages/connector/tencent-meeting-cli/tests/account.spec.ts @@ -1,10 +1,12 @@ /** Account operations over a scripted tmeet: status text, sign-in, sign-out, cancellation, and the Remote wiring. */ -import { rm } from 'node:fs/promises' +import { mkdtemp, rm } from 'node:fs/promises' +import { tmpdir } from 'node:os' import { join } from 'node:path' import { Context } from '@deepseek-ai/cordis' import { CliCommandExecutor, type CliOperationId } from '@deepseek-ai/dsh-cli-account' import SkillRegistry from '@deepseek-ai/dsh-skill' import SystemPrompt from '@deepseek-ai/dsh-system-prompt' +import type { UpstreamSkillsState } from '@deepseek-ai/dsh-upstream-skills' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { TencentMeetingAccount } from '../src/account.ts' import { PROGRAM } from '../src/directory.ts' @@ -36,6 +38,7 @@ type Script = (process: ScriptedProcess) => void let ctx: Context let subprocess: ScriptedSubprocess let binDir: string +let skillsDir: string let script: Record beforeEach(async () => { @@ -45,6 +48,7 @@ beforeEach(async () => { await ctx.plugin(SystemPrompt) subprocess = ctx.subprocess as ScriptedSubprocess binDir = await createBinDir() + skillsDir = await mkdtemp(join(tmpdir(), 'dsh-tencent-meeting-skills-')) script = {} subprocess.respond = (process) => { const handler = script[process.spec.argv.slice(1).join(' ')] @@ -57,6 +61,7 @@ beforeEach(async () => { afterEach(async () => { await ctx.fiber.dispose() await rm(binDir, { recursive: true, force: true }) + await rm(skillsDir, { recursive: true, force: true }) }) const commands = () => subprocess.processes.map(process => process.spec.argv.slice(1).join(' ')) @@ -64,10 +69,13 @@ const errors = (): unknown[] => ctx.logger.buffer.filter(message => message.type describe('TencentMeetingAccount', () => { let account: TencentMeetingAccount + /** The upstream guide as the account sees it; a retry starts a download. */ + let skills: { state: UpstreamSkillsState; retry: () => void } beforeEach(() => { const cli = new CliCommandExecutor(ctx.subprocess, { program: PROGRAM, executable: join(binDir, PROGRAM), commandTimeoutMs: 5_000 }) - account = new TencentMeetingAccount(cli, ctx.logger) + skills = { state: 'installed', retry: () => { if (skills.state === 'failed') skills.state = 'downloading' } } + account = new TencentMeetingAccount(cli, ctx.logger, skills) }) afterEach(() => account.dispose()) @@ -77,12 +85,27 @@ describe('TencentMeetingAccount', () => { return account.snapshot() } + it('restarts a failed download of the guide on each check without waiting for it, and reports the state it leaves', async () => { + skills.state = 'failed' + script[STATUS] = [NOT_LOGGED_IN] + const id = account.start('check') + expect(skills.state).toBe('downloading') + expect(await settled(id)).toEqual({ account: { state: 'signed-out', skills: 'downloading' }, result: { id, kind: 'check', outcome: 'succeeded' } }) + }) + + it('reports a new state of the guide with the current account', async () => { + script[STATUS] = [NOT_LOGGED_IN] + await settled(account.start('check')) + account.showSkills('failed') + expect(account.snapshot().account).toEqual({ state: 'signed-out', skills: 'failed' }) + }) + it.each<[string, CliReply, TencentMeetingState['account']]>([ - ['a sign-in the server accepts', CONNECTED, { state: 'connected', userName: '测试 用户' }], - ['no sign-in', NOT_LOGGED_IN, { state: 'signed-out' }], - ['a sign-in the CLI cleared after a failed refresh', SESSION_EXPIRED, { state: 'signed-out' }], - ['a sign-in whose refresh token expired', REFRESH_EXPIRED, { state: 'signed-out' }], - ['a stored sign-in the server did not confirm', UNVERIFIED, { state: 'unverified' }], + ['a sign-in the server accepts', CONNECTED, { state: 'connected', userName: '测试 用户', skills: 'installed' }], + ['no sign-in', NOT_LOGGED_IN, { state: 'signed-out', skills: 'installed' }], + ['a sign-in the CLI cleared after a failed refresh', SESSION_EXPIRED, { state: 'signed-out', skills: 'installed' }], + ['a sign-in whose refresh token expired', REFRESH_EXPIRED, { state: 'signed-out', skills: 'installed' }], + ['a stored sign-in the server did not confirm', UNVERIFIED, { state: 'unverified', skills: 'installed' }], ])('checks %s', async (_name, reply, expected) => { script[STATUS] = [reply] const id = account.start('check') @@ -97,7 +120,7 @@ describe('TencentMeetingAccount', () => { script[STATUS] = [reply] const result = await settled(account.start('check')) expect(result).toEqual({ - account: { state: 'unchecked' }, + account: { state: 'unchecked', skills: 'installed' }, result: { id: result.result?.id, kind: 'check', outcome: 'failed', failure: { command: 'auth-status', exitCode: reply.exitCode ?? 0 } }, }) expect(errors()).toEqual([['tencent-meeting: account operation failed: %o', { @@ -121,7 +144,7 @@ describe('TencentMeetingAccount', () => { authorizing.reply({ stdout: 'Login successful. Start managing your meetings using tmeet.\n' }) expect(await settled(id)).toEqual({ - account: { state: 'connected', userName: '测试 用户' }, result: { id, kind: 'sign-in', outcome: 'succeeded' }, + account: { state: 'connected', userName: '测试 用户', skills: 'installed' }, result: { id, kind: 'sign-in', outcome: 'succeeded' }, }) expect(commands()).toEqual([LOGIN, STATUS]) expect(errors()).toEqual([]) @@ -147,7 +170,7 @@ describe('TencentMeetingAccount', () => { const cancelling = account.cancel(id) expect(account.snapshot().operation).toEqual({ id, kind: 'sign-in', phase: 'cancelling', cancellable: false }) await cancelling - expect(account.snapshot()).toEqual({ account: { state: 'unchecked' }, result: { id, kind: 'sign-in', outcome: 'cancelled' } }) + expect(account.snapshot()).toEqual({ account: { state: 'unchecked', skills: 'installed' }, result: { id, kind: 'sign-in', outcome: 'cancelled' } }) expect(subprocess.processes[0]?.terminated).toBe(true) expect(errors()).toEqual([]) }) @@ -162,7 +185,7 @@ describe('TencentMeetingAccount', () => { await account.cancel(id) signingOut.reply({ stdout: 'Logout success, welcome to use it again.\n' }) - expect(await settled(id)).toEqual({ account: { state: 'signed-out' }, result: { id, kind: 'sign-out', outcome: 'succeeded' } }) + expect(await settled(id)).toEqual({ account: { state: 'signed-out', skills: 'installed' }, result: { id, kind: 'sign-out', outcome: 'succeeded' } }) expect(commands()).toEqual([LOGOUT, STATUS]) }) @@ -176,7 +199,7 @@ describe('TencentMeetingAccount', () => { describe('Tencent Meeting Remote', () => { beforeEach(async () => { - await ctx.plugin(TencentMeeting, { commandTimeoutMs: 5_000, binDir }) + await ctx.plugin(TencentMeeting, { commandTimeoutMs: 5_000, binDir, skillsDir, skillsUrls: ['https://codeload.github.com'], skillsTimeoutMs: 120_000 }) }) it('checks for a new follower, streams each change, and starts checks, sign-ins, and sign-outs', async () => { @@ -194,8 +217,8 @@ describe('Tencent Meeting Remote', () => { return states.at(-1)?.result } expect(await finished()).toMatchObject({ kind: 'check', outcome: 'succeeded' }) - expect(states[0]).toMatchObject({ account: { state: 'unchecked' }, operation: { kind: 'check' } }) - expect(states.at(-1)?.account).toEqual({ state: 'signed-out' }) + expect(states[0]).toMatchObject({ account: { state: 'unchecked', skills: 'installed' }, operation: { kind: 'check' } }) + expect(states.at(-1)?.account).toEqual({ state: 'signed-out', skills: 'installed' }) expect(subprocess.lookups[0]?.command).toBe(join(binDir, 'tmeet')) expect(await finished(ctx.tencentMeeting.check())).toMatchObject({ kind: 'check', outcome: 'succeeded' }) diff --git a/packages/connector/tencent-meeting-cli/tests/plugin.spec.ts b/packages/connector/tencent-meeting-cli/tests/plugin.spec.ts index 9c66e2ecdd..e1f6182c10 100644 --- a/packages/connector/tencent-meeting-cli/tests/plugin.spec.ts +++ b/packages/connector/tencent-meeting-cli/tests/plugin.spec.ts @@ -1,18 +1,20 @@ -import { rm } from 'node:fs/promises' +import { mkdtemp, rm } from 'node:fs/promises' +import { tmpdir } from 'node:os' import { join } from 'node:path' import { Context } from '@deepseek-ai/cordis' import SkillRegistry from '@deepseek-ai/dsh-skill' import SystemPrompt, { renderContextSections } from '@deepseek-ai/dsh-system-prompt' -import { afterEach, beforeEach, describe, expect, it } from 'vitest' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import TencentMeeting from '../src/index.ts' import { createBinDir, ScriptedSubprocess } from './harness.ts' -const CONFIG = { commandTimeoutMs: 5_000 } +const CONFIG = { commandTimeoutMs: 5_000, skillsUrls: ['https://codeload.github.com'], skillsTimeoutMs: 120_000 } describe('Tencent Meeting plugin', () => { let ctx: Context let subprocess: ScriptedSubprocess let binDir: string + let skillsDir: string beforeEach(async () => { ctx = new Context() @@ -22,17 +24,20 @@ describe('Tencent Meeting plugin', () => { subprocess = ctx.subprocess as ScriptedSubprocess subprocess.respond = (process) => { process.reply({ stdout: 'Not logged in. Please use \'tmeet auth login\' to authenticate.\n' }) } binDir = await createBinDir() + skillsDir = await mkdtemp(join(tmpdir(), 'dsh-tencent-meeting-skills-')) }) afterEach(async () => { await ctx.fiber.dispose() + vi.unstubAllEnvs() await rm(binDir, { recursive: true, force: true }) + await rm(skillsDir, { recursive: true, force: true }) }) const runtimeContext = async () => renderContextSections(await ctx.systemPrompt.assemble()) it('publishes one tencent-meeting entry skill whose body carries the DSH guidance', async () => { - await ctx.plugin(TencentMeeting, { ...CONFIG, binDir }) + await ctx.plugin(TencentMeeting, { ...CONFIG, binDir, skillsDir }) const catalog = await ctx.skills.list() expect(catalog.map(skill => `${skill.provider}/${skill.source}/${skill.name}`)).toEqual(['tencent-meeting/bundled/tencent-meeting']) @@ -40,11 +45,29 @@ describe('Tencent Meeting plugin', () => { const entry = await ctx.skills.get('tencent-meeting') expect(entry?.content).toContain('`tmeet` 由腾讯会议插件安装,按当前 runtime context 给出的绝对路径运行,不要直接按名称运行') expect(entry?.content).toContain('跳过运行 `scripts/agent_init.py` 的要求') + expect(entry?.resourceBase).toEqual({ kind: 'directory', path: skillsDir }) expect(await ctx.skills.get('tmeet-skill')).toBeUndefined() }) + it('reports the guide as downloading and then failed when no skills URL answers, and lists no skill', async () => { + const home = await mkdtemp(join(tmpdir(), 'dsh-tencent-meeting-home-')) + vi.stubEnv('DSH_HOME', home) + try { + await ctx.plugin(TencentMeeting, { ...CONFIG, binDir, skillsUrls: ['https://127.0.0.1:9'], skillsTimeoutMs: 5_000 }) + const seen: string[] = [] + for await (const view of ctx.tencentMeeting.follow(new AbortController().signal)) { + seen.push(view.account.skills) + if (view.account.skills === 'failed') break + } + expect(seen[0]).toBe('downloading') + expect(await ctx.skills.list()).toEqual([]) + } finally { + await rm(home, { recursive: true, force: true }) + } + }) + it('gives the executable path in runtime context, and withdraws it and the skills on disposal', async () => { - const fiber = await ctx.plugin(TencentMeeting, { ...CONFIG, binDir }) + const fiber = await ctx.plugin(TencentMeeting, { ...CONFIG, binDir, skillsDir }) expect(await runtimeContext()).toEqual([{ name: 'tencent-meeting:cli', text: `Tencent Meeting CLI: run \`tmeet\` by its absolute path "${join(binDir, 'tmeet')}"; the bare name may resolve to another installation or to none.`, diff --git a/packages/connector/tencent-meeting-cli/tests/skills.spec.ts b/packages/connector/tencent-meeting-cli/tests/skills.spec.ts index aadaa69ee6..a1831c72ab 100644 --- a/packages/connector/tencent-meeting-cli/tests/skills.spec.ts +++ b/packages/connector/tencent-meeting-cli/tests/skills.spec.ts @@ -1,12 +1,14 @@ -/** The bundled entry skill: its index names exactly the upstream guides, and it reaches the model below the pruner threshold. */ -import { readdirSync, readFileSync, statSync } from 'node:fs' +/** The bundled entry skill: its index names exactly the pinned upstream guide, and it reaches the model below the pruner threshold. */ +import { readdirSync, readFileSync } from 'node:fs' import { join } from 'node:path' import { fileURLToPath } from 'node:url' import { renderSkillContent } from '@deepseek-ai/dsh-skill' import { expect, it } from 'vitest' const entry = fileURLToPath(new URL('../skills/tencent-meeting/', import.meta.url)) -const guides = join(entry, 'guides') + +/** The `skills//SKILL.md` directories of the pinned selection, as `scripts/upstream-skills-digest.ts` lists them. */ +const PINNED_GUIDES = ['tmeet-skill'] /** * `packages/bundle/web-app/presets/standard.patch.yml` prunes a tool result only above `thresholdChars: 8192` @@ -30,8 +32,7 @@ it('renders the entry below the pruner threshold', () => { expect(Array.from(rendered).length).toBeLessThan(PRUNER_THRESHOLD_CHARS) }) -it('indexes every upstream guide exactly once, and each indexed guide exists', () => { +it('indexes the guide of the pinned selection exactly once', () => { const indexed = [...body().matchAll(/^- `([a-z-]+)`:/gmu)].map(match => match[1] ?? '') - expect(indexed.toSorted()).toEqual(readdirSync(guides).toSorted()) - for (const name of indexed) expect(() => statSync(join(guides, name, 'SKILL.md')), name).not.toThrow() + expect(indexed.toSorted()).toEqual(PINNED_GUIDES) }) diff --git a/packages/connector/tencent-meeting-cli/tsconfig.json b/packages/connector/tencent-meeting-cli/tsconfig.json index 59d0faa98d..87b82d223c 100644 --- a/packages/connector/tencent-meeting-cli/tsconfig.json +++ b/packages/connector/tencent-meeting-cli/tsconfig.json @@ -15,7 +15,7 @@ "path": "../../../vendor/schemastery" }, { - "path": "../../skill/skill-filesystem" + "path": "../upstream-skills" }, { "path": "../../util/values" diff --git a/packages/extensions/tool-cordis/src/api-catalog.ts b/packages/extensions/tool-cordis/src/api-catalog.ts index 885a0191e8..b8803dc84b 100644 --- a/packages/extensions/tool-cordis/src/api-catalog.ts +++ b/packages/extensions/tool-cordis/src/api-catalog.ts @@ -9074,7 +9074,7 @@ export const TYPE_API: readonly TypeApiEntry[] = [ }, { name: 'TencentMeetingAccountState', - declaration: 'export type TencentMeetingAccountState = {\n readonly state: \'unchecked\' | \'signed-out\' | \'unverified\';\n} | {\n readonly state: \'connected\';\n readonly userName: string;\n};', + declaration: 'export type TencentMeetingAccountState = TencentMeetingSignIn & {\n readonly skills: UpstreamSkillsState;\n};', }, { name: 'TencentMeetingOperationFailure', @@ -9088,6 +9088,10 @@ export const TYPE_API: readonly TypeApiEntry[] = [ name: 'TencentMeetingPhase', declaration: 'export type TencentMeetingPhase = \'authorizing\' | \'signing-out\';', }, + { + name: 'TencentMeetingSignIn', + declaration: 'export type TencentMeetingSignIn = {\n readonly state: \'unchecked\' | \'signed-out\' | \'unverified\';\n} | {\n readonly state: \'connected\';\n readonly userName: string;\n};', + }, { name: 'TencentMeetingState', declaration: 'export type TencentMeetingState = CliAccountView;', @@ -9604,6 +9608,10 @@ export const TYPE_API: readonly TypeApiEntry[] = [ name: 'UpdateTeamTaskRequest', declaration: 'export interface UpdateTeamTaskRequest {\n readonly taskId: TeamTaskId;\n readonly expectedRevision: number;\n readonly action: TeamTaskAction;\n readonly subject?: string;\n readonly description?: string;\n readonly blockedBy?: readonly TeamTaskId[];\n readonly writeScopes?: readonly string[];\n readonly owner?: string;\n}', }, + { + name: 'UpstreamSkillsState', + declaration: 'export type UpstreamSkillsState = \'installed\' | \'downloading\' | \'failed\';', + }, { name: 'UserMessage', declaration: 'export interface UserMessage extends MessageBase {\n readonly role: \'user\';\n}', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d6dc21e3b..5bce78f7c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6603,6 +6603,9 @@ importers: '@deepseek-ai/dsh-typert-protocol': specifier: workspace:* version: link:../../typert/protocol + '@deepseek-ai/dsh-upstream-skills': + specifier: workspace:* + version: link:../../connector/upstream-skills '@deepseek-ai/dsh-util-values': specifier: workspace:* version: link:../../util/values @@ -7363,9 +7366,9 @@ importers: '@deepseek-ai/dsh-cli-account': specifier: workspace:* version: link:../cli-account - '@deepseek-ai/dsh-skill-filesystem': + '@deepseek-ai/dsh-upstream-skills': specifier: workspace:* - version: link:../../skill/skill-filesystem + version: link:../upstream-skills '@deepseek-ai/dsh-util-values': specifier: workspace:* version: link:../../util/values diff --git a/snapshots/session/tencent-meeting-skills/cordis.snapshot.yml b/snapshots/session/tencent-meeting-skills/cordis.snapshot.yml index 431df39476..931365a936 100644 --- a/snapshots/session/tencent-meeting-skills/cordis.snapshot.yml +++ b/snapshots/session/tencent-meeting-skills/cordis.snapshot.yml @@ -49,3 +49,4 @@ name: '@deepseek-ai/dsh-tencent-meeting-cli' config: binDir: !!js process.cwd() + '/tmeet-bin' + skillsDir: !!js process.cwd() + '/tmeet-skills' diff --git a/snapshots/session/tencent-meeting-skills/cordis.yml b/snapshots/session/tencent-meeting-skills/cordis.yml index b667087f54..2579be1859 100644 --- a/snapshots/session/tencent-meeting-skills/cordis.yml +++ b/snapshots/session/tencent-meeting-skills/cordis.yml @@ -3,3 +3,4 @@ name: '@deepseek-ai/dsh-tencent-meeting-cli' config: binDir: !!js process.cwd() + '/tmeet-bin' + skillsDir: !!js process.cwd() + '/tmeet-skills' diff --git a/snapshots/session/tencent-meeting-skills/workspace/tmeet-skills/.gitkeep b/snapshots/session/tencent-meeting-skills/workspace/tmeet-skills/.gitkeep new file mode 100644 index 0000000000..e69de29bb2