@suifei/dsh-ai-team 0.4.103 → 0.4.104

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
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.104 - 2026-11-16
4
+
5
+ **切到 dsh 来源后的两处实机缺陷**
6
+
7
+ - **handoff 夜间空钉永久复用**:handoff 后端把一轮采集到的会话钉在 `.skillopt-sleep-handoff/digests.json`,
8
+ 下一轮直接复用以保护已有回答。「没挖出任务」分支只推进采集窗、不撤钉——il2c 14:26 一次 `auto` 来源的运行
9
+ 留下空钉(0 个会话),之后每晚都复用它,切到 `dsh` 后 10 个在册会话照样 `no tasks mined`。现在无任务即撤钉
10
+ (此时没有待回答的调用,撤钉不丢任何东西);
11
+ - **「列出已排程的项目」仍为空**:0.4.103 修了解码,但 schtasks 报的是任务路径 `"\SkillOpt-Sleep-…"`,按裸前缀
12
+ 匹配永远不中。解析抽成 `_parse_win_task_names` 并去掉前导 `\`;实机 A/B:修复前 `[]`,修复后列出
13
+ `SkillOpt-Sleep-12d591e63a2d03aa9d7f`;
14
+ - 测试:`test/skillopt-dsh-source.test.js` 新增 2 例(隔离 HOME 跑两晚 `run --backend handoff --source dsh`,去掉修复即
15
+ 失败;用实机 schtasks 输出样本解析任务名);
16
+
3
17
  ## 0.4.103 - 2026-11-16
4
18
 
5
19
  **夜间 SkillOpt 环能从 DSH 会话里学习**
@@ -480,6 +480,14 @@ def _handoff_mine_and_pin(cfg, args, backend, snapshot: str, dry: bool):
480
480
  # branch, or every later run re-scans the same stale window.
481
481
  state.set_last_harvest(project, started, source)
482
482
  state.save()
483
+ # The digest pin only protects answers of an unfinished round; with
484
+ # no tasks there are none. A kept pin is replayed every later night
485
+ # instead of harvesting (il2c: an empty pin from one `auto` run made
486
+ # every `dsh` night report "no tasks mined" over 10 live sessions).
487
+ try:
488
+ os.remove(digests_path)
489
+ except OSError:
490
+ pass
483
491
  return 0, None
484
492
  payload = make_tasks_payload(
485
493
  tasks,
@@ -109,21 +109,29 @@ def _delete_win_task(task_name: str) -> bool:
109
109
  return False
110
110
 
111
111
 
112
+ def _parse_win_task_names(csv_text: str) -> List[str]:
113
+ """SkillOpt task names from ``schtasks /query /fo csv`` output.
114
+
115
+ schtasks reports task paths (``"\\SkillOpt-Sleep-…"`` for a root-folder
116
+ task); matching the bare prefix against the path never found one, so the
117
+ listing was always empty even with tasks installed.
118
+ """
119
+ tasks: List[str] = []
120
+ for line in csv_text.splitlines():
121
+ if not line.startswith('"'):
122
+ continue
123
+ name = line.split(",", 1)[0].strip('"').lstrip("\\")
124
+ if name.startswith("SkillOpt-Sleep-") and name not in tasks:
125
+ tasks.append(name)
126
+ return tasks
127
+
128
+
112
129
  def _list_win_tasks() -> List[str]:
113
130
  try:
114
131
  proc = _run_schtasks(["/query", "/fo", "csv"])
115
132
  if proc.returncode != 0:
116
133
  return []
117
- tasks = []
118
- for line in proc.stdout.splitlines():
119
- if not line.startswith('"'):
120
- continue
121
- parts = line.split(",")
122
- if len(parts) > 0:
123
- name = parts[0].strip('"')
124
- if name.startswith("SkillOpt-Sleep-"):
125
- tasks.append(name)
126
- return tasks
134
+ return _parse_win_task_names(proc.stdout or "")
127
135
  except Exception:
128
136
  return []
129
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suifei/dsh-ai-team",
3
- "version": "0.4.103",
3
+ "version": "0.4.104",
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",