Skip to content

Commit c77312b

Browse files
authored
Merge pull request #10 from perplexityai/release-please--branches--main--changes--next--components--perplexity_ai
2 parents 9b3967a + 9f5d6b8 commit c77312b

Some content is hidden

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

54 files changed

+9971
-33
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Node
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: '20'
27+
node-version: '22'
2828

2929
- name: Bootstrap
3030
run: ./scripts/bootstrap
@@ -46,7 +46,7 @@ jobs:
4646
- name: Set up Node
4747
uses: actions/setup-node@v4
4848
with:
49-
node-version: '20'
49+
node-version: '22'
5050

5151
- name: Bootstrap
5252
run: ./scripts/bootstrap
@@ -68,6 +68,15 @@ jobs:
6868
AUTH: ${{ steps.github-oidc.outputs.github_token }}
6969
SHA: ${{ github.sha }}
7070
run: ./scripts/utils/upload-artifact.sh
71+
72+
- name: Upload MCP Server tarball
73+
if: github.repository == 'stainless-sdks/perplexity-typescript'
74+
env:
75+
URL: https://pkg.stainless.com/s?subpackage=mcp-server
76+
AUTH: ${{ steps.github-oidc.outputs.github_token }}
77+
SHA: ${{ github.sha }}
78+
BASE_PATH: packages/mcp-server
79+
run: ./scripts/utils/upload-artifact.sh
7180
test:
7281
timeout-minutes: 10
7382
name: test
@@ -79,10 +88,13 @@ jobs:
7988
- name: Set up Node
8089
uses: actions/setup-node@v4
8190
with:
82-
node-version: '20'
91+
node-version: '22'
8392

8493
- name: Bootstrap
8594
run: ./scripts/bootstrap
8695

96+
- name: Build
97+
run: ./scripts/build
98+
8799
- name: Run tests
88100
run: ./scripts/test

.github/workflows/docker-mcp.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Build and Push MCP Server Docker Image
2+
3+
# This workflow is triggered when a GitHub release is created.
4+
# It can also be run manually to re-publish to Docker Hub in case it failed for some reason.
5+
# You can run this workflow by navigating to https://www.github.com/perplexityai/perplexity-node/actions/workflows/docker-mcp.yml
6+
on:
7+
release:
8+
types: [published]
9+
10+
workflow_dispatch:
11+
12+
env:
13+
REGISTRY: docker.io
14+
IMAGE_NAME: perplexityai/perplexity-mcp
15+
16+
jobs:
17+
build-and-push:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
# For OIDC token if using Docker Hub provenance
23+
id-token: write
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
with:
32+
driver-opts: |
33+
image=moby/buildkit:latest
34+
35+
- name: Log in to Docker Hub
36+
uses: docker/login-action@v3
37+
with:
38+
registry: ${{ env.REGISTRY }}
39+
username: ${{ vars.DOCKERHUB_USERNAME }}
40+
password: ${{ secrets.DOCKERHUB_TOKEN }}
41+
42+
- name: Determine Docker tags
43+
id: tags
44+
run: |
45+
# Get tags from our script
46+
TAGS=$(bash ./bin/docker-tags)
47+
48+
# Convert to format expected by docker/metadata-action
49+
DOCKER_TAGS=""
50+
while IFS= read -r tag; do
51+
if [ -n "$DOCKER_TAGS" ]; then
52+
DOCKER_TAGS="${DOCKER_TAGS}\n"
53+
fi
54+
DOCKER_TAGS="${DOCKER_TAGS}type=raw,value=${tag}"
55+
done <<< "$TAGS"
56+
57+
# Output for docker/metadata-action
58+
echo "tags<<EOF" >> $GITHUB_OUTPUT
59+
echo -e "$DOCKER_TAGS" >> $GITHUB_OUTPUT
60+
echo "EOF" >> $GITHUB_OUTPUT
61+
62+
# Save for build summary
63+
echo "DOCKER_TAG_LIST<<EOF" >> $GITHUB_ENV
64+
echo "$TAGS" >> $GITHUB_ENV
65+
echo "EOF" >> $GITHUB_ENV
66+
67+
- name: Extract metadata
68+
id: meta
69+
uses: docker/metadata-action@v5
70+
with:
71+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
72+
tags: |
73+
${{ steps.tags.outputs.tags }}
74+
labels: |
75+
org.opencontainers.image.title=Perplexity MCP Server
76+
org.opencontainers.image.description=Model Context Protocol server for Perplexity API
77+
org.opencontainers.image.vendor=perplexity
78+
79+
- name: Build and push Docker image
80+
uses: docker/build-push-action@v6
81+
with:
82+
context: .
83+
file: ./packages/mcp-server/Dockerfile
84+
platforms: linux/amd64
85+
push: true
86+
tags: ${{ steps.meta.outputs.tags }}
87+
labels: ${{ steps.meta.outputs.labels }}
88+
annotations: ${{ steps.meta.outputs.annotations }}
89+
cache-from: type=gha
90+
cache-to: type=gha,mode=max
91+
provenance: true
92+
sbom: true
93+
94+
- name: Generate build summary
95+
run: |
96+
echo "## Docker Build Summary" >> $GITHUB_STEP_SUMMARY
97+
echo "" >> $GITHUB_STEP_SUMMARY
98+
echo "**Image:** \`${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}\`" >> $GITHUB_STEP_SUMMARY
99+
echo "" >> $GITHUB_STEP_SUMMARY
100+
echo "**Tags:**" >> $GITHUB_STEP_SUMMARY
101+
echo "$DOCKER_TAG_LIST" | sed 's/^/- `/' | sed 's/$/`/' >> $GITHUB_STEP_SUMMARY
102+
echo "" >> $GITHUB_STEP_SUMMARY
103+
echo "**Platforms:** linux/amd64" >> $GITHUB_STEP_SUMMARY

.github/workflows/publish-npm.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
name: Publish NPM
55
on:
66
workflow_dispatch:
7+
inputs:
8+
path:
9+
description: The path to run the release in, e.g. '.' or 'packages/mcp-server'
10+
required: true
711

812
release:
913
types: [published]
@@ -12,6 +16,8 @@ jobs:
1216
publish:
1317
name: publish
1418
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
1521

1622
steps:
1723
- uses: actions/checkout@v4
@@ -27,6 +33,18 @@ jobs:
2733
2834
- name: Publish to NPM
2935
run: |
30-
bash ./bin/publish-npm
36+
if [ -n "${{ github.event.inputs.path }}" ]; then
37+
PATHS_RELEASED='[\"${{ github.event.inputs.path }}\"]'
38+
else
39+
PATHS_RELEASED='[\".\", \"packages/mcp-server\"]'
40+
fi
41+
yarn tsn scripts/publish-packages.ts "{ \"paths_released\": \"$PATHS_RELEASED\" }"
3142
env:
3243
NPM_TOKEN: ${{ secrets.PERPLEXITY_NPM_TOKEN || secrets.NPM_TOKEN }}
44+
45+
- name: Upload MCP Server DXT GitHub release asset
46+
run: |
47+
gh release upload ${{ github.event.release.tag_name }} \
48+
packages/mcp-server/perplexity_ai_perplexity_ai_api.mcpb
49+
env:
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ jobs:
1919
bash ./bin/check-release-environment
2020
env:
2121
NPM_TOKEN: ${{ secrets.PERPLEXITY_NPM_TOKEN || secrets.NPM_TOKEN }}
22+
DOCKERHUB_TOKEN: ${{ secrets.PERPLEXITY_DOCKERHUB_TOKEN || secrets.DOCKERHUB_TOKEN }}
2223

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ dist-deno
88
/*.tgz
99
.idea/
1010
.eslintcache
11-
11+
dist-bundle
12+
*.mcpb

.prettierignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ CHANGELOG.md
44
/deno
55

66
# don't format tsc output, will break source maps
7-
/dist
7+
dist

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.12.0"
2+
".": "0.13.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 5
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-cf9f981e30f8c9739f337a8b20436cebdbf35fffc70d6db5a09ec5a3b68cddef.yml
3-
openapi_spec_hash: d0cdcfdde0a0046e6451305475060748
4-
config_hash: 29552caca3e91432ed1a14f4a38487cc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/perplexity-ai%2Fperplexity-335f0ceddae39ba77e5abf8b2b72691a43174b25c2ec897cd7779db8d1524820.yml
3+
openapi_spec_hash: e34fc7a3c97b61c7aded4df4774f298e
4+
config_hash: 4e2c5b7ad4caa07a2ac1af091ecf6c9c

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 0.13.0 (2025-10-29)
4+
5+
Full Changelog: [v0.12.0...v0.13.0](https://github.com/perplexityai/perplexity-node/compare/v0.12.0...v0.13.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([ab3c07b](https://github.com/perplexityai/perplexity-node/commit/ab3c07b646009f43ac4d0001e6d61e8562073aba))
10+
11+
12+
### Chores
13+
14+
* configure new SDK language ([3cbc5a5](https://github.com/perplexityai/perplexity-node/commit/3cbc5a5e922e5fe0b2092b0088145bc1103f87d5))
15+
316
## 0.12.0 (2025-10-16)
417

518
Full Changelog: [v0.11.0...v0.12.0](https://github.com/perplexityai/perplexity-node/compare/v0.11.0...v0.12.0)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,12 @@ await client.chat.completions.create({ messages: [{ role: 'user', content: 'What
269269

270270
### Timeouts
271271

272-
Requests time out after 1 minute by default. You can configure this with a `timeout` option:
272+
Requests time out after 15 minutes by default. You can configure this with a `timeout` option:
273273

274274
```ts
275275
// Configure the default for all requests:
276276
const client = new Perplexity({
277-
timeout: 20 * 1000, // 20 seconds (default is 1 minute)
277+
timeout: 20 * 1000, // 20 seconds (default is 15 minutes)
278278
});
279279

280280
// Override per-request:

0 commit comments

Comments
 (0)