[PR #83] [MERGED] feat: Add TypeScript SDK generation and publishing pipeline #101

Closed
opened 2026-02-16 02:16:35 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/workflows-py/pull/83
Author: @zhaotai
Created: 9/5/2025
Status: Merged
Merged: 9/8/2025
Merged by: @zhaotai

Base: mainHead: feat/client-sdk


📝 Commits (10+)

📊 Changes

8 files changed (+629 additions, -3 deletions)

View changed files

📝 .github/workflows/publish_release.yml (+56 -1)
📝 .gitignore (+3 -0)
📝 pyproject.toml (+2 -1)
scripts/detect_change_type.py (+108 -0)
scripts/validate_version.py (+67 -0)
📝 tests/server/test_server_endpoints.py (+9 -0)
tests/test_scripts.py (+381 -0)
📝 uv.lock (+3 -1)

📄 Description

Summary

  • Adds automated TypeScript SDK generation from the Python server's OpenAPI schema
  • Creates a unified release pipeline with proper version synchronization
  • Uses @llamaindex/workflows-client as the npm package name

Changes

SDK Generation

  • Added scripts/generate_sdk.py to orchestrate SDK generation using @hey-api/openapi-ts
  • Configured SDK to be generated from Starlette's OpenAPI schema
  • SDK artifacts are gitignored, only configuration files are committed

CI/CD Pipeline

  • Version Validation: New job validates Git tags match pyproject.toml version
  • Separated Jobs: Python and TypeScript publishing are independent jobs
  • SDK CI: Added workflow to validate SDK generation on every PR
  • Single Source of Truth: pyproject.toml version drives both Python and SDK versions

Dependencies

  • Added pyyaml to server dependencies for OpenAPI schema generation
  • Configured pnpm as the package manager for Node.js operations
  • Added typecheck script to package.json for validation

Test Plan

  • SDK generation works locally with uv run hatch run server:sdk-generate
  • Version validation correctly fails on mismatched tags (tested with act)
  • Version validation passes with matching tags (tested with act)
  • Manual workflow dispatch uses pyproject.toml version (tested with act)
  • Release workflow publishes both packages successfully
  • SDK CI validates generation on PR

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/workflows-py/pull/83 **Author:** [@zhaotai](https://github.com/zhaotai) **Created:** 9/5/2025 **Status:** ✅ Merged **Merged:** 9/8/2025 **Merged by:** [@zhaotai](https://github.com/zhaotai) **Base:** `main` ← **Head:** `feat/client-sdk` --- ### 📝 Commits (10+) - [`f737eb9`](https://github.com/run-llama/workflows-py/commit/f737eb9cf6d0a8d4f368312b6865bc9a145d089d) inital commit - [`e7c2a56`](https://github.com/run-llama/workflows-py/commit/e7c2a56d4b68417aa179db02eb5b93b6133623dd) feat: Add TypeScript SDK generation and publishing pipeline - [`6066084`](https://github.com/run-llama/workflows-py/commit/606608490d7ef541ac5e654289c214d3cb7dd56a) fix lint - [`cac2c6d`](https://github.com/run-llama/workflows-py/commit/cac2c6d916b9ebfe68a2acfb6a5eb906d89daddf) fix - [`426734d`](https://github.com/run-llama/workflows-py/commit/426734dba672d09ba4def13612d33cef3a367b82) rebase main - [`c79342c`](https://github.com/run-llama/workflows-py/commit/c79342cb81962e2130801f6af25570bfba524ffc) fix - [`190a5cd`](https://github.com/run-llama/workflows-py/commit/190a5cddf639dd159f323e107b0e5bff0632b389) fix - [`9bb6efe`](https://github.com/run-llama/workflows-py/commit/9bb6efec9643722cde95a837bddcbc7b8a9b9a77) fix ci - [`bc2362c`](https://github.com/run-llama/workflows-py/commit/bc2362cfe6cc2f0015b3764e7b267a2409f6e2cd) refactor: Simplify to only publish OpenAPI spec as release artifact - [`fd9e4d5`](https://github.com/run-llama/workflows-py/commit/fd9e4d569c312b3f2829752c4807372dba50eda9) Merge branch 'main' into feat/client-sdk ### 📊 Changes **8 files changed** (+629 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/publish_release.yml` (+56 -1) 📝 `.gitignore` (+3 -0) 📝 `pyproject.toml` (+2 -1) ➕ `scripts/detect_change_type.py` (+108 -0) ➕ `scripts/validate_version.py` (+67 -0) 📝 `tests/server/test_server_endpoints.py` (+9 -0) ➕ `tests/test_scripts.py` (+381 -0) 📝 `uv.lock` (+3 -1) </details> ### 📄 Description ## Summary - Adds automated TypeScript SDK generation from the Python server's OpenAPI schema - Creates a unified release pipeline with proper version synchronization - Uses `@llamaindex/workflows-client` as the npm package name ## Changes ### SDK Generation - Added `scripts/generate_sdk.py` to orchestrate SDK generation using @hey-api/openapi-ts - Configured SDK to be generated from Starlette's OpenAPI schema - SDK artifacts are gitignored, only configuration files are committed ### CI/CD Pipeline - **Version Validation**: New job validates Git tags match pyproject.toml version - **Separated Jobs**: Python and TypeScript publishing are independent jobs - **SDK CI**: Added workflow to validate SDK generation on every PR - **Single Source of Truth**: pyproject.toml version drives both Python and SDK versions ### Dependencies - Added `pyyaml` to server dependencies for OpenAPI schema generation - Configured pnpm as the package manager for Node.js operations - Added typecheck script to package.json for validation ## Test Plan - [x] SDK generation works locally with `uv run hatch run server:sdk-generate` - [x] Version validation correctly fails on mismatched tags (tested with act) - [x] Version validation passes with matching tags (tested with act) - [x] Manual workflow dispatch uses pyproject.toml version (tested with act) - [ ] Release workflow publishes both packages successfully - [ ] SDK CI validates generation on PR 🤖 Generated with [Claude Code](https://claude.ai/code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 02:16:35 -05:00
yindo closed this issue 2026-02-16 02:16:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-py#101