Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/publish-agent-framework-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Agent Framework Python

on:
push:
branches:
- main
paths:
- "packages/agent-framework-python/pyproject.toml"

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: ./packages/agent-framework-python
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install build dependencies
run: pip install hatchling build

- name: Build package
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: packages/agent-framework-python/dist/
25 changes: 21 additions & 4 deletions .github/workflows/publish-ai-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'

- name: Upgrade npm for trusted publishing support
run: npm install -g npm@latest

- name: Setup Bun
uses: oven-sh/setup-bun@v2

Expand All @@ -34,11 +38,24 @@ jobs:
- name: Install dependencies
run: bun install

- name: Check if version changed
id: version-check
run: |
PACKAGE_NAME=$(jq -r '.name' package.json)
LOCAL_VERSION=$(jq -r '.version' package.json)
NPM_VERSION=$(npm view "$PACKAGE_NAME" version 2>/dev/null || echo "0.0.0")
if [ "$LOCAL_VERSION" = "$NPM_VERSION" ]; then
echo "Version $LOCAL_VERSION already published, skipping."
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "Publishing $LOCAL_VERSION (npm has $NPM_VERSION)"
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Build
if: steps.version-check.outputs.changed == 'true'
run: bun run build

- name: Publish
run: pnpm publish --access public --verbose
env:
NPM_CONFIG_PROVENANCE: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: steps.version-check.outputs.changed == 'true'
run: npm publish --access public --provenance
37 changes: 37 additions & 0 deletions .github/workflows/publish-cartesia-sdk-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Cartesia SDK Python

on:
push:
branches:
- main
paths:
- "packages/cartesia-sdk-python/pyproject.toml"

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: ./packages/cartesia-sdk-python
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install build dependencies
run: pip install hatchling build

- name: Build package
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: packages/cartesia-sdk-python/dist/
61 changes: 61 additions & 0 deletions .github/workflows/publish-memory-graph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish Memory Graph

on:
push:
branches:
- main
paths:
- "packages/memory-graph/package.json"

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: ./packages/memory-graph
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'

- name: Upgrade npm for trusted publishing support
run: npm install -g npm@latest

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies
run: bun install

- name: Check if version changed
id: version-check
run: |
PACKAGE_NAME=$(jq -r '.name' package.json)
LOCAL_VERSION=$(jq -r '.version' package.json)
NPM_VERSION=$(npm view "$PACKAGE_NAME" version 2>/dev/null || echo "0.0.0")
if [ "$LOCAL_VERSION" = "$NPM_VERSION" ]; then
echo "Version $LOCAL_VERSION already published, skipping."
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "Publishing $LOCAL_VERSION (npm has $NPM_VERSION)"
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Build
if: steps.version-check.outputs.changed == 'true'
run: bun run build

- name: Publish
if: steps.version-check.outputs.changed == 'true'
run: npm publish --access public --provenance
37 changes: 37 additions & 0 deletions .github/workflows/publish-openai-sdk-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish OpenAI SDK Python

on:
push:
branches:
- main
paths:
- "packages/openai-sdk-python/pyproject.toml"

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: ./packages/openai-sdk-python
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install build dependencies
run: pip install hatchling build

- name: Build package
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: packages/openai-sdk-python/dist/
37 changes: 37 additions & 0 deletions .github/workflows/publish-pipecat-sdk-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Pipecat SDK Python

on:
push:
branches:
- main
paths:
- "packages/pipecat-sdk-python/pyproject.toml"

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: ./packages/pipecat-sdk-python
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install build dependencies
run: pip install hatchling build

- name: Build package
run: python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: packages/pipecat-sdk-python/dist/
61 changes: 61 additions & 0 deletions .github/workflows/publish-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Publish Tools

on:
push:
branches:
- main
paths:
- "packages/tools/package.json"

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: ./packages/tools
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'

- name: Upgrade npm for trusted publishing support
run: npm install -g npm@latest

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies
run: bun install

- name: Check if version changed
id: version-check
run: |
PACKAGE_NAME=$(jq -r '.name' package.json)
LOCAL_VERSION=$(jq -r '.version' package.json)
NPM_VERSION=$(npm view "$PACKAGE_NAME" version 2>/dev/null || echo "0.0.0")
if [ "$LOCAL_VERSION" = "$NPM_VERSION" ]; then
echo "Version $LOCAL_VERSION already published, skipping."
echo "changed=false" >> "$GITHUB_OUTPUT"
else
echo "Publishing $LOCAL_VERSION (npm has $NPM_VERSION)"
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Build
if: steps.version-check.outputs.changed == 'true'
run: bun run build

- name: Publish
if: steps.version-check.outputs.changed == 'true'
run: npm publish --access public --provenance
19 changes: 7 additions & 12 deletions apps/mcp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ app.get("/", (c) => {
// MCP clients use this to discover the authorization server
app.get("/.well-known/oauth-protected-resource", (c) => {
const apiUrl = c.env.API_URL || DEFAULT_API_URL

const host = c.req.header("x-forwarded-host") || c.req.header("host")
const proto = c.req.header("x-forwarded-proto") || "https"
const resourceUrl = host ? `${proto}://${host}` : "https://mcp.supermemory.ai"
Expand Down Expand Up @@ -114,18 +115,12 @@ const handleMcpRequest = async (c: Context<{ Bindings: Bindings }>) => {
const token = authHeader?.replace(/^Bearer\s+/i, "")
const containerTag = c.req.header("x-sm-project")
const apiUrl = c.env.API_URL || DEFAULT_API_URL
const mcpURL =
c.env.API_URL === "http://localhost:8787"
? "http://localhost:8788"
: "https://mcp.supermemory.ai"

// TODO: commented out because this might be issue with auth
//const reqHost = c.req.header("x-forwarded-host") || c.req.header("host") || ""
//const reqProto = c.req.header("x-forwarded-proto") || "https"
//const resourceMetadataUrl = reqHost
// ? `${reqProto}://${reqHost}/.well-known/oauth-protected-resource`
// : "/.well-known/oauth-protected-resource"
const resourceMetadataUrl = `${mcpURL}/.well-known/oauth-protected-resource`

const reqHost = c.req.header("x-forwarded-host") || c.req.header("host") || ""
const reqProto = c.req.header("x-forwarded-proto") || "https"
const resourceMetadataUrl = reqHost
? `${reqProto}://${reqHost}/.well-known/oauth-protected-resource`
: "/.well-known/oauth-protected-resource"

if (!token) {
return new Response("Unauthorized", {
Expand Down
2 changes: 1 addition & 1 deletion packages/cartesia-sdk-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "supermemory-cartesia"
version = "0.1.0"
version = "0.1.1"
description = "Supermemory integration for Cartesia Line - memory-enhanced voice agents"
readme = "README.md"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@supermemory/tools",
"type": "module",
"version": "1.4.02",
"version": "1.4.4",
"description": "Memory tools for AI SDK and OpenAI function calling with supermemory",
"scripts": {
"build": "tsdown",
Expand Down
Loading