@locusai/sdk 0.4.11 → 0.4.12
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/index-node.js +4 -12
- package/dist/orchestrator.d.ts +0 -4
- package/dist/orchestrator.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index-node.js
CHANGED
|
@@ -1317,6 +1317,7 @@ module.exports = __toCommonJS(exports_index_node);
|
|
|
1317
1317
|
var import_node_child_process2 = require("node:child_process");
|
|
1318
1318
|
var import_node_fs4 = require("node:fs");
|
|
1319
1319
|
var import_node_path4 = require("node:path");
|
|
1320
|
+
var import_node_url = require("node:url");
|
|
1320
1321
|
var import_shared3 = require("@locusai/shared");
|
|
1321
1322
|
var import_events3 = require("events");
|
|
1322
1323
|
class AgentOrchestrator extends import_events3.EventEmitter {
|
|
@@ -1396,16 +1397,6 @@ ${c.primary("\uD83E\uDD16 Locus Agent Orchestrator")}`);
|
|
|
1396
1397
|
console.log(`
|
|
1397
1398
|
${c.success("✅ Orchestrator finished")}`);
|
|
1398
1399
|
}
|
|
1399
|
-
findPackageRoot(startPath) {
|
|
1400
|
-
let currentDir = startPath;
|
|
1401
|
-
while (currentDir !== "/") {
|
|
1402
|
-
if (import_node_fs4.existsSync(import_node_path4.join(currentDir, "package.json"))) {
|
|
1403
|
-
return currentDir;
|
|
1404
|
-
}
|
|
1405
|
-
currentDir = import_node_path4.dirname(currentDir);
|
|
1406
|
-
}
|
|
1407
|
-
return startPath;
|
|
1408
|
-
}
|
|
1409
1400
|
async spawnAgent() {
|
|
1410
1401
|
const agentId = `agent-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
|
|
1411
1402
|
const agentState = {
|
|
@@ -1420,8 +1411,9 @@ ${c.success("✅ Orchestrator finished")}`);
|
|
|
1420
1411
|
console.log(`${c.primary("\uD83D\uDE80 Agent started:")} ${c.bold(agentId)}
|
|
1421
1412
|
`);
|
|
1422
1413
|
const potentialPaths = [];
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1414
|
+
const currentModulePath = import_node_url.fileURLToPath("file:///home/runner/work/locusai/locusai/packages/sdk/src/orchestrator.ts");
|
|
1415
|
+
const currentModuleDir = import_node_path4.dirname(currentModulePath);
|
|
1416
|
+
potentialPaths.push(import_node_path4.join(currentModuleDir, "agent", "worker.js"), import_node_path4.join(currentModuleDir, "worker.js"));
|
|
1425
1417
|
const workerPath = potentialPaths.find((p) => import_node_fs4.existsSync(p));
|
|
1426
1418
|
if (!workerPath) {
|
|
1427
1419
|
throw new Error(`Worker file not found. Checked: ${potentialPaths.join(", ")}. ` + `Make sure the SDK is properly built and installed.`);
|
package/dist/orchestrator.d.ts
CHANGED
|
@@ -44,10 +44,6 @@ export declare class AgentOrchestrator extends EventEmitter {
|
|
|
44
44
|
* Main orchestration loop - runs 1 agent continuously
|
|
45
45
|
*/
|
|
46
46
|
private orchestrationLoop;
|
|
47
|
-
/**
|
|
48
|
-
* Find the package root by looking for package.json
|
|
49
|
-
*/
|
|
50
|
-
private findPackageRoot;
|
|
51
47
|
/**
|
|
52
48
|
* Spawn a single agent process
|
|
53
49
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAS,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../src/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAS,MAAM,oBAAoB,CAAC;AAIzD,OAAO,EAAE,IAAI,EAA4B,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAItC,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM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,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC;IAyBhB;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAM3B;;OAEG;YACW,OAAO;IAWrB;;OAEG;IACH,QAAQ;;;;;;IAeR,OAAO,CAAC,KAAK;CAGd"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.12",
|
|
4
4
|
"main": "./src/index.ts",
|
|
5
5
|
"types": "./src/index.ts",
|
|
6
6
|
"exports": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@anthropic-ai/sdk": "^0.71.2",
|
|
32
|
-
"@locusai/shared": "^0.4.
|
|
32
|
+
"@locusai/shared": "^0.4.12",
|
|
33
33
|
"axios": "^1.13.2",
|
|
34
34
|
"events": "^3.3.0",
|
|
35
35
|
"globby": "^14.0.2"
|