@gotgenes/pi-subagents 11.4.0 → 11.6.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.
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  import type { ParentSnapshot } from "#src/lifecycle/parent-snapshot";
9
+ import type { WorkspaceProvider } from "#src/lifecycle/workspace";
9
10
  import type { SpawnOptions, SubagentRecord, SubagentsService } from "#src/service/service";
10
11
  import type { ModelRegistry } from "#src/session/model-resolver";
11
12
  import type { Agent, SessionContext } from "#src/types";
@@ -18,6 +19,7 @@ export interface AgentManagerLike {
18
19
  abort(id: string): boolean;
19
20
  waitForAll(): Promise<void>;
20
21
  hasRunning(): boolean;
22
+ registerWorkspaceProvider(provider: WorkspaceProvider): () => void;
21
23
  }
22
24
 
23
25
  /**
@@ -107,6 +109,10 @@ export class SubagentsServiceAdapter implements SubagentsService {
107
109
  hasRunning(): boolean {
108
110
  return this.manager.hasRunning();
109
111
  }
112
+
113
+ registerWorkspaceProvider(provider: WorkspaceProvider): () => void {
114
+ return this.manager.registerWorkspaceProvider(provider);
115
+ }
110
116
  }
111
117
 
112
118
  /**
@@ -10,8 +10,13 @@
10
10
  */
11
11
 
12
12
  import type { LifetimeUsage } from "#src/lifecycle/usage";
13
+ import type { WorkspaceProvider } from "#src/lifecycle/workspace";
13
14
 
14
- export type { LifetimeUsage };
15
+ // Generative extension seam (ADR 0002, Phase 16 Step 2). Only the provider
16
+ // entry-point type is re-exported here; a consumer assigning to
17
+ // `WorkspaceProvider` gets `Workspace` and the context types via inference.
18
+ // The worktrees package (#263) adds named re-exports when it imports them.
19
+ export type { LifetimeUsage, WorkspaceProvider };
15
20
 
16
21
  export type SubagentStatus =
17
22
  | "queued"
@@ -73,6 +78,13 @@ export interface SubagentsService {
73
78
 
74
79
  /** Whether any agents are running or queued. */
75
80
  hasRunning(): boolean;
81
+
82
+ /**
83
+ * Register the single workspace provider that supplies a child's working
84
+ * directory plus bracketed setup/teardown. Throws if one is already
85
+ * registered. Returns a disposer that unregisters the provider.
86
+ */
87
+ registerWorkspaceProvider(provider: WorkspaceProvider): () => void;
76
88
  }
77
89
 
78
90
  /** Event channel constants for pi.events subscriptions. */