Skip to content

Commit fec55a3

Browse files
authored
Merge branch 'main' into main
2 parents e7086aa + d125228 commit fec55a3

27 files changed

+224
-91
lines changed

.changeset/fast-ads-return.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/ten-lizards-deny.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/wild-hotels-jump.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/customer-service/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ async function main() {
169169
console.log(`${agentName}: Skipping item: ${newItem.type}`);
170170
}
171171
}
172-
// Defensive: check if toInputList and lastAgent exist
173-
if (typeof (result as any).toInputList === 'function') {
174-
inputItems = (result as any).toInputList();
172+
// Defensive: check if history and lastAgent exist
173+
if ((result as any).history) {
174+
inputItems = (result as any).history;
175175
}
176176
if ((result as any).lastAgent) {
177177
currentAgent = (result as any).lastAgent;

examples/docs/extensions/twilio-basic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const agent = new RealtimeAgent({
99
// the OpenAI Realtime API.
1010
const twilioTransport = new TwilioRealtimeTransportLayer({
1111
// @ts-expect-error - this is not defined
12-
twilioWebSocket: websoketConnection,
12+
twilioWebSocket: websocketConnection,
1313
});
1414

1515
const session = new RealtimeSession(agent, {

packages/agents-core/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# @openai/agents-core
22

3+
## 0.0.10
4+
5+
### Patch Changes
6+
7+
- c248a7d: Fix #138 by checking the unexpected absence of state.currentAgent.handoffs
8+
- ff63127: Fix #129 The model in run config should be used over an agent's default setting
9+
- 9c60282: Fix a bug where some of the exceptions thrown from runImplementation.ts could be unhandled
10+
- f61fd18: Don't enable `cacheToolsList` per default for MCP servers
11+
- c248a7d: Fix #138 by checking the unexpected absence of currentAgent.handoffs
12+
313
## 0.0.9
414

515
### Patch Changes

packages/agents-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@openai/agents-core",
33
"repository": "https://github.com/openai/openai-agents-js",
44
"homepage": "https://openai.github.io/openai-agents-js/",
5-
"version": "0.0.9",
5+
"version": "0.0.10",
66
"description": "The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows.",
77
"author": "OpenAI <[email protected]>",
88
"main": "dist/index.js",

packages/agents-core/src/result.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,9 @@ export class StreamedRunResult<
308308
}
309309
this.#error = err;
310310
this.#completedPromiseReject?.(err);
311+
this.#completedPromise.catch((e) => {
312+
logger.debug(`Resulted in an error: ${e}`);
313+
});
311314
}
312315

313316
/**

packages/agents-core/src/run.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,12 @@ export class Runner extends RunHooks<any, AgentOutputType<unknown>> {
302302
}
303303

304304
if (state._currentStep.type === 'next_step_run_again') {
305-
const handoffs = state._currentAgent.handoffs.map(getHandoff);
305+
const handoffs: Handoff<any>[] = [];
306+
if (state._currentAgent.handoffs) {
307+
// While this array usually must not be undefined,
308+
// we've added this check to prevent unexpected runtime errors like https://github.com/openai/openai-agents-js/issues/138
309+
handoffs.push(...state._currentAgent.handoffs.map(getHandoff));
310+
}
306311

307312
if (!state._currentAgentSpan) {
308313
const handoffNames = handoffs.map((h) => h.agentName);

packages/agents-extensions/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @openai/agents-extensions
22

3+
## 0.0.10
4+
5+
### Patch Changes
6+
7+
- 955e6f1: Fix #152 empty arguments parsing error in ai-sdk extension
8+
- 787968b: fix: use web standard event apis for twilio websocket
9+
- Updated dependencies [787968b]
10+
- @openai/agents@0.0.10
11+
312
## 0.0.9
413

514
### Patch Changes

0 commit comments

Comments
 (0)