@bike4mind/cli 0.2.25-feat-cli-multi-agentic-workflow.18573 → 0.2.25-fix-anthropic-overloaded-fallback.18535
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/dist/{chunk-TVW4ZESU.js → chunk-EIDW3VBS.js} +4 -51
- package/dist/index.js +194 -911
- package/dist/store-JNTO6SRG.js +7 -0
- package/package.json +6 -6
- package/dist/agents/defaults/test.md +0 -56
- package/dist/store-FU6NDC2W.js +0 -11
|
@@ -2,10 +2,6 @@
|
|
|
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
|
-
}
|
|
9
5
|
var useCliStore = create((set) => ({
|
|
10
6
|
// Session state
|
|
11
7
|
session: null,
|
|
@@ -50,22 +46,9 @@ var useCliStore = create((set) => ({
|
|
|
50
46
|
inputValue: "",
|
|
51
47
|
setInputValue: (value) => set({ inputValue: value }),
|
|
52
48
|
clearInput: () => set({ inputValue: "" }),
|
|
53
|
-
// Permission prompt
|
|
49
|
+
// Permission prompt
|
|
54
50
|
permissionPrompt: null,
|
|
55
|
-
|
|
56
|
-
enqueuePermissionPrompt: (prompt) => set((state) => {
|
|
57
|
-
if (!state.permissionPrompt) {
|
|
58
|
-
return { permissionPrompt: prompt };
|
|
59
|
-
}
|
|
60
|
-
return { permissionQueue: [...state.permissionQueue, prompt] };
|
|
61
|
-
}),
|
|
62
|
-
dequeuePermissionPrompt: () => set((state) => {
|
|
63
|
-
const [next, ...rest] = state.permissionQueue;
|
|
64
|
-
return {
|
|
65
|
-
permissionPrompt: next ?? null,
|
|
66
|
-
permissionQueue: rest
|
|
67
|
-
};
|
|
68
|
-
}),
|
|
51
|
+
setPermissionPrompt: (prompt) => set({ permissionPrompt: prompt }),
|
|
69
52
|
// Config editor
|
|
70
53
|
showConfigEditor: false,
|
|
71
54
|
setShowConfigEditor: (show) => set({ showConfigEditor: show }),
|
|
@@ -77,39 +60,9 @@ var useCliStore = create((set) => ({
|
|
|
77
60
|
toggleAutoAcceptEdits: () => set((state) => ({ autoAcceptEdits: !state.autoAcceptEdits })),
|
|
78
61
|
// Exit handling
|
|
79
62
|
exitRequested: false,
|
|
80
|
-
setExitRequested: (requested) => set({ exitRequested: requested })
|
|
81
|
-
// Background agents
|
|
82
|
-
backgroundAgents: [],
|
|
83
|
-
upsertBackgroundAgent: (job) => set((state) => {
|
|
84
|
-
const existing = state.backgroundAgents.findIndex((j) => j.id === job.id);
|
|
85
|
-
if (existing >= 0) {
|
|
86
|
-
const updated = [...state.backgroundAgents];
|
|
87
|
-
updated[existing] = job;
|
|
88
|
-
return { backgroundAgents: updated };
|
|
89
|
-
}
|
|
90
|
-
return { backgroundAgents: [...state.backgroundAgents, job] };
|
|
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 })
|
|
63
|
+
setExitRequested: (requested) => set({ exitRequested: requested })
|
|
107
64
|
}));
|
|
108
|
-
var selectActiveBackgroundAgents = (state) => state.backgroundAgents.filter((j) => isActiveStatus(j.status));
|
|
109
|
-
var selectCompletedBackgroundAgents = (state) => state.backgroundAgents.filter((j) => !isActiveStatus(j.status));
|
|
110
65
|
|
|
111
66
|
export {
|
|
112
|
-
useCliStore
|
|
113
|
-
selectActiveBackgroundAgents,
|
|
114
|
-
selectCompletedBackgroundAgents
|
|
67
|
+
useCliStore
|
|
115
68
|
};
|