@omercnet/paseo-agent-crew 0.3.0-next.137.1 → 0.3.0-next.146.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/README.md CHANGED
@@ -129,7 +129,7 @@ bun run test:coverage
129
129
  bun run typecheck
130
130
  ```
131
131
 
132
- The manifest supports Paseo `>=0.8.0 <0.10.0`. The project pins `@getpaseo/cli`, `@getpaseo/client`,
132
+ The manifest requires Paseo `^0.9.0`. The project pins `@getpaseo/cli`, `@getpaseo/client`,
133
133
  `@getpaseo/plugin`, and `@getpaseo/protocol` to `0.9.0` for development. React 19.1 and
134
134
  React Native 0.81 match the host.
135
135
 
package/client/crew.ts CHANGED
@@ -6,11 +6,46 @@ export type AgentEntry = Awaited<ReturnType<PaseoApi["agents"]["list"]>>["entrie
6
6
  type AgentSnapshot = AgentEntry["agent"];
7
7
 
8
8
  export function listenToCrewDirectory(paseo: PaseoApi, invalidate: () => void): () => void {
9
- const unsubscribeAgents = paseo.agents.subscribe(invalidate);
10
- const unsubscribeWorkspaces = paseo.workspaces.subscribe(invalidate);
9
+ let closed = false;
10
+ let removeAgentObserver: (() => void) | undefined;
11
+ let removeWorkspaceObserver: (() => void) | undefined;
12
+ let releaseAgentSubscription: (() => Promise<void>) | undefined;
13
+ let releaseWorkspaceSubscription: (() => Promise<void>) | undefined;
14
+
15
+ void paseo.agents
16
+ .list({ subscribe: {} })
17
+ .then(({ subscription }) => {
18
+ if (closed) return subscription.release();
19
+ releaseAgentSubscription = () => subscription.release();
20
+ removeAgentObserver = subscription.subscribe({
21
+ snapshot: invalidate,
22
+ update: invalidate,
23
+ });
24
+ })
25
+ .catch((error: unknown) => {
26
+ if (!closed) console.error("Agent Crew agent observation failed", error);
27
+ });
28
+
29
+ void paseo.workspaces
30
+ .list({ subscribe: {} })
31
+ .then(({ subscription }) => {
32
+ if (closed) return subscription.release();
33
+ releaseWorkspaceSubscription = () => subscription.release();
34
+ removeWorkspaceObserver = subscription.subscribe({
35
+ snapshot: invalidate,
36
+ update: invalidate,
37
+ });
38
+ })
39
+ .catch((error: unknown) => {
40
+ if (!closed) console.error("Agent Crew workspace observation failed", error);
41
+ });
42
+
11
43
  return () => {
12
- unsubscribeAgents();
13
- unsubscribeWorkspaces();
44
+ closed = true;
45
+ removeAgentObserver?.();
46
+ removeWorkspaceObserver?.();
47
+ void releaseAgentSubscription?.();
48
+ void releaseWorkspaceSubscription?.();
14
49
  };
15
50
  }
16
51
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omercnet/paseo-agent-crew",
3
- "version": "0.3.0-next.137.1",
3
+ "version": "0.3.0-next.146.1",
4
4
  "type": "module",
5
5
  "description": "A Paseo Explorer panel for visualizing and controlling every managed agent crew in a workspace.",
6
6
  "license": "MIT",
package/paseo-plugin.json CHANGED
@@ -1,6 +1,5 @@
1
1
  {
2
2
  "id": "agent-crew",
3
- "requirements": {
4
- "paseo": ">=0.8.0 <0.10.0"
5
- }
3
+ "description": "A Paseo Explorer panel for visualizing and controlling every managed agent crew in a workspace.",
4
+ "requirements": { "paseo": "^0.9.0" }
6
5
  }