@aigne/agent-library 1.24.0-beta.11 → 1.24.0-beta.13
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 +30 -0
- package/lib/cjs/ask-user-question/index.d.ts +2 -1
- package/lib/cjs/ask-user-question/index.js +8 -0
- package/lib/cjs/bash/index.js +5 -3
- package/lib/dts/ask-user-question/index.d.ts +2 -1
- package/lib/esm/ask-user-question/index.d.ts +2 -1
- package/lib/esm/ask-user-question/index.js +9 -1
- package/lib/esm/bash/index.js +5 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,36 @@
|
|
|
7
7
|
* @aigne/core bumped to 1.22.0
|
|
8
8
|
* @aigne/openai bumped to 0.3.4
|
|
9
9
|
|
|
10
|
+
## [1.24.0-beta.13](https://github.com/AIGNE-io/aigne-framework/compare/agent-library-v1.24.0-beta.12...agent-library-v1.24.0-beta.13) (2026-01-06)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **core:** preserve Agent Skill in session compact and support complex tool result content ([#876](https://github.com/AIGNE-io/aigne-framework/issues/876)) ([edb86ae](https://github.com/AIGNE-io/aigne-framework/commit/edb86ae2b9cfe56a8f08b276f843606e310566cf))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Dependencies
|
|
19
|
+
|
|
20
|
+
* The following workspace dependencies were updated
|
|
21
|
+
* dependencies
|
|
22
|
+
* @aigne/core bumped to 1.72.0-beta.11
|
|
23
|
+
* @aigne/openai bumped to 0.16.16-beta.11
|
|
24
|
+
|
|
25
|
+
## [1.24.0-beta.12](https://github.com/AIGNE-io/aigne-framework/compare/agent-library-v1.24.0-beta.11...agent-library-v1.24.0-beta.12) (2026-01-06)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **agent-library:** include stdout in the error message ([#872](https://github.com/AIGNE-io/aigne-framework/issues/872)) ([4627428](https://github.com/AIGNE-io/aigne-framework/commit/4627428ade3de38a94491670216372ab2e2f2396))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Dependencies
|
|
34
|
+
|
|
35
|
+
* The following workspace dependencies were updated
|
|
36
|
+
* dependencies
|
|
37
|
+
* @aigne/core bumped to 1.72.0-beta.10
|
|
38
|
+
* @aigne/openai bumped to 0.16.16-beta.10
|
|
39
|
+
|
|
10
40
|
## [1.24.0-beta.11](https://github.com/AIGNE-io/aigne-framework/compare/agent-library-v1.24.0-beta.10...agent-library-v1.24.0-beta.11) (2026-01-02)
|
|
11
41
|
|
|
12
42
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Agent, type AgentInvokeOptions, type AgentProcessResult, type Message } from "@aigne/core";
|
|
1
|
+
import { Agent, type AgentInvokeOptions, type AgentOptions, type AgentProcessResult, type Message } from "@aigne/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export interface AskUserQuestionAgentOption {
|
|
4
4
|
label: string;
|
|
@@ -23,5 +23,6 @@ export default class AskUserQuestionAgent extends Agent<AskUserQuestionAgentInpu
|
|
|
23
23
|
filepath: string;
|
|
24
24
|
parsed: object;
|
|
25
25
|
}): Promise<Agent<I, O>>;
|
|
26
|
+
constructor(options?: AgentOptions<AskUserQuestionAgentInput, AskUserQuestionAgentOutput>);
|
|
26
27
|
process(input: AskUserQuestionAgentInput, options: AgentInvokeOptions): Promise<AgentProcessResult<AskUserQuestionAgentOutput>>;
|
|
27
28
|
}
|
|
@@ -33,6 +33,14 @@ class AskUserQuestionAgent extends core_1.Agent {
|
|
|
33
33
|
inputSchema: askUserQuestionAgentInputSchema,
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
+
constructor(options) {
|
|
37
|
+
super({
|
|
38
|
+
...options,
|
|
39
|
+
name: options?.name || defaultName,
|
|
40
|
+
description: options?.description || defaultDescription,
|
|
41
|
+
inputSchema: options?.inputSchema || askUserQuestionAgentInputSchema,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
36
44
|
async process(input, options) {
|
|
37
45
|
const { prompts } = options;
|
|
38
46
|
if (!prompts)
|
package/lib/cjs/bash/index.js
CHANGED
|
@@ -158,8 +158,10 @@ When to use:
|
|
|
158
158
|
timeout,
|
|
159
159
|
});
|
|
160
160
|
let stderr = "";
|
|
161
|
+
let stdout = "";
|
|
161
162
|
child.stdout.on("data", (chunk) => {
|
|
162
163
|
controller.enqueue({ delta: { text: { stdout: chunk.toString() } } });
|
|
164
|
+
stdout += chunk.toString();
|
|
163
165
|
});
|
|
164
166
|
child.stderr.on("data", (chunk) => {
|
|
165
167
|
controller.enqueue({ delta: { text: { stderr: chunk.toString() } } });
|
|
@@ -172,7 +174,7 @@ When to use:
|
|
|
172
174
|
// Handle timeout or killed by signal
|
|
173
175
|
if (signal) {
|
|
174
176
|
const timeoutHint = signal === "SIGTERM" ? ` (likely timeout ${timeout})` : "";
|
|
175
|
-
controller.error(new Error(`Bash script killed by signal ${signal}${timeoutHint}: ${stderr}`));
|
|
177
|
+
controller.error(new Error(`Bash script killed by signal ${signal}${timeoutHint}:\n stdout: ${stdout}\n stderr: ${stderr}`));
|
|
176
178
|
return;
|
|
177
179
|
}
|
|
178
180
|
// Handle normal exit
|
|
@@ -182,12 +184,12 @@ When to use:
|
|
|
182
184
|
controller.close();
|
|
183
185
|
}
|
|
184
186
|
else {
|
|
185
|
-
controller.error(new Error(`Bash script exited with code ${code}: ${stderr}`));
|
|
187
|
+
controller.error(new Error(`Bash script exited with code ${code}:\n stdout: ${stdout}\n stderr: ${stderr}`));
|
|
186
188
|
}
|
|
187
189
|
}
|
|
188
190
|
else {
|
|
189
191
|
// Unexpected case: no code and no signal
|
|
190
|
-
controller.error(new Error(`Bash script closed unexpectedly: ${stderr}`));
|
|
192
|
+
controller.error(new Error(`Bash script closed unexpectedly:\n stdout: ${stdout}\n stderr: ${stderr}`));
|
|
191
193
|
}
|
|
192
194
|
});
|
|
193
195
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Agent, type AgentInvokeOptions, type AgentProcessResult, type Message } from "@aigne/core";
|
|
1
|
+
import { Agent, type AgentInvokeOptions, type AgentOptions, type AgentProcessResult, type Message } from "@aigne/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export interface AskUserQuestionAgentOption {
|
|
4
4
|
label: string;
|
|
@@ -23,5 +23,6 @@ export default class AskUserQuestionAgent extends Agent<AskUserQuestionAgentInpu
|
|
|
23
23
|
filepath: string;
|
|
24
24
|
parsed: object;
|
|
25
25
|
}): Promise<Agent<I, O>>;
|
|
26
|
+
constructor(options?: AgentOptions<AskUserQuestionAgentInput, AskUserQuestionAgentOutput>);
|
|
26
27
|
process(input: AskUserQuestionAgentInput, options: AgentInvokeOptions): Promise<AgentProcessResult<AskUserQuestionAgentOutput>>;
|
|
27
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Agent, type AgentInvokeOptions, type AgentProcessResult, type Message } from "@aigne/core";
|
|
1
|
+
import { Agent, type AgentInvokeOptions, type AgentOptions, type AgentProcessResult, type Message } from "@aigne/core";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
export interface AskUserQuestionAgentOption {
|
|
4
4
|
label: string;
|
|
@@ -23,5 +23,6 @@ export default class AskUserQuestionAgent extends Agent<AskUserQuestionAgentInpu
|
|
|
23
23
|
filepath: string;
|
|
24
24
|
parsed: object;
|
|
25
25
|
}): Promise<Agent<I, O>>;
|
|
26
|
+
constructor(options?: AgentOptions<AskUserQuestionAgentInput, AskUserQuestionAgentOutput>);
|
|
26
27
|
process(input: AskUserQuestionAgentInput, options: AgentInvokeOptions): Promise<AgentProcessResult<AskUserQuestionAgentOutput>>;
|
|
27
28
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Agent } from "@aigne/core";
|
|
1
|
+
import { Agent, } from "@aigne/core";
|
|
2
2
|
import { optionalize } from "@aigne/core/loader/schema.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
const askUserQuestionAgentOptionSchema = z.object({
|
|
@@ -31,6 +31,14 @@ export default class AskUserQuestionAgent extends Agent {
|
|
|
31
31
|
inputSchema: askUserQuestionAgentInputSchema,
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
+
constructor(options) {
|
|
35
|
+
super({
|
|
36
|
+
...options,
|
|
37
|
+
name: options?.name || defaultName,
|
|
38
|
+
description: options?.description || defaultDescription,
|
|
39
|
+
inputSchema: options?.inputSchema || askUserQuestionAgentInputSchema,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
34
42
|
async process(input, options) {
|
|
35
43
|
const { prompts } = options;
|
|
36
44
|
if (!prompts)
|
package/lib/esm/bash/index.js
CHANGED
|
@@ -122,8 +122,10 @@ When to use:
|
|
|
122
122
|
timeout,
|
|
123
123
|
});
|
|
124
124
|
let stderr = "";
|
|
125
|
+
let stdout = "";
|
|
125
126
|
child.stdout.on("data", (chunk) => {
|
|
126
127
|
controller.enqueue({ delta: { text: { stdout: chunk.toString() } } });
|
|
128
|
+
stdout += chunk.toString();
|
|
127
129
|
});
|
|
128
130
|
child.stderr.on("data", (chunk) => {
|
|
129
131
|
controller.enqueue({ delta: { text: { stderr: chunk.toString() } } });
|
|
@@ -136,7 +138,7 @@ When to use:
|
|
|
136
138
|
// Handle timeout or killed by signal
|
|
137
139
|
if (signal) {
|
|
138
140
|
const timeoutHint = signal === "SIGTERM" ? ` (likely timeout ${timeout})` : "";
|
|
139
|
-
controller.error(new Error(`Bash script killed by signal ${signal}${timeoutHint}: ${stderr}`));
|
|
141
|
+
controller.error(new Error(`Bash script killed by signal ${signal}${timeoutHint}:\n stdout: ${stdout}\n stderr: ${stderr}`));
|
|
140
142
|
return;
|
|
141
143
|
}
|
|
142
144
|
// Handle normal exit
|
|
@@ -146,12 +148,12 @@ When to use:
|
|
|
146
148
|
controller.close();
|
|
147
149
|
}
|
|
148
150
|
else {
|
|
149
|
-
controller.error(new Error(`Bash script exited with code ${code}: ${stderr}`));
|
|
151
|
+
controller.error(new Error(`Bash script exited with code ${code}:\n stdout: ${stdout}\n stderr: ${stderr}`));
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
else {
|
|
153
155
|
// Unexpected case: no code and no signal
|
|
154
|
-
controller.error(new Error(`Bash script closed unexpectedly: ${stderr}`));
|
|
156
|
+
controller.error(new Error(`Bash script closed unexpectedly:\n stdout: ${stdout}\n stderr: ${stderr}`));
|
|
155
157
|
}
|
|
156
158
|
});
|
|
157
159
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/agent-library",
|
|
3
|
-
"version": "1.24.0-beta.
|
|
3
|
+
"version": "1.24.0-beta.13",
|
|
4
4
|
"description": "Collection of agent libraries for AIGNE framework",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
"yaml": "^2.8.1",
|
|
58
58
|
"zod": "^3.25.67",
|
|
59
59
|
"zod-to-json-schema": "^3.24.6",
|
|
60
|
-
"@aigne/core": "^1.72.0-beta.
|
|
61
|
-
"@aigne/
|
|
62
|
-
"@aigne/
|
|
60
|
+
"@aigne/core": "^1.72.0-beta.11",
|
|
61
|
+
"@aigne/openai": "^0.16.16-beta.11",
|
|
62
|
+
"@aigne/sqlite": "^0.4.9-beta"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/bun": "^1.2.22",
|