The publish workflow's docker-build step for the operator image was
spending ~2 minutes of every run exporting cache to GHA (per build
log: `sending cache export 88.3s done`, total step 3m37s). The
`golang:1.24` base + builder-stage layers were being uploaded to GHA
cache on every push because `cache-to` was hardcoded to `mode=max`.
Changes:
- Add `cacheMode` to `DockerConfig` (defaults to `max` — the Python
images still benefit from caching every intermediate stage).
- Plumb it through `DockerBuildAction` and into the `--cache-to`
flag in `_execute_docker_build`.
- Always emit `compression=zstd` and `ignore-error=true` on the
cache-to directive: smaller blobs to upload, and a flaky cache
push no longer fails a build whose image is already on the registry.
- Set `"cacheMode": "min"` on `operator/package.json`. The operator
is a tiny static Go binary in distroless; caching the golang base
+ module download layers costs more upload time than the rebuild
saves.
Co-authored-by: Claude <noreply@anthropic.com>
* chore: CI/testing improvements for parallel test execution
- Add workflows-dev pytest command with parallel test runner
- Add pytest-xdist for parallel test execution (-nauto)
- Add timeouts to prevent test hangs (--timeout=10/60/120)
- Use module-scoped async fixtures for faster tests
- Remove mypy in favor of basedpyright/ty type checking
- Add test-docker CI job for integration tests with testcontainers
- Exclude integration tests from Python 3.9/3.14 in CI matrix
* Fix: Handle errors during workflow resume and context restoration
Co-authored-by: adrian <adrian@runllama.ai>
* Refactor server startup to handle invalid contexts gracefully
Co-authored-by: adrian <adrian@runllama.ai>
* Fix: Improve invalid context test case
Co-authored-by: adrian <adrian@runllama.ai>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* Add option to include internal workflow events in server stream
Co-authored-by: adrian <adrian@runllama.ai>
* Refactor: Rename 'internal' query param to 'include_internal'
Co-authored-by: adrian <adrian@runllama.ai>
* Remove unnecessary dependencies from pre-commit config
Co-authored-by: adrian <adrian@runllama.ai>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
* server: return ISO 8601 timestamps (Z) for started_at/updated_at/completed_at and update OpenAPI to date-time format
* server: format timestamps with strftime('%Y-%m-%dT%H:%M:%SZ') for canonical ISO-8601Z output
* tests(server): add datetime progression test for handler started_at/updated_at/completed_at
* fix lint
* feat: add testing utils
* fix: make python 3.9 happy
* chore: removed run_test method on Workflow and send_test_event on WorkflowTestRunner, rename run_and_collect to run
* chore: make the test runner an async context manager again
* chore: removing the context manager
* feat: Add POST /events/{handler_id} endpoint and /tasks endpoint
- Add GET /tasks endpoint to list running workflow tasks
- Add POST /events/{handler_id} endpoint to send events to running workflows
- Enable external event injection into workflow contexts
- Add InteractiveWorkflow test fixture for testing event handling
- Add comprehensive tests for both endpoints
This allows developers to:
1. Monitor running workflows via the /tasks endpoint
2. Send events to running workflows for interactive use cases
3. Build event-driven integrations with external systems
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix lint
* refactor: Update /tasks endpoint to /handlers with enhanced status tracking
- Renamed /tasks endpoint to /handlers for better naming consistency
- Enhanced handler status tracking (running, completed, failed)
- Added result and error fields to handler response
- Fixed safe access to handler.result() and handler.exception() methods
- Added comprehensive tests for all handler states
The /handlers endpoint now provides complete visibility into workflow execution state.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* update comments
---------
Co-authored-by: Claude <noreply@anthropic.com>
* inital commit
* feat: Add TypeScript SDK generation and publishing pipeline
- Add @hey-api/openapi-ts based SDK generation from Starlette OpenAPI schema
- Create unified release workflow with separate jobs for Python and TypeScript
- Add version validation to ensure Git tags match pyproject.toml
- Configure SDK to use @llamaindex/workflows-client package name
- Add CI workflow to validate SDK generation on every PR
- Use pnpm as package manager for Node.js operations
- Add pyyaml dependency for OpenAPI schema generation
The SDK is treated as a build artifact, generated from the Python server's
OpenAPI specification. Version synchronization is maintained by using
pyproject.toml as the single source of truth.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix lint
* fix
* rebase main
* fix
* fix
* fix ci
* refactor: Simplify to only publish OpenAPI spec as release artifact
- Remove TypeScript SDK generation infrastructure
- Add OpenAPI spec generation to release workflow
- Add version validation to ensure tag matches pyproject.toml
- Add trigger to notify llama-ui for SDK generation
- Keep workflow changes minimal from original
The SDK generation will now be handled in the llama-ui repository,
which can fetch the OpenAPI spec from releases and generate the SDK.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: Add smart SDK update triggering with change type detection
- Add workflow_dispatch inputs for manual server change type and description
- Create script to auto-detect change type from semantic version tags
- Add comprehensive tests using pytest-style functions with mock data
- Only trigger SDK update when there are server/API changes
- Pass change type and description to llama-ui for proper versioning
- Use tomllib for proper TOML parsing in validate_version.py
For manual triggers: developers can specify if there are API changes
For tag pushes: automatically detects patch/minor/major from version bump
Tests use temporary directories and mock data for complete isolation.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix lint
* fix: Replace tomllib with regex parsing for Python 3.9+ compatibility
- Remove tomllib dependency which is only available in Python 3.11+
- Use regex to parse version from pyproject.toml for broader Python version support
- Add test fixture cleanup to reduce event loop warnings in async tests
* fix comment
---------
Co-authored-by: Claude <noreply@anthropic.com>