Merge remote-tracking branch 'origin/stack/agent-profiles-5-web-ui' into stack/agent-profiles-8-authoring

# Conflicts:
#	packages/client/connection/README.i18n.yaml
#	packages/client/connection/README.zh.md
#	packages/core/tools/README.i18n.yaml
#	packages/core/tools/README.zh.md
This commit is contained in:
Yichen Jiang
2026-08-09 13:22:10 +08:00
1049 changed files with 3397 additions and 2094 deletions

View File

@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write examples/acp-agent/README.md
README.md: 61c6efafe9dde4f91385beebdfd426c57006187b
README.zh.md: 343e55722a4dda7c5cc5e0de6b5fecf250b9ab13
README.zh.md: bd1b0e2200271a71074fbb2475167c25eb309d77

View File

@@ -9,16 +9,16 @@ pnpm run demo:acp # needs DEEPSEEK_API_KEY (repo-root .env or env)
pnpm run demo:code-mode # same protocol with the Code Mode tool transport
```
该叶节点加载 ACP 应用、DeepSeek 适配器、受沙箱限制的 bash 与文件系统栈、一次性批准策略、压缩compaction、subagent、工作流、钩子、派生会话查询索引和重复守卫。应用为每次 `session/new` 创建一个新 agent将会话持久化到 JSONL并保持 stdout 只含协议内容。可选 overlay 可添加会话查询、文件系统溢出存储、Code Mode 或 Web 抓取。
该叶节点加载 ACP 应用、DeepSeek 适配器、受沙箱限制的 bash 与文件系统栈、一次性批准策略、压缩compaction、subagent、工作流、钩子、派生会话查询索引和重复守卫。应用为每次 `session/new` 创建一个新 agent将会话持久化到 JSONL并保持 stdout 只含协议内容。可选 overlay 可添加会话查询、文件系统 spill 存储、Code Mode 或 Web 抓取。
## 协议通道
Stdout 只携带以换行分隔的 ACP JSON-RPC。`@deepseek-ai/dsh-acp-demo` 不安装 stdout logger该叶节点新增的组件必须使用 stderr 输出诊断信息。
自动化约(支持的方法、基线提示词内容、已提交文本输出,以及有意缺少的 UI 界面)位于 [`@deepseek-ai/dsh-acp`](../../packages/acp/acp/README.md)。
自动化约(支持的方法、基线提示词内容、已提交文本输出,以及有意缺少的 UI 界面)位于 [`@deepseek-ai/dsh-acp`](../../packages/acp/acp/README.md)。
## 会话 workspace 与权限
每次 `session/new` 都提供一个绝对 `cwd`。受沙箱限制的 bash 和文件系统修改会以该会话 cwd 为基准应用 `workspace-write`,因此并发会话可以使用不同的项目根目录;平台临时根目录仍是共享可写暂存空间(参见[沙箱](../../packages/sandbox/sandbox/README.md))。`DSH_PERMISSION_MODE` 为部署选择 `workspace-write``danger-full-access`
每次 `session/new` 都提供一个绝对 `cwd`。受沙箱限制的 bash 和文件系统修改会以该会话 cwd 为基准应用 `workspace-write`,因此并发会话可以使用不同的项目根目录;平台临时根目录仍是共享可写暂存空间(参见[沙箱约](../../packages/sandbox/sandbox/README.md))。`DSH_PERMISSION_MODE` 为部署选择 `workspace-write``danger-full-access`
`workspace-write` 下,如果模型重试请求更广泛的沙箱访问权限,就会触发 `session/request_permission`,选项为 `allow_once``reject_once`。客户端以程序方式决策;客户端放弃选择或无法给出答复时,系统会按拒绝处理。选定结果仅适用于该次重试,并通过常规工具结果/审计路径记录。服务器绝不公开权限选择器,也不持久化客户端策略。

View File

@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write examples/headless-agent/README.md
README.md: 6e80e56dec70c2be341ae5dfbad70e13a5109715
README.zh.md: ea8c41b9ae75f0cee3edd78e59408f37c19182d3
README.zh.md: 9e409735f03afc62cd788fa2a5d1afdef0fa6c2a

View File

@@ -19,13 +19,13 @@ pnpm run dsh run "fix the failing test in this workspace"
## E2B POC overlay
[`e2b.cordis.yml`](e2b.cordis.yml) 使用一个共享 E2B 沙箱替换本地文件系统与进程管理提供方,同时保留 `dsh-bash-local` 和相同的面向模型工具。请在 git 忽略的根目录 `.env` 中,将 `E2B_API_KEY``DEEPSEEK_API_KEY` 放在一起,然后运行凭据门控的实机组合测试;它在同一个沙箱中驱动 FS、Bash、PTY 和 LSP并证明沙箱最终被删除
[`e2b.cordis.yml`](e2b.cordis.yml) 使用一个共享 E2B 沙箱替换本地文件系统与进程提供方,同时保留 `dsh-bash-local` 和相同的面向模型工具。请在 git 忽略的根目录 `.env` 中,将 `E2B_API_KEY``DEEPSEEK_API_KEY` 放在一起,然后运行凭据门控的实机组合测试;它在同一个沙箱中驱动 FS、Bash、PTY 和 LSP并证明沙箱最终被删除
```sh
pnpm exec vitest run --config vitest.e2e.config.ts packages/e2b/e2b/tests/composition.e2e.ts
```
该 overlay 会在沙箱中创建拼写相同的绝对 cwd但不会上传或挂载宿主工作区。文件与 Bash 变更只存在于 E2BCordis、模型调用、agent会话状态、会话日志、skill技能和 SDK 缓冲仍在宿主上。该组合会在超时和资源释放时终止其沙箱。它是提供方组合 POC而不是完整 harness 迁移或工作区同步功能。
该 overlay 会在沙箱中创建相同的绝对 cwd但不会上传或挂载宿主工作区。文件与 Bash 变更只存在于 E2BCordis、模型调用、agent会话状态、会话日志、skill技能和 SDK 缓冲仍在宿主上。该组合会在超时和资源释放时终止其沙箱。它是提供方组合 POC而不是完整 harness 迁移或工作区同步功能。
## 高级配置

View File

@@ -1,9 +1,19 @@
// Generated by dsh-plugin-prepare. Do not edit.
const manifest = {"name":"headless-repository-fixture","skills":["dsh-plugin-assets/skills/0"]}
// Value mirror: Cordis const enum FiberState.ACTIVE; keep aligned with dsh-repository-plugin source.ts.
const FIBER_ACTIVE = 2
export const name = "headless-repository-fixture"
export const inject = ["loader","skills"]
async function mount(ctx, plugin, label, config) {
const fiber = ctx.plugin(plugin, config)
await fiber
if (fiber.state !== FIBER_ACTIVE) {
const missing = Object.keys(fiber.inject).filter(service => fiber.ctx.get(service) === undefined)
throw new Error(`${label} did not activate (waiting for services: ${missing.join(', ') || 'unknown'})`)
}
}
export async function apply(ctx) {
const runtime = ctx.loader.builtins["dsh-repository-plugin"]
if (runtime === undefined) throw new Error("missing Cordis builtin dsh-repository-plugin")
await ctx.plugin(runtime, { baseUrl: import.meta.url, manifest })
await mount(ctx, runtime, 'repository Plugin runtime', { baseUrl: import.meta.url, manifest })
}

View File

@@ -6,7 +6,12 @@ import { join } from 'node:path'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
import { LOADER_SMOKE_TEST_TIMEOUT_MS, runLoaderSmoke } from '@deepseek-ai/dsh-loader-smoke'
import { PREPARED_ENTRY_FILENAME, prepareDshPlugin } from '@deepseek-ai/dsh-repository-plugin'
import {
PREPARED_ENTRY_FILENAME,
REPOSITORY_PLUGIN_PREPARE_COMMAND,
REPOSITORY_PLUGIN_PACKAGE_NAME,
prepareDshPlugin,
} from '@deepseek-ai/dsh-repository-plugin'
import type { SessionEvent } from '@deepseek-ai/dsh-session'
const binScript = fileURLToPath(new URL('./fixtures/headless-driver.ts', import.meta.url))
@@ -72,6 +77,8 @@ describe('headless-agent keyless smoke', () => {
await writeFile(join(plugin, 'package.json'), `${JSON.stringify({
name: 'headless-repository-fixture',
version: '0.0.0',
scripts: { prepack: REPOSITORY_PLUGIN_PREPARE_COMMAND },
devDependencies: { [REPOSITORY_PLUGIN_PACKAGE_NAME]: '0.0.1' },
dsh: { skills: ['../skills'] },
}, undefined, 2)}\n`)
await prepareDshPlugin(plugin)

View File

@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write examples/jsonrpc-agent/README.md
README.md: bcc1027d2edb30ab374dfa2ed13ad8e6360d923b
README.zh.md: 197c25d7b4f5645aeb7e92d8c36ef4a423beb2e8
README.zh.md: ce255e4dd70bf8c5c6edc51afbe03bb4c66560a0

View File

@@ -26,11 +26,11 @@
通过 Python SDK 的 `cordis` 选项或 `DSH_CORDIS_CONFIG` 传入配置路径。内置可执行文件已携带此文件中指定的每个插件;目标机器无需 Node.js。
## 持久工具变体
## 持久工具变体
[`persistent-tools.cordis.yml`](persistent-tools.cordis.yml) 是一个最小可运行变体,面向模型的能力严格只有:
- agent 独占、状态持久的 `bash`
- 所有者作用域内持久`bash`
- 提供 `view``create``str_replace``insert``str_replace_editor`
它组合本地 PTY、文件系统 intent 策略与会话沙箱策略。
它组合本地 PTY、文件系统意图策略与会话沙箱策略。

View File

@@ -3,4 +3,4 @@
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write examples/web-cordis/README.md
README.md: 21fe0a210b2e591a96dc254014a0f91ed9afa2ba
README.zh.md: 35158affd5cbdd6f8fa7f5910500f21c2b241309
README.zh.md: b3fecb4312dbcbaeff460a21f1d2db6b5288f9ad

View File

@@ -18,4 +18,4 @@ pnpm run demo:cordis
pnpm run demo:cordis acp
```
这两条命令都需要 `DEEPSEEK_API_KEY`。工具、生命周期和安全约由 [Cordis 工具参考](../../packages/self-modification/tool-cordis/README.md)定义。
这两条命令都需要 `DEEPSEEK_API_KEY`。工具、生命周期和安全约由 [Cordis 工具参考](../../packages/self-modification/tool-cordis/README.md)定义。