Skip to content

Commit 433600e

Browse files
authored
Merge branch 'main' into issue-245-branch-commonjs-interop
2 parents 8cfb0a1 + f825f71 commit 433600e

File tree

124 files changed

+3173
-1110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+3173
-1110
lines changed

.changeset/spotty-nights-tell.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@openai/agents-extensions': patch
3+
'@openai/agents-realtime': patch
4+
'@openai/agents-openai': patch
5+
'@openai/agents-core': patch
6+
'@openai/agents': patch
7+
---
8+
9+
Fix #187 Agent outputType type error with [email protected]+

.changeset/tender-turtles-carry.md

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

.github/workflows/release-tag.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Create Release Tag
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
CI: true
10+
11+
jobs:
12+
create-tag:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Determine if latest commit is a version bump
23+
id: check
24+
run: |
25+
commit_message=$(git log -1 --pretty=%B)
26+
echo "Latest commit message: $commit_message"
27+
if [[ "$commit_message" == "chore: update versions"* ]]; then
28+
echo "is_version_bump=true" >> "$GITHUB_OUTPUT"
29+
else
30+
echo "is_version_bump=false" >> "$GITHUB_OUTPUT"
31+
fi
32+
33+
- name: Create and push git tag
34+
if: steps.check.outputs.is_version_bump == 'true'
35+
run: |
36+
version=$(jq -r '.version' packages/agents/package.json)
37+
tag="v${version}"
38+
echo "Tag derived from package version: $tag"
39+
40+
if git rev-parse "refs/tags/$tag" >/dev/null 2>&1; then
41+
echo "Tag $tag already exists. Skipping."
42+
exit 0
43+
fi
44+
45+
git config user.name "github-actions[bot]"
46+
git config user.email "github-actions[bot]@users.noreply.github.com"
47+
git tag -a "$tag" -m "Release $tag"
48+
git push origin "$tag"

.github/workflows/release.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Changesets
1+
name: Changesets Release
22

33
on:
44
workflow_run:
@@ -45,34 +45,10 @@ jobs:
4545
with:
4646
commit: 'chore: update versions'
4747
title: 'chore: update versions'
48+
version: pnpm bump-version
4849
publish: pnpm ci:publish
4950
env:
5051
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5152
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5253
NPM_CONFIG_PROVENANCE: true
5354
NPM_CONFIG_ACCESS: public
54-
55-
- name: Push metadata changes
56-
run: |
57-
files="packages/agents-core/src/metadata.ts packages/agents-extensions/src/metadata.ts packages/agents-openai/src/metadata.ts packages/agents-realtime/src/metadata.ts packages/agents/src/metadata.ts"
58-
if git diff --quiet -- $files; then
59-
echo "No metadata changes to push"
60-
else
61-
# -- Commit all the metadata.ts files --
62-
git config user.name "github-actions[bot]"
63-
git config user.email "github-actions[bot]@users.noreply.github.com"
64-
git add $files
65-
git commit -m "chore: sync metadata files"
66-
git push origin HEAD:main
67-
# -- Push a new release tag as well --
68-
# We don't use changeset release command because we always do release for all the packages
69-
# Thus, creating git tags manually here
70-
version=$(jq -r '.version' packages/agents/package.json)
71-
tag="v${version}"
72-
if git rev-parse "refs/tags/$tag" >/dev/null 2>&1; then
73-
echo "Tag $tag already exists"
74-
else
75-
git tag -a "$tag" -m "Release $tag"
76-
git push origin "$tag"
77-
fi
78-
fi

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ jobs:
3737
- name: Compile examples
3838
run: pnpm -r build-check
3939
- name: Run tests
40-
run: pnpm test
40+
run: pnpm test

.github/workflows/update-docs.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: "Update Translated Docs"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- '!docs/src/content/docs/ja/**'
10+
11+
jobs:
12+
update-docs:
13+
if: "!contains(github.event.head_commit.message, 'Update all translated document pages')"
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- name: Install pnpm
21+
uses: pnpm/action-setup@v4
22+
with:
23+
version: 10.13.1
24+
run_install: false
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
cache: 'pnpm'
30+
- name: Install dependencies
31+
run: pnpm install
32+
33+
- name: Build workspace packages
34+
run: pnpm build
35+
36+
- name: Translate docs
37+
env:
38+
OPENAI_API_KEY: ${{ secrets.PROD_OPENAI_API_KEY }}
39+
run: |
40+
pnpm docs:translate
41+
pnpm docs:build # to make sure if the generated docs are valid
42+
43+
- name: Commit changes
44+
id: commit
45+
run: |
46+
git config user.name "github-actions[bot]"
47+
git config user.email "github-actions[bot]@users.noreply.github.com"
48+
git add docs/
49+
if [ -n "$(git status --porcelain)" ]; then
50+
git commit -m "Update all translated document pages"
51+
echo "committed=true" >> "$GITHUB_OUTPUT"
52+
else
53+
echo "No changes to commit"
54+
echo "committed=false" >> "$GITHUB_OUTPUT"
55+
fi
56+
57+
- name: Create Pull Request
58+
if: steps.commit.outputs.committed == 'true'
59+
uses: peter-evans/create-pull-request@v6
60+
with:
61+
commit-message: "Update all translated document pages"
62+
title: "Update all translated document pages"
63+
body: "Automated update of translated documentation"
64+
branch: update-translated-docs-${{ github.run_id }}
65+
delete-branch: true

.husky/pre-commit

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,11 @@ git update-index --again
88

99
# check for secrets
1010
if [ -z "$CI" ] && [ -z "$GITHUB_ACTIONS" ]; then
11+
if ! command -v trufflehog >/dev/null 2>&1; then
12+
echo "trufflehog' is not installed or not in your PATH."
13+
echo "Download it from: https://github.com/trufflesecurity/trufflehog"
14+
echo "Skipping secrets check due to missing trufflehog."
15+
exit 1
16+
fi
1117
trufflehog git file://. --since-commit HEAD --fail
1218
fi

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# OpenAI Agents SDK (JavaScript/TypeScript)
22

3+
[![npm version](https://badge.fury.io/js/@openai%2Fagents.svg)](https://badge.fury.io/js/@openai%2Fagents)
4+
[![CI](https://github.com/openai/openai-agents-js/actions/workflows/test.yml/badge.svg)](https://github.com/openai/openai-agents-js/actions/workflows/test.yml)
5+
36
The OpenAI Agents SDK is a lightweight yet powerful framework for building multi-agent workflows in JavaScript/TypeScript. It is provider-agnostic, supporting OpenAI APIs and more.
47

58
<img src="https://cdn.openai.com/API/docs/images/orchestration.png" alt="Image of the Agents Tracing UI" style="max-height: 803px;">

docs/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
"translate": "tsx src/scripts/translate.ts"
1212
},
1313
"dependencies": {
14-
"@astrojs/starlight": "^0.34.3",
15-
"@astrojs/starlight-tailwind": "^3.0.1",
14+
"@astrojs/starlight": "^0.35.2",
15+
"@astrojs/starlight-tailwind": "^4.0.1",
1616
"@openai/agents": "workspace:*",
1717
"@tailwindcss/vite": "^4.0.17",
18-
"astro": "^5.5.3",
18+
"astro": "^5.13.0",
1919
"sharp": "^0.34.2",
20-
"starlight-llms-txt": "^0.5.0",
21-
"starlight-typedoc": "^0.21.0",
20+
"starlight-llms-txt": "^0.6.0",
21+
"starlight-typedoc": "^0.21.3",
2222
"typedoc": "^0.28.1",
23-
"typedoc-plugin-markdown": "^4.6.0"
23+
"typedoc-plugin-markdown": "^4.8.1"
2424
},
2525
"devDependencies": {
2626
"tailwindcss": "^3.3.3",

0 commit comments

Comments
 (0)