🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
chore: update sdk-api-spec bot for js sdk (#9226)
Hassieb Pakzadefa6fe7e6ab4
diff --git a/.github/workflows/sdk-api-spec.yml b/.github/workflows/sdk-api-spec.ymlindex be3d29cc7b..a88d950ec8 100644--- a/.github/workflows/sdk-api-spec.yml+++ b/.github/workflows/sdk-api-spec.yml@@ -74,14 +74,14 @@ jobs:gh pr list --author langfuse-bot --state open --json number --jq '.[].number' | xargs -I {} gh pr close {}# Create new branch and push changes- BRANCH_NAME="api-spec-bot-${{ github.sha }}"+ BRANCH_NAME="api-spec-bot-${GITHUB_SHA::7}"git checkout -b "$BRANCH_NAME"git add .- git commit -m "feat(api): update API spec from langfuse/langfuse ${GITHUB_SHA::8}"+ git commit -m "feat(api): update API spec from langfuse/langfuse ${GITHUB_SHA::7}"git push origin "$BRANCH_NAME"# Create PR- gh pr create --title "feat(api): update API spec from langfuse/langfuse ${GITHUB_SHA::8}" --body ""+ gh pr create --title "feat(api): update API spec from langfuse/langfuse ${GITHUB_SHA::7}" --body ""- name: Update TypeScript SDKenv:@@ -103,6 +103,15 @@ jobs:# Copy generated TypeScript SDK filescp -r ../langfuse/generated/typescript/* packages/core/src/api/+ # Patch compilation error inducing output+ # Without this patch, the JS SDK will not build due to+ # "Error: packages/core build: src/api/core/auth/index.ts(1,10): error TS1205: Re-exporting a type when 'isolatedModules' is enabled requires using 'export type'."+ if [ -f "packages/core/src/api/core/auth/index.ts" ]; then+ if grep -q '^export { AuthProvider } from "./AuthProvider.js";$' packages/core/src/api/core/auth/index.ts; then+ sed -i '1s/^export { AuthProvider }/export { type AuthProvider }/' packages/core/src/api/core/auth/index.ts+ fi+ fi+# Install dependencies and formatnpm install -g pnpmpnpm install@@ -118,11 +127,11 @@ jobs:gh pr list --author langfuse-bot --state open --json number --jq '.[].number' | xargs -I {} gh pr close {}# Create new branch and push changes- BRANCH_NAME="api-spec-bot-${{ github.sha }}"+ BRANCH_NAME="api-spec-bot-${GITHUB_SHA::7}"git checkout -b "$BRANCH_NAME"git add .- git commit -m "feat(api): update API spec from langfuse/langfuse ${GITHUB_SHA::8}" --no-verify+ git commit -m "feat(api): update API spec from langfuse/langfuse ${GITHUB_SHA::7}" --no-verifygit push origin "$BRANCH_NAME"# Create PR- gh pr create --title "feat(api): update API spec from langfuse/langfuse ${GITHUB_SHA::8}" --body ""+ gh pr create --title "feat(api): update API spec from langfuse/langfuse ${GITHUB_SHA::7}" --body ""