orchajs 0.27.2 → 0.27.4

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.
@@ -88,24 +88,38 @@ async function runTests(orcha, options = {}) {
88
88
  const store = createStore(manifest);
89
89
  const activeSessions = /* @__PURE__ */ new Set();
90
90
  const sessionControls = /* @__PURE__ */ new Map();
91
- const subagents = Object.fromEntries(
92
- Object.entries(manifest.subagents ?? {}).map(
93
- ([name, subagentManifest]) => [
94
- name,
95
- new import_agent.RuntimeAgent({
96
- manifest: subagentManifest,
97
- configuration: context.configuration,
98
- store: createStore(subagentManifest),
99
- activeSessions,
100
- sessionControls,
101
- generateProviderResponse: context.generateProviderResponse,
102
- delegatedOnly: true,
103
- sessionIdPrefix: "ses_test_",
104
- projectRoot: context.projectRoot
105
- })
106
- ]
91
+ const createTestSubagents = (parentManifest, ancestry) => Object.fromEntries(
92
+ Object.entries(parentManifest.subagents ?? {}).map(
93
+ ([name, subagentManifest]) => {
94
+ if (ancestry.has(name)) {
95
+ throw new Error(
96
+ `Circular subagent registration detected: ${[...ancestry, name].join(" -> ")}.`
97
+ );
98
+ }
99
+ const nextAncestry = new Set(ancestry);
100
+ nextAncestry.add(name);
101
+ return [
102
+ name,
103
+ new import_agent.RuntimeAgent({
104
+ manifest: subagentManifest,
105
+ configuration: context.configuration,
106
+ store: createStore(subagentManifest),
107
+ activeSessions,
108
+ sessionControls,
109
+ generateProviderResponse: context.generateProviderResponse,
110
+ subagents: createTestSubagents(subagentManifest, nextAncestry),
111
+ delegatedOnly: true,
112
+ sessionIdPrefix: "ses_test_",
113
+ projectRoot: context.projectRoot
114
+ })
115
+ ];
116
+ }
107
117
  )
108
118
  );
119
+ const subagents = createTestSubagents(
120
+ manifest,
121
+ /* @__PURE__ */ new Set([manifest.key ?? manifest.name])
122
+ );
109
123
  const agent = new import_agent.RuntimeAgent({
110
124
  manifest: withTestActions(
111
125
  manifest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "orchajs",
3
- "version": "0.27.2",
3
+ "version": "0.27.4",
4
4
  "description": "A filesystem-convention, stateful agent framework for JavaScript.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -24,6 +24,7 @@
24
24
  ".": {
25
25
  "types": "./dist/index.d.ts",
26
26
  "react-native": "./dist/react-native.js",
27
+ "edge-light": "./dist/browser.js",
27
28
  "browser": "./dist/browser.js",
28
29
  "import": "./dist/index.js",
29
30
  "require": "./dist-cjs/index.js"
@@ -67,6 +68,31 @@
67
68
  "types": "./dist/integrations/expo.d.ts",
68
69
  "import": "./dist/integrations/expo.js",
69
70
  "require": "./dist-cjs/integrations/expo.js"
71
+ },
72
+ "./compiler": {
73
+ "types": "./dist/compiler/compile.d.ts",
74
+ "import": "./dist/compiler/compile.js",
75
+ "require": "./dist-cjs/compiler/compile.js"
76
+ },
77
+ "./providers/*": {
78
+ "types": "./dist/providers/*.d.ts",
79
+ "import": "./dist/providers/*.js",
80
+ "require": "./dist-cjs/providers/*.js"
81
+ },
82
+ "./runtime/sandbox": {
83
+ "types": "./dist/runtime/actions/sandbox.d.ts",
84
+ "import": "./dist/runtime/actions/sandbox.js",
85
+ "require": "./dist-cjs/runtime/actions/sandbox.js"
86
+ },
87
+ "./runtime/mcp-node": {
88
+ "types": "./dist/runtime/mcp/node-client.d.ts",
89
+ "import": "./dist/runtime/mcp/node-client.js",
90
+ "require": "./dist-cjs/runtime/mcp/node-client.js"
91
+ },
92
+ "./storage/sqlite": {
93
+ "types": "./dist/storage/node-sqlite.d.ts",
94
+ "import": "./dist/storage/node-sqlite.js",
95
+ "require": "./dist-cjs/storage/node-sqlite.js"
70
96
  }
71
97
  },
72
98
  "typesVersions": {
@@ -94,6 +120,9 @@
94
120
  ],
95
121
  "expo": [
96
122
  "dist/integrations/expo.d.ts"
123
+ ],
124
+ "storage/sqlite": [
125
+ "dist/storage/node-sqlite.d.ts"
97
126
  ]
98
127
  }
99
128
  },