pixelcrew 0.2.1 → 0.2.3
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/package.json +1 -1
- package/src/orchestrator/code-generator.js +994 -0
- package/src/orchestrator/engine.js +123 -6
- package/src/orchestrator/oneshot.js +80 -1230
- package/src/orchestrator/planner.js +329 -0
- package/src/orchestrator/skills-registry.js +194 -0
- package/src/orchestrator/task-queue.js +128 -0
- package/src/scaffold/init.js +5 -5
- package/src/server/server.js +19 -6
package/src/server/server.js
CHANGED
|
@@ -4,9 +4,17 @@ import fsSync from 'node:fs';
|
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
|
|
7
|
-
export function createServer(
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export function createServer(engineOrRootDir, maybeEngine, options = {}) {
|
|
8
|
+
let engine = engineOrRootDir;
|
|
9
|
+
let rootDir = engine?.rootDir || process.cwd();
|
|
10
|
+
|
|
11
|
+
if (typeof engineOrRootDir === 'string') {
|
|
12
|
+
rootDir = engineOrRootDir;
|
|
13
|
+
engine = maybeEngine;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const dashboardDir = path.join(rootDir, '.pixel-agents', 'dashboard');
|
|
17
|
+
const legacyDashboardDir = path.join(rootDir, '.pixel-dashboard');
|
|
10
18
|
const fallbackDashboardDir = fileURLToPath(new URL('../dashboard', import.meta.url));
|
|
11
19
|
|
|
12
20
|
const sseClients = new Set();
|
|
@@ -233,9 +241,14 @@ export function createServer(engine, options = {}) {
|
|
|
233
241
|
try {
|
|
234
242
|
await fs.access(filePath);
|
|
235
243
|
} catch {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
244
|
+
filePath = path.join(legacyDashboardDir, filename);
|
|
245
|
+
try {
|
|
246
|
+
await fs.access(filePath);
|
|
247
|
+
} catch {
|
|
248
|
+
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
249
|
+
res.end('404 Not Found');
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
239
252
|
}
|
|
240
253
|
}
|
|
241
254
|
|