docs: translate remaining READMEs
This commit is contained in:
6
packages/sdk/README.i18n.yaml
Normal file
6
packages/sdk/README.i18n.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write
|
||||
README.md: 53995820a575d68bbd3322f82e21fa6d3456b38e
|
||||
README.zh.md: d3481cab032a9bede9b85ce0f4010566592befbd
|
||||
@@ -1,5 +1,7 @@
|
||||
# SDK packages
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
Developer tooling for creating, editing, building, and running DeepSeek Harness projects.
|
||||
|
||||
The [feature Agent Note](../../.agents/notes/proposed/feature/2026-07-14-sdk-developer-projects.md) owns the developer workflow; the [architecture Agent Note](../../.agents/notes/proposed/architecture/2026-07-15-sdk-project-editing-architecture.md) owns the package and project-editing boundaries.
|
||||
|
||||
17
packages/sdk/README.zh.md
Normal file
17
packages/sdk/README.zh.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# SDK 包
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
用于创建、编辑、构建和运行 DeepSeek Harness 项目的开发者工具。
|
||||
|
||||
[功能 Agent Note](../../.agents/notes/proposed/feature/2026-07-14-sdk-developer-projects.md)负责开发者工作流;[架构 Agent Note](../../.agents/notes/proposed/architecture/2026-07-15-sdk-project-editing-architecture.md)负责包与项目编辑边界。
|
||||
|
||||
| 包 | 职责 |
|
||||
|---|---|
|
||||
| [`helper`](helper/README.md) | 项目聚合、编辑会话、内置功能、项目文档、模板、包管理器与提示词抽象 |
|
||||
| [`scripts`](scripts/README.md) | `dsh-sdk` 启动器:`start`、`dev`、`build` 和交互式 `config` |
|
||||
| [`create-sdk`](create-sdk/README.md) | `npm create @deepseek-ai/sdk` 初始化器 |
|
||||
|
||||
`@deepseek-ai/create-sdk` 是仓库 `@deepseek-ai/dsh-*` 命名规则的唯一例外:npm 的 scoped initializer 约定要求使用该名称,才能支持 `npm create @deepseek-ai/sdk`。
|
||||
|
||||
生成的项目始终以 `cordis.yml` 作为唯一运行时插件树。`dsh-sdk dev` 只是在同一文件周围增加 TypeScript 与本地工作区解析,不会创建仅供开发环境使用的配置。
|
||||
6
packages/sdk/create-sdk/README.i18n.yaml
Normal file
6
packages/sdk/create-sdk/README.i18n.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write
|
||||
README.md: aa09236832a50abdcd2b158e0561db26bce19cf6
|
||||
README.zh.md: 7900f243f944b61cdf114bf63ec7fd5c177806d7
|
||||
@@ -1,5 +1,7 @@
|
||||
# `@deepseek-ai/create-sdk`
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
Interactive initializer for `npm create @deepseek-ai/sdk [directory]`. Directory/name/description have visible editable defaults. A tree picker selects features and configures finite options with Right/Left navigation; secret text follows only for selected options. Local plugin creation is one none/plugin/tool choice.
|
||||
|
||||
The supported package surface is the `create-sdk` bin. The package root exports no symbols, and workflow, bin, source, and package-manifest subpaths are not exported.
|
||||
|
||||
25
packages/sdk/create-sdk/README.zh.md
Normal file
25
packages/sdk/create-sdk/README.zh.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# `@deepseek-ai/create-sdk`
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
用于 `npm create @deepseek-ai/sdk [directory]` 的交互式初始化器。目录/名称/描述都提供可见且可编辑的默认值。树形选择器用于选择功能;可选项通过 Right/Left 导航配置,只有选中相应选项后才会询问密钥文本。本地插件创建提供 none/plugin/tool 三选一。
|
||||
|
||||
受支持的包接口是 `create-sdk` bin。包根不导出任何符号,也不导出 workflow、bin、source 或 package-manifest 子路径。
|
||||
|
||||
初始化器拒绝任何已经存在的目标路径,创建一个 `SdkProject` 编辑会话,验证并提交该会话,然后询问是否安装 NPM 依赖并构建。安装或构建失败时会保留生成的项目,并打印重试命令。
|
||||
|
||||
公开标志包括 `[directory]`、`--description`、`--provider`、`--base-url`、`--api-key`、`--model`、`--interface`、`--pm`、`--install`/`--no-install`,以及无头模式标志 `--config <path>`/`--config-json <json>` 和 `--json`。交互式标志会预填对应问题;无头 spec(`--config`/`--config-json`)会预先提供所有答案和功能方案,因此创建过程无需 TTY,并通过 `HeadlessPromptPort` 驱动;若缺少任何必填答案,该端口会明确失败。`--json` 会发送 NDJSON 生命周期事件(`done`/`action-required`/`error`),使 agent(智能体)能够补充其中点名的缺失输入并重新运行。
|
||||
|
||||
提供方可以选择 DeepSeek,也可以选择由 `llm-pi-ai` 支持的自定义端点。选择 DeepSeek 时只询问 API key,并使用公共端点与 `deepseek-v4-flash`;自定义端点还会询问 base URL。密钥为空时必须确认;系统会创建包含注释和空 `.env` 变量的文件,使提供方在填写变量前启动时明确失败。现有插件的默认值会被省略;必填 SDK 预设仍按所属包的 Config 保持类型约束。
|
||||
|
||||
## 模型体验
|
||||
|
||||
通过生成的项目组合及其所选运行时插件间接提供;此外,无头 `--config-json` + `--json` 接口允许 agent 端到端创建项目,并响应 `action-required` 事件。
|
||||
|
||||
#### KV Cache 影响
|
||||
|
||||
不会直接失效;由具名消费方负责请求前缀变更。
|
||||
|
||||
## 已知限制与暂缓工作
|
||||
|
||||
- **无头本地插件**:无头 spec 会提供项目答案和功能方案;目前还不能在 spec 中表达本地插件脚手架(交互式 none/plugin/tool 选择),默认使用 none。
|
||||
6
packages/sdk/helper/README.i18n.yaml
Normal file
6
packages/sdk/helper/README.i18n.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write
|
||||
README.md: 8c6ed9e87be0a97af67849793edb7fa30ffb33ab
|
||||
README.zh.md: 6798962acd4f282068394cae9bc40aace2288879
|
||||
@@ -1,5 +1,7 @@
|
||||
# `@deepseek-ai/dsh-helper`
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
Shared project domain and infrastructure for `create-sdk` and `dsh-sdk config`. `SdkProject` is a read-only snapshot; `ProjectEditSession` is the only mutation and commit boundary. The [SDK architecture Agent Note](../../../.agents/notes/proposed/architecture/2026-07-15-sdk-project-editing-architecture.md) owns the rationale.
|
||||
|
||||
The package owns the builtin typed-spec catalog, provider/app behavior entities, structured project file objects, helper-owned project templates, the shared typed `TextTemplate` renderer, package-manager strategies, local-plugin blueprints, typed questions, and the clack prompt adapter. It never boots a Cordis application.
|
||||
|
||||
29
packages/sdk/helper/README.zh.md
Normal file
29
packages/sdk/helper/README.zh.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# `@deepseek-ai/dsh-helper`
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
供 `create-sdk` 与 `dsh-sdk config` 共用的项目领域和基础设施。`SdkProject` 是只读快照;`ProjectEditSession` 是唯一的变更与提交边界。设计理由由 [SDK 架构 Agent Note](../../../.agents/notes/proposed/architecture/2026-07-15-sdk-project-editing-architecture.md)负责。
|
||||
|
||||
该包负责内置的类型化 spec 目录、提供方/应用行为实体、结构化项目文件对象、helper 自有项目模板、共享的类型化 `TextTemplate` 渲染器、包管理器策略、本地插件蓝图、类型化问题,以及 clack 提示词适配器。它绝不会启动 Cordis 应用。
|
||||
|
||||
所有业务验证与文档验证都会在提交写入任何受影响文件前完成。提交会检测编辑会话打开后发生的外部修改,但在开始写入后,有意不提供跨文件回滚。
|
||||
|
||||
内置功能包括 provider、bash、app、persistence、HMR、filesystem、todo、skill、web、subagent、workflow、compaction、hooks、repeat-tool guard、timeout policy 和 ask-user。目录负责功能选项、必填和非默认 Cordis 插件配置、功能依赖、资源贡献与往返标记;create 与 config 使用同一注册表和配置器。ACP 应用选项只贡献自动化桥;交互式服务属于 TUI 或 Web 组合。
|
||||
|
||||
`SdkProject.open()` 只要求根目录下的 `package.json` 和 `cordis.yml` 可读。Cordis 配置项用于锚定功能安装;如果某个包只存在于链接的 NPM 依赖闭包中,则该功能仍视为不存在。一旦所属的 Cordis 配置项存在,资源形状不完整就是 `inconsistent`,无法自动修改。
|
||||
|
||||
`.env.example` 跟随当前所选功能。`.env` 仅追加:helper 可以补充缺失且名称不同的变量,但绝不会更新或删除现有内容。
|
||||
|
||||
包根明确只导出 `create-sdk` 和 `dsh-scripts` 使用的对象;内部模块不提供 `src/*` 或 package-manifest 子路径导出。
|
||||
|
||||
## 模型体验
|
||||
|
||||
无。项目领域只编辑文件,绝不会挂载活跃 agent 或模型请求。
|
||||
|
||||
#### KV Cache 影响
|
||||
|
||||
无;此包既不组装也不发送提供方请求。
|
||||
|
||||
## 已知限制与暂缓工作
|
||||
|
||||
- **提交不具备跨文件事务性**:每次写入前都会检测外部修改,但后续失败不会回滚已经写入的文件。
|
||||
6
packages/sdk/scripts/README.i18n.yaml
Normal file
6
packages/sdk/scripts/README.i18n.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write
|
||||
README.md: 9a696bf5a4de9a80f0741f07a7e753733bc2f998
|
||||
README.zh.md: 85c2e52c7bca0a9b7c40ebd6ede7c40f113168de
|
||||
@@ -1,5 +1,7 @@
|
||||
# `@deepseek-ai/dsh-scripts`
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
The `dsh-sdk` launcher owns SDK project startup and configuration.
|
||||
|
||||
| Command | Behavior |
|
||||
|
||||
37
packages/sdk/scripts/README.zh.md
Normal file
37
packages/sdk/scripts/README.zh.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# `@deepseek-ai/dsh-scripts`
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
`dsh-sdk` 启动器负责 SDK 项目启动与配置。
|
||||
|
||||
| 命令 | 行为 |
|
||||
|---|---|
|
||||
| `dsh-sdk start [target] [-- args…]` | 导入模块目标并调用 `main(bootContext)`;省略目标时启动 `cordis.yml`;`--` 后的参数原样转发 |
|
||||
| `dsh-sdk dev [target] [-- args…]` | 注册 TypeScript 与本地工作区源代码解析,然后进入 start 路径 |
|
||||
| `dsh-sdk build [args…]` | 使用项目参数调用项目已安装的 tsdown |
|
||||
| `dsh-sdk config` | 打开一个交互式编辑会话,审阅累计变更,统一提交一次;NPM 依赖变化时只安装一次 |
|
||||
| `dsh-sdk create <source>` | 从原生包管理器来源(`pkg@version` 或 `github:owner/repo#ref`)添加外部 Cordis 插件:确认后执行 `<pm> add <source>`,再将解析出的依赖挂载到 `cordis.yml`。不使用 giget/pacote;由包管理器解析并固定来源(GitHub 依赖会在管理器策略下通过自身 `prepare` 构建) |
|
||||
|
||||
`ProjectBuild(tsdownConfig)` 与 `PluginBuild(tsdownConfig)` 只从 `@deepseek-ai/dsh-scripts/dev/tsdown-config` 导出。开发环境与生产环境读取同一个 `cordis.yml`。
|
||||
|
||||
生成项目的脚本通过 `dsh-sdk` 执行 dev、build、start 和 config;类型检查直接运行 `tsc -b`。HMR 始终是显式的 `cordis.yml` 功能,并由 dev 与 start 同时加载。
|
||||
|
||||
运行时库导出 `startSDK(source)`,用于加载 `.env` 和 `cordis.yml` 并返回活跃上下文;还导出 `runSDK(target)`,用于导入项目模块并调用其 `main(bootContext)`(不带目标的 `runSDK()` 会委派给 `startSDK('./cordis.yml')`)。`SdkBootContext` 携带原样转发的 `argv`、通用 `args`、启动器的绝对 `cwd`,以及 `start`/`dev` 模式。启动器不声明项目选项:Node `parseArgs()` 使用空 schema 运行,因此带值的标志写作 `--key=value`,裸标志变为布尔值,`--no-cache` 变为 `args.cache = false`,选项名称保留 Node 的拼写(`--max-depth=3` → `args['max-depth']`)。
|
||||
|
||||
`start` 绝不构建。`dev` 注册项目已安装的 tsx 转换,并建立从 `plugins/*/package.json` 中的精确包名到各自 `src/index.ts` 的映射,然后沿用相同的 start 路径。`build` 调用项目已安装的 tsdown 并转发其参数;缺少 tsdown 配置时视为成功且不执行操作。
|
||||
|
||||
`config` 要求 TTY。一个功能树用于选择期望的启用集合;变更行会高亮,Right 用于修改有限功能选项,必填行无法取消选择,不一致行会显示诊断,自定义/手动 Cordis 配置项支持启用/禁用。工作流会将该目标协调到一个编辑会话中。Review & Apply 只提交一次;之后,如果 NPM 依赖有变更,则触发一次包管理器安装。安装失败不会撤销已提交文件。
|
||||
|
||||
根库导出 `startSDK`、`runSDK` 以及 `SdkBootArgs`/`SdkBootContext` 类型;命令组合仍由 bin 私有持有。不导出 `src/*`、bin 或 package-manifest 子路径。
|
||||
|
||||
## 模型体验
|
||||
|
||||
通过项目 `cordis.yml` 树间接提供;该树由 `start` 或 `dev` 加载。
|
||||
|
||||
#### KV Cache 影响
|
||||
|
||||
不会直接失效;由具名消费方负责请求前缀变更。
|
||||
|
||||
## 已知限制与暂缓工作
|
||||
|
||||
- **启动器参数没有 schema**:`start` 和 `dev` 会保留 Node `parseArgs()` 输出,而不会验证项目专用标志。
|
||||
6
packages/sdk/telemetry/README.i18n.yaml
Normal file
6
packages/sdk/telemetry/README.i18n.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write
|
||||
README.md: 1d33915f36e0af10eedac5f9ab34f2534268a327
|
||||
README.zh.md: 3b60040f02ceaf17292bcbd1c046d82bdf86dafe
|
||||
@@ -1,5 +1,7 @@
|
||||
# `@deepseek-ai/dsh-telemetry`
|
||||
|
||||
English | [中文](README.zh.md)
|
||||
|
||||
Launcher-side telemetry primitives for the dsh-sdk toolchain. This is a plain library the launcher imports around each command; it is **not** a Cordis plugin, because `build` and first-init `create` never boot Cordis. Wiring the reporter into the launcher command dispatch and adding the telemetry consent feature to the `dsh-helper` catalog live in their owning packages, not here.
|
||||
|
||||
| Export | Role |
|
||||
|
||||
30
packages/sdk/telemetry/README.zh.md
Normal file
30
packages/sdk/telemetry/README.zh.md
Normal file
@@ -0,0 +1,30 @@
|
||||
# `@deepseek-ai/dsh-telemetry`
|
||||
|
||||
[English](README.md) | 中文
|
||||
|
||||
用于 dsh-sdk 工具链的启动器侧 telemetry 原语。这是启动器在每个命令周围导入的普通库;它**不是** Cordis 插件,因为 `build` 与首次初始化的 `create` 从不启动 Cordis。将 reporter 接入启动器命令分发,并把 telemetry consent 功能加入 `dsh-helper` 目录,属于各自所属包的职责,而不是此包的职责。
|
||||
|
||||
| 导出 | 职责 |
|
||||
|---|---|
|
||||
| `SecretRedactor` | 保守的安全后备:在已解析值(`redactValue`)与原始文本(`redactText`)中,将形似密钥的值(密钥式键名、已知 token 形状、PEM 块、URL 凭据、高熵不透明 token)替换为占位符。绝不删除字段或行。 |
|
||||
| `ConsentResolver` | 解析项目 `cordis.yml`(绝不启动),读取 telemetry 配置项的启用/禁用状态作为 consent;`DO_NOT_TRACK`/CI 环境会强制彻底退出。 |
|
||||
| `buildTelemetryPayload` | 组装 `{command, durationMs, success, cordisYmlContent, packageJsonContent}`,对完整的 `cordis.yml` 与 `package.json` 文本运行 redactor。绝不读取 `.env`;发送 `package.json` 的前提是同时存在 `cordis.yml`,因此在非 SDK 目录运行的命令不会上传该目录中无关的 manifest。 |
|
||||
| `getOrCreateAnonymousId` | 将随机 UUID 持久化到 [`@deepseek-ai/dsh-paths`](../../util/paths/README.md) 解析出的 harness home(`$DSH_HOME` > `~/.dsh`);其范围限定为该 home,而不是整台机器,且绝不从 git 派生。 |
|
||||
| `TelemetryReporter` | 即发即弃发送:`report()` 绝不阻塞或抛出;所有路径都会结算发送;`flush()` 可以在上限内排空进行中的发送。 |
|
||||
|
||||
Consent 由 `cordis.yml` 中的 telemetry 配置项承载,因此禁用 telemetry 就是禁用该配置项。telemetry 默认上报,只有已经存在的 telemetry 配置项被显式设为 `disabled` 时才关闭:缺少 `cordis.yml`(首次 `create`)、配置项已启用,或 `cordis.yml` 中没有 telemetry 配置项时都会上报。`DO_NOT_TRACK`/CI 始终拒绝。无配置与缺少配置项的默认值可以通过 `ConsentResolver` 配置。
|
||||
|
||||
收集端点是固定常量(`DSH_TELEMETRY_ENDPOINT`);发布前必须将其 `.invalid` 占位值替换为真实端点。
|
||||
|
||||
## 模型体验
|
||||
|
||||
无。reporter 从启动器发送开发周期 telemetry,绝不会进入模型请求。
|
||||
|
||||
#### KV Cache 影响
|
||||
|
||||
无;此包既不组装也不发送提供方请求。
|
||||
|
||||
## 已知限制与暂缓工作
|
||||
|
||||
- **占位端点**:`DSH_TELEMETRY_ENDPOINT` 指向 `.invalid`,直到配置真实端点。
|
||||
- **脱敏依赖启发式规则**:这只是保守后备,不是保证;密钥应存放于 `.env`,而该文件绝不会被读取或上报。
|
||||
Reference in New Issue
Block a user