@aigne/core 1.47.0 → 1.48.0

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,16 +1,11 @@
1
- ## [1.22.0](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.21.0...core-v1.22.0) (2025-06-24)
2
-
1
+ # Changelog
3
2
 
4
- ### Features
3
+ ## [1.48.0](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.47.0...core-v1.48.0) (2025-08-12)
5
4
 
6
- * support observability for cli and blocklet ([#155](https://github.com/AIGNE-io/aigne-framework/issues/155)) ([5baa705](https://github.com/AIGNE-io/aigne-framework/commit/5baa705a33cfdba1efc5ccbe18674c27513ca97d))
7
5
 
6
+ ### Features
8
7
 
9
- ### Dependencies
10
-
11
- * The following workspace dependencies were updated
12
- * dependencies
13
- * @aigne/observability bumped to 0.1.0
8
+ * enhance task title functionality to support dynamic generation ([#346](https://github.com/AIGNE-io/aigne-framework/issues/346)) ([fff098c](https://github.com/AIGNE-io/aigne-framework/commit/fff098c9828beca9d99e4b2ebaebdf6b92efb84e))
14
9
 
15
10
  ## [1.47.0](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.46.1...core-v1.47.0) (2025-08-11)
16
11
 
@@ -445,6 +440,21 @@
445
440
  * dependencies
446
441
  * @aigne/observability bumped to 0.1.1
447
442
 
443
+ ## [1.22.0](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.21.0...core-v1.22.0) (2025-06-24)
444
+
445
+
446
+ ### Features
447
+
448
+ * support observability for cli and blocklet ([#155](https://github.com/AIGNE-io/aigne-framework/issues/155)) ([5baa705](https://github.com/AIGNE-io/aigne-framework/commit/5baa705a33cfdba1efc5ccbe18674c27513ca97d))
449
+
450
+
451
+ ### Dependencies
452
+
453
+ * The following workspace dependencies were updated
454
+ * dependencies
455
+ * @aigne/observability bumped to 0.1.0
456
+
457
+
448
458
  ## [1.21.0](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.20.1...core-v1.21.0) (2025-06-20)
449
459
 
450
460
 
@@ -72,7 +72,7 @@ export interface AgentOptions<I extends Message = Message, O extends Message = M
72
72
  * for documentation and debugging
73
73
  */
74
74
  description?: string;
75
- taskTitle?: string;
75
+ taskTitle?: string | ((input: I) => PromiseOrValue<string | undefined>);
76
76
  /**
77
77
  * Zod schema defining the input message structure
78
78
  *
@@ -257,8 +257,8 @@ export declare abstract class Agent<I extends Message = any, O extends Message =
257
257
  * each other's roles in a multi-agent system
258
258
  */
259
259
  readonly description?: string;
260
- taskTitle?: string;
261
- renderTaskTitle(input: I): string | undefined;
260
+ taskTitle?: string | ((input: Message) => PromiseOrValue<string | undefined>);
261
+ renderTaskTitle(input: I): Promise<string | undefined>;
262
262
  private readonly _inputSchema?;
263
263
  defaultInput?: Partial<{
264
264
  [key in keyof I]: {
@@ -199,10 +199,13 @@ class Agent {
199
199
  */
200
200
  description;
201
201
  taskTitle;
202
- renderTaskTitle(input) {
202
+ async renderTaskTitle(input) {
203
203
  if (!this.taskTitle)
204
204
  return;
205
- return nunjucks_1.default.renderString(this.taskTitle, { ...input });
205
+ const s = typeof this.taskTitle === "function" ? await this.taskTitle(input) : this.taskTitle;
206
+ if (!s)
207
+ return;
208
+ return nunjucks_1.default.renderString(s, { ...input });
206
209
  }
207
210
  _inputSchema;
208
211
  defaultInput;
@@ -131,8 +131,8 @@ class AgentResponseProgressStream extends ReadableStream {
131
131
  context.off("agentFailed", onAgentFailed);
132
132
  controller.close();
133
133
  };
134
- const onAgentStarted = (event) => {
135
- const taskTitle = event.agent.renderTaskTitle(event.input);
134
+ const onAgentStarted = async (event) => {
135
+ const taskTitle = await event.agent.renderTaskTitle(event.input);
136
136
  writeEvent("agentStarted", { ...event, taskTitle });
137
137
  };
138
138
  const onAgentSucceed = (event) => {
@@ -72,7 +72,7 @@ export interface AgentOptions<I extends Message = Message, O extends Message = M
72
72
  * for documentation and debugging
73
73
  */
74
74
  description?: string;
75
- taskTitle?: string;
75
+ taskTitle?: string | ((input: I) => PromiseOrValue<string | undefined>);
76
76
  /**
77
77
  * Zod schema defining the input message structure
78
78
  *
@@ -257,8 +257,8 @@ export declare abstract class Agent<I extends Message = any, O extends Message =
257
257
  * each other's roles in a multi-agent system
258
258
  */
259
259
  readonly description?: string;
260
- taskTitle?: string;
261
- renderTaskTitle(input: I): string | undefined;
260
+ taskTitle?: string | ((input: Message) => PromiseOrValue<string | undefined>);
261
+ renderTaskTitle(input: I): Promise<string | undefined>;
262
262
  private readonly _inputSchema?;
263
263
  defaultInput?: Partial<{
264
264
  [key in keyof I]: {
@@ -72,7 +72,7 @@ export interface AgentOptions<I extends Message = Message, O extends Message = M
72
72
  * for documentation and debugging
73
73
  */
74
74
  description?: string;
75
- taskTitle?: string;
75
+ taskTitle?: string | ((input: I) => PromiseOrValue<string | undefined>);
76
76
  /**
77
77
  * Zod schema defining the input message structure
78
78
  *
@@ -257,8 +257,8 @@ export declare abstract class Agent<I extends Message = any, O extends Message =
257
257
  * each other's roles in a multi-agent system
258
258
  */
259
259
  readonly description?: string;
260
- taskTitle?: string;
261
- renderTaskTitle(input: I): string | undefined;
260
+ taskTitle?: string | ((input: Message) => PromiseOrValue<string | undefined>);
261
+ renderTaskTitle(input: I): Promise<string | undefined>;
262
262
  private readonly _inputSchema?;
263
263
  defaultInput?: Partial<{
264
264
  [key in keyof I]: {
@@ -151,10 +151,13 @@ export class Agent {
151
151
  */
152
152
  description;
153
153
  taskTitle;
154
- renderTaskTitle(input) {
154
+ async renderTaskTitle(input) {
155
155
  if (!this.taskTitle)
156
156
  return;
157
- return nunjucks.renderString(this.taskTitle, { ...input });
157
+ const s = typeof this.taskTitle === "function" ? await this.taskTitle(input) : this.taskTitle;
158
+ if (!s)
159
+ return;
160
+ return nunjucks.renderString(s, { ...input });
158
161
  }
159
162
  _inputSchema;
160
163
  defaultInput;
@@ -125,8 +125,8 @@ export class AgentResponseProgressStream extends ReadableStream {
125
125
  context.off("agentFailed", onAgentFailed);
126
126
  controller.close();
127
127
  };
128
- const onAgentStarted = (event) => {
129
- const taskTitle = event.agent.renderTaskTitle(event.input);
128
+ const onAgentStarted = async (event) => {
129
+ const taskTitle = await event.agent.renderTaskTitle(event.input);
130
130
  writeEvent("agentStarted", { ...event, taskTitle });
131
131
  };
132
132
  const onAgentSucceed = (event) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/core",
3
- "version": "1.47.0",
3
+ "version": "1.48.0",
4
4
  "description": "The functional core of agentic AI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -89,8 +89,8 @@
89
89
  "yaml": "^2.8.0",
90
90
  "zod": "^3.25.67",
91
91
  "zod-to-json-schema": "^3.24.6",
92
- "@aigne/observability-api": "^0.9.0",
93
- "@aigne/platform-helpers": "^0.6.0"
92
+ "@aigne/platform-helpers": "^0.6.0",
93
+ "@aigne/observability-api": "^0.9.0"
94
94
  },
95
95
  "devDependencies": {
96
96
  "@types/bun": "^1.2.18",