@michengai/dsh-automation 0.1.43 → 0.1.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 CHANGED
@@ -4,6 +4,11 @@
4
4
 
5
5
  Upcoming changes and recent published versions are listed below. Git tags and GitHub Releases now mirror these entries; historical sections retain links to their original release commits.
6
6
 
7
+ ## 0.1.44 - 2026-09-16
8
+
9
+ - Keep only turn-boundary events in the live run-summary buffer, dropping request headers and tool results.
10
+ - Treat plugin-fiber unload (`INACTIVE_EFFECT`) or an aborted run signal mid-execution as `cancelled`, not `executor_error`.
11
+
7
12
  ## 0.1.43 - 2026-09-16
8
13
 
9
14
  - Add support for DSH `0.1.6-alpha.1`, retaining compatibility with `0.1.0-rc.8`, `0.1.1-rc.2`, `0.1.2-rc.1`, `0.1.5-rc.1`, and `0.1.5-rc.2`.
@@ -4,6 +4,11 @@
4
4
 
5
5
  以下记录待发布变更及近期已发布版本。Git 标签与 GitHub Release 现已和这些条目同步;历史条目继续保留原始发布提交链接。
6
6
 
7
+ ## 0.1.44 - 2026-09-16
8
+
9
+ - 运行摘要增量只保留 turn 边界事件,不再缓存 request/header 和工具结果。
10
+ - 插件 fiber 卸载抛出 `INACTIVE_EFFECT`,或运行中段已 abort 时,将运行记为 `cancelled`,而不是 `executor_error`。
11
+
7
12
  ## 0.1.43 - 2026-09-16
8
13
 
9
14
  - 支持 DSH `0.1.6-alpha.1`,继续兼容 `0.1.0-rc.8`、`0.1.1-rc.2`、`0.1.2-rc.1`、`0.1.5-rc.1` 和 `0.1.5-rc.2`。
package/lib/index.js CHANGED
@@ -21614,6 +21614,13 @@ function automationSessionTitle(taskName, iso, timeZone2) {
21614
21614
 
21615
21615
  // src/executor.ts
21616
21616
  var CANCEL_CONVERGENCE_TIMEOUT_MS = 1e4;
21617
+ var SUMMARY_EVENT_TYPES = /* @__PURE__ */ new Set(["turn/start", "assistant/message", "turn/end"]);
21618
+ function isInactiveEffect(error51) {
21619
+ return typeof error51 === "object" && error51 !== null && "code" in error51 && error51.code === "INACTIVE_EFFECT";
21620
+ }
21621
+ function isAbortRequested(signal) {
21622
+ return signal?.aborted === true;
21623
+ }
21617
21624
  async function settlesWithin(promise2, timeoutMs) {
21618
21625
  let timer;
21619
21626
  try {
@@ -21657,6 +21664,7 @@ function watchSessionEvents(ctx, session, fromSeq) {
21657
21664
  const stop = typeof ctx.on === "function" ? ctx.on("session/event", (target, event) => {
21658
21665
  if (target !== session || typeof event?.type !== "string") return;
21659
21666
  if (typeof event.seq === "number" && event.seq < fromSeq) return;
21667
+ if (!SUMMARY_EVENT_TYPES.has(event.type)) return;
21660
21668
  events.push(event);
21661
21669
  }) : () => {
21662
21670
  };
@@ -21703,7 +21711,7 @@ function reasonError(reason) {
21703
21711
  return { code: `turn_${String(reason.kind)}`, message: `\u81EA\u52A8\u5316\u4EE5 ${String(reason.kind)} \u7ED3\u675F\u3002` };
21704
21712
  }
21705
21713
  async function executeAutomationRun(ctx, definition, run, config2) {
21706
- if (config2.signal?.aborted === true) {
21714
+ if (isAbortRequested(config2.signal)) {
21707
21715
  return { status: "cancelled", error: { code: "cancelled", message: "\u81EA\u52A8\u5316\u5728\u542F\u52A8\u524D\u5DF2\u88AB\u53D6\u6D88\u3002" } };
21708
21716
  }
21709
21717
  const target = run.targetSnapshot;
@@ -21825,6 +21833,13 @@ async function executeAutomationRun(ctx, definition, run, config2) {
21825
21833
  error: reasonError(outcome.reason)
21826
21834
  };
21827
21835
  } catch (error51) {
21836
+ if (isAbortRequested(config2.signal) || isInactiveEffect(error51)) {
21837
+ return {
21838
+ ...handle === void 0 ? {} : { sessionId: String(sessionId) },
21839
+ status: "cancelled",
21840
+ error: { code: "cancelled", message: "\u81EA\u52A8\u5316\u56E0\u5176\u6240\u5C5E\u670D\u52A1\u505C\u6B62\u800C\u88AB\u53D6\u6D88\u3002" }
21841
+ };
21842
+ }
21828
21843
  return {
21829
21844
  ...handle === void 0 ? {} : { sessionId: String(sessionId) },
21830
21845
  status: "failed",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-automation",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
4
4
  "description": "在独立 DSH Session 中按计划执行编码任务,支持 Web 设置页与 Agent 双入口管理。",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.22.0",