cowork-flow 2.4.2 → 2.5.2

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +44 -1
  2. package/CONTRIBUTING.en.md +115 -0
  3. package/CONTRIBUTING.md +14 -8
  4. package/README.en.md +14 -3
  5. package/README.md +10 -2
  6. package/docs/architecture.en.md +2 -0
  7. package/docs/architecture.md +2 -0
  8. package/docs/hosts.en.md +15 -0
  9. package/docs/hosts.md +15 -0
  10. package/docs/index.en.md +1 -1
  11. package/docs/release.en.md +1 -1
  12. package/package.json +4 -3
  13. package/presets/claude-code/.claude-plugin/plugin.json +1 -1
  14. package/presets/codex/.codex-plugin/plugin.json +1 -1
  15. package/presets/kimi-code/.kimi-plugin/plugin.json +1 -1
  16. package/presets/qoder/.qoder-plugin/plugin.json +1 -1
  17. package/presets/zcode/.zcode-plugin/plugin.json +1 -1
  18. package/src/commands/host-inspect.js +86 -0
  19. package/src/commands/host.js +42 -18
  20. package/src/commands/init.js +111 -5
  21. package/src/commands/install-claude-code-plugin.js +53 -2
  22. package/src/commands/install-codex-plugin.js +114 -4
  23. package/src/commands/install-dsh-hook.js +51 -0
  24. package/src/commands/install-dsh-preset.js +56 -9
  25. package/src/commands/install-kimi-code-plugin.js +61 -2
  26. package/src/commands/install-kimi-hook.js +84 -2
  27. package/src/commands/install-opencode-plugin.js +58 -2
  28. package/src/commands/install-qoder-plugin.js +67 -3
  29. package/src/commands/install-zcode-plugin.js +77 -2
  30. package/src/commands/registry.js +20 -5
  31. package/src/lib/dsh-home.js +2 -2
  32. package/template/.cowork-flow/.version +1 -1
  33. package/template/.cowork-flow/scripts/adapters/cli/task_navigation.py +8 -3
  34. package/template/.cowork-flow/scripts/adapters/host/host_manifest.py +4 -0
  35. package/template/.cowork-flow/scripts/adapters/host/workflow_state_hook.py +1 -3
  36. package/template/.cowork-flow/scripts/infra/files.py +0 -13
  37. package/template/.cowork-flow/scripts/services/ac_evidence.py +1 -1
  38. package/template/.cowork-flow/scripts/services/decision_anchor_schema.py +65 -0
  39. package/template/.cowork-flow/scripts/services/fact_view.py +2 -75
  40. package/template/.cowork-flow/scripts/services/lifecycle_checks.py +1 -1
  41. package/template/.cowork-flow/scripts/services/plan_readiness.py +139 -67
  42. package/template/.cowork-flow/spec/contracts/host-install-inspection.md +174 -0
  43. package/template/.cowork-flow/spec/contracts/index.md +1 -0
  44. package/template/.cowork-flow/spec/runtime/contract-registry.json +15 -0
  45. package/template/skills/runtime-health/scripts/doctor.py +538 -489
  46. package/template/skills/task-review/scripts/review_check.py +33 -6
@@ -30,6 +30,7 @@ from infra.git_snapshot import collect_changed_paths
30
30
  from infra.quality_sources import quality_source_entries
31
31
  from services.lifecycle_checks import LifecycleCheckRunner
32
32
  from services.task_context import TaskContextService
33
+ from services.task_repository import TaskRepository
33
34
  from runtime.session_state import is_main_session
34
35
 
35
36
 
@@ -78,10 +79,12 @@ def _repo_root() -> Path:
78
79
 
79
80
 
80
81
  def _task_dir(repo_root: Path, raw: str) -> Path:
81
- path = Path(raw)
82
- if not path.is_absolute():
83
- path = repo_root / path
84
- return path.resolve()
82
+ """Resolve a task name, workflow-relative path, or absolute path.
83
+
84
+ `task next` accepts all three forms; an advisory report that only
85
+ understood paths silently produced facts about a non-existent directory.
86
+ """
87
+ return TaskRepository(repo_root).resolve(raw)
85
88
 
86
89
 
87
90
  def _relative(repo_root: Path, path: Path) -> str:
@@ -596,7 +599,10 @@ def main(argv: list[str] | None = None) -> int:
596
599
  parser = argparse.ArgumentParser(
597
600
  description="Print advisory review facts for task-review.",
598
601
  )
599
- parser.add_argument("task_dir", help="Task directory to inspect.")
602
+ parser.add_argument(
603
+ "task_dir",
604
+ help="Task directory, repository-relative path, or task name to inspect.",
605
+ )
600
606
  parser.add_argument(
601
607
  "--json",
602
608
  action="store_true",
@@ -605,7 +611,28 @@ def main(argv: list[str] | None = None) -> int:
605
611
  args = parser.parse_args(argv)
606
612
 
607
613
  repo_root = _repo_root()
608
- report = build_report(repo_root, _task_dir(repo_root, args.task_dir))
614
+ task_dir = _task_dir(repo_root, args.task_dir)
615
+ if not (task_dir / "task.json").is_file():
616
+ print(
617
+ json.dumps(
618
+ {
619
+ "error": {
620
+ "code": "TASK-NOT-FOUND",
621
+ "task": args.task_dir,
622
+ "path": _relative(repo_root, task_dir),
623
+ "message": (
624
+ f"No task.json found for {args.task_dir!r}; "
625
+ "pass a task name, a repository-relative path, "
626
+ "or an absolute task directory."
627
+ ),
628
+ }
629
+ },
630
+ ensure_ascii=False,
631
+ indent=2,
632
+ )
633
+ )
634
+ return 2
635
+ report = build_report(repo_root, task_dir)
609
636
  print(json.dumps(report, ensure_ascii=False, indent=2, sort_keys=False))
610
637
  return 0
611
638