@suifei/dsh-ai-team 0.4.43 → 0.4.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/index.js +4 -0
- package/lib/host/service.js +8 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.44 - 2026-11-12
|
|
4
|
+
|
|
5
|
+
**批 12:报告路径按 realpath 判定、唤醒去重键按项目淘汰**
|
|
6
|
+
|
|
7
|
+
- **junction 不再能绕过工作区限制**:`backfillHumanMentions` 只做词法包含性判断,工作区内的 junction/symlink 指向外部时会被当成「在工作区内」,等于把「读主机任意文件」的通道留着。现在两边都取 `realpath` 再比较(取不到才退回词法解析)。
|
|
8
|
+
- **唤醒去重键按项目淘汰**:窗口淘汰用**当前项目**的账本水位去比较所有键,水位较低的项目里刚产生的键会被整批删掉,那些唤醒随后会被重复规划。
|
|
9
|
+
- 测试:`node --test` **244 通过 / 1 跳过**(跳过的是 junction 用例——本机沙箱不允许创建目录 junction,用 `t.skip` 显式标注,不伪装成通过)。
|
|
10
|
+
|
|
3
11
|
## 0.4.43 - 2026-11-12
|
|
4
12
|
|
|
5
13
|
**修复:成员会话的 cwd 落在插件数据目录(workspace attach 失败)**
|
package/index.js
CHANGED
|
@@ -567,8 +567,12 @@ export function apply(ctx, config = {}) {
|
|
|
567
567
|
if (plans.length === 0) return;
|
|
568
568
|
// Window eviction: a key older than this horizon can no longer dedupe
|
|
569
569
|
// a relevant event, so drop it instead of growing the Map forever.
|
|
570
|
+
// 只淘汰**本项目**的键:`head` 是当前项目的账本水位,拿它去比较别的项目的
|
|
571
|
+
// seq,会把水位较低的项目里刚产生的键全部删掉(那些键还没发挥去重作用)。
|
|
570
572
|
const head = projectRuntime?.ledger?.head?.seq ?? 0;
|
|
573
|
+
const projectSuffix = `:${projectRuntime.id}`;
|
|
571
574
|
for (const [key, seq] of wakeKeys) {
|
|
575
|
+
if (!key.endsWith(projectSuffix)) continue;
|
|
572
576
|
if (Number.isSafeInteger(seq) && head - seq > 500) wakeKeys.delete(key);
|
|
573
577
|
}
|
|
574
578
|
const subagents = serviceOf(ctx, 'subagents');
|
package/lib/host/service.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
1
|
+
import { existsSync, mkdirSync, readFileSync, realpathSync, statSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import pathDefault from 'node:path';
|
|
3
3
|
import { ERRORS, fail } from '../domain/errors.js';
|
|
4
4
|
import { findReportPath, parseDecisionQuestions } from './decision-report.js';
|
|
@@ -286,12 +286,17 @@ export class TeamService {
|
|
|
286
286
|
const projectId = Object.keys(this.state.projects ?? {})[0];
|
|
287
287
|
// 路径包含性:Thread 正文由 agent 写,正文里的绝对路径不能变成
|
|
288
288
|
// 「读主机任意文件」的通道——只接受项目工作目录内的 .md。
|
|
289
|
+
// 必须按 **realpath** 比较:工作区内的 junction/symlink 指向外部时,
|
|
290
|
+
// 纯词法比较会把它当成「在工作区内」,等于放行任意路径。
|
|
291
|
+
const realOrNull = (value) => {
|
|
292
|
+
try { return realpathSync(value); } catch { return null; }
|
|
293
|
+
};
|
|
289
294
|
const allowedRoot = typeof workspacePath === 'string' && workspacePath !== ''
|
|
290
|
-
? pathDefault.resolve(workspacePath)
|
|
295
|
+
? realOrNull(workspacePath) ?? pathDefault.resolve(workspacePath)
|
|
291
296
|
: null;
|
|
292
297
|
const insideWorkspace = (candidate) => {
|
|
293
298
|
if (allowedRoot === null) return false;
|
|
294
|
-
const resolved = pathDefault.resolve(candidate);
|
|
299
|
+
const resolved = realOrNull(candidate) ?? pathDefault.resolve(candidate);
|
|
295
300
|
const relative = pathDefault.relative(allowedRoot, resolved);
|
|
296
301
|
return relative !== '' && !relative.startsWith('..') && !pathDefault.isAbsolute(relative);
|
|
297
302
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suifei/dsh-ai-team",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.44",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "文渊阁 (Wenyuan Pavilion) — AI Team mode for DeepSeek Harness: concurrent projects, owned tasks, threads, inbox and an append-only team ledger",
|
|
6
6
|
"license": "MIT",
|