diff --git a/packages/connector/cli-account/README.i18n.yaml b/packages/connector/cli-account/README.i18n.yaml index e708fea73f..165fe181e7 100644 --- a/packages/connector/cli-account/README.i18n.yaml +++ b/packages/connector/cli-account/README.i18n.yaml @@ -30,8 +30,8 @@ en: 9a2ca1dc8d3824ce zh: 93039bfade3d44fa /deepseek-ai-dsh-cli-account/understand-the-implementation: - en: 455303ac1b4a8d8b - zh: 61c36ecf972fa60e + en: dd37cab6897a1ce0 + zh: c1b694ad3a356709 /deepseek-ai-dsh-cli-account/further-exploration: en: 51a9a21640f56d70 zh: c18b3aba1e0fe4e6 diff --git a/packages/connector/cli-account/README.md b/packages/connector/cli-account/README.md index d76884eea6..56bf085fb5 100644 --- a/packages/connector/cli-account/README.md +++ b/packages/connector/cli-account/README.md @@ -86,7 +86,7 @@ The runtime owns the operation lifecycle and the plugin owns the meaning of each | [`src/executor.ts`](src/executor.ts) | Bounded command execution and process ownership | | [`src/runtime.ts`](src/runtime.ts) | One-at-a-time operations, cancellation, link filtering, failure classification, and the follow stream | | [`src/types.ts`](src/types.ts) | The generic Remote view types | -| [`src/config.ts`](src/config.ts) | The shared config fields | +| [`src/index.ts`](src/index.ts) | The entry module and the shared config fields | diff --git a/packages/connector/cli-account/README.zh.md b/packages/connector/cli-account/README.zh.md index 932d55a44f..a3a4d02872 100644 --- a/packages/connector/cli-account/README.zh.md +++ b/packages/connector/cli-account/README.zh.md @@ -86,7 +86,7 @@ const account = new Account({ | [`src/executor.ts`](src/executor.ts) | 有上限的命令执行与进程归属 | | [`src/runtime.ts`](src/runtime.ts) | 一次一个操作、取消、链接过滤、失败分类与订阅流 | | [`src/types.ts`](src/types.ts) | 泛型 Remote 视图类型 | -| [`src/config.ts`](src/config.ts) | 共用配置字段 | +| [`src/index.ts`](src/index.ts) | 入口模块与共用配置字段 | diff --git a/packages/connector/cli-account/src/config.ts b/packages/connector/cli-account/src/config.ts deleted file mode 100644 index c6d1e14989..0000000000 --- a/packages/connector/cli-account/src/config.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** Config fields that CLI plugins share. */ - -import z from '@deepseek-ai/schemastery' -import { MAX_TIMER_DELAY_MS } from '@deepseek-ai/dsh-timeout' - -/** Where a plugin's CLI is and how long commands that do not wait for the user may run. */ -export interface CliAccountConfig { - /** Absolute directory holding the CLI executable; the plugin defines the default. */ - binDir?: string - /** Deadline in milliseconds for a command that does not wait for the user, including executable lookup. */ - commandTimeoutMs: number -} - -/** Schema for {@link CliAccountConfig}; a plugin with no other fields uses it as its `Config`. */ -export const CliAccountConfig: z, CliAccountConfig> = z.object({ - binDir: z.string().min(1), - commandTimeoutMs: z.number().min(1).max(MAX_TIMER_DELAY_MS).default(30_000), -}) diff --git a/packages/connector/cli-account/src/index.ts b/packages/connector/cli-account/src/index.ts index d647c2d013..ad68d220de 100644 --- a/packages/connector/cli-account/src/index.ts +++ b/packages/connector/cli-account/src/index.ts @@ -4,7 +4,23 @@ * @module @deepseek-ai/dsh-cli-account */ -export { CliAccountConfig } from './config.ts' +import z from '@deepseek-ai/schemastery' +import { MAX_TIMER_DELAY_MS } from '@deepseek-ai/dsh-timeout' + export { CliCommandExecutor, type CliCommandExecutorOptions, type CliCommandResult, type CliRunOptions } from './executor.ts' export { CliAccountRuntime, exitFailure, type CliAccountRuntimeOptions, type CliOperationControl } from './runtime.ts' export type * from './types.ts' + +/** Where a plugin's CLI is and how long commands that do not wait for the user may run. */ +export interface CliAccountConfig { + /** Absolute directory holding the CLI executable; the plugin defines the default. */ + binDir?: string + /** Deadline in milliseconds for a command that does not wait for the user, including executable lookup. */ + commandTimeoutMs: number +} + +/** Schema for {@link CliAccountConfig}; a plugin with no other fields uses it as its `Config`. */ +export const CliAccountConfig: z, CliAccountConfig> = z.object({ + binDir: z.string().min(1), + commandTimeoutMs: z.number().min(1).max(MAX_TIMER_DELAY_MS).default(30_000), +}) diff --git a/packages/connector/cli-account/tests/config.spec.ts b/packages/connector/cli-account/tests/config.spec.ts index 8c44d0b24f..124df918b5 100644 --- a/packages/connector/cli-account/tests/config.spec.ts +++ b/packages/connector/cli-account/tests/config.spec.ts @@ -1,5 +1,5 @@ import { expect, it } from 'vitest' -import { CliAccountConfig } from '../src/config.ts' +import { CliAccountConfig } from '../src/index.ts' it('defaults the command deadline and leaves the bin directory to the plugin', () => { expect(CliAccountConfig({})).toEqual({ commandTimeoutMs: 30_000 })