claudehq 1.0.2 → 1.0.5
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/lib/core/claude-events.js +2 -1
- package/lib/core/config.js +39 -1
- package/lib/data/orchestration.js +941 -0
- package/lib/index.js +211 -23
- package/lib/orchestration/executor.js +635 -0
- package/lib/routes/orchestration.js +417 -0
- package/lib/routes/spawner.js +335 -0
- package/lib/sessions/manager.js +36 -9
- package/lib/spawner/index.js +51 -0
- package/lib/spawner/path-validator.js +366 -0
- package/lib/spawner/projects-manager.js +421 -0
- package/lib/spawner/session-spawner.js +1010 -0
- package/package.json +1 -1
- package/public/index.html +399 -18
- package/lib/server.js +0 -9364
|
@@ -175,12 +175,13 @@ function loadEventsFromFile() {
|
|
|
175
175
|
console.log(` Loaded ${claudeEvents.length} Claude events from: ${EVENTS_FILE}`);
|
|
176
176
|
|
|
177
177
|
// Discover sessions from loaded events (process unique session IDs)
|
|
178
|
+
// Pass skipAutoUnhide: true to prevent unhiding sessions during initialization
|
|
178
179
|
if (sessionUpdateCallback) {
|
|
179
180
|
const sessionIds = new Set();
|
|
180
181
|
for (const event of claudeEvents) {
|
|
181
182
|
if (event.sessionId && !sessionIds.has(event.sessionId)) {
|
|
182
183
|
sessionIds.add(event.sessionId);
|
|
183
|
-
sessionUpdateCallback(event);
|
|
184
|
+
sessionUpdateCallback(event, { skipAutoUnhide: true });
|
|
184
185
|
}
|
|
185
186
|
}
|
|
186
187
|
}
|
package/lib/core/config.js
CHANGED
|
@@ -45,6 +45,36 @@ const EVENT_DEBOUNCE_DELAY = 100; // 100ms
|
|
|
45
45
|
const MAX_EVENTS_IN_MEMORY = 1000;
|
|
46
46
|
const MAX_EVENTS_TO_BROADCAST = 500;
|
|
47
47
|
|
|
48
|
+
// Orchestration directories and status
|
|
49
|
+
const ORCHESTRATIONS_DIR = path.join(EVENTS_DIR, 'orchestrations');
|
|
50
|
+
|
|
51
|
+
// Agent status constants
|
|
52
|
+
const AGENT_STATUS = {
|
|
53
|
+
PENDING: 'pending',
|
|
54
|
+
SPAWNING: 'spawning',
|
|
55
|
+
RUNNING: 'running',
|
|
56
|
+
WAITING: 'waiting',
|
|
57
|
+
COMPLETED: 'completed',
|
|
58
|
+
FAILED: 'failed',
|
|
59
|
+
CANCELLED: 'cancelled'
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// Orchestration status constants
|
|
63
|
+
const ORCHESTRATION_STATUS = {
|
|
64
|
+
DRAFT: 'draft',
|
|
65
|
+
RUNNING: 'running',
|
|
66
|
+
COMPLETED: 'completed',
|
|
67
|
+
FAILED: 'failed',
|
|
68
|
+
PAUSED: 'paused'
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// Spawner configuration
|
|
72
|
+
const SPAWNER_CONFIG = {
|
|
73
|
+
SESSION_PREFIX: 'tasks-board',
|
|
74
|
+
MAX_TRACKED_PROJECTS: 100,
|
|
75
|
+
MAX_AUTOCOMPLETE_RESULTS: 15
|
|
76
|
+
};
|
|
77
|
+
|
|
48
78
|
module.exports = {
|
|
49
79
|
// Directories
|
|
50
80
|
CLAUDE_DIR,
|
|
@@ -75,5 +105,13 @@ module.exports = {
|
|
|
75
105
|
|
|
76
106
|
// Limits
|
|
77
107
|
MAX_EVENTS_IN_MEMORY,
|
|
78
|
-
MAX_EVENTS_TO_BROADCAST
|
|
108
|
+
MAX_EVENTS_TO_BROADCAST,
|
|
109
|
+
|
|
110
|
+
// Orchestration
|
|
111
|
+
ORCHESTRATIONS_DIR,
|
|
112
|
+
AGENT_STATUS,
|
|
113
|
+
ORCHESTRATION_STATUS,
|
|
114
|
+
|
|
115
|
+
// Spawner
|
|
116
|
+
SPAWNER_CONFIG
|
|
79
117
|
};
|