@aigne/core 1.67.0-beta → 1.67.0-beta.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.67.0-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.67.0-beta.1...core-v1.67.0-beta.2) (2025-11-12)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **core:** resolve relative paths correctly in JS agent files ([#732](https://github.com/AIGNE-io/aigne-framework/issues/732)) ([0cb5631](https://github.com/AIGNE-io/aigne-framework/commit/0cb5631e1a1516b796f86a8dafc2341fe0e0810c))
9
+ * **core:** support JSON object definitions for agent files ([#730](https://github.com/AIGNE-io/aigne-framework/issues/730)) ([4337def](https://github.com/AIGNE-io/aigne-framework/commit/4337defab694abdbcc118cc7f9151ba4df945478))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * The following workspace dependencies were updated
15
+ * dependencies
16
+ * @aigne/observability-api bumped to 0.11.6-beta.2
17
+
18
+ ## [1.67.0-beta.1](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.67.0-beta...core-v1.67.0-beta.1) (2025-11-12)
19
+
20
+
21
+ ### Dependencies
22
+
23
+ * The following workspace dependencies were updated
24
+ * dependencies
25
+ * @aigne/afs bumped to 1.1.2-beta
26
+ * @aigne/observability-api bumped to 0.11.6-beta.1
27
+
3
28
  ## [1.67.0-beta](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.66.0...core-v1.67.0-beta) (2025-11-11)
4
29
 
5
30
 
@@ -8,18 +8,14 @@ const agent_yaml_js_1 = require("./agent-yaml.js");
8
8
  const error_js_1 = require("./error.js");
9
9
  const importFn = new Function("path", "return import(path)");
10
10
  async function loadAgentFromJsFile(path) {
11
- if (index_js_1.nodejs.path.isAbsolute(path))
12
- path = index_js_1.nodejs.url.pathToFileURL(path).toString();
13
- const { default: agent } = await (0, type_utils_js_1.tryOrThrow)(() => importFn(path), (error) => new error_js_1.LoadJsAgentError(`Failed to load agent definition from ${path}: ${error.message}`));
11
+ const url = index_js_1.nodejs.path.isAbsolute(path) ? index_js_1.nodejs.url.pathToFileURL(path).toString() : path;
12
+ const { default: agent } = await (0, type_utils_js_1.tryOrThrow)(() => importFn(url), (error) => new error_js_1.LoadJsAgentError(`Failed to load agent definition from ${url}: ${error.message}`));
14
13
  if (agent instanceof agent_js_1.Agent)
15
14
  return agent;
16
- if (typeof agent !== "function") {
17
- throw new Error(`Agent file ${path} must export a default function, but got ${typeof agent}`);
18
- }
19
15
  return (0, type_utils_js_1.tryOrThrow)(() => (0, agent_yaml_js_1.parseAgentFile)(path, {
20
- ...agent,
21
16
  type: "function",
22
- name: agent.agent_name || agent.agentName || agent.name,
23
17
  process: agent,
18
+ name: agent.agent_name || agent.agentName || agent.name,
19
+ ...agent,
24
20
  }), (error) => new Error(`Failed to parse agent from ${path}: ${error.message}`));
25
21
  }
@@ -5,18 +5,14 @@ import { parseAgentFile } from "./agent-yaml.js";
5
5
  import { LoadJsAgentError } from "./error.js";
6
6
  const importFn = new Function("path", "return import(path)");
7
7
  export async function loadAgentFromJsFile(path) {
8
- if (nodejs.path.isAbsolute(path))
9
- path = nodejs.url.pathToFileURL(path).toString();
10
- const { default: agent } = await tryOrThrow(() => importFn(path), (error) => new LoadJsAgentError(`Failed to load agent definition from ${path}: ${error.message}`));
8
+ const url = nodejs.path.isAbsolute(path) ? nodejs.url.pathToFileURL(path).toString() : path;
9
+ const { default: agent } = await tryOrThrow(() => importFn(url), (error) => new LoadJsAgentError(`Failed to load agent definition from ${url}: ${error.message}`));
11
10
  if (agent instanceof Agent)
12
11
  return agent;
13
- if (typeof agent !== "function") {
14
- throw new Error(`Agent file ${path} must export a default function, but got ${typeof agent}`);
15
- }
16
12
  return tryOrThrow(() => parseAgentFile(path, {
17
- ...agent,
18
13
  type: "function",
19
- name: agent.agent_name || agent.agentName || agent.name,
20
14
  process: agent,
15
+ name: agent.agent_name || agent.agentName || agent.name,
16
+ ...agent,
21
17
  }), (error) => new Error(`Failed to parse agent from ${path}: ${error.message}`));
22
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/core",
3
- "version": "1.67.0-beta",
3
+ "version": "1.67.0-beta.2",
4
4
  "description": "The functional core of agentic AI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -92,9 +92,9 @@
92
92
  "zod": "^3.25.67",
93
93
  "zod-from-json-schema": "^0.0.5",
94
94
  "zod-to-json-schema": "^3.24.6",
95
- "@aigne/observability-api": "^0.11.6-beta",
96
- "@aigne/platform-helpers": "^0.6.3",
97
- "@aigne/afs": "^1.1.1"
95
+ "@aigne/afs": "^1.1.2-beta",
96
+ "@aigne/observability-api": "^0.11.6-beta.2",
97
+ "@aigne/platform-helpers": "^0.6.3"
98
98
  },
99
99
  "devDependencies": {
100
100
  "@types/bun": "^1.2.22",