Docs: rename SETUP, INSTALL, CHANGES and GITEA-DESIGN to Chinese filenames
This commit is contained in:
@@ -12,11 +12,11 @@ dsh-superagent 是为一个 GitHub 仓库服务的主动式编码 agent,打包
|
||||
|
||||
安装步骤较多,所以由一个 agent 陪你做。对你的编码 agent 说:
|
||||
|
||||
> 读这个仓库里的 SETUP.md,陪我一起把 dsh-superagent 装好。
|
||||
> 读这个仓库里的 设置.md,陪我一起把 dsh-superagent 装好。
|
||||
|
||||
它会一次只问一个短问题,展示一次完整计划,然后安装并配置好一切。[SETUP.md](SETUP.md) 就是它遵循的协议。
|
||||
它会一次只问一个短问题,展示一次完整计划,然后安装并配置好一切。[设置.md](设置.md) 就是它遵循的协议。
|
||||
|
||||
本 fork 另有一篇动手向的中文速查,覆盖插件安装、Gitea Source 与模型 provider:[INSTALL.md](INSTALL.md)。完整参考是 [docs/006-部署.md](docs/006-部署.md)。
|
||||
本 fork 另有一篇动手向的中文速查,覆盖插件安装、Gitea Source 与模型 provider:[安装.md](安装.md)。完整参考是 [docs/006-部署.md](docs/006-部署.md)。
|
||||
|
||||
## 文档
|
||||
|
||||
@@ -42,7 +42,7 @@ dsh-superagent 是为一个 GitHub 仓库服务的主动式编码 agent,打包
|
||||
|
||||
## 本 fork 的改动
|
||||
|
||||
本仓库是上游 dsh-superagent 研究原型的 fork:新增 Gitea Source(自建 Gitea,纯轮询拉取,无 webhook、无需公网回调)、Windows 全面移植修复,以及默认模型头部快切、Source 活性上报、工单目录回收等部署运维改进。逐提交的动机与改动位置、部署实战要点和已知限制见 [CHANGES.md](CHANGES.md)。
|
||||
本仓库是上游 dsh-superagent 研究原型的 fork:新增 Gitea Source(自建 Gitea,纯轮询拉取,无 webhook、无需公网回调)、Windows 全面移植修复,以及默认模型头部快切、Source 活性上报、工单目录回收等部署运维改进。逐提交的动机与改动位置、部署实战要点和已知限制见 [变更.md](变更.md)。
|
||||
|
||||
## 安装本 fork 插件栈(速览)
|
||||
|
||||
@@ -58,5 +58,5 @@ dsh plugin --profile superagent add "link:$PWD"
|
||||
然后配置并启动:
|
||||
|
||||
1. 按 [examples/profile.cordis.patch.yml](examples/profile.cordis.patch.yml) 写 `~/.dsh/profiles/superagent/cordis.patch.yml`(`webserver.port`、`stateDir` 必填;Windows 上 stateDir 支持盘符路径,YAML 里用单引号包反斜杠路径)。
|
||||
2. 用 Gitea 的话:取消示例中 `dsh-superagent-gitea` 的注释(`disabled: false`),启动后在面板 Sources 里填 `url`(直连实例地址,别走反代——反代可能吞 Authorization)、`repository`(owner/name)、`tokenEnv`(填环境变量名),并在启动环境里导出该变量=**细粒度访问令牌**(scope 例:`write:issue`、`write:notification`、`read:user`、`write:repository`;Gitea 1.26 起 API 写路由拒绝密码 Basic,见 CHANGES.md)。同时把不再使用的 GitHub Source 置 `enabled: false`。
|
||||
2. 用 Gitea 的话:取消示例中 `dsh-superagent-gitea` 的注释(`disabled: false`),启动后在面板 Sources 里填 `url`(直连实例地址,别走反代——反代可能吞 Authorization)、`repository`(owner/name)、`tokenEnv`(填环境变量名),并在启动环境里导出该变量=**细粒度访问令牌**(scope 例:`write:issue`、`write:notification`、`read:user`、`write:repository`;Gitea 1.26 起 API 写路由拒绝密码 Basic,见 变更.md)。同时把不再使用的 GitHub Source 置 `enabled: false`。
|
||||
3. `dsh --profile superagent --no-open` 启动,打开 `http://127.0.0.1:<port>/orchestrator/` 面板;让某人进 allowlist(Gitea 登录名),在 Issue 里 `@机器人` 提需求即开工。
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ Check dsh-superagent: run `scripts/dsh-superagent --profile superagent status` i
|
||||
|
||||
### Management API
|
||||
|
||||
面板使用一个本地 HTTP API,agent 也可以调用它。`SETUP.md` 用它保存设置,服务脚本读取 `GET state`。
|
||||
面板使用一个本地 HTTP API,agent 也可以调用它。`设置.md` 用它保存设置,服务脚本读取 `GET state`。
|
||||
|
||||
向 `http://127.0.0.1:<port>/orchestrator/api/` 发送请求,带上 `x-orchestrator-request: 1`。host 必须是 `127.0.0.1:<port>` 或 `localhost:<port>`。缺少请求头、或 `Origin` 来自别的站点,都会得到 403。
|
||||
|
||||
|
||||
@@ -12,6 +12,6 @@
|
||||
# disabled: false
|
||||
# Gitea is optional (this fork): uncomment to enable its Source, then set url / repository / tokenEnv
|
||||
# on the Gitea Source settings page. tokenEnv names an environment variable holding a fine-grained
|
||||
# access token (Gitea 1.26+ rejects password Basic on API write routes; see CHANGES.md).
|
||||
# access token (Gitea 1.26+ rejects password Basic on API write routes; see 变更.md).
|
||||
# - id: dsh-superagent-gitea
|
||||
# disabled: false
|
||||
|
||||
@@ -49,7 +49,7 @@ export const KV = {
|
||||
branchCi: record<{ branch?: string; failures?: string[]; revision: number }>('github-branch-ci'),
|
||||
ci: family<{ fingerprint: string; revision: number }, [number: number]>('github-ci:') },
|
||||
/**
|
||||
* Gitea Source: notification cursor and pending retries (Gitea-only deployment; see GITEA-DESIGN.md);
|
||||
* Gitea Source: notification cursor and pending retries (Gitea-only deployment; see Gitea-设计.md);
|
||||
* per-Issue/PR read cursor shared by notification and polled reads; per-stream cursor and start times by kind.
|
||||
*/
|
||||
gitea: { since: record<string>('gitea-since'), retries: record<Record<string, Retry>>('gitea-retry'),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** Normalizes Gitea issues, pull requests and reviews into domain Triggers (see GITEA-DESIGN.md). */
|
||||
/** Normalizes Gitea issues, pull requests and reviews into domain Triggers (see Gitea-设计.md). */
|
||||
import { z } from 'zod'
|
||||
import { key, type ChannelRef, type Trigger } from '../core/index.ts'
|
||||
import { sameName } from '../infra/text.ts'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** Gitea source kind: notification, stream and thread polling, thread context, and the Cordis plugin entry (see GITEA-DESIGN.md). */
|
||||
/** Gitea source kind: notification, stream and thread polling, thread context, and the Cordis plugin entry (see Gitea-设计.md). */
|
||||
import type { Context } from '@deepseek-ai/cordis'
|
||||
import { z } from 'zod'
|
||||
import { sameName } from '../infra/text.ts'
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { describe, expect, it } from 'vitest'
|
||||
const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..')
|
||||
const NUMBERED = /^(\d{3})-[\p{L}0-9-]+\.md$/u
|
||||
const numbered = readdirSync(join(ROOT, 'docs')).filter(name => NUMBERED.test(name)).sort()
|
||||
const entries = ['README.md', 'SETUP.md']
|
||||
const entries = ['README.md', '设置.md']
|
||||
const documents = [...entries, ...readdirSync(join(ROOT, 'docs')).filter(name => name.endsWith('.md')).map(name => `docs/${name}`)]
|
||||
const read = (path: string): string => readFileSync(join(ROOT, path), 'utf8')
|
||||
function links(file: string): string[] {
|
||||
|
||||
+4
-4
@@ -8,7 +8,7 @@
|
||||
本 fork 在上游研究原型之上做了三件事:
|
||||
|
||||
1. **新增 Gitea Source**:面向自建 Gitea 实例的纯拉取轮询——不用 webhook、不需要外网回调,
|
||||
部署机器无需公网入口。设计决策见 [GITEA-DESIGN.md](GITEA-DESIGN.md)。
|
||||
部署机器无需公网入口。设计决策见 [Gitea-设计.md](Gitea-设计.md)。
|
||||
2. **Windows 全面移植**:上游原型只在 Linux/macOS 上跑通,本 fork 修复了四个卡死部署的
|
||||
Windows 缺陷(都在 `4379973` 内,见下文)。
|
||||
3. **部署 / 运维层若干改进**:面板头部一键切换部署默认模型、Source 活性与轮询停滞上报、
|
||||
@@ -31,7 +31,7 @@ Gitea Source:新增 `src/sources/gitea.ts`(Source kind、轮询 round、`Git
|
||||
码;`src/infra/environment.ts` 加 Gitea 的 gh 封禁 shim 与 git 凭据 store;bundle 接线
|
||||
(`cordis.patch.yml` 插件行默认 disabled、`package.json` 导出 `./gitea-watch`、
|
||||
`tsdown.config.ts` 入口);`src/client/locales.ts` 文案;docs/007 模块与测试表;
|
||||
`GITEA-DESIGN.md`;`tests/gitea.spec.ts`。
|
||||
`Gitea-设计.md`;`tests/gitea.spec.ts`。
|
||||
|
||||
四个 Windows 缺陷:
|
||||
|
||||
@@ -147,13 +147,13 @@ deployment 相关、docs 测试的 path.sep 枚举、NTFS 语义等)。本 for
|
||||
- **插件不自动升级**:装时锁版本。升级纪律=一次升一个、升前看 changelog、升后跑门禁+验
|
||||
overview;带本地热补丁的插件(如 `workbuddy-to-dsh` 桥脚本)升级会盖掉补丁,升完要重打补丁
|
||||
并核对两侧桥脚本哈希一致(不一致时 buildDiff 判 stale,桥互杀重启);重度依赖在跑的插件
|
||||
没有明确收益不升。详见 INSTALL.md「插件升级纪律」。
|
||||
没有明确收益不升。详见 安装.md「插件升级纪律」。
|
||||
|
||||
## 已知限制
|
||||
|
||||
- 无 webhook,纯轮询(默认 60 s,可配 60–3600 s);响应速度换部署侧零入站端口。
|
||||
- bot 不自动 merge PR,人工合并是设计(Gitea 侧 auto-merge 在 MVP 裁剪线之外,见
|
||||
GITEA-DESIGN.md)。
|
||||
Gitea-设计.md)。
|
||||
- Gitea API 无 `is_bot` 字段,非 agent、不在名单里的 actor 一律按 human 处理;自动化账号要
|
||||
手工维护进 Policy 的 `bots` 名单。
|
||||
- 结束的工单可被 human 唤醒,所以执行目录回收留有保留期(默认 14 天,见 `3bee231`)。
|
||||
+1
-1
@@ -80,7 +80,7 @@ grep -l -E 'id: dsh-superagent\\b' "${DSH_HOME:-$HOME/.dsh}"/profiles/*/cordis.p
|
||||
|
||||
## Gitea Source 配置要点(本 fork)
|
||||
|
||||
替代或并存于 GitHub 的自建 Gitea 来源。设计决策见 `GITEA-DESIGN.md`,逐提交说明见 `CHANGES.md`。
|
||||
替代或并存于 GitHub 的自建 Gitea 来源。设计决策见 `Gitea-设计.md`,逐提交说明见 `变更.md`。
|
||||
|
||||
- **启用与 sourceId**:bundle 的 `cordis.patch.yml` 里插件 `dsh-superagent-gitea` 加 `disabled: false`,Source 的 `sourceId` 用 `gitea`。
|
||||
- **凭据**:Gitea 1.26 起 API 写路由拒绝 Basic,必须用 token;token 同时是 git push 的密码(凭据 store 同一规则),一个变量全链路。
|
||||
Reference in New Issue
Block a user