Files
llmx/llmx-cli/scripts/__pycache__/build_npm_package.cpython-310.pyc

69 lines
7.4 KiB
Plaintext
Raw Normal View History

feat: Complete LLMX v0.1.0 - Rebrand from Codex with LiteLLM Integration This release represents a comprehensive transformation of the codebase from Codex to LLMX, enhanced with LiteLLM integration to support 100+ LLM providers through a unified API. ## Major Changes ### Phase 1: Repository & Infrastructure Setup - Established new repository structure and branching strategy - Created comprehensive project documentation (CLAUDE.md, LITELLM-SETUP.md) - Set up development environment and tooling configuration ### Phase 2: Rust Workspace Transformation - Renamed all Rust crates from `codex-*` to `llmx-*` (30+ crates) - Updated package names, binary names, and workspace members - Renamed core modules: codex.rs → llmx.rs, codex_delegate.rs → llmx_delegate.rs - Updated all internal references, imports, and type names - Renamed directories: codex-rs/ → llmx-rs/, codex-backend-openapi-models/ → llmx-backend-openapi-models/ - Fixed all Rust compilation errors after mass rename ### Phase 3: LiteLLM Integration - Integrated LiteLLM for multi-provider LLM support (Anthropic, OpenAI, Azure, Google AI, AWS Bedrock, etc.) - Implemented OpenAI-compatible Chat Completions API support - Added model family detection and provider-specific handling - Updated authentication to support LiteLLM API keys - Renamed environment variables: OPENAI_BASE_URL → LLMX_BASE_URL - Added LLMX_API_KEY for unified authentication - Enhanced error handling for Chat Completions API responses - Implemented fallback mechanisms between Responses API and Chat Completions API ### Phase 4: TypeScript/Node.js Components - Renamed npm package: @codex/codex-cli → @valknar/llmx - Updated TypeScript SDK to use new LLMX APIs and endpoints - Fixed all TypeScript compilation and linting errors - Updated SDK tests to support both API backends - Enhanced mock server to handle multiple API formats - Updated build scripts for cross-platform packaging ### Phase 5: Configuration & Documentation - Updated all configuration files to use LLMX naming - Rewrote README and documentation for LLMX branding - Updated config paths: ~/.codex/ → ~/.llmx/ - Added comprehensive LiteLLM setup guide - Updated all user-facing strings and help text - Created release plan and migration documentation ### Phase 6: Testing & Validation - Fixed all Rust tests for new naming scheme - Updated snapshot tests in TUI (36 frame files) - Fixed authentication storage tests - Updated Chat Completions payload and SSE tests - Fixed SDK tests for new API endpoints - Ensured compatibility with Claude Sonnet 4.5 model - Fixed test environment variables (LLMX_API_KEY, LLMX_BASE_URL) ### Phase 7: Build & Release Pipeline - Updated GitHub Actions workflows for LLMX binary names - Fixed rust-release.yml to reference llmx-rs/ instead of codex-rs/ - Updated CI/CD pipelines for new package names - Made Apple code signing optional in release workflow - Enhanced npm packaging resilience for partial platform builds - Added Windows sandbox support to workspace - Updated dotslash configuration for new binary names ### Phase 8: Final Polish - Renamed all assets (.github images, labels, templates) - Updated VSCode and DevContainer configurations - Fixed all clippy warnings and formatting issues - Applied cargo fmt and prettier formatting across codebase - Updated issue templates and pull request templates - Fixed all remaining UI text references ## Technical Details **Breaking Changes:** - Binary name changed from `codex` to `llmx` - Config directory changed from `~/.codex/` to `~/.llmx/` - Environment variables renamed (CODEX_* → LLMX_*) - npm package renamed to `@valknar/llmx` **New Features:** - Support for 100+ LLM providers via LiteLLM - Unified authentication with LLMX_API_KEY - Enhanced model provider detection and handling - Improved error handling and fallback mechanisms **Files Changed:** - 578 files modified across Rust, TypeScript, and documentation - 30+ Rust crates renamed and updated - Complete rebrand of UI, CLI, and documentation - All tests updated and passing **Dependencies:** - Updated Cargo.lock with new package names - Updated npm dependencies in llmx-cli - Enhanced OpenAPI models for LLMX backend This release establishes LLMX as a standalone project with comprehensive LiteLLM integration, maintaining full backward compatibility with existing functionality while opening support for a wide ecosystem of LLM providers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Sebastian Krüger <support@pivoine.art>
2025-11-12 20:40:44 +01:00
o
<00>}iS*<00>@s<>UdZddlZddlZddlZddlZddlZddlZddlmZee <09><01>
<EFBFBD>j Z e j Z e j ZedddZeddZd d
gd gd gd <0C>Zeeeefed <d d dd<0F>Zeeefed<dejfdd<13>Zdefdd<15>ZdedBdeeeffdd<18>Zdedededdfdd<1C>Zd+deededBddfdd <20>Zdeddfd!d"<22>Z d#eded$eeddfd%d&<26>Z!ded'edefd(d)<29>Z"e#d*kr<>ddlZe<05>$e<1A><00>dSdS),z:Stage and optionally package the @valknar/llmx npm module.<2E>N)<01>Pathzllmx-rszresponses-api-proxy<78>npmZsdkZ
typescript<EFBFBD>llmx<6D>rg<72>llmx-responses-api-proxy<78>rr<00>llmx-sdk<64>PACKAGE_NATIVE_COMPONENTS<54>path)rrr<00>COMPONENT_DEST_DIR<49>returncCs<>tjdd<02>}|jddddd<07>|jdd d
<EFBFBD>|jd d d
<EFBFBD>|jd tdd<0F>|jddttjd<12>|jdtdd<0F>|jdtdd<0F>|<00><05>S)Nz(Build or stage the LLMX CLI npm package.)<01> descriptionz --packagerrz,Which npm package to stage (default: codex).)<03>choices<65>default<6C>helpz --versionzBVersion number to write to package.json inside the staged package.)rz--release-versionz!Version to stage for npm release.z --staging-dirz<72>Directory to stage the package contents. Defaults to a new temporary directory if omitted. The directory must be empty when provided.)<02>typerz--tmp<6D> staging_dir)<03>destrrz --pack-outputz7Path where the generated npm tarball should be written.z --vendor-srczKDirectory containing pre-installed native binaries to bundle (vendor root).)<06>argparse<73>ArgumentParser<65> add_argumentr<00>SUPPRESS<53>
parse_args)<01>parser<65>r<00>G/home/valknar/Projects/codex/llmx/llmx-cli/scripts/build_npm_package.pyrsJ <06><06><06><06><06><06><06>rc
Cszt<00>}|j}|j}|j}|r|r||krtd<01><01>|}|s td<02><01>t|j<06>\}}z<>t|||<01>|jr6|j<08> <09>nd}t
<EFBFBD> |g<00>}|rZ|durTd<03> |<07>}td|<08>d|<01>d<06><05><01>t |||<07>|r<>t|<04>} |dkrvtd|<02>d | <09>d
| <09>d | <09>d <0C> <09>n,|d kr<>td|<02>d | <09>d| <09>d<0F><07>ntd|<02>d | <09>d| <09>d| <09>d<12> <09>ntd|<04><00><02>|jdur<>t||j<10>}
td|
<EFBFBD><00><02>W|r<> dS|r<>w)NzB--version and --release-version must match when both are provided.z,Must specify --version or --release-version.z, zNative components (z) required for package 'zR'. Provide --vendor-src pointing to a directory containing pre-installed binaries.rzStaged version z for release in z
Verify the CLI:
node z /bin/llmx.js --version
node z/bin/llmx.js --help
rz+
Verify the responses API proxy:
node z)/bin/llmx-responses-api-proxy.js --help
z"
Verify the SDK contents:
ls z /dist
ls zO/vendor
node -e "import('./dist/index.js').then(() => console.log('ok'))"
zStaged package in znpm pack output written to r)r<00>package<67>version<6F>release_version<6F> RuntimeError<6F>prepare_staging_dirr<00> stage_sources<65>
vendor_src<EFBFBD>resolver <00>get<65>join<69>copy_native_binaries<65>str<74>print<6E> pack_output<75> run_npm_pack) <0B>argsrrrrZ created_tempr"<00>native_componentsZcomponents_strZstaging_dir_str<74> output_pathrrr<00>mainKsv   
<04><06><04> <04><06><06><06><06><04><06><06>
 <02><04>r.rcCsZ|dur!|<00><00>}|jddd<02>t|<00><03><00>rtd|<00>d<04><03><01>|dfSttjdd<07><01>}|dfS)NT<4E><02>parents<74>exist_okzStaging directory z is not empty.Fzcodex-npm-stage-<2D><01>prefix)r#<00>mkdir<69>any<6E>iterdirrr<00>tempfile<6C>mkdtemp)rZtemp_dirrrrr <00>s r rrc Cs|dkrB|d}|jddd<04>t<01>tdd|d<00>tdd}|<04><04>r-t<01>||d<00>td}|<05><04>r=t<01>||d<00>td}nG|d krt|d}|jddd<04>tdd
}t<01>||d
<00>td}|<05><04>rot<01>||d<00>td}n|d kr<>td}t|<00>nt d |<02>d <0A><03><01>t
|ddd<10><03> }t <0B> |<08>} Wd<00>n1s<>wY|| d<|d kr<>| <09> d<12>}
t|
t<0F>r<>|
<EFBFBD>dd<00>| <09> d<14>} t| t<11>r<>d| vr<>| <0B>d<15>nddg| d<t
|dddd<10><03>} t j| | dd<19>| <0C>d<1A>Wd<00>dS1s<>wYdS)Nr<00>binTr/zllmx.jsr<00> README.mdz package.jsonrzllmx-responses-api-proxy.jsrzUnknown package 'z'.<2E>rzutf-8)<01>encodingr<00>scriptsZprepare<72>files<65>vendor<6F>dist<73>w<>)<01>indent<6E>
)r4<00>shutil<69>copy2<79>CODEX_CLI_ROOT<4F>exists<74> REPO_ROOT<4F>RESPONSES_API_PROXY_NPM_ROOT<4F>CODEX_SDK_ROOT<4F>stage_codex_sdk_sourcesr<00>open<65>json<6F>loadr$<00>
isinstance<EFBFBD>dict<63>pop<6F>list<73>append<6E>dump<6D>write) rrrZbin_dirZ rg_manifest<73>
readme_srcZpackage_json_pathZ launcher_srcZfhZ package_jsonr=r><00>outrrrr!<00>sT 
 

 <1C>

 


<02>  "<22>r!<00>cmd<6D>cwdcCs$tdd<02>|<00><01>tj||dd<04>dS)N<>+<2B> T)rZ<00>check)r(r%<00>
subprocess<EFBFBD>run)rYrZrrr<00> run_command<6E>sr`cCs<>t}tgd<01>|d<02>tgd<03>|d<02>|d}|<02><02>std<05><01>t<04>||d<00>|d}|<03><02>r6t<04>||d<00>td}|<04><02>rHt<04>||d<00>dSdS)N)<03>pnpm<70>installz--frozen-lockfile)rZ)rar_Zbuildr@z1codex-sdk build did not produce a dist directory.r:<00>LICENSE)rKr`rHrrE<00>copytreerFrI)rZ package_rootZdist_srcrWZ license_srcrrrrL<00>s<04>rLr"<00>
componentsc Cs<>|<00><00>}|<00><01>std|<00><00><02><01>dd<03>|D<00>}|sdS|d}|<04><01>r't<03>|<04>|jddd<06>|<00><06>D]G}|<05><07>s9q2||j}|jddd<06>|D]1}t <09>
|<07>}|durSqG||} | <09><01>setd|<07>d| <09><00><04><01>||}
|
<EFBFBD><01>rrt<03>|
<EFBFBD>t<03> | |
<EFBFBD>qGq2dS) Nz#Vendor source directory not found: cSsh|]}|tvr|<01>qSr)r )<02>.0<EFBFBD> componentrrr<00> <setcomp><3E>sz'copy_native_binaries.<locals>.<setcomp>r?Tr/zMissing native component 'z' in vendor source: ) r#rHrrE<00>rmtreer4r6<00>is_dir<69>namer r$rd) r"rreZcomponents_setZ vendor_destZ
target_dirZdest_target_dirrgZ dest_dir_nameZsrc_component_dirZdest_component_dirrrrr&<00>s<
 

<04>
<02><04>r&r-c Cs|<01><00>}|jjddd<02>tjdd<04><01>g}t|<02>}tjddddt|<03>g|dd <09>}zt <09>
|<04>}Wnt j y?}zt d
<EFBFBD>|<06>d}~ww|sFt d <0B><01>|d <00> d <0A>pS|d <00> d<0E>}|sZt d<0F><01>||}|<08><0E>sit d|<08><00><02><01>t<0F>t|<08>|<01>Wd<00>|S1s|wY|S)NTr/zcodex-npm-pack-r2rZpackz--jsonz--pack-destination)rZ<00>textz Failed to parse npm pack output.z+npm pack did not produce an output tarball.r<00>filenamerkz-Unable to determine npm pack output filename.z$Expected npm pack output not found: )r#<00>parentr4r7<00>TemporaryDirectoryrr^<00> check_outputr'rN<00>loads<64>JSONDecodeErrorrr$rHrE<00>move) rr-Z pack_dir_strZpack_dir<69>stdoutr)<00>excZ tarball_nameZ tarball_pathrrrr*s8<06>
<08><02>
<EFBFBD><10>r*<00>__main__)N)%<25>__doc__rrNrEr^<00>sysr7<00>pathlibr<00>__file__r#rnZ
SCRIPT_DIRrGrIrJrKr rQr'rS<00>__annotations__r <00> Namespacer<00>intr.<00>tuple<6C>boolr r!r`rLr&r*<00>__name__<5F>exitrrrr<00><module>sB  <1A><16>-F 4& <04>