@stardustlc/dsh-dream 0.8.0 → 0.8.1
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 +5 -0
- package/README.en.md +2 -0
- package/README.md +2 -0
- package/docs/validation/0.8.1.md +18 -0
- package/lib/automatic.js +26 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
[历史英文记录](docs/CHANGELOG.en.md)
|
|
6
6
|
|
|
7
|
+
## 0.8.1 (2026-10-04)
|
|
8
|
+
|
|
9
|
+
- 修复真实 DeepSeek 辅助整理因深度推理耗尽 1200 token、JSON 被截断而无法保存候选的问题。通过官方模型元数据,仅对明确支持 `off` 的模型关闭这条辅助调用的推理;保留当前主任务设置及其他提供商的默认行为。
|
|
10
|
+
- 模型元数据查询也受辅助整理的超时与取消约束;旧宿主或元数据不可用时保留原有调用方式。真实模型复测与限制见 [0.8.1 验收](docs/validation/0.8.1.md)。
|
|
11
|
+
|
|
7
12
|
## 0.8.0 (2026-10-04)
|
|
8
13
|
|
|
9
14
|
- 对照官方 0.2.1-alpha.1 源码接入会话事件、Agent Inbox 与动态上下文:符合条件的任务收尾自动整理候选,后续相关任务自动回用已采纳、有独立来源的经验,无需记住触发词。候选始终待审阅,日记和项目规则仍是独立操作。
|
package/README.en.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[中文](README.md)
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
5
7
|
Collect candidate lessons from completed tasks, review them and reuse relevant memories. Manual reflections remain available.
|
|
6
8
|
|
|
7
9
|
[](https://www.npmjs.com/package/@stardustlc/dsh-dream) [](https://www.npmjs.com/package/@stardustlc/dsh-dream)
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.en.md)
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
5
7
|
自动整理任务中的候选经验,审阅后在相关任务中回用;也可手动复盘并保存梦境日记。
|
|
6
8
|
|
|
7
9
|
[](https://www.npmjs.com/package/@stardustlc/dsh-dream) [](https://www.npmjs.com/package/@stardustlc/dsh-dream)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Dream 0.8.1 acceptance / 验收
|
|
2
|
+
|
|
3
|
+
## Observed failure
|
|
4
|
+
|
|
5
|
+
With the official 0.2.1-alpha.1 DeepSeek adapter and `deepseek-flash`, a short invented CSV preference with an encoding exception consumed all 1200 output tokens. The adapter returned `max-tokens` after reasoning and incomplete JSON. Dream correctly discarded it, but the useful candidate was lost.
|
|
6
|
+
|
|
7
|
+
## Change
|
|
8
|
+
|
|
9
|
+
The auxiliary extraction checks the official `llm.resolveModelInfo(provider, model, signal)` capability. If this exact model advertises the `off` reasoning effort, only the auxiliary call requests it. Unknown models, unavailable metadata and legacy hosts retain their provider default. Metadata resolution and streaming share the existing timeout and abort signal. No retries, larger budgets or main-agent settings were added.
|
|
10
|
+
|
|
11
|
+
## Validation
|
|
12
|
+
|
|
13
|
+
- Windows: 304 tests, 303 passed, one optional stress test skipped. Regression cases cover complete extraction within the short budget, unsupported/missing metadata, and metadata calls that ignore abort.
|
|
14
|
+
- Real official SDK/provider with the local existing API credential: the invented CSV preference was saved as one unreviewed, project-scoped candidate with its exact source and UTF-8 exception; a second case without reusable information saved nothing. Both finished with `stop`; project AGENTS.md and the credential file remained unchanged.
|
|
15
|
+
- The quality check uses invented session events, not a claim that those events were emitted by a human's live session. The previous 0.8.0 acceptance separately exercised complete official RC2 and Alpha AgentLoops using a scripted adapter.
|
|
16
|
+
- The user's native Desktop process and one main window were observed. The window was minimized, so it was not restored while the user watched a video. Native visual/interaction acceptance remains untested.
|
|
17
|
+
|
|
18
|
+
Local receipts: `E:/deepseek/.harness-validation/dream-auto-20261003/real-model-before-081.json`, `real-model-verification.json`, `automatic-081-tests.log`.
|
package/lib/automatic.js
CHANGED
|
@@ -257,11 +257,7 @@ export class AutomaticDream {
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
async generate(route, sessionId, text, signal) {
|
|
260
|
-
|
|
261
|
-
provider: route.provider, model: route.model, sessionId, signal,
|
|
262
|
-
system: SYSTEM, maxTokens: this.cfg.autoMaxOutputTokens, tools: [],
|
|
263
|
-
messages: [{ id: randomUUID(), role: 'user', source: { kind: 'dsh-dream-automatic' }, content: [{ type: 'text', text }] }],
|
|
264
|
-
})[Symbol.asyncIterator]();
|
|
260
|
+
let stream;
|
|
265
261
|
let output = '', stopped = false;
|
|
266
262
|
const blocks = new Map();
|
|
267
263
|
let rejectAbort;
|
|
@@ -270,8 +266,31 @@ export class AutomaticDream {
|
|
|
270
266
|
signal.addEventListener('abort', onAbort, { once: true });
|
|
271
267
|
try {
|
|
272
268
|
signal.throwIfAborted();
|
|
269
|
+
// Short extraction JSON shares the output budget with hidden reasoning.
|
|
270
|
+
// Opt out only when this exact model advertises support; preserve other
|
|
271
|
+
// providers' defaults and older hosts without the metadata seam.
|
|
272
|
+
let reasoningEffort;
|
|
273
|
+
if (typeof this.host.llm.resolveModelInfo === 'function') {
|
|
274
|
+
try {
|
|
275
|
+
const model = await Promise.race([this.host.llm.resolveModelInfo(route.provider, route.model, signal), aborted]);
|
|
276
|
+
const efforts = object(model?.reasoning).efforts;
|
|
277
|
+
if (Array.isArray(efforts) && efforts.some(item => object(item).id === 'off'))
|
|
278
|
+
reasoningEffort = 'off';
|
|
279
|
+
}
|
|
280
|
+
catch {
|
|
281
|
+
signal.throwIfAborted();
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
signal.throwIfAborted();
|
|
285
|
+
const iterator = this.host.llm.stream({
|
|
286
|
+
provider: route.provider, model: route.model, sessionId, signal,
|
|
287
|
+
system: SYSTEM, maxTokens: this.cfg.autoMaxOutputTokens, tools: [],
|
|
288
|
+
...(reasoningEffort === undefined ? {} : { reasoningEffort }),
|
|
289
|
+
messages: [{ id: randomUUID(), role: 'user', source: { kind: 'dsh-dream-automatic' }, content: [{ type: 'text', text }] }],
|
|
290
|
+
})[Symbol.asyncIterator]();
|
|
291
|
+
stream = iterator;
|
|
273
292
|
for (;;) {
|
|
274
|
-
const part = await Promise.race([
|
|
293
|
+
const part = await Promise.race([iterator.next(), aborted]);
|
|
275
294
|
if (part.done)
|
|
276
295
|
break;
|
|
277
296
|
const chunk = object(part.value);
|
|
@@ -297,7 +316,7 @@ export class AutomaticDream {
|
|
|
297
316
|
}
|
|
298
317
|
finally {
|
|
299
318
|
signal.removeEventListener('abort', onAbort);
|
|
300
|
-
if (typeof stream
|
|
319
|
+
if (typeof stream?.return === 'function')
|
|
301
320
|
void Promise.resolve(stream.return()).catch(() => { });
|
|
302
321
|
}
|
|
303
322
|
}
|