chore(sdk): satisfy CI gates — config catalog, md-wrap, knip

Regenerate docs/config-catalog.md for the telemetry package, unwrap the
design doc's multi-line blockquote paragraphs, and stop exporting the
create-sdk headless spec internals that have no external consumer.
This commit is contained in:
imccyu
2026-07-18 16:32:08 +08:00
parent 560ce3b539
commit ed418827c2
3 changed files with 5 additions and 2 deletions

View File

@@ -1432,4 +1432,5 @@ Imported as libraries by other packages; a `cordis.yml` cannot load them.
- `@deepseek-ai/dsh-scripts` ([`packages/sdk/scripts/src/index.ts`](../packages/sdk/scripts/src/index.ts))
- `@deepseek-ai/dsh-subagent-inprocess` ([`packages/subagent/subagent-inprocess/src/index.ts`](../packages/subagent/subagent-inprocess/src/index.ts))
- `@deepseek-ai/dsh-subagent-subprocess` ([`packages/subagent/subagent-subprocess/src/index.ts`](../packages/subagent/subagent-subprocess/src/index.ts))
- `@deepseek-ai/dsh-telemetry` ([`packages/sdk/telemetry/src/index.ts`](../packages/sdk/telemetry/src/index.ts))
- `@deepseek-ai/dsh-timeout` ([`packages/util/timeout/src/index.ts`](../packages/util/timeout/src/index.ts))

View File

@@ -1,6 +1,7 @@
# DeepSeek Harness SDK 后续工作设计
> 状态:设计成稿,供通读与评审。定案后由 ccyu 转正式 RFC 并双语化。本文件为临时设计文档,不走 doc-sync / 文档预算门禁。
>
> 一句话:**SDK 初版已合并;本轮把"创建项目""创建插件""遥测""交互测试"四块补齐,核心是抽出一个既撑交互又撑 headless 的创建内核,其余三块围绕它扩展。**
## 0. 总览(一屏读完)
@@ -134,6 +135,7 @@ SDK 初版(`packages/sdk/*`)已经落地三个包:
- **consent 承载**:遥测作为 `create` 时默认打开的 feature 写进 cordis.yml对用户可见、随项目
> **接线现状(读码修正)**launcher 上报已接通——`runDshSdkCommand` 计时包住每条命令,`finally` 里 resolve consent→ 建 redacted payloadcordis.yml+package.json 全文、不读 .env→ fire-and-forget 上报 + flushbest-effort 永不影响命令结果。**默认开**:无遥测条目 → 甲 → 上报。**opt-out 现状**:在 cordis.yml 手动加一条 `disabled` 的 `@deepseek-ai/dsh-telemetry` 条目即关(`ConsentResolver` 读到 disabled → 不报disabled 条目 cordis 不加载,故不会因"它不是运行时插件"而 boot 失败)。
>
> **暂缓(催表 opt-out 开关)**:把"关遥测"做成 config/create 向导里的勾选项还没做。关键约束:`@deepseek-ai/dsh-telemetry` 是 **launcher 库、不是 cordis 运行时插件**,所以 consent 条目只能以 **disabled 形态**存在enabled=无条目=甲默认报;要关才写 disabled 条目),不能像普通 feature 那样挂一个 enabled 的可 boot 条目。向导化这个"只在关闭时才出现条目"的特殊语义留作后续。
**在案取舍**:发全文会把第三方(含私有 scoped包名、cordis 配置值base-url/路径)暴露给 endpoint 持有方主流工具都不发这些Turbo 排除包名、Angular 禁模块名。ccyu 作为本 SDK 维护者接受此暴露——目的即掌握开发者用了哪些 plugin/依赖/配置。

View File

@@ -15,7 +15,7 @@ import type { CreateArgs } from './args.ts'
* (the interactive tree/suggests prompts are skipped). Absent required answers make
* the run fail loud through `HeadlessPromptPort` rather than blocking.
*/
export interface HeadlessCreateSpec {
interface HeadlessCreateSpec {
directory?: string
description?: string
provider?: 'deepseek' | 'custom'
@@ -43,7 +43,7 @@ function asRecord(value: unknown, source: string): Record<string, unknown> {
}
/** Parse and shallow-validate a headless spec from JSON text. */
export function parseHeadlessSpec(text: string, source: string): HeadlessCreateSpec {
function parseHeadlessSpec(text: string, source: string): HeadlessCreateSpec {
let parsed: unknown
try {
parsed = JSON.parse(text)