Skip to content

Sawra/cross os export#110

Merged
sawradip merged 6 commits into
mainfrom
sawra/cross_os_export
Dec 19, 2025
Merged

Sawra/cross os export#110
sawradip merged 6 commits into
mainfrom
sawra/cross_os_export

Conversation

@sawradip
Copy link
Copy Markdown
Contributor

@sawradip sawradip commented Dec 19, 2025

Summary by CodeRabbit

  • New Features

    • Added cross-platform standalone binary builds for macOS (x86_64, arm64), Linux (x86_64, aarch64), and Windows (amd64).
    • Automated release workflow to trigger and upload binaries to GitHub Releases.
    • Added middleware sync status visibility in the serve command.
    • Added Parlant framework support.
  • Chores

    • Bumped version to 0.1.42 across all packages.
    • Optimized startup performance through lazy import loading.
    • Removed LangGraph advanced template.

✏️ Tip: You can customize this high-level summary in your review settings.

- Added "mint" as a dependency in package.json with version ^4.2.209.
- Updated packageManager field in package.json for consistency.
- Introduced pnpm-lock.yaml to manage dependencies effectively.
- Introduced `build-macos.sh` for optimized macOS builds using Nuitka.
- Added `clean-build.sh` for cleaning up build artifacts.
- Created `runagent_entry.py` as the entry point for the RunAgent CLI.
- Updated `.gitignore` to include new build artifacts and directories.
- Added `build_guide.md` for comprehensive cross-platform build instructions.
- Removed unnecessary imports from various files, including `os`, `sys`, and `json`.
- Streamlined code by eliminating unused variables and dependencies across multiple modules.
- Updated `pyproject.toml` to remove the target version for `ruff`.
- Enhanced overall code clarity and maintainability.
…nore

- Introduced standalone build scripts for macOS, Linux, and Windows using Nuitka.
- Added `build-linux-standalone.sh`, `build-macos-standalone.sh`, and `build-windows-standalone.ps1` for streamlined builds.
- Updated `.gitignore` to include new build artifacts and directories.
- Removed `build_guide.md` as it is no longer needed.
- Enhanced CI/CD workflows for automated binary builds upon release creation.
- Updated all SDK versions to 0.1.42
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR introduces standalone binary build infrastructure using Nuitka for macOS, Linux, and Windows platforms; adds corresponding GitHub Actions workflows for automated release builds; bumps the project version to 0.1.42 across all SDKs; performs extensive cleanup of unused imports throughout the codebase; refactors CLI commands to use lazy/local imports; and removes the LangGraph advanced template suite.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/build-binaries.yml, .github/workflows/create-release.yml
New build-binaries workflow triggered on release creation or manual dispatch; runs platform-specific build jobs (macOS, Linux, Windows), verifies binaries, and uploads artifacts to GitHub Release. Modified create-release workflow to output release_created flag and trigger binary builds via GitHub Script dispatch.
Deleted Workflow
.github/workflows/sync-from-main.yml
Removed entire sync workflow that previously synced Go SDK from main repository on repository dispatch.
Nuitka Build Scripts
build_scripts/build-linux-standalone.sh, build_scripts/build-macos-standalone.sh, build_scripts/build-windows-standalone.ps1, clean-build.sh
New platform-specific standalone executable builders using Nuitka with environment setup, dependency installation, architecture detection, binary validation, and tarball/zip artifact generation. Cleanup script removes build remnants.
Version Bumps (0.1.41 → 0.1.42)
CHANGELOG.md, pyproject.toml, runagent/__init__.py, runagent/__version__.py, runagent-go/version.go, runagent-rust/runagent/Cargo.toml, runagent-ts/package.json
Version updated across Python, Go, Rust, and TypeScript SDKs. Changelog documented new features (Mint dependency, build scripts, cross-platform support) and miscellaneous tasks.
CLI Command Import Refactoring
runagent/cli/commands/config.py, runagent/cli/commands/db.py, runagent/cli/commands/init.py, runagent/cli/commands/register.py, runagent/cli/commands/run.py, runagent/cli/commands/run_stream.py, runagent/cli/commands/serve.py, runagent/cli/commands/setup.py, runagent/cli/commands/start.py, runagent/cli/commands/teardown.py, runagent/cli/commands/upload.py
Removed top-level imports and moved heavy dependencies (e.g., RunAgent, RunAgentClient, DBService) to local/lazy imports within functions. Added new format_error_message() helper to run.py and upload.py. Introduced middleware sync status checking in serve.py.
CLI Main Wiring
runagent/cli/main.py
Updated command registration to explicitly import and add new command handlers (deploy_cmd, serve_cmd, run_cmd, run_stream_cmd, db_cmd, whoami_cmd) individually instead of bulk package import.
Framework Mapping Update
runagent/sdk/server/framework/__init__.py
Changed LANGCHAIN framework mapping from GenericExecutor to LangChainExecutor; added new PARLANT → ParlantExecutor mapping.
Widespread Import Cleanup
docs/package.json, examples/Stockagent/*, examples/book_writer/*, examples/*, runagent/cli/auth/device_client.py, runagent/cli/branding.py, runagent/sdk/deployment/middleware_sync.py, runagent/sdk/deployment/remote.py, runagent/sdk/rest_client.py, runagent/sdk/sdk.py, runagent/sdk/server/framework/generic.py, runagent/sdk/server/framework/n8n.py, runagent/sdk/server/local_server.py, runagent/sdk/server/socket_utils.py, runagent/sdk/socket_client.py, runagent/utils/*, templates/*, test_scripts/*
Removed unused imports (e.g., os, sys, json, uuid, typing variants, asyncio) across 40+ files. Minor optimizations with no functional impact.
New Entry Point
runagent_entry.py
New Nuitka-compatible entry point script that imports and invokes the CLI main function.
Template Removals
templates/langgraph/advanced/agent.py, templates/langgraph/advanced/main.py, templates/langgraph/advanced/requirements.txt, templates/langgraph/advanced/runagent.config.json, templates/langchain/__init__.py, templates/langgraph/__init__.py
Deleted entire LangGraph advanced agent template including state definitions, tools, orchestration, config, and dependencies. Removed public re-exports of LangGraph and LangChain template classes from respective __init__.py files.
Configuration & Docs
.gitignore, docs/explanation/introduction.mdx
Updated .gitignore to explicitly handle build artifacts (dist/, dist-/, runagent_entry., .nuitka/, artifacts/, release-assets/). Expanded introduction.mdx to emphasize deployment speed (seconds) and multi-environment support (self-hosted or Cloud).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Areas requiring extra attention:

  • Build script validation: All three platform-specific build scripts (bash and PowerShell) execute complex Nuitka compilation with architecture detection and artifact generation—requires testing on actual target platforms (macOS/Linux/Windows) to verify binary generation, wrapper scripts, and tarball/zip outputs work correctly.
  • GitHub Actions workflow logic: The build-binaries.yml and create-release.yml interdependency (soft dependency via workflow dispatch) should be verified to ensure proper artifact handling, tag passing, and release asset upload succeed end-to-end.
  • CLI lazy import safety: Large-scale relocation of imports from module scope to function scope (especially RunAgent, RunAgentClient, DBService) could affect import-time side effects, error visibility, and startup behavior—verify no circular imports or initialization issues arise.
  • Framework mapping change: LANGCHAIN executor swap (GenericExecutor → LangChainExecutor) and new PARLANT framework addition require verification that existing deployments and new Parlant agents initialize correctly.
  • Template removal impact: Deletion of LangGraph advanced template and public re-export removals—confirm no external code or documentation references these removed classes and that the simplified template surface is intentional.
  • Version consistency: Version bumps across 6+ separate SDK files (Python, Go, Rust, TypeScript)—ensure all files correctly updated and no stale references remain.

Possibly related PRs

  • Sawra/runagent cloud support wip #71: Both PRs modify version/release files (runagent/init.py, runagent/version.py, CHANGELOG, Go/Rust/TypeScript version declarations) for version bump orchestration.
  • Rad/new ready example #77: Both PRs modify the same example files in examples/Stockagent/ (agent.py, custom_logger.py, main.py, secretary.py, runagent_wrapper.py) with overlapping import cleanup changes.
  • Sawra/runagent cloud support wip #73: Both PRs restructure CLI command modules (runagent/cli/commands/*) to add error formatting and lazy imports, plus register commands in runagent/cli/main.py.

Poem

🐰 Binaries built in seconds flat,
Nuitka scripts—imagine that!
Lazy imports, imports clean,
Best refactor I have seen,
Version 42 hops into place,
Templates gone—we've picked up pace! 🎉

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sawra/cross_os_export

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e16e03 and e0b8a76.

⛔ Files ignored due to path filters (2)
  • docs/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • runagent-ts/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (90)
  • .github/workflows/build-binaries.yml (1 hunks)
  • .github/workflows/create-release.yml (4 hunks)
  • .github/workflows/sync-from-main.yml (0 hunks)
  • .gitignore (2 hunks)
  • CHANGELOG.md (1 hunks)
  • build_scripts/build-linux-standalone.sh (1 hunks)
  • build_scripts/build-macos-standalone.sh (1 hunks)
  • build_scripts/build-windows-standalone.ps1 (1 hunks)
  • clean-build.sh (1 hunks)
  • docs/explanation/introduction.mdx (1 hunks)
  • docs/package.json (1 hunks)
  • examples/Stockagent/agent.py (0 hunks)
  • examples/Stockagent/log/custom_logger.py (1 hunks)
  • examples/Stockagent/main.py (0 hunks)
  • examples/Stockagent/runagent_wrapper.py (0 hunks)
  • examples/Stockagent/secretary.py (0 hunks)
  • examples/book_writer/backend/app.py (1 hunks)
  • examples/deprecated/Vibe_Agent_Builder_gpt_5/main.py (1 hunks)
  • examples/deprecated/code-reviewer/code-reviewer/agent.py (1 hunks)
  • examples/deprecated/code-reviewer/code-reviewer/code_review_tools.py (0 hunks)
  • examples/gaming-pc-builder/agent/simple_pc_builder.py (1 hunks)
  • examples/lead-agent/backend/app.py (0 hunks)
  • examples/lead-agent/lead-score-flow/main.py (0 hunks)
  • examples/lightrag_agent_(developing)/agent/storage.py (0 hunks)
  • examples/lightrag_agent_(developing)/services/rag_service.py (0 hunks)
  • examples/lightrag_agent_(developing)/utils/helpers.py (1 hunks)
  • examples/rag_agent/agent/agent.py (0 hunks)
  • examples/rag_agent/backend/app.py (0 hunks)
  • examples/rag_agent/test_connection.py (0 hunks)
  • examples/recipe_creator/backend/app.py (0 hunks)
  • examples/recipe_creator/sdk/python/test.py (0 hunks)
  • examples/trip_planner/backend/app.py (0 hunks)
  • pyproject.toml (2 hunks)
  • runagent-go/version.go (1 hunks)
  • runagent-rust/runagent/Cargo.toml (1 hunks)
  • runagent-ts/.gitignore (1 hunks)
  • runagent-ts/package.json (1 hunks)
  • runagent/__init__.py (1 hunks)
  • runagent/__version__.py (1 hunks)
  • runagent/cli/auth/device_client.py (0 hunks)
  • runagent/cli/branding.py (0 hunks)
  • runagent/cli/commands/config.py (1 hunks)
  • runagent/cli/commands/db.py (6 hunks)
  • runagent/cli/commands/delete.py (0 hunks)
  • runagent/cli/commands/deploy.py (0 hunks)
  • runagent/cli/commands/init.py (2 hunks)
  • runagent/cli/commands/register.py (1 hunks)
  • runagent/cli/commands/run.py (1 hunks)
  • runagent/cli/commands/run_stream.py (1 hunks)
  • runagent/cli/commands/serve.py (1 hunks)
  • runagent/cli/commands/setup.py (2 hunks)
  • runagent/cli/commands/start.py (1 hunks)
  • runagent/cli/commands/teardown.py (0 hunks)
  • runagent/cli/commands/upload.py (1 hunks)
  • runagent/cli/main.py (3 hunks)
  • runagent/sdk/deployment/middleware_sync.py (1 hunks)
  • runagent/sdk/deployment/remote.py (1 hunks)
  • runagent/sdk/rest_client.py (0 hunks)
  • runagent/sdk/sdk.py (1 hunks)
  • runagent/sdk/server/framework/__init__.py (1 hunks)
  • runagent/sdk/server/framework/generic.py (1 hunks)
  • runagent/sdk/server/framework/n8n.py (1 hunks)
  • runagent/sdk/server/local_server.py (1 hunks)
  • runagent/sdk/server/socket_utils.py (1 hunks)
  • runagent/sdk/socket_client.py (0 hunks)
  • runagent/utils/agent_id.py (0 hunks)
  • runagent/utils/env_vars.py (0 hunks)
  • runagent/utils/gitignore.py (1 hunks)
  • runagent/utils/imports.py (1 hunks)
  • runagent/utils/logs.py (1 hunks)
  • runagent/utils/response.py (1 hunks)
  • runagent/utils/schema.py (0 hunks)
  • runagent/utils/serializer.py (1 hunks)
  • runagent_entry.py (1 hunks)
  • templates/autogen/default/simple_assistant.py (0 hunks)
  • templates/default/default/email_agent.py (1 hunks)
  • templates/langchain/__init__.py (0 hunks)
  • templates/langchain/chatbot/agent.py (0 hunks)
  • templates/langgraph/__init__.py (0 hunks)
  • templates/langgraph/advanced/agent.py (0 hunks)
  • templates/langgraph/advanced/main.py (0 hunks)
  • templates/langgraph/advanced/requirements.txt (0 hunks)
  • templates/langgraph/advanced/runagent.config.json (0 hunks)
  • templates/letta/advanced/agent.py (1 hunks)
  • templates/letta/advanced/keyword_tool.py (0 hunks)
  • templates/letta/default/agent.py (0 hunks)
  • templates/letta/rag/agent.py (1 hunks)
  • templates/parlant/test/test_chat.py (0 hunks)
  • test_scripts/python/client_test2_langgraph.py (0 hunks)
  • test_scripts/python/client_test_langgraph_advanced.py (0 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sawradip sawradip merged commit 1e759ae into main Dec 19, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant