@brainervirus/workit-core 8.15.0 → 8.15.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-core",
3
- "version": "8.15.0",
3
+ "version": "8.15.1",
4
4
  "private": false,
5
5
  "description": "Workit shared core — task, policy, evidence, review, decision, worker, and writer state for agentic coding workflows",
6
6
  "keywords": [
@@ -51,3 +51,12 @@ export const workerBlocksTransition = (
51
51
  transition: "pause" | "resume" | "revise" | "close",
52
52
  state: WorkerState,
53
53
  ): boolean => (transition === "pause" ? false : isUncertainWorker(state));
54
+
55
+ /**
56
+ * A worker may be continued in its own session only while it holds live
57
+ * state: a running process, or uncommitted changes in its worktree. A worker
58
+ * that reported and is clean is continued by a fresh worker on the same
59
+ * slice. An unreadable worktree counts as no live state.
60
+ */
61
+ export const holdsLiveState = (state: WorkerState, dirty: boolean | null): boolean =>
62
+ state === "running" || dirty === true;