flower-trellis 0.5.0-beta.3 → 0.5.0-beta.4

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.
@@ -0,0 +1,28 @@
1
+ def clear_active_task(
2
+ repo_root: Path,
3
+ platform_input: dict[str, Any] | None = None,
4
+ platform: str | None = None,
5
+ ) -> ActiveTask:
6
+ """Clear the active task for the current or sole fallback session.
7
+
8
+ Args:
9
+ repo_root: Repository root.
10
+ platform_input: Platform hook input.
11
+ platform: Explicit platform name.
12
+
13
+ Returns:
14
+ The resolved task before cleanup, or an empty task when no session is safe to select.
15
+ """
16
+ context_key = resolve_context_key(platform_input, platform)
17
+ previous = resolve_active_task(repo_root, platform_input, platform)
18
+
19
+ # Fallback resolution is safe only when the runtime contains exactly one session file.
20
+ if previous.source_type == "session-fallback" and previous.context_key:
21
+ context_key = previous.context_key
22
+ if not context_key:
23
+ return ActiveTask(None, "none")
24
+
25
+ context_path = _context_path(repo_root, context_key)
26
+ if context_path.is_file():
27
+ _remove_file(context_path)
28
+ return previous
@@ -0,0 +1,15 @@
1
+ def clear_active_task(
2
+ repo_root: Path,
3
+ platform_input: dict[str, Any] | None = None,
4
+ platform: str | None = None,
5
+ ) -> ActiveTask:
6
+ """Clear the active task by deleting the current session context file."""
7
+ context_key = resolve_context_key(platform_input, platform)
8
+ if not context_key:
9
+ return ActiveTask(None, "none")
10
+
11
+ previous = resolve_active_task(repo_root, platform_input, platform)
12
+ context_path = _context_path(repo_root, context_key)
13
+ if context_path.is_file():
14
+ _remove_file(context_path)
15
+ return previous
@@ -2,13 +2,27 @@
2
2
  "schemaVersion": 2,
3
3
  "id": "workflow-state-missing-task",
4
4
  "purpose": "workflow_state",
5
- "operations": [{
6
- "id": "workflow-state-missing-task",
7
- "operation": "insert",
8
- "position": "after",
9
- "targets": [{ "kind": "workflow", "path": ".trellis/workflow.md", "missing": "error" }],
10
- "selector": { "type": "literal", "source": "selector.md" },
11
- "content": { "source": "content.md" },
12
- "legacyMarkers": [{ "namespace": "patch", "id": "workflow-state-stale-task" }]
13
- }]
5
+ "operations": [
6
+ {
7
+ "id": "workflow-state-missing-task",
8
+ "operation": "insert",
9
+ "position": "after",
10
+ "targets": [{ "kind": "workflow", "path": ".trellis/workflow.md", "missing": "error" }],
11
+ "selector": { "type": "literal", "source": "selector.md" },
12
+ "content": { "source": "content.md" },
13
+ "legacyMarkers": [{ "namespace": "patch", "id": "workflow-state-stale-task" }]
14
+ },
15
+ {
16
+ "id": "active-task-clear-session-fallback",
17
+ "operation": "replace",
18
+ "targets": [{
19
+ "kind": "file",
20
+ "path": ".trellis/scripts/common/active_task.py",
21
+ "missing": "error",
22
+ "markerStyle": "hash"
23
+ }],
24
+ "selector": { "type": "literal", "source": "active-task-clear-fallback-selector.py" },
25
+ "content": { "source": "active-task-clear-fallback-content.py" }
26
+ }
27
+ ]
14
28
  }
@@ -1,7 +1,7 @@
1
1
  {
2
- "syncedAt": "2026-07-19T18:42:57.187Z",
2
+ "syncedAt": "2026-07-20T00:48:18.573Z",
3
3
  "syncedFrom": "vendor/skill-garden",
4
- "sourceCommit": "ea9117c62f620fab7a78d94b5e8e7f1582de1488",
4
+ "sourceCommit": "6ff1dcbcfa9164ab7239374af1071fffe648437e",
5
5
  "common": {
6
6
  "codexSkills": [
7
7
  "craft-rpa",
@@ -202,6 +202,8 @@
202
202
  "workflow/runtime-contract-reference/runtime-reference-selector.md",
203
203
  "workflow/runtime-contract-reference/state-contract-comment-content.md",
204
204
  "workflow/runtime-contract-reference/state-contract-comment-selector.md",
205
+ "workflow/state-missing-task/active-task-clear-fallback-content.py",
206
+ "workflow/state-missing-task/active-task-clear-fallback-selector.py",
205
207
  "workflow/state-missing-task/content.md",
206
208
  "workflow/state-missing-task/patch.json",
207
209
  "workflow/state-missing-task/selector.md",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flower-trellis",
3
- "version": "0.5.0-beta.3",
3
+ "version": "0.5.0-beta.4",
4
4
  "description": "一键安装/升级 Trellis 并自动融合 skill-garden 强化包(默认 Claude + agents)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -61,9 +61,9 @@
61
61
  "commit-and-tag-version": "^12.7.3"
62
62
  },
63
63
  "flowerReleaseNotes": {
64
- "version": "0.5.0-beta.3",
64
+ "version": "0.5.0-beta.4",
65
65
  "source": "CHANGELOG.md",
66
- "body": "### 🐛 修复 Bug Fixes\n\n* **enhancements:** 同步 missing_task 意图恢复 ([e1fae6d](https://github.com/SilentFlower/flower-trellis/commit/e1fae6d1adab0440371062b7f35316602d147c5e))\n\n\n### 🧰 维护 Maintenance\n\n* **trellis:** 同步项目 Flower 版本状态到 0.5.0-beta.2 ([855fc39](https://github.com/SilentFlower/flower-trellis/commit/855fc392eaa82cc15146a897d010bdc3a8dfbb93))",
66
+ "body": "### 🐛 修复 Bug Fixes\n\n* **enhancements:** 补齐 session fallback 清理 ([b3884cb](https://github.com/SilentFlower/flower-trellis/commit/b3884cb9e3fac25ef504bbee722333f2d3d98c0e))",
67
67
  "truncated": false
68
68
  }
69
69
  }