@bike4mind/cli 0.2.25-feat-cli-multi-agentic-workflow.18570 → 0.2.25-feat-cli-multi-agentic-workflow.18573

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.
@@ -2,6 +2,10 @@
2
2
 
3
3
  // src/store/index.ts
4
4
  import { create } from "zustand";
5
+ var ACTIVE_STATUSES = /* @__PURE__ */ new Set(["running", "queued"]);
6
+ function isActiveStatus(status) {
7
+ return ACTIVE_STATUSES.has(status);
8
+ }
5
9
  var useCliStore = create((set) => ({
6
10
  // Session state
7
11
  session: null,
@@ -84,9 +88,28 @@ var useCliStore = create((set) => ({
84
88
  return { backgroundAgents: updated };
85
89
  }
86
90
  return { backgroundAgents: [...state.backgroundAgents, job] };
87
- })
91
+ }),
92
+ cleanupCompletedBackgroundAgents: () => set((state) => ({
93
+ backgroundAgents: state.backgroundAgents.filter((j) => isActiveStatus(j.status))
94
+ })),
95
+ // Completed group notifications
96
+ completedGroupNotifications: [],
97
+ addCompletedGroupNotification: (notification, groupDescription) => set((state) => ({
98
+ completedGroupNotifications: [
99
+ ...state.completedGroupNotifications,
100
+ { notification, groupDescription, timestamp: Date.now() }
101
+ ]
102
+ })),
103
+ clearCompletedGroupNotifications: () => set({ completedGroupNotifications: [] }),
104
+ // Pending background trigger
105
+ pendingBackgroundTrigger: false,
106
+ setPendingBackgroundTrigger: (pending) => set({ pendingBackgroundTrigger: pending })
88
107
  }));
108
+ var selectActiveBackgroundAgents = (state) => state.backgroundAgents.filter((j) => isActiveStatus(j.status));
109
+ var selectCompletedBackgroundAgents = (state) => state.backgroundAgents.filter((j) => !isActiveStatus(j.status));
89
110
 
90
111
  export {
91
- useCliStore
112
+ useCliStore,
113
+ selectActiveBackgroundAgents,
114
+ selectCompletedBackgroundAgents
92
115
  };