@openai/agents-core 0.2.0 → 0.2.1
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/dist/metadata.js +3 -3
- package/dist/metadata.js.map +1 -1
- package/dist/metadata.mjs +3 -3
- package/dist/metadata.mjs.map +1 -1
- package/dist/utils/tools.js +59 -20
- package/dist/utils/tools.js.map +1 -1
- package/dist/utils/tools.mjs +59 -20
- package/dist/utils/tools.mjs.map +1 -1
- package/package.json +2 -2
package/dist/metadata.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.METADATA = void 0;
|
|
5
5
|
exports.METADATA = {
|
|
6
6
|
"name": "@openai/agents-core",
|
|
7
|
-
"version": "0.2.
|
|
7
|
+
"version": "0.2.1",
|
|
8
8
|
"versions": {
|
|
9
|
-
"@openai/agents-core": "0.2.
|
|
10
|
-
"openai": "^
|
|
9
|
+
"@openai/agents-core": "0.2.1",
|
|
10
|
+
"openai": "^6"
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
exports.default = exports.METADATA;
|
package/dist/metadata.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":";AACA,uCAAuC;;;AAE1B,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE,qBAAqB;IAC7B,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE;QACV,qBAAqB,EAAE,OAAO;QAC9B,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":";AACA,uCAAuC;;;AAE1B,QAAA,QAAQ,GAAG;IACtB,MAAM,EAAE,qBAAqB;IAC7B,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE;QACV,qBAAqB,EAAE,OAAO;QAC9B,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF,kBAAe,gBAAQ,CAAC"}
|
package/dist/metadata.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// This file is automatically generated
|
|
2
2
|
export const METADATA = {
|
|
3
3
|
"name": "@openai/agents-core",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.1",
|
|
5
5
|
"versions": {
|
|
6
|
-
"@openai/agents-core": "0.2.
|
|
7
|
-
"openai": "^
|
|
6
|
+
"@openai/agents-core": "0.2.1",
|
|
7
|
+
"openai": "^6"
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
10
|
export default METADATA;
|
package/dist/metadata.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.mjs","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AACA,uCAAuC;AAEvC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM,EAAE,qBAAqB;IAC7B,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE;QACV,qBAAqB,EAAE,OAAO;QAC9B,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"metadata.mjs","sourceRoot":"","sources":["../src/metadata.ts"],"names":[],"mappings":"AACA,uCAAuC;AAEvC,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM,EAAE,qBAAqB;IAC7B,SAAS,EAAE,OAAO;IAClB,UAAU,EAAE;QACV,qBAAqB,EAAE,OAAO;QAC9B,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/dist/utils/tools.js
CHANGED
|
@@ -8,6 +8,9 @@ const errors_1 = require("../errors.js");
|
|
|
8
8
|
const typeGuards_1 = require("./typeGuards.js");
|
|
9
9
|
const zodJsonSchemaCompat_1 = require("./zodJsonSchemaCompat.js");
|
|
10
10
|
const zodCompat_1 = require("./zodCompat.js");
|
|
11
|
+
const zodResponsesFunctionCompat = zod_1.zodResponsesFunction;
|
|
12
|
+
// The `.schema` payload is all we need, so a lightweight signature keeps the compiler happy.
|
|
13
|
+
const zodTextFormatCompat = zod_1.zodTextFormat;
|
|
11
14
|
// openai/helpers/zod cannot emit strict schemas for every Zod runtime
|
|
12
15
|
// (notably Zod v4), so we delegate to a small local converter living in
|
|
13
16
|
// zodJsonSchemaCompat.ts whenever its output is missing the required JSON Schema bits.
|
|
@@ -42,26 +45,38 @@ function toFunctionToolName(name) {
|
|
|
42
45
|
function getSchemaAndParserFromInputType(inputType, name) {
|
|
43
46
|
const parser = (input) => JSON.parse(input);
|
|
44
47
|
if ((0, typeGuards_1.isZodObject)(inputType)) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
const useFallback = (originalError) => {
|
|
49
|
+
const fallbackSchema = buildJsonSchemaFromZod(inputType);
|
|
50
|
+
if (fallbackSchema) {
|
|
51
|
+
return {
|
|
52
|
+
schema: fallbackSchema,
|
|
53
|
+
parser: (rawInput) => inputType.parse(JSON.parse(rawInput)),
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const errorMessage = originalError instanceof Error
|
|
57
|
+
? ` Upstream helper error: ${originalError.message}`
|
|
58
|
+
: '';
|
|
59
|
+
throw new errors_1.UserError(`Unable to convert the provided Zod schema to JSON Schema. Ensure that the \`zod\` package is available at runtime or provide a JSON schema object instead.${errorMessage}`);
|
|
60
|
+
};
|
|
61
|
+
let formattedFunction;
|
|
62
|
+
try {
|
|
63
|
+
formattedFunction = zodResponsesFunctionCompat({
|
|
64
|
+
name,
|
|
65
|
+
parameters: (0, zodCompat_1.asZodType)(inputType),
|
|
66
|
+
function: () => { }, // empty function here to satisfy the OpenAI helper
|
|
67
|
+
description: '',
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
return useFallback(error);
|
|
72
|
+
}
|
|
51
73
|
if ((0, zodJsonSchemaCompat_1.hasJsonSchemaObjectShape)(formattedFunction.parameters)) {
|
|
52
74
|
return {
|
|
53
75
|
schema: formattedFunction.parameters,
|
|
54
76
|
parser: formattedFunction.$parseRaw,
|
|
55
77
|
};
|
|
56
78
|
}
|
|
57
|
-
|
|
58
|
-
if (fallbackSchema) {
|
|
59
|
-
return {
|
|
60
|
-
schema: fallbackSchema,
|
|
61
|
-
parser: (rawInput) => inputType.parse(JSON.parse(rawInput)),
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
throw new errors_1.UserError('Unable to convert the provided Zod schema to JSON Schema. Ensure that the `zod` package is available at runtime or provide a JSON schema object instead.');
|
|
79
|
+
return useFallback();
|
|
65
80
|
}
|
|
66
81
|
else if (typeof inputType === 'object' && inputType !== null) {
|
|
67
82
|
return {
|
|
@@ -79,13 +94,37 @@ function convertAgentOutputTypeToSerializable(outputType) {
|
|
|
79
94
|
return 'text';
|
|
80
95
|
}
|
|
81
96
|
if ((0, typeGuards_1.isZodObject)(outputType)) {
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
97
|
+
const useFallback = (existing, originalError) => {
|
|
98
|
+
const fallbackSchema = buildJsonSchemaFromZod(outputType);
|
|
99
|
+
if (fallbackSchema) {
|
|
100
|
+
return {
|
|
101
|
+
type: existing?.type ?? 'json_schema',
|
|
102
|
+
name: existing?.name ?? 'output',
|
|
103
|
+
strict: existing?.strict ?? false,
|
|
104
|
+
schema: fallbackSchema,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
const errorMessage = originalError instanceof Error
|
|
108
|
+
? ` Upstream helper error: ${originalError.message}`
|
|
109
|
+
: '';
|
|
110
|
+
throw new errors_1.UserError(`Unable to convert the provided Zod schema to JSON Schema. Ensure that the \`zod\` package is available at runtime or provide a JSON schema object instead.${errorMessage}`);
|
|
88
111
|
};
|
|
112
|
+
let output;
|
|
113
|
+
try {
|
|
114
|
+
output = zodTextFormatCompat((0, zodCompat_1.asZodType)(outputType), 'output');
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
return useFallback(undefined, error);
|
|
118
|
+
}
|
|
119
|
+
if ((0, zodJsonSchemaCompat_1.hasJsonSchemaObjectShape)(output.schema)) {
|
|
120
|
+
return {
|
|
121
|
+
type: output.type,
|
|
122
|
+
name: output.name,
|
|
123
|
+
strict: output.strict || false,
|
|
124
|
+
schema: output.schema,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
return useFallback(output);
|
|
89
128
|
}
|
|
90
129
|
return outputType;
|
|
91
130
|
}
|
package/dist/utils/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":";;AAsEA,gDAaC;AAUD,0EAyDC;AAKD,oFAoDC;AA/MD,4CAAyE;AACzE,yCAAsC;AAGtC,gDAA2C;AAE3C,kEAG+B;AAE/B,8CAAwC;AAgBxC,MAAM,0BAA0B,GAEI,0BAEH,CAAC;AASlC,6FAA6F;AAC7F,MAAM,mBAAmB,GAIS,mBAIH,CAAC;AAMhC,sEAAsE;AACtE,wEAAwE;AACxE,uFAAuF;AACvF,SAAS,sBAAsB,CAC7B,SAAwB;IAExB,OAAO,IAAA,yCAAmB,EAAC,SAAS,CAAC,CAAC;AACxC,CAAC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,kCAAkC;IAClC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAEhC,uDAAuD;IACvD,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;IAE1C,+BAA+B;IAC/B,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,C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Q,CAAC,CAAC;QAChE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACvC,CAAC;QAED,IAAI,IAAA,8CAAwB,EAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YAC5C,OAAO;gBACL,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,IAAI,EAAE,MAAM,CAAC,IAAI;gBACjB,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,KAAK;gBAC9B,MAAM,EAAE,MAAM,CAAC,MAA+B;aAC/C,CAAC;QACJ,CAAC;QAED,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
package/dist/utils/tools.mjs
CHANGED
|
@@ -3,6 +3,9 @@ import { UserError } from "../errors.mjs";
|
|
|
3
3
|
import { isZodObject } from "./typeGuards.mjs";
|
|
4
4
|
import { zodJsonSchemaCompat, hasJsonSchemaObjectShape, } from "./zodJsonSchemaCompat.mjs";
|
|
5
5
|
import { asZodType } from "./zodCompat.mjs";
|
|
6
|
+
const zodResponsesFunctionCompat = zodResponsesFunction;
|
|
7
|
+
// The `.schema` payload is all we need, so a lightweight signature keeps the compiler happy.
|
|
8
|
+
const zodTextFormatCompat = zodTextFormat;
|
|
6
9
|
// openai/helpers/zod cannot emit strict schemas for every Zod runtime
|
|
7
10
|
// (notably Zod v4), so we delegate to a small local converter living in
|
|
8
11
|
// zodJsonSchemaCompat.ts whenever its output is missing the required JSON Schema bits.
|
|
@@ -37,26 +40,38 @@ export function toFunctionToolName(name) {
|
|
|
37
40
|
export function getSchemaAndParserFromInputType(inputType, name) {
|
|
38
41
|
const parser = (input) => JSON.parse(input);
|
|
39
42
|
if (isZodObject(inputType)) {
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
const useFallback = (originalError) => {
|
|
44
|
+
const fallbackSchema = buildJsonSchemaFromZod(inputType);
|
|
45
|
+
if (fallbackSchema) {
|
|
46
|
+
return {
|
|
47
|
+
schema: fallbackSchema,
|
|
48
|
+
parser: (rawInput) => inputType.parse(JSON.parse(rawInput)),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const errorMessage = originalError instanceof Error
|
|
52
|
+
? ` Upstream helper error: ${originalError.message}`
|
|
53
|
+
: '';
|
|
54
|
+
throw new UserError(`Unable to convert the provided Zod schema to JSON Schema. Ensure that the \`zod\` package is available at runtime or provide a JSON schema object instead.${errorMessage}`);
|
|
55
|
+
};
|
|
56
|
+
let formattedFunction;
|
|
57
|
+
try {
|
|
58
|
+
formattedFunction = zodResponsesFunctionCompat({
|
|
59
|
+
name,
|
|
60
|
+
parameters: asZodType(inputType),
|
|
61
|
+
function: () => { }, // empty function here to satisfy the OpenAI helper
|
|
62
|
+
description: '',
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
return useFallback(error);
|
|
67
|
+
}
|
|
46
68
|
if (hasJsonSchemaObjectShape(formattedFunction.parameters)) {
|
|
47
69
|
return {
|
|
48
70
|
schema: formattedFunction.parameters,
|
|
49
71
|
parser: formattedFunction.$parseRaw,
|
|
50
72
|
};
|
|
51
73
|
}
|
|
52
|
-
|
|
53
|
-
if (fallbackSchema) {
|
|
54
|
-
return {
|
|
55
|
-
schema: fallbackSchema,
|
|
56
|
-
parser: (rawInput) => inputType.parse(JSON.parse(rawInput)),
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
throw new UserError('Unable to convert the provided Zod schema to JSON Schema. Ensure that the `zod` package is available at runtime or provide a JSON schema object instead.');
|
|
74
|
+
return useFallback();
|
|
60
75
|
}
|
|
61
76
|
else if (typeof inputType === 'object' && inputType !== null) {
|
|
62
77
|
return {
|
|
@@ -74,13 +89,37 @@ export function convertAgentOutputTypeToSerializable(outputType) {
|
|
|
74
89
|
return 'text';
|
|
75
90
|
}
|
|
76
91
|
if (isZodObject(outputType)) {
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
const useFallback = (existing, originalError) => {
|
|
93
|
+
const fallbackSchema = buildJsonSchemaFromZod(outputType);
|
|
94
|
+
if (fallbackSchema) {
|
|
95
|
+
return {
|
|
96
|
+
type: existing?.type ?? 'json_schema',
|
|
97
|
+
name: existing?.name ?? 'output',
|
|
98
|
+
strict: existing?.strict ?? false,
|
|
99
|
+
schema: fallbackSchema,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const errorMessage = originalError instanceof Error
|
|
103
|
+
? ` Upstream helper error: ${originalError.message}`
|
|
104
|
+
: '';
|
|
105
|
+
throw new UserError(`Unable to convert the provided Zod schema to JSON Schema. Ensure that the \`zod\` package is available at runtime or provide a JSON schema object instead.${errorMessage}`);
|
|
83
106
|
};
|
|
107
|
+
let output;
|
|
108
|
+
try {
|
|
109
|
+
output = zodTextFormatCompat(asZodType(outputType), 'output');
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
return useFallback(undefined, error);
|
|
113
|
+
}
|
|
114
|
+
if (hasJsonSchemaObjectShape(output.schema)) {
|
|
115
|
+
return {
|
|
116
|
+
type: output.type,
|
|
117
|
+
name: output.name,
|
|
118
|
+
strict: output.strict || false,
|
|
119
|
+
schema: output.schema,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
return useFallback(output);
|
|
84
123
|
}
|
|
85
124
|
return outputType;
|
|
86
125
|
}
|
package/dist/utils/tools.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":"OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,oBAAoB;OACjE,EAAE,SAAS,EAAE;OAGb,EAAE,WAAW,EAAE;OAEf,EACL,mB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AAM,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@openai/agents-core",
|
|
3
3
|
"repository": "https://github.com/openai/openai-agents-js",
|
|
4
4
|
"homepage": "https://openai.github.io/openai-agents-js/",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.1",
|
|
6
6
|
"description": "The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.",
|
|
7
7
|
"author": "OpenAI <support@openai.com>",
|
|
8
8
|
"main": "dist/index.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@modelcontextprotocol/sdk": "^1.17.2"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"openai": "^
|
|
68
|
+
"openai": "^6",
|
|
69
69
|
"debug": "^4.4.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|