@gotgenes/pi-subagents 11.2.0 → 11.3.0

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.
@@ -1,45 +0,0 @@
1
- /**
2
- * worktree-state.ts — WorktreeState: lifecycle-phase object for worktree-isolated agents.
3
- *
4
- * Constructed once when the worktree is set up (before the run begins).
5
- * Only exists for agents with isolation: "worktree".
6
- * cleanupResult is recorded once at completion or error — it is not set at construction.
7
- */
8
-
9
- import type { WorktreeCleanupResult, WorktreeInfo, WorktreeManager } from "#src/lifecycle/worktree";
10
-
11
- export type { WorktreeCleanupResult, WorktreeInfo };
12
-
13
- export class WorktreeState {
14
- /** Absolute path to the worktree directory. */
15
- readonly path: string;
16
- /** Branch name created for this worktree. */
17
- readonly branch: string;
18
-
19
- private _cleanupResult?: WorktreeCleanupResult;
20
-
21
- constructor(info: WorktreeInfo) {
22
- this.path = info.path;
23
- this.branch = info.branch;
24
- }
25
-
26
- /** Result of the worktree cleanup — undefined until recordCleanup is called. */
27
- get cleanupResult(): WorktreeCleanupResult | undefined {
28
- return this._cleanupResult;
29
- }
30
-
31
- /** Record the cleanup result. Called once on agent completion or error. */
32
- recordCleanup(result: WorktreeCleanupResult): void {
33
- this._cleanupResult = result;
34
- }
35
-
36
- /**
37
- * Perform worktree cleanup and record the result.
38
- * Tell-Don't-Ask: callers no longer need to orchestrate cleanup + recordCleanup separately.
39
- */
40
- performCleanup(worktrees: WorktreeManager, description: string): WorktreeCleanupResult {
41
- const result = worktrees.cleanup(this, description);
42
- this._cleanupResult = result;
43
- return result;
44
- }
45
- }