@aigne/agent-library 1.24.0-beta.19 → 1.24.0-beta.20
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 +15 -0
- package/lib/cjs/bash/index.d.ts +8 -0
- package/lib/cjs/bash/index.js +2 -0
- package/lib/dts/bash/index.d.ts +8 -0
- package/lib/esm/bash/index.d.ts +8 -0
- package/lib/esm/bash/index.js +2 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@
|
|
|
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.20](https://github.com/AIGNE-io/aigne-framework/compare/agent-library-v1.24.0-beta.19...agent-library-v1.24.0-beta.20) (2026-01-13)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **agent-library:** add cwd option for bash agent ([#901](https://github.com/AIGNE-io/aigne-framework/issues/901)) ([d8a036b](https://github.com/AIGNE-io/aigne-framework/commit/d8a036b84ee97f80de747c141dae15a0d96bf4f5))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Dependencies
|
|
19
|
+
|
|
20
|
+
* The following workspace dependencies were updated
|
|
21
|
+
* dependencies
|
|
22
|
+
* @aigne/core bumped to 1.72.0-beta.18
|
|
23
|
+
* @aigne/openai bumped to 0.16.16-beta.18
|
|
24
|
+
|
|
10
25
|
## [1.24.0-beta.19](https://github.com/AIGNE-io/aigne-framework/compare/agent-library-v1.24.0-beta.18...agent-library-v1.24.0-beta.19) (2026-01-12)
|
|
11
26
|
|
|
12
27
|
|
package/lib/cjs/bash/index.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ export interface BashAgentOptions extends AgentOptions<BashAgentInput, BashAgent
|
|
|
14
14
|
* @default 60000 (60 seconds)
|
|
15
15
|
*/
|
|
16
16
|
timeout?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Optional current working directory for script execution
|
|
19
|
+
* If not specified, inherits the parent process's working directory
|
|
20
|
+
*/
|
|
21
|
+
cwd?: string;
|
|
17
22
|
/**
|
|
18
23
|
* Optional permissions configuration for command execution control
|
|
19
24
|
* Inspired by Claude Code's permission system
|
|
@@ -71,6 +76,7 @@ export declare class BashAgent extends Agent<BashAgentInput, BashAgentOutput> {
|
|
|
71
76
|
} | undefined>;
|
|
72
77
|
inputKey: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
73
78
|
timeout: z.ZodType<number | undefined, z.ZodTypeDef, number | undefined>;
|
|
79
|
+
cwd: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
74
80
|
permissions: z.ZodType<{
|
|
75
81
|
allow?: string[] | undefined;
|
|
76
82
|
deny?: string[] | undefined;
|
|
@@ -88,6 +94,7 @@ export declare class BashAgent extends Agent<BashAgentInput, BashAgentOutput> {
|
|
|
88
94
|
[x: string]: z.ZodTypeAny | undefined;
|
|
89
95
|
} | undefined;
|
|
90
96
|
timeout?: number | undefined;
|
|
97
|
+
cwd?: string | undefined;
|
|
91
98
|
permissions?: {
|
|
92
99
|
allow?: string[] | undefined;
|
|
93
100
|
deny?: string[] | undefined;
|
|
@@ -100,6 +107,7 @@ export declare class BashAgent extends Agent<BashAgentInput, BashAgentOutput> {
|
|
|
100
107
|
[x: string]: z.ZodTypeAny | undefined;
|
|
101
108
|
} | undefined;
|
|
102
109
|
timeout?: number | undefined;
|
|
110
|
+
cwd?: string | undefined;
|
|
103
111
|
permissions?: {
|
|
104
112
|
allow?: string[] | undefined;
|
|
105
113
|
deny?: string[] | undefined;
|
package/lib/cjs/bash/index.js
CHANGED
|
@@ -56,6 +56,7 @@ class BashAgent extends core_1.Agent {
|
|
|
56
56
|
sandbox: (0, schema_js_1.optionalize)(zod_1.default.union([makeShapePropertiesOptions(sandbox_runtime_1.SandboxRuntimeConfigSchema, 2), zod_1.default.boolean()])),
|
|
57
57
|
inputKey: (0, schema_js_1.optionalize)(zod_1.default.string().describe("The input key for the bash script.")),
|
|
58
58
|
timeout: (0, schema_js_1.optionalize)(zod_1.default.number().describe("Timeout for script execution in milliseconds.")),
|
|
59
|
+
cwd: (0, schema_js_1.optionalize)(zod_1.default.string().describe("Current working directory for script execution.")),
|
|
59
60
|
permissions: (0, schema_js_1.optionalize)((0, schema_js_1.camelizeSchema)(zod_1.default.object({
|
|
60
61
|
allow: (0, schema_js_1.optionalize)(zod_1.default.array(zod_1.default.string())),
|
|
61
62
|
deny: (0, schema_js_1.optionalize)(zod_1.default.array(zod_1.default.string())),
|
|
@@ -157,6 +158,7 @@ class BashAgent extends core_1.Agent {
|
|
|
157
158
|
...options,
|
|
158
159
|
stdio: "pipe",
|
|
159
160
|
timeout,
|
|
161
|
+
cwd: this.options.cwd,
|
|
160
162
|
});
|
|
161
163
|
let stderr = "";
|
|
162
164
|
let stdout = "";
|
package/lib/dts/bash/index.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ export interface BashAgentOptions extends AgentOptions<BashAgentInput, BashAgent
|
|
|
14
14
|
* @default 60000 (60 seconds)
|
|
15
15
|
*/
|
|
16
16
|
timeout?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Optional current working directory for script execution
|
|
19
|
+
* If not specified, inherits the parent process's working directory
|
|
20
|
+
*/
|
|
21
|
+
cwd?: string;
|
|
17
22
|
/**
|
|
18
23
|
* Optional permissions configuration for command execution control
|
|
19
24
|
* Inspired by Claude Code's permission system
|
|
@@ -71,6 +76,7 @@ export declare class BashAgent extends Agent<BashAgentInput, BashAgentOutput> {
|
|
|
71
76
|
} | undefined>;
|
|
72
77
|
inputKey: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
73
78
|
timeout: z.ZodType<number | undefined, z.ZodTypeDef, number | undefined>;
|
|
79
|
+
cwd: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
74
80
|
permissions: z.ZodType<{
|
|
75
81
|
allow?: string[] | undefined;
|
|
76
82
|
deny?: string[] | undefined;
|
|
@@ -88,6 +94,7 @@ export declare class BashAgent extends Agent<BashAgentInput, BashAgentOutput> {
|
|
|
88
94
|
[x: string]: z.ZodTypeAny | undefined;
|
|
89
95
|
} | undefined;
|
|
90
96
|
timeout?: number | undefined;
|
|
97
|
+
cwd?: string | undefined;
|
|
91
98
|
permissions?: {
|
|
92
99
|
allow?: string[] | undefined;
|
|
93
100
|
deny?: string[] | undefined;
|
|
@@ -100,6 +107,7 @@ export declare class BashAgent extends Agent<BashAgentInput, BashAgentOutput> {
|
|
|
100
107
|
[x: string]: z.ZodTypeAny | undefined;
|
|
101
108
|
} | undefined;
|
|
102
109
|
timeout?: number | undefined;
|
|
110
|
+
cwd?: string | undefined;
|
|
103
111
|
permissions?: {
|
|
104
112
|
allow?: string[] | undefined;
|
|
105
113
|
deny?: string[] | undefined;
|
package/lib/esm/bash/index.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ export interface BashAgentOptions extends AgentOptions<BashAgentInput, BashAgent
|
|
|
14
14
|
* @default 60000 (60 seconds)
|
|
15
15
|
*/
|
|
16
16
|
timeout?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Optional current working directory for script execution
|
|
19
|
+
* If not specified, inherits the parent process's working directory
|
|
20
|
+
*/
|
|
21
|
+
cwd?: string;
|
|
17
22
|
/**
|
|
18
23
|
* Optional permissions configuration for command execution control
|
|
19
24
|
* Inspired by Claude Code's permission system
|
|
@@ -71,6 +76,7 @@ export declare class BashAgent extends Agent<BashAgentInput, BashAgentOutput> {
|
|
|
71
76
|
} | undefined>;
|
|
72
77
|
inputKey: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
73
78
|
timeout: z.ZodType<number | undefined, z.ZodTypeDef, number | undefined>;
|
|
79
|
+
cwd: z.ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
74
80
|
permissions: z.ZodType<{
|
|
75
81
|
allow?: string[] | undefined;
|
|
76
82
|
deny?: string[] | undefined;
|
|
@@ -88,6 +94,7 @@ export declare class BashAgent extends Agent<BashAgentInput, BashAgentOutput> {
|
|
|
88
94
|
[x: string]: z.ZodTypeAny | undefined;
|
|
89
95
|
} | undefined;
|
|
90
96
|
timeout?: number | undefined;
|
|
97
|
+
cwd?: string | undefined;
|
|
91
98
|
permissions?: {
|
|
92
99
|
allow?: string[] | undefined;
|
|
93
100
|
deny?: string[] | undefined;
|
|
@@ -100,6 +107,7 @@ export declare class BashAgent extends Agent<BashAgentInput, BashAgentOutput> {
|
|
|
100
107
|
[x: string]: z.ZodTypeAny | undefined;
|
|
101
108
|
} | undefined;
|
|
102
109
|
timeout?: number | undefined;
|
|
110
|
+
cwd?: string | undefined;
|
|
103
111
|
permissions?: {
|
|
104
112
|
allow?: string[] | undefined;
|
|
105
113
|
deny?: string[] | undefined;
|
package/lib/esm/bash/index.js
CHANGED
|
@@ -20,6 +20,7 @@ export class BashAgent extends Agent {
|
|
|
20
20
|
sandbox: optionalize(z.union([makeShapePropertiesOptions(SandboxRuntimeConfigSchema, 2), z.boolean()])),
|
|
21
21
|
inputKey: optionalize(z.string().describe("The input key for the bash script.")),
|
|
22
22
|
timeout: optionalize(z.number().describe("Timeout for script execution in milliseconds.")),
|
|
23
|
+
cwd: optionalize(z.string().describe("Current working directory for script execution.")),
|
|
23
24
|
permissions: optionalize(camelizeSchema(z.object({
|
|
24
25
|
allow: optionalize(z.array(z.string())),
|
|
25
26
|
deny: optionalize(z.array(z.string())),
|
|
@@ -121,6 +122,7 @@ export class BashAgent extends Agent {
|
|
|
121
122
|
...options,
|
|
122
123
|
stdio: "pipe",
|
|
123
124
|
timeout,
|
|
125
|
+
cwd: this.options.cwd,
|
|
124
126
|
});
|
|
125
127
|
let stderr = "";
|
|
126
128
|
let stdout = "";
|
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.20",
|
|
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.18",
|
|
61
|
+
"@aigne/sqlite": "^0.4.9-beta.1",
|
|
62
|
+
"@aigne/openai": "^0.16.16-beta.18"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/bun": "^1.2.22",
|