claude-flow 1.0.54 → 1.0.55
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
CHANGED
package/src/cli/simple-cli.js
CHANGED
|
@@ -3,8 +3,20 @@
|
|
|
3
3
|
* Actual swarm executor that creates files
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
import
|
|
6
|
+
// Node.js compatible imports
|
|
7
|
+
import fs from 'fs';
|
|
8
|
+
import path from 'path';
|
|
9
|
+
|
|
10
|
+
// Polyfill for Deno's ensureDir using Node.js fs
|
|
11
|
+
async function ensureDir(dirPath) {
|
|
12
|
+
try {
|
|
13
|
+
await fs.promises.mkdir(dirPath, { recursive: true });
|
|
14
|
+
} catch (error) {
|
|
15
|
+
if (error.code !== 'EEXIST') throw error;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const join = path.join;
|
|
8
20
|
|
|
9
21
|
export async function executeSwarm(objective, options = {}) {
|
|
10
22
|
const swarmId = `swarm_${Math.random().toString(36).substring(2, 11)}_${Math.random().toString(36).substring(2, 11)}`;
|