@elizaos/plugin-agent-orchestrator 2.0.0-alpha.8 → 2.0.0-alpha.9

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.js CHANGED
@@ -2387,7 +2387,7 @@ import {
2387
2387
  Service
2388
2388
  } from "@elizaos/core";
2389
2389
 
2390
- // ../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist-node/stringify.js
2390
+ // node_modules/uuid/dist-node/stringify.js
2391
2391
  var byteToHex = [];
2392
2392
  for (let i = 0;i < 256; ++i) {
2393
2393
  byteToHex.push((i + 256).toString(16).slice(1));
@@ -2396,7 +2396,7 @@ function unsafeStringify(arr, offset = 0) {
2396
2396
  return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
2397
2397
  }
2398
2398
 
2399
- // ../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist-node/rng.js
2399
+ // node_modules/uuid/dist-node/rng.js
2400
2400
  import { randomFillSync } from "node:crypto";
2401
2401
  var rnds8Pool = new Uint8Array(256);
2402
2402
  var poolPtr = rnds8Pool.length;
@@ -2408,11 +2408,11 @@ function rng() {
2408
2408
  return rnds8Pool.slice(poolPtr, poolPtr += 16);
2409
2409
  }
2410
2410
 
2411
- // ../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist-node/native.js
2411
+ // node_modules/uuid/dist-node/native.js
2412
2412
  import { randomUUID } from "node:crypto";
2413
2413
  var native_default = { randomUUID };
2414
2414
 
2415
- // ../../../node_modules/.pnpm/uuid@13.0.0/node_modules/uuid/dist-node/v4.js
2415
+ // node_modules/uuid/dist-node/v4.js
2416
2416
  function _v4(options, buf, offset) {
2417
2417
  options = options || {};
2418
2418
  const rnds = options.random ?? options.rng?.() ?? rng();
@@ -20787,11 +20787,19 @@ function redactSensitiveText3(text) {
20787
20787
  }
20788
20788
 
20789
20789
  // src/sub-agents/registry.ts
20790
- var SweAgentSubAgent2 = null;
20791
- try {
20792
- const sweagentModule = await Promise.resolve().then(() => (init_sweagent_sub_agent(), exports_sweagent_sub_agent));
20793
- SweAgentSubAgent2 = sweagentModule.SweAgentSubAgent;
20794
- } catch {}
20790
+ var _SweAgentSubAgent = undefined;
20791
+ async function getSweAgentSubAgent() {
20792
+ if (_SweAgentSubAgent !== undefined) {
20793
+ return _SweAgentSubAgent;
20794
+ }
20795
+ try {
20796
+ const sweagentModule = await Promise.resolve().then(() => (init_sweagent_sub_agent(), exports_sweagent_sub_agent));
20797
+ _SweAgentSubAgent = sweagentModule.SweAgentSubAgent;
20798
+ } catch {
20799
+ _SweAgentSubAgent = null;
20800
+ }
20801
+ return _SweAgentSubAgent;
20802
+ }
20795
20803
  var CLAUDE_CODE_PROMPT_TEMPLATE = `You are a Claude Code–style coding worker. Execute tasks using these tools:
20796
20804
 
20797
20805
  AVAILABLE TOOLS:
@@ -20835,7 +20843,7 @@ Working directory: {cwd}`;
20835
20843
  function normalizeType(type) {
20836
20844
  return type === "claude" ? "claude-code" : type;
20837
20845
  }
20838
- function createSubAgent(type) {
20846
+ async function createSubAgent(type) {
20839
20847
  const useSdkWorkers = process.env.ELIZA_CODE_USE_SDK_WORKERS !== "0";
20840
20848
  switch (normalizeType(type)) {
20841
20849
  case "eliza":
@@ -20857,11 +20865,13 @@ function createSubAgent(type) {
20857
20865
  });
20858
20866
  case "opencode":
20859
20867
  return new OpenCodeSubAgent;
20860
- case "sweagent":
20868
+ case "sweagent": {
20869
+ const SweAgentSubAgent2 = await getSweAgentSubAgent();
20861
20870
  if (!SweAgentSubAgent2) {
20862
20871
  throw new Error("SweAgent is not available - @elizaos/sweagent-root package not installed");
20863
20872
  }
20864
20873
  return new SweAgentSubAgent2;
20874
+ }
20865
20875
  case "elizaos-native":
20866
20876
  return new ElizaOSNativeSubAgent;
20867
20877
  default:
@@ -20923,7 +20933,7 @@ var createSubAgentProvider = (runtime, id, type, label) => {
20923
20933
  id,
20924
20934
  label,
20925
20935
  executeTask: async (task, ctx) => {
20926
- const subAgent = createSubAgent(type);
20936
+ const subAgent = await createSubAgent(type);
20927
20937
  const tools = createTools(ctx.workingDirectory);
20928
20938
  return subAgent.execute(toCodeTask(task), {
20929
20939
  runtime,
@@ -21107,4 +21117,4 @@ export {
21107
21117
  AgentOrchestratorService
21108
21118
  };
21109
21119
 
21110
- //# debugId=50986580F51FCE4464756E2164756E21
21120
+ //# debugId=929FDB9B2DCD003864756E2164756E21