cowork-flow 2.7.2 → 2.7.3

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
@@ -6,6 +6,16 @@
6
6
 
7
7
  ### Changed
8
8
 
9
+ ## [2.7.3] - 2026-11-13
10
+
11
+ ### Fixed
12
+
13
+ - **运行时入口字节码自防护**:`template/.cowork-flow/scripts/run.py` 入口在 `sys.pycache_prefix` 与 `PYTHONPYCACHEPREFIX` 均未设置时,把字节码缓存重定向到系统临时目录(`cowork-flow-pycache`),直接调用运行时入口不再把 `__pycache__` 写进交付树(源码 checkout 即 `template/`);已有前缀按真值尊重、不覆盖,与调用方既有防护(tests、template-test-runner、release-gates)互补,新增回归测试断言入口调用后 `template/` 无新增 `__pycache__`。
14
+
15
+ ### Changed
16
+
17
+ - **派发纪律双条目指引**:`cowork-flow` Skill 的 Delegation 段新增「派发 `cowork-check` 前收口指纹覆盖工件」指引——先定稿 `implement.jsonl` 范围、anchor goal/AC 文本、绑定计划与引用 spec 正文,引用 task-review `Receipt freshness` 而非复述机制,避免复核后编辑使回执过期重派;`agent-dispatch` Skill 的 Boundaries 段新增「所有验证前台同步执行、本回合内提交角色输出或回执」纪律,宿主中立措辞,避免叶子上下文在回合结束被回收导致后台失联。
18
+
9
19
  ## [2.7.2] - 2026-11-13
10
20
 
11
21
  ### Added
@@ -520,7 +530,8 @@
520
530
 
521
531
  此版本未保留本地条目正文,详情见 [GitHub Release](https://github.com/fishlikewater/cowork-flow/releases/tag/v0.0.47)。
522
532
 
523
- [Unreleased]: https://github.com/fishlikewater/cowork-flow/compare/v2.7.2...HEAD
533
+ [Unreleased]: https://github.com/fishlikewater/cowork-flow/compare/v2.7.3...HEAD
534
+ [2.7.3]: https://github.com/fishlikewater/cowork-flow/compare/v2.7.2...v2.7.3
524
535
  [2.7.2]: https://github.com/fishlikewater/cowork-flow/compare/v2.7.1...v2.7.2
525
536
  [2.7.1]: https://github.com/fishlikewater/cowork-flow/compare/v2.7.0...v2.7.1
526
537
  [2.7.0]: https://github.com/fishlikewater/cowork-flow/compare/v2.6.0...v2.7.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cowork-flow",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "CLI for installing and maintaining cowork-flow collaboration templates.",
5
5
  "keywords": [
6
6
  "ai-agent",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cowork-flow",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "AI 协作工作流引擎:任务生命周期、子代理调度、门禁与状态注入。将 cowork-flow 的完整工作流带入 Claude Code。",
5
5
  "displayName": "Cowork Flow",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cowork-flow",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "AI 协作工作流引擎:任务生命周期、子代理调度、门禁与状态注入。将 cowork-flow 的完整工作流带入 Codex。",
5
5
  "author": {
6
6
  "name": "fishlikewater",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cowork-flow",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "AI 协作工作流引擎:任务生命周期、子代理调度、门禁与状态注入。将 cowork-flow 的完整工作流带入 Kimi Code。",
5
5
  "author": {
6
6
  "name": "fishlikewater",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cowork-flow",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "AI 协作工作流引擎:任务生命周期、子代理调度、门禁与状态注入。将 cowork-flow 的完整工作流带入 Qoder。",
5
5
  "displayName": "Cowork Flow",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cowork-flow",
3
- "version": "2.7.2",
3
+ "version": "2.7.3",
4
4
  "description": "AI 协作工作流引擎:任务生命周期、子代理调度、门禁与状态注入。将 cowork-flow 的完整工作流带入 ZCode。",
5
5
  "author": {
6
6
  "name": "fishlikewater",
@@ -1 +1 @@
1
- 2.7.2
1
+ 2.7.3
@@ -21,11 +21,11 @@ def runtime_pythonpath_env(
21
21
  import `services.*` / `infra.*` from the same runtime this code came from,
22
22
  while any caller-provided PYTHONPATH entries are preserved after it.
23
23
 
24
- `cache_bytecode=False` is the skill-script rule: those children run rarely,
25
- the cache buys them nothing measurable, and the `__pycache__` trees they
26
- leave behind land next to whatever runtime they resolved to — in a source
27
- checkout that is the shipped `template/` tree. High-frequency commands keep
28
- the default so they keep their cache.
24
+ `cache_bytecode=False` is the skill-script rule: those children run rarely
25
+ and the cache buys them nothing measurable. High-frequency commands keep
26
+ the default so they keep their cache; the `run.py` entry guard redirects
27
+ that cache to the system temp prefix, so it never lands next to shipped
28
+ sources (in a source checkout that is the `template/` tree).
29
29
  """
30
30
  env = os.environ.copy()
31
31
  existing = env.get("PYTHONPATH")
@@ -7,8 +7,15 @@ from __future__ import annotations
7
7
  import os
8
8
  import subprocess
9
9
  import sys
10
+ import tempfile
10
11
  from pathlib import Path
11
12
 
13
+ # Entry self-guard: direct calls must not drop __pycache__ next to shipped sources.
14
+ if not sys.pycache_prefix:
15
+ sys.pycache_prefix = str(Path(tempfile.gettempdir()) / "cowork-flow-pycache")
16
+ if not os.environ.get("PYTHONPYCACHEPREFIX"):
17
+ os.environ["PYTHONPYCACHEPREFIX"] = sys.pycache_prefix
18
+
12
19
  from adapters.cli.encoding import configure_cli_encoding
13
20
  from adapters.cli.execution_context_args import (
14
21
  context_to_internal_cli_args,
@@ -23,6 +23,10 @@ Use this Skill only inside fixed subagents such as `cowork-implement`,
23
23
  ## Boundaries
24
24
 
25
25
  - Act as a leaf executor: do not spawn, wait for, list, or close other agents.
26
+ - Run all verification synchronously in the foreground and deliver the role
27
+ output or receipt within this turn; never end the turn waiting for a
28
+ background task — the host may reclaim the leaf context and its background
29
+ children at turn end.
26
30
  - Do not start, finish, archive, resume, commit, or push workflow state.
27
31
  - Keep edits and reads inside the assigned runtime context and task scope.
28
32
  - When the assignment names `owned_paths`, keep every edit inside them; report
@@ -54,6 +54,12 @@ Dispatch follows the plan's execution strategy:
54
54
  `.cowork-flow/spec/contracts/subagent-dispatch.md`.
55
55
  - Before completion, arrange the `cowork-check` dispatch the completion gate
56
56
  requires — do not wait for the blocker to tell you.
57
+ - Close the review surface before dispatching `cowork-check`: final
58
+ `implement.jsonl` scope, anchor goal/AC text, bound plan, referenced spec
59
+ bodies. The receipt hashes their content; a post-check edit — even one
60
+ appended scope entry — stales it and forces a re-dispatch (task-review
61
+ `Receipt freshness`). AC ticks and evidence appends are fingerprint-neutral;
62
+ close them before dispatch so the review judges the final state.
57
63
  - Research-heavy work: dispatch two or three `cowork-research` children for
58
64
  independent questions instead of widening the main context.
59
65
  - Long-running children: prefer background dispatch when the host supports it;