@aigne/core 1.65.0-beta.1 → 1.65.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 +7 -0
- package/lib/cjs/agents/image-model.d.ts +3 -3
- package/lib/cjs/agents/model.d.ts +2 -2
- package/lib/cjs/agents/model.js +4 -1
- package/lib/cjs/agents/video-model.d.ts +3 -3
- package/lib/dts/agents/image-model.d.ts +3 -3
- package/lib/dts/agents/model.d.ts +2 -2
- package/lib/dts/agents/video-model.d.ts +3 -3
- package/lib/esm/agents/image-model.d.ts +3 -3
- package/lib/esm/agents/model.d.ts +2 -2
- package/lib/esm/agents/model.js +4 -1
- package/lib/esm/agents/video-model.d.ts +3 -3
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.65.0-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.65.0-beta.1...core-v1.65.0-beta.2) (2025-10-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **core:** added support for URL file type handling, expanding the range of supported file formats ([#671](https://github.com/AIGNE-io/aigne-framework/issues/671)) ([fea4519](https://github.com/AIGNE-io/aigne-framework/commit/fea45197e87cf7b19499c48b41626062824d1355))
|
|
9
|
+
|
|
3
10
|
## [1.65.0-beta.1](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.65.0-beta...core-v1.65.0-beta.1) (2025-10-26)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -85,7 +85,7 @@ export declare const imageModelInputSchema: z.ZodObject<{
|
|
|
85
85
|
mimeType?: string | undefined;
|
|
86
86
|
}>]>, "many">>;
|
|
87
87
|
n: z.ZodOptional<z.ZodNumber>;
|
|
88
|
-
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file"]>>;
|
|
88
|
+
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file", "url"]>>;
|
|
89
89
|
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
91
|
prompt: string;
|
|
@@ -106,7 +106,7 @@ export declare const imageModelInputSchema: z.ZodObject<{
|
|
|
106
106
|
filename?: string | undefined;
|
|
107
107
|
mimeType?: string | undefined;
|
|
108
108
|
})[] | undefined;
|
|
109
|
-
outputFileType?: "local" | "file" | undefined;
|
|
109
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
110
110
|
n?: number | undefined;
|
|
111
111
|
}, {
|
|
112
112
|
prompt: string;
|
|
@@ -127,7 +127,7 @@ export declare const imageModelInputSchema: z.ZodObject<{
|
|
|
127
127
|
filename?: string | undefined;
|
|
128
128
|
mimeType?: string | undefined;
|
|
129
129
|
})[] | undefined;
|
|
130
|
-
outputFileType?: "local" | "file" | undefined;
|
|
130
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
131
131
|
n?: number | undefined;
|
|
132
132
|
}>;
|
|
133
133
|
export interface ImageModelOutput extends Message {
|
|
@@ -8,8 +8,8 @@ export declare abstract class Model<I extends Message = any, O extends Message =
|
|
|
8
8
|
static getMimeType(filename: string): Promise<string | undefined>;
|
|
9
9
|
downloadFile(url: string): Promise<Response>;
|
|
10
10
|
}
|
|
11
|
-
export type FileType = "local" | "file";
|
|
12
|
-
export declare const fileTypeSchema: z.ZodEnum<["local", "file"]>;
|
|
11
|
+
export type FileType = "local" | "file" | "url";
|
|
12
|
+
export declare const fileTypeSchema: z.ZodEnum<["local", "file", "url"]>;
|
|
13
13
|
export interface FileContentBase {
|
|
14
14
|
filename?: string;
|
|
15
15
|
mimeType?: string;
|
package/lib/cjs/agents/model.js
CHANGED
|
@@ -86,6 +86,9 @@ class Model extends agent_js_1.Agent {
|
|
|
86
86
|
}
|
|
87
87
|
return { ...common, type: "file", data: base64, mimeType };
|
|
88
88
|
}
|
|
89
|
+
default: {
|
|
90
|
+
return data;
|
|
91
|
+
}
|
|
89
92
|
}
|
|
90
93
|
}
|
|
91
94
|
static async getFileExtension(type) {
|
|
@@ -106,7 +109,7 @@ class Model extends agent_js_1.Agent {
|
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
111
|
exports.Model = Model;
|
|
109
|
-
exports.fileTypeSchema = zod_1.z.enum(["local", "file"]);
|
|
112
|
+
exports.fileTypeSchema = zod_1.z.enum(["local", "file", "url"]);
|
|
110
113
|
exports.fileContentBaseSchema = zod_1.z.object({
|
|
111
114
|
filename: (0, schema_js_1.optionalize)(zod_1.z.string()),
|
|
112
115
|
mimeType: (0, schema_js_1.optionalize)(zod_1.z.string()),
|
|
@@ -37,20 +37,20 @@ export declare const videoModelInputSchema: z.ZodObject<{
|
|
|
37
37
|
model: z.ZodOptional<z.ZodString>;
|
|
38
38
|
size: z.ZodOptional<z.ZodString>;
|
|
39
39
|
seconds: z.ZodOptional<z.ZodString>;
|
|
40
|
-
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file"]>>;
|
|
40
|
+
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file", "url"]>>;
|
|
41
41
|
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
43
|
prompt: string;
|
|
44
44
|
model?: string | undefined;
|
|
45
45
|
modelOptions?: Record<string, unknown> | undefined;
|
|
46
|
-
outputFileType?: "local" | "file" | undefined;
|
|
46
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
47
47
|
size?: string | undefined;
|
|
48
48
|
seconds?: string | undefined;
|
|
49
49
|
}, {
|
|
50
50
|
prompt: string;
|
|
51
51
|
model?: string | undefined;
|
|
52
52
|
modelOptions?: Record<string, unknown> | undefined;
|
|
53
|
-
outputFileType?: "local" | "file" | undefined;
|
|
53
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
54
54
|
size?: string | undefined;
|
|
55
55
|
seconds?: string | undefined;
|
|
56
56
|
}>;
|
|
@@ -85,7 +85,7 @@ export declare const imageModelInputSchema: z.ZodObject<{
|
|
|
85
85
|
mimeType?: string | undefined;
|
|
86
86
|
}>]>, "many">>;
|
|
87
87
|
n: z.ZodOptional<z.ZodNumber>;
|
|
88
|
-
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file"]>>;
|
|
88
|
+
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file", "url"]>>;
|
|
89
89
|
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
91
|
prompt: string;
|
|
@@ -106,7 +106,7 @@ export declare const imageModelInputSchema: z.ZodObject<{
|
|
|
106
106
|
filename?: string | undefined;
|
|
107
107
|
mimeType?: string | undefined;
|
|
108
108
|
})[] | undefined;
|
|
109
|
-
outputFileType?: "local" | "file" | undefined;
|
|
109
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
110
110
|
n?: number | undefined;
|
|
111
111
|
}, {
|
|
112
112
|
prompt: string;
|
|
@@ -127,7 +127,7 @@ export declare const imageModelInputSchema: z.ZodObject<{
|
|
|
127
127
|
filename?: string | undefined;
|
|
128
128
|
mimeType?: string | undefined;
|
|
129
129
|
})[] | undefined;
|
|
130
|
-
outputFileType?: "local" | "file" | undefined;
|
|
130
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
131
131
|
n?: number | undefined;
|
|
132
132
|
}>;
|
|
133
133
|
export interface ImageModelOutput extends Message {
|
|
@@ -8,8 +8,8 @@ export declare abstract class Model<I extends Message = any, O extends Message =
|
|
|
8
8
|
static getMimeType(filename: string): Promise<string | undefined>;
|
|
9
9
|
downloadFile(url: string): Promise<Response>;
|
|
10
10
|
}
|
|
11
|
-
export type FileType = "local" | "file";
|
|
12
|
-
export declare const fileTypeSchema: z.ZodEnum<["local", "file"]>;
|
|
11
|
+
export type FileType = "local" | "file" | "url";
|
|
12
|
+
export declare const fileTypeSchema: z.ZodEnum<["local", "file", "url"]>;
|
|
13
13
|
export interface FileContentBase {
|
|
14
14
|
filename?: string;
|
|
15
15
|
mimeType?: string;
|
|
@@ -37,20 +37,20 @@ export declare const videoModelInputSchema: z.ZodObject<{
|
|
|
37
37
|
model: z.ZodOptional<z.ZodString>;
|
|
38
38
|
size: z.ZodOptional<z.ZodString>;
|
|
39
39
|
seconds: z.ZodOptional<z.ZodString>;
|
|
40
|
-
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file"]>>;
|
|
40
|
+
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file", "url"]>>;
|
|
41
41
|
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
43
|
prompt: string;
|
|
44
44
|
model?: string | undefined;
|
|
45
45
|
modelOptions?: Record<string, unknown> | undefined;
|
|
46
|
-
outputFileType?: "local" | "file" | undefined;
|
|
46
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
47
47
|
size?: string | undefined;
|
|
48
48
|
seconds?: string | undefined;
|
|
49
49
|
}, {
|
|
50
50
|
prompt: string;
|
|
51
51
|
model?: string | undefined;
|
|
52
52
|
modelOptions?: Record<string, unknown> | undefined;
|
|
53
|
-
outputFileType?: "local" | "file" | undefined;
|
|
53
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
54
54
|
size?: string | undefined;
|
|
55
55
|
seconds?: string | undefined;
|
|
56
56
|
}>;
|
|
@@ -85,7 +85,7 @@ export declare const imageModelInputSchema: z.ZodObject<{
|
|
|
85
85
|
mimeType?: string | undefined;
|
|
86
86
|
}>]>, "many">>;
|
|
87
87
|
n: z.ZodOptional<z.ZodNumber>;
|
|
88
|
-
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file"]>>;
|
|
88
|
+
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file", "url"]>>;
|
|
89
89
|
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
91
|
prompt: string;
|
|
@@ -106,7 +106,7 @@ export declare const imageModelInputSchema: z.ZodObject<{
|
|
|
106
106
|
filename?: string | undefined;
|
|
107
107
|
mimeType?: string | undefined;
|
|
108
108
|
})[] | undefined;
|
|
109
|
-
outputFileType?: "local" | "file" | undefined;
|
|
109
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
110
110
|
n?: number | undefined;
|
|
111
111
|
}, {
|
|
112
112
|
prompt: string;
|
|
@@ -127,7 +127,7 @@ export declare const imageModelInputSchema: z.ZodObject<{
|
|
|
127
127
|
filename?: string | undefined;
|
|
128
128
|
mimeType?: string | undefined;
|
|
129
129
|
})[] | undefined;
|
|
130
|
-
outputFileType?: "local" | "file" | undefined;
|
|
130
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
131
131
|
n?: number | undefined;
|
|
132
132
|
}>;
|
|
133
133
|
export interface ImageModelOutput extends Message {
|
|
@@ -8,8 +8,8 @@ export declare abstract class Model<I extends Message = any, O extends Message =
|
|
|
8
8
|
static getMimeType(filename: string): Promise<string | undefined>;
|
|
9
9
|
downloadFile(url: string): Promise<Response>;
|
|
10
10
|
}
|
|
11
|
-
export type FileType = "local" | "file";
|
|
12
|
-
export declare const fileTypeSchema: z.ZodEnum<["local", "file"]>;
|
|
11
|
+
export type FileType = "local" | "file" | "url";
|
|
12
|
+
export declare const fileTypeSchema: z.ZodEnum<["local", "file", "url"]>;
|
|
13
13
|
export interface FileContentBase {
|
|
14
14
|
filename?: string;
|
|
15
15
|
mimeType?: string;
|
package/lib/esm/agents/model.js
CHANGED
|
@@ -50,6 +50,9 @@ export class Model extends Agent {
|
|
|
50
50
|
}
|
|
51
51
|
return { ...common, type: "file", data: base64, mimeType };
|
|
52
52
|
}
|
|
53
|
+
default: {
|
|
54
|
+
return data;
|
|
55
|
+
}
|
|
53
56
|
}
|
|
54
57
|
}
|
|
55
58
|
static async getFileExtension(type) {
|
|
@@ -69,7 +72,7 @@ export class Model extends Agent {
|
|
|
69
72
|
return response;
|
|
70
73
|
}
|
|
71
74
|
}
|
|
72
|
-
export const fileTypeSchema = z.enum(["local", "file"]);
|
|
75
|
+
export const fileTypeSchema = z.enum(["local", "file", "url"]);
|
|
73
76
|
export const fileContentBaseSchema = z.object({
|
|
74
77
|
filename: optionalize(z.string()),
|
|
75
78
|
mimeType: optionalize(z.string()),
|
|
@@ -37,20 +37,20 @@ export declare const videoModelInputSchema: z.ZodObject<{
|
|
|
37
37
|
model: z.ZodOptional<z.ZodString>;
|
|
38
38
|
size: z.ZodOptional<z.ZodString>;
|
|
39
39
|
seconds: z.ZodOptional<z.ZodString>;
|
|
40
|
-
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file"]>>;
|
|
40
|
+
outputFileType: z.ZodOptional<z.ZodEnum<["local", "file", "url"]>>;
|
|
41
41
|
modelOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
43
|
prompt: string;
|
|
44
44
|
model?: string | undefined;
|
|
45
45
|
modelOptions?: Record<string, unknown> | undefined;
|
|
46
|
-
outputFileType?: "local" | "file" | undefined;
|
|
46
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
47
47
|
size?: string | undefined;
|
|
48
48
|
seconds?: string | undefined;
|
|
49
49
|
}, {
|
|
50
50
|
prompt: string;
|
|
51
51
|
model?: string | undefined;
|
|
52
52
|
modelOptions?: Record<string, unknown> | undefined;
|
|
53
|
-
outputFileType?: "local" | "file" | undefined;
|
|
53
|
+
outputFileType?: "local" | "file" | "url" | undefined;
|
|
54
54
|
size?: string | undefined;
|
|
55
55
|
seconds?: string | undefined;
|
|
56
56
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/core",
|
|
3
|
-
"version": "1.65.0-beta.
|
|
3
|
+
"version": "1.65.0-beta.2",
|
|
4
4
|
"description": "The functional core of agentic AI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"zod-from-json-schema": "^0.0.5",
|
|
93
93
|
"zod-to-json-schema": "^3.24.6",
|
|
94
94
|
"@aigne/afs": "^1.1.1-beta",
|
|
95
|
-
"@aigne/
|
|
96
|
-
"@aigne/
|
|
95
|
+
"@aigne/platform-helpers": "^0.6.3",
|
|
96
|
+
"@aigne/observability-api": "^0.11.3"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"@types/bun": "^1.2.22",
|