mirror of
https://ghproxy.cflmy.top/https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-12-02 01:59:35 +08:00
docs(upgrade): explain current-directory migration
This commit is contained in:
1 parent
6d0533df47
commit
caef1d5d5f
3 files changed
+56
No files matched your search
@@ -0,0 +1,16 @@
|
||||
# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
|
||||
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
||||
# After editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.1-alpha.1/working-directory/guide.md
|
||||
/:
|
||||
en: a7c17e352374c537
|
||||
zh: d0321bc63c6bbf2b
|
||||
/migrate-working-directory-templates-and-subagent-configuration:
|
||||
en: f83861180d272d05
|
||||
zh: 27717359b5290a94
|
||||
/migrate-working-directory-templates-and-subagent-configuration/change:
|
||||
en: 508e243b8f9980ca
|
||||
zh: 9eba95b0617d5ddb
|
||||
/migrate-working-directory-templates-and-subagent-configuration/migration:
|
||||
en: 37046f846fcec632
|
||||
zh: c7d715171e70655a
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
kind: upgrade-guide
|
||||
description: "The built-in cwd prompt variable and per-provider cwd configuration are replaced by the Session working-directory service and per-start cwd."
|
||||
---
|
||||
|
||||
# Migrate working-directory templates and subagent configuration
|
||||
|
||||
English | [中文](guide.zh.md)
|
||||
|
||||
## Change
|
||||
|
||||
The next release removes the loop's built-in `{{cwd}}` prompt variable and the `cwd` configuration key from `@deepseek-ai/dsh-subagent-acp` and `@deepseek-ai/dsh-subagent-dsh-sdk`. Custom prompt templates that retain an unresolved `{{cwd}}` fail before a model request. A Session's current execution directory is supplied as required user context and is persisted separately from its original `Session.header.cwd`.
|
||||
|
||||
New subagents use their start request's `cwd` when provided, otherwise they capture the parent's current directory. Existing processes keep their own directories. Changing the execution directory does not change the original project or grant additional write permissions.
|
||||
|
||||
## Migration
|
||||
|
||||
1. In home, profile, or invocation `personaSuffix` configuration and preset `suffix` fields, remove the directory clause that references `{{cwd}}`, retaining unrelated text. Omit or clear a suffix that becomes empty. The [working-directory service](../../../../packages/session/working-directory/README.md) supplies the directory context.
|
||||
2. Remove `config.cwd` from ACP and DSH-SDK subagent provider rows in your profile patches. To select a directory for one child, pass `cwd` in its [start request](../../../subsystems/subagent.md). To change the parent's execution directory, use `working_directory({ cd: "/absolute/project" })` before starting the child.
|
||||
3. Run `working_directory({})` in the affected Session and confirm the reported directory. Start a child without an override and check its execution directory; use an explicit start `cwd` when the child must use another checkout. Read `Session.header.cwd` only for original project identity or permission roots, rather than current-directory operations.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
kind: upgrade-guide
|
||||
description: "内置 cwd 提示词变量和 provider 的 cwd 配置由 Session 工作目录服务与每次启动的 cwd 替代。"
|
||||
---
|
||||
|
||||
# 迁移工作目录模板与子代理配置
|
||||
|
||||
[English](guide.md) | 中文
|
||||
|
||||
## 变更
|
||||
|
||||
下一版本移除 loop 的内置 `{{cwd}}` 提示词变量,以及 `@deepseek-ai/dsh-subagent-acp` 和 `@deepseek-ai/dsh-subagent-dsh-sdk` 的 `cwd` 配置键。自定义提示词模板保留未解析的 `{{cwd}}` 时,会在模型请求发出前失败。Session 当前执行目录作为必需的 user context 提供,并与原始 `Session.header.cwd` 分开持久化。
|
||||
|
||||
新子代理使用启动请求中显式提供的 `cwd`,未提供时捕获父代理的当前目录。已有进程保留各自的目录。切换执行目录不会改变原始项目,也不会授予额外写权限。
|
||||
|
||||
## 迁移
|
||||
|
||||
1. 在 home、profile 或本次调用的 `personaSuffix` 配置,以及 preset 的 `suffix` 字段中,移除引用 `{{cwd}}` 的目录语句,保留其他文本。suffix 变为空时省略或清空该字段。[工作目录服务](../../../../packages/session/working-directory/README.zh.md)负责提供目录上下文。
|
||||
2. 从 profile patch 中的 ACP 与 DSH-SDK 子代理 provider 行移除 `config.cwd`。为单个子代理选择目录时,在其[启动请求](../../../subsystems/subagent.zh.md)中传入 `cwd`。改变父代理执行目录时,先调用 `working_directory({ cd: "/absolute/project" })`,再启动子代理。
|
||||
3. 在相关 Session 中调用 `working_directory({})` 并确认报告的目录。启动一个不带目录覆盖的子代理并检查其执行目录;子代理需要另一个 checkout 时,显式提供启动 `cwd`。仅用 `Session.header.cwd` 读取原始项目标识或权限根目录,当前目录操作使用工作目录服务。
|
||||
Reference in new issue
Block a user