diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c831d34806..4476840be1 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,9 +1,22 @@ name: VitePress Pages on: + pull_request: + branches: [main] + paths: + - "docs/**" + - "package.json" + - "bun.lock" + - ".oxlintrc.json" + - ".oxfmtrc.json" push: - branches-ignore: - - "gh-pages" + branches: [main] + paths: + - "docs/**" + - "package.json" + - "bun.lock" + - ".oxlintrc.json" + - ".oxfmtrc.json" workflow_dispatch: concurrency: @@ -31,6 +44,20 @@ jobs: cache: "npm" cache-dependency-path: docs/package.json + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install OXC dependencies + run: bun install --frozen-lockfile + + - name: Lint docs TS/JS with OXC + run: bun run lint + + - name: Check docs TS/JS formatting with OXC + run: bun run format:check + - name: Install dependencies working-directory: docs run: npm install --frozen-lockfile diff --git a/.gitignore b/.gitignore index a8c31d7630..e1a5a15209 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,21 @@ cli-proxy-api-plus-integration-test boardsync releasebatch .cache + +# Added by Spec Kitty CLI (auto-managed) +.windsurf/ +.qwen/ +.augment/ +.roo/ +.amazonq/ +.github/copilot/ +.kittify/.dashboard + +# AI tool artifacts +.cursor/ +.kittify/ +.kilocode/ +.github/prompts/ +.github/copilot-instructions.md +.claudeignore +.llmignore diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 0000000000..63f8a4cb72 --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://oxc.rs/schemas/oxfmt.json", + "printWidth": 100, + "useTabs": false, + "indentWidth": 2 +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000000..5c36a7b096 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://oxc.rs/schemas/oxlintrc.json", + "ignorePatterns": [ + "**/node_modules/**", + "**/dist/**", + "**/.vitepress/dist/**", + "**/.vitepress/cache/**" + ], + "plugins": ["typescript"], + "rules": { + "correctness": "error", + "suspicious": "error" + } +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b386d18263..410b3d8e21 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to cliproxyapi++ +# Contributing to cliproxyapi-plusplus -First off, thank you for considering contributing to **cliproxyapi++**! It's people like you who make this tool better for everyone. +First off, thank you for considering contributing to **cliproxyapi-plusplus**! It's people like you who make this tool better for everyone. ## Code of Conduct @@ -26,7 +26,7 @@ By participating in this project, you agree to abide by our [Code of Conduct](CO #### Which repository to use? - **Third-party provider support**: Submit your PR directly to [kooshapari/cliproxyapi-plusplus](https://github.com/kooshapari/cliproxyapi-plusplus). -- **Core logic improvements**: If the change is not specific to a third-party provider, please propose it to the [mainline project](https://github.com/kooshapari/cliproxyapi) first. +- **Core logic improvements**: If the change is not specific to a third-party provider, please propose it to the [mainline project](https://github.com/kooshapari/cliproxyapi-plusplus) first. ## Governance diff --git a/README.md b/README.md index 7eb43039d3..296c699b77 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,10 @@ -# CLIProxyAPI++ +# cliproxyapi-plusplus Agent-native, multi-provider OpenAI-compatible proxy for production and local model routing. -## Table of Contents +This is the Plus version of [cliproxyapi-plusplus](https://github.com/kooshapari/cliproxyapi-plusplus), adding support for third-party providers on top of the mainline project. -- [Key Features](#key-features) -- [Architecture](#architecture) -- [Getting Started](#getting-started) -- [Operations and Security](#operations-and-security) -- [Testing and Quality](#testing-and-quality) -- [Documentation](#documentation) -- [Contributing](#contributing) -- [License](#license) +All third-party provider support is maintained by community contributors; cliproxyapi-plusplus does not provide technical support. Please contact the corresponding community maintainer if you need assistance. ## Key Features @@ -39,8 +32,29 @@ Agent-native, multi-provider OpenAI-compatible proxy for production and local mo ### Quick Start ```bash -go build -o cliproxy ./cmd/server -./cliproxy --config config.yaml +# Create deployment directory +mkdir -p ~/cli-proxy && cd ~/cli-proxy + +# Create docker-compose.yml +cat > docker-compose.yml << 'EOF' +services: + cli-proxy-api: + image: eceasy/cli-proxy-api-plus:latest + container_name: cli-proxy-api-plus + ports: + - "8317:8317" + volumes: + - ./config.yaml:/CLIProxyAPI/config.yaml + - ./auths:/root/.cli-proxy-api + - ./logs:/CLIProxyAPI/logs + restart: unless-stopped +EOF + +# Download example config +curl -o config.yaml https://raw.githubusercontent.com/kooshapari/cliproxyapi-plusplus/main/config.example.yaml + +# Pull and start +docker compose pull && docker compose up -d ``` ### Docker Quick Start @@ -85,9 +99,9 @@ npm run docs:build ## Contributing -1. Create a worktree branch. -2. Implement and validate changes. -3. Open a PR with clear scope and migration notes. +This project only accepts pull requests that relate to third-party provider support. Any pull requests unrelated to third-party provider support will be rejected. + +If you need to submit any non-third-party provider changes, please open them against the [mainline](https://github.com/kooshapari/cliproxyapi-plusplus) repository. ## License diff --git a/Taskfile.yml b/Taskfile.yml index dd7b8ff66e..56233e71a1 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -330,6 +330,18 @@ tasks: fi staticcheck ./... + quality:oxc: + desc: "Run OXC lint + format checks for docs TypeScript/JavaScript files" + cmds: + - | + if ! command -v bun >/dev/null 2>&1; then + echo "[WARN] bun not found; skipping OXC checks" + exit 0 + fi + bun install --frozen-lockfile + bun run lint + bun run format:check + quality:ci: desc: "Run non-mutating PR quality gates" cmds: @@ -343,6 +355,7 @@ tasks: - task: quality:vet - task: quality:staticcheck - task: quality:shellcheck + - task: quality:oxc - task: lint:changed test:provider-smoke-matrix:test: @@ -376,6 +389,38 @@ tasks: - | go test -run 'TestServer_StartupSmokeEndpoints|TestServer_StartupSmokeEndpoints/GET_v1_models|TestServer_StartupSmokeEndpoints/GET_v1_metrics_providers|TestServer_RoutesNamespaceIsolation|TestServer_ControlPlane_MessageLifecycle|TestServer_ControlPlane_IdempotencyKey_ReplaysResponseAndPreventsDuplicateMessages|TestServer_ControlPlane_IdempotencyKey_DifferentKeysCreateDifferentMessages' ./pkg/llmproxy/api + devops:status: + desc: "Show git status, remotes, and branch state" + cmds: + - git status --short --branch + - git remote -v + - git log --oneline -n 5 + + devops:check: + desc: "Run shared DevOps checks for this repository" + cmds: + - bash scripts/devops-checker.sh + + devops:check:ci: + desc: "Run shared DevOps checks including CI lane" + cmds: + - bash scripts/devops-checker.sh --check-ci + + devops:check:ci-summary: + desc: "Run shared DevOps checks with CI lane and JSON summary" + cmds: + - bash scripts/devops-checker.sh --check-ci --emit-summary + + devops:push: + desc: "Push branch with shared helper and fallback remote behavior" + cmds: + - bash scripts/push-cliproxyapi-plusplus-with-fallback.sh {{.CLI_ARGS}} + + devops:push:origin: + desc: "Push using fallback remote only (skip primary)" + cmds: + - bash scripts/push-cliproxyapi-plusplus-with-fallback.sh --skip-primary {{.CLI_ARGS}} + lint:changed: desc: "Run golangci-lint on changed/staged files only" cmds: diff --git a/bun.lock b/bun.lock new file mode 100644 index 0000000000..99b0978241 --- /dev/null +++ b/bun.lock @@ -0,0 +1,111 @@ +{ + "lockfileVersion": 1, + "configVersion": 1, + "workspaces": { + "": { + "name": "cliproxyapi-plusplus-oxc-tools", + "devDependencies": { + "oxfmt": "^0.36.0", + "oxlint": "^1.51.0", + "oxlint-tsgolint": "^0.16.0", + }, + }, + }, + "packages": { + "@oxfmt/binding-android-arm-eabi": ["@oxfmt/binding-android-arm-eabi@0.36.0", "", { "os": "android", "cpu": "arm" }, "sha512-Z4yVHJWx/swHHjtr0dXrBZb6LxS+qNz1qdza222mWwPTUK4L790+5i3LTgjx3KYGBzcYpjaiZBw4vOx94dH7MQ=="], + + "@oxfmt/binding-android-arm64": ["@oxfmt/binding-android-arm64@0.36.0", "", { "os": "android", "cpu": "arm64" }, "sha512-3ElCJRFNPQl7jexf2CAa9XmAm8eC5JPrIDSjc9jSchkVSFTEqyL0NtZinBB2h1a4i4JgP1oGl/5G5n8YR4FN8Q=="], + + "@oxfmt/binding-darwin-arm64": ["@oxfmt/binding-darwin-arm64@0.36.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-nak4znWCqIExKhYSY/mz/lWsqWIpdsS7o0+SRzXR1Q0m7GrMcG1UrF1pS7TLGZhhkf7nTfEF7q6oZzJiodRDuw=="], + + "@oxfmt/binding-darwin-x64": ["@oxfmt/binding-darwin-x64@0.36.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-V4GP96thDnpKx6ADnMDnhIXNdtV+Ql9D4HUU+a37VTeVbs5qQSF/s6hhUP1b3xUqU7iRcwh72jUU2Y12rtGHAw=="], + + "@oxfmt/binding-freebsd-x64": ["@oxfmt/binding-freebsd-x64@0.36.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-/xapWCADfI5wrhxpEUjhI9fnw7MV5BUZizVa8e24n3VSK6A3Y1TB/ClOP1tfxNspykFKXp4NBWl6NtDJP3osqQ=="], + + "@oxfmt/binding-linux-arm-gnueabihf": ["@oxfmt/binding-linux-arm-gnueabihf@0.36.0", "", { "os": "linux", "cpu": "arm" }, "sha512-1lOmv61XMFIH5uNm27620kRRzWt/RK6tdn250BRDoG9W7OXGOQ5UyI1HVT+SFkoOoKztBiinWgi68+NA1MjBVQ=="], + + "@oxfmt/binding-linux-arm-musleabihf": ["@oxfmt/binding-linux-arm-musleabihf@0.36.0", "", { "os": "linux", "cpu": "arm" }, "sha512-vMH23AskdR1ujUS9sPck2Df9rBVoZUnCVY86jisILzIQ/QQ/yKUTi7tgnIvydPx7TyB/48wsQ5QMr5Knq5p/aw=="], + + "@oxfmt/binding-linux-arm64-gnu": ["@oxfmt/binding-linux-arm64-gnu@0.36.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-Hy1V+zOBHpBiENRx77qrUTt5aPDHeCASRc8K5KwwAHkX2AKP0nV89eL17hsZrE9GmnXFjsNmd80lyf7aRTXsbw=="], + + "@oxfmt/binding-linux-arm64-musl": ["@oxfmt/binding-linux-arm64-musl@0.36.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-SPGLJkOIHSIC6ABUQ5V8NqJpvYhMJueJv26NYqfCnwi/Mn6A61amkpJJ9Suy0Nmvs+OWESJpcebrBUbXPGZyQQ=="], + + "@oxfmt/binding-linux-ppc64-gnu": ["@oxfmt/binding-linux-ppc64-gnu@0.36.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-3EuoyB8x9x8ysYJjbEO/M9fkSk72zQKnXCvpZMDHXlnY36/1qMp55Nm0PrCwjGO/1pen5hdOVkz9WmP3nAp2IQ=="], + + "@oxfmt/binding-linux-riscv64-gnu": ["@oxfmt/binding-linux-riscv64-gnu@0.36.0", "", { "os": "linux", "cpu": "none" }, "sha512-MpY3itLwpGh8dnywtrZtaZ604T1m715SydCKy0+qTxetv+IHzuA+aO/AGzrlzUNYZZmtWtmDBrChZGibvZxbRQ=="], + + "@oxfmt/binding-linux-riscv64-musl": ["@oxfmt/binding-linux-riscv64-musl@0.36.0", "", { "os": "linux", "cpu": "none" }, "sha512-mmDhe4Vtx+XwQPRPn/V25+APnkApYgZ23q+6GVsNYY98pf3aU0aI3Me96pbRs/AfJ1jIiGC+/6q71FEu8dHcHw=="], + + "@oxfmt/binding-linux-s390x-gnu": ["@oxfmt/binding-linux-s390x-gnu@0.36.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-AYXhU+DmNWLSnvVwkHM92fuYhogtVHab7UQrPNaDf1sxadugg9gWVmcgJDlIwxJdpk5CVW/TFvwUKwI432zhhA=="], + + "@oxfmt/binding-linux-x64-gnu": ["@oxfmt/binding-linux-x64-gnu@0.36.0", "", { "os": "linux", "cpu": "x64" }, "sha512-H16QhhQ3usoakMleiAAQ2mg0NsBDAdyE9agUgfC8IHHh3jZEbr0rIKwjEqwbOHK5M0EmfhJmr+aGO/MgZPsneA=="], + + "@oxfmt/binding-linux-x64-musl": ["@oxfmt/binding-linux-x64-musl@0.36.0", "", { "os": "linux", "cpu": "x64" }, "sha512-EFFGkixA39BcmHiCe2ECdrq02D6FCve5ka6ObbvrheXl4V+R0U/E+/uLyVx1X65LW8TA8QQHdnbdDallRekohw=="], + + "@oxfmt/binding-openharmony-arm64": ["@oxfmt/binding-openharmony-arm64@0.36.0", "", { "os": "none", "cpu": "arm64" }, "sha512-zr/t369wZWFOj1qf06Z5gGNjFymfUNDrxKMmr7FKiDRVI1sNsdKRCuRL4XVjtcptKQ+ao3FfxLN1vrynivmCYg=="], + + "@oxfmt/binding-win32-arm64-msvc": ["@oxfmt/binding-win32-arm64-msvc@0.36.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-FxO7UksTv8h4olzACgrqAXNF6BP329+H322323iDrMB5V/+a1kcAw07fsOsUmqNrb9iJBsCQgH/zqcqp5903ag=="], + + "@oxfmt/binding-win32-ia32-msvc": ["@oxfmt/binding-win32-ia32-msvc@0.36.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-OjoMQ89H01M0oLMfr/CPNH1zi48ZIwxAKObUl57oh7ssUBNDp/2Vjf7E1TQ8M4oj4VFQ/byxl2SmcPNaI2YNDg=="], + + "@oxfmt/binding-win32-x64-msvc": ["@oxfmt/binding-win32-x64-msvc@0.36.0", "", { "os": "win32", "cpu": "x64" }, "sha512-MoyeQ9S36ZTz/4bDhOKJgOBIDROd4dQ5AkT9iezhEaUBxAPdNX9Oq0jD8OSnCj3G4wam/XNxVWKMA52kmzmPtQ=="], + + "@oxlint-tsgolint/darwin-arm64": ["@oxlint-tsgolint/darwin-arm64@0.16.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-WQt5lGwRPJBw7q2KNR0mSPDAaMmZmVvDlEEti96xLO7ONhyomQc6fBZxxwZ4qTFedjJnrHX94sFelZ4OKzS7UQ=="], + + "@oxlint-tsgolint/darwin-x64": ["@oxlint-tsgolint/darwin-x64@0.16.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-VJo29XOzdkalvCTiE2v6FU3qZlgHaM8x8hUEVJGPU2i5W+FlocPpmn00+Ld2n7Q0pqIjyD5EyvZ5UmoIEJMfqg=="], + + "@oxlint-tsgolint/linux-arm64": ["@oxlint-tsgolint/linux-arm64@0.16.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-MPfqRt1+XRHv9oHomcBMQ3KpTE+CSkZz14wUxDQoqTNdUlV0HWdzwIE9q65I3D9YyxEnqpM7j4qtDQ3apqVvbQ=="], + + "@oxlint-tsgolint/linux-x64": ["@oxlint-tsgolint/linux-x64@0.16.0", "", { "os": "linux", "cpu": "x64" }, "sha512-XQSwVUsnwLokMhe1TD6IjgvW5WMTPzOGGkdFDtXWQmlN2YeTw94s/NN0KgDrn2agM1WIgAenEkvnm0u7NgwEyw=="], + + "@oxlint-tsgolint/win32-arm64": ["@oxlint-tsgolint/win32-arm64@0.16.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-EWdlspQiiFGsP2AiCYdhg5dTYyAlj6y1nRyNI2dQWq4Q/LITFHiSRVPe+7m7K7lcsZCEz2icN/bCeSkZaORqIg=="], + + "@oxlint-tsgolint/win32-x64": ["@oxlint-tsgolint/win32-x64@0.16.0", "", { "os": "win32", "cpu": "x64" }, "sha512-1ufk8cgktXJuJZHKF63zCHAkaLMwZrEXnZ89H2y6NO85PtOXqu4zbdNl0VBpPP3fCUuUBu9RvNqMFiv0VsbXWA=="], + + "@oxlint/binding-android-arm-eabi": ["@oxlint/binding-android-arm-eabi@1.51.0", "", { "os": "android", "cpu": "arm" }, "sha512-jJYIqbx4sX+suIxWstc4P7SzhEwb4ArWA2KVrmEuu9vH2i0qM6QIHz/ehmbGE4/2fZbpuMuBzTl7UkfNoqiSgw=="], + + "@oxlint/binding-android-arm64": ["@oxlint/binding-android-arm64@1.51.0", "", { "os": "android", "cpu": "arm64" }, "sha512-GtXyBCcH4ti98YdiMNCrpBNGitx87EjEWxevnyhcBK12k/Vu4EzSB45rzSC4fGFUD6sQgeaxItRCEEWeVwPafw=="], + + "@oxlint/binding-darwin-arm64": ["@oxlint/binding-darwin-arm64@1.51.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-3QJbeYaMHn6Bh2XeBXuITSsbnIctyTjvHf5nRjKYrT9pPeErNIpp5VDEeAXC0CZSwSVTsc8WOSDwgrAI24JolQ=="], + + "@oxlint/binding-darwin-x64": ["@oxlint/binding-darwin-x64@1.51.0", "", { "os": "darwin", "cpu": "x64" }, "sha512-NzErhMaTEN1cY0E8C5APy74lw5VwsNfJfVPBMWPVQLqAbO0k4FFLjvHURvkUL+Y18Wu+8Vs1kbqPh2hjXYA4pg=="], + + "@oxlint/binding-freebsd-x64": ["@oxlint/binding-freebsd-x64@1.51.0", "", { "os": "freebsd", "cpu": "x64" }, "sha512-msAIh3vPAoKoHlOE/oe6Q5C/n9umypv/k81lED82ibrJotn+3YG2Qp1kiR8o/Dg5iOEU97c6tl0utxcyFenpFw=="], + + "@oxlint/binding-linux-arm-gnueabihf": ["@oxlint/binding-linux-arm-gnueabihf@1.51.0", "", { "os": "linux", "cpu": "arm" }, "sha512-CqQPcvqYyMe9ZBot2stjGogEzk1z8gGAngIX7srSzrzexmXixwVxBdFZyxTVM0CjGfDeV+Ru0w25/WNjlMM2Hw=="], + + "@oxlint/binding-linux-arm-musleabihf": ["@oxlint/binding-linux-arm-musleabihf@1.51.0", "", { "os": "linux", "cpu": "arm" }, "sha512-dstrlYQgZMnyOssxSbolGCge/sDbko12N/35RBNuqLpoPbft2aeBidBAb0dvQlyBd9RJ6u8D4o4Eh8Un6iTgyQ=="], + + "@oxlint/binding-linux-arm64-gnu": ["@oxlint/binding-linux-arm64-gnu@1.51.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-QEjUpXO7d35rP1/raLGGbAsBLLGZIzV3ZbeSjqWlD3oRnxpRIZ6iL4o51XQHkconn3uKssc+1VKdtHJ81BBhDA=="], + + "@oxlint/binding-linux-arm64-musl": ["@oxlint/binding-linux-arm64-musl@1.51.0", "", { "os": "linux", "cpu": "arm64" }, "sha512-YSJua5irtG4DoMAjUapDTPhkQLHhBIY0G9JqlZS6/SZPzqDkPku/1GdWs0D6h/wyx0Iz31lNCfIaWKBQhzP0wQ=="], + + "@oxlint/binding-linux-ppc64-gnu": ["@oxlint/binding-linux-ppc64-gnu@1.51.0", "", { "os": "linux", "cpu": "ppc64" }, "sha512-7L4Wj2IEUNDETKssB9IDYt16T6WlF+X2jgC/hBq3diGHda9vJLpAgb09+D3quFq7TdkFtI7hwz/jmuQmQFPc1Q=="], + + "@oxlint/binding-linux-riscv64-gnu": ["@oxlint/binding-linux-riscv64-gnu@1.51.0", "", { "os": "linux", "cpu": "none" }, "sha512-cBUHqtOXy76G41lOB401qpFoKx1xq17qYkhWrLSM7eEjiHM9sOtYqpr6ZdqCnN9s6ZpzudX4EkeHOFH2E9q0vA=="], + + "@oxlint/binding-linux-riscv64-musl": ["@oxlint/binding-linux-riscv64-musl@1.51.0", "", { "os": "linux", "cpu": "none" }, "sha512-WKbg8CysgZcHfZX0ixQFBRSBvFZUHa3SBnEjHY2FVYt2nbNJEjzTxA3ZR5wMU0NOCNKIAFUFvAh5/XJKPRJuJg=="], + + "@oxlint/binding-linux-s390x-gnu": ["@oxlint/binding-linux-s390x-gnu@1.51.0", "", { "os": "linux", "cpu": "s390x" }, "sha512-N1QRUvJTxqXNSu35YOufdjsAVmKVx5bkrggOWAhTWBc3J4qjcBwr1IfyLh/6YCg8sYRSR1GraldS9jUgJL/U4A=="], + + "@oxlint/binding-linux-x64-gnu": ["@oxlint/binding-linux-x64-gnu@1.51.0", "", { "os": "linux", "cpu": "x64" }, "sha512-e0Mz0DizsCoqNIjeOg6OUKe8JKJWZ5zZlwsd05Bmr51Jo3AOL4UJnPvwKumr4BBtBrDZkCmOLhCvDGm95nJM2g=="], + + "@oxlint/binding-linux-x64-musl": ["@oxlint/binding-linux-x64-musl@1.51.0", "", { "os": "linux", "cpu": "x64" }, "sha512-wD8HGTWhYBKXvRDvoBVB1y+fEYV01samhWQSy1Zkxq2vpezvMnjaFKRuiP6tBNITLGuffbNDEXOwcAhJ3gI5Ug=="], + + "@oxlint/binding-openharmony-arm64": ["@oxlint/binding-openharmony-arm64@1.51.0", "", { "os": "none", "cpu": "arm64" }, "sha512-5NSwQ2hDEJ0GPXqikjWtwzgAQCsS7P9aLMNenjjKa+gknN3lTCwwwERsT6lKXSirfU3jLjexA2XQvQALh5h27w=="], + + "@oxlint/binding-win32-arm64-msvc": ["@oxlint/binding-win32-arm64-msvc@1.51.0", "", { "os": "win32", "cpu": "arm64" }, "sha512-JEZyah1M0RHMw8d+jjSSJmSmO8sABA1J1RtrHYujGPeCkYg1NeH0TGuClpe2h5QtioRTaF57y/TZfn/2IFV6fA=="], + + "@oxlint/binding-win32-ia32-msvc": ["@oxlint/binding-win32-ia32-msvc@1.51.0", "", { "os": "win32", "cpu": "ia32" }, "sha512-q3cEoKH6kwjz/WRyHwSf0nlD2F5Qw536kCXvmlSu+kaShzgrA0ojmh45CA81qL+7udfCaZL2SdKCZlLiGBVFlg=="], + + "@oxlint/binding-win32-x64-msvc": ["@oxlint/binding-win32-x64-msvc@1.51.0", "", { "os": "win32", "cpu": "x64" }, "sha512-Q14+fOGb9T28nWF/0EUsYqERiRA7cl1oy4TJrGmLaqhm+aO2cV+JttboHI3CbdeMCAyDI1+NoSlrM7Melhp/cw=="], + + "oxfmt": ["oxfmt@0.36.0", "", { "dependencies": { "tinypool": "2.1.0" }, "optionalDependencies": { "@oxfmt/binding-android-arm-eabi": "0.36.0", "@oxfmt/binding-android-arm64": "0.36.0", "@oxfmt/binding-darwin-arm64": "0.36.0", "@oxfmt/binding-darwin-x64": "0.36.0", "@oxfmt/binding-freebsd-x64": "0.36.0", "@oxfmt/binding-linux-arm-gnueabihf": "0.36.0", "@oxfmt/binding-linux-arm-musleabihf": "0.36.0", "@oxfmt/binding-linux-arm64-gnu": "0.36.0", "@oxfmt/binding-linux-arm64-musl": "0.36.0", "@oxfmt/binding-linux-ppc64-gnu": "0.36.0", "@oxfmt/binding-linux-riscv64-gnu": "0.36.0", "@oxfmt/binding-linux-riscv64-musl": "0.36.0", "@oxfmt/binding-linux-s390x-gnu": "0.36.0", "@oxfmt/binding-linux-x64-gnu": "0.36.0", "@oxfmt/binding-linux-x64-musl": "0.36.0", "@oxfmt/binding-openharmony-arm64": "0.36.0", "@oxfmt/binding-win32-arm64-msvc": "0.36.0", "@oxfmt/binding-win32-ia32-msvc": "0.36.0", "@oxfmt/binding-win32-x64-msvc": "0.36.0" }, "bin": { "oxfmt": "bin/oxfmt" } }, "sha512-/ejJ+KoSW6J9bcNT9a9UtJSJNWhJ3yOLSBLbkoFHJs/8CZjmaZVZAJe4YgO1KMJlKpNQasrn/G9JQUEZI3p0EQ=="], + + "oxlint": ["oxlint@1.51.0", "", { "optionalDependencies": { "@oxlint/binding-android-arm-eabi": "1.51.0", "@oxlint/binding-android-arm64": "1.51.0", "@oxlint/binding-darwin-arm64": "1.51.0", "@oxlint/binding-darwin-x64": "1.51.0", "@oxlint/binding-freebsd-x64": "1.51.0", "@oxlint/binding-linux-arm-gnueabihf": "1.51.0", "@oxlint/binding-linux-arm-musleabihf": "1.51.0", "@oxlint/binding-linux-arm64-gnu": "1.51.0", "@oxlint/binding-linux-arm64-musl": "1.51.0", "@oxlint/binding-linux-ppc64-gnu": "1.51.0", "@oxlint/binding-linux-riscv64-gnu": "1.51.0", "@oxlint/binding-linux-riscv64-musl": "1.51.0", "@oxlint/binding-linux-s390x-gnu": "1.51.0", "@oxlint/binding-linux-x64-gnu": "1.51.0", "@oxlint/binding-linux-x64-musl": "1.51.0", "@oxlint/binding-openharmony-arm64": "1.51.0", "@oxlint/binding-win32-arm64-msvc": "1.51.0", "@oxlint/binding-win32-ia32-msvc": "1.51.0", "@oxlint/binding-win32-x64-msvc": "1.51.0" }, "peerDependencies": { "oxlint-tsgolint": ">=0.15.0" }, "optionalPeers": ["oxlint-tsgolint"], "bin": { "oxlint": "bin/oxlint" } }, "sha512-g6DNPaV9/WI9MoX2XllafxQuxwY1TV++j7hP8fTJByVBuCoVtm3dy9f/2vtH/HU40JztcgWF4G7ua+gkainklQ=="], + + "oxlint-tsgolint": ["oxlint-tsgolint@0.16.0", "", { "optionalDependencies": { "@oxlint-tsgolint/darwin-arm64": "0.16.0", "@oxlint-tsgolint/darwin-x64": "0.16.0", "@oxlint-tsgolint/linux-arm64": "0.16.0", "@oxlint-tsgolint/linux-x64": "0.16.0", "@oxlint-tsgolint/win32-arm64": "0.16.0", "@oxlint-tsgolint/win32-x64": "0.16.0" }, "bin": { "tsgolint": "bin/tsgolint.js" } }, "sha512-4RuJK2jP08XwqtUu+5yhCbxEauCm6tv2MFHKEMsjbosK2+vy5us82oI3VLuHwbNyZG7ekZA26U2LLHnGR4frIA=="], + + "tinypool": ["tinypool@2.1.0", "", {}, "sha512-Pugqs6M0m7Lv1I7FtxN4aoyToKg1C4tu+/381vH35y8oENM/Ai7f7C4StcoK4/+BSw9ebcS8jRiVrORFKCALLw=="], + } +} diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 1bf2f370c6..f1367c003a 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -16,48 +16,39 @@ export default defineConfig({ { text: 'API', link: '/api/' }, { text: 'Roadmap', link: '/roadmap/' } ], - sidebar: { - '/wiki/': [ - { text: 'Wiki (User Guides)', items: [ - { text: 'Overview', link: '/wiki/' } - ]} - ], - '/development/': [ - { text: 'Development Guide', items: [ - { text: 'Overview', link: '/development/' } - ]} - ], - '/index/': [ - { text: 'Document Index', items: [ - { text: 'Overview', link: '/index/' }, - { text: 'Raw/All', link: '/index/raw-all' }, - { text: 'Planning', link: '/index/planning' }, - { text: 'Specs', link: '/index/specs' }, - { text: 'Research', link: '/index/research' }, - { text: 'Worklogs', link: '/index/worklogs' }, - { text: 'Other', link: '/index/other' } - ]} - ], - '/api/': [ - { text: 'API', items: [ - { text: 'Overview', link: '/api/' } - ]} - ], - '/roadmap/': [ - { text: 'Roadmap', items: [ - { text: 'Overview', link: '/roadmap/' } - ]} - ], - '/': [ - { text: 'Quick Links', items: [ - { text: 'Wiki', link: '/wiki/' }, - { text: 'Development Guide', link: '/development/' }, - { text: 'Document Index', link: '/index/' }, - { text: 'API', link: '/api/' }, - { text: 'Roadmap', link: '/roadmap/' } - ]} - ] - }, + sidebar: [ + { + text: "Guide", + items: [ + { text: "Overview", link: "/" }, + { text: "Getting Started", link: "/getting-started" }, + { text: "Install", link: "/install" }, + { text: "Provider Usage", link: "/provider-usage" }, + { text: "Provider Catalog", link: "/provider-catalog" }, + { text: "DevOps and CI/CD", link: "/operations/devops-cicd" }, + { text: "Provider Operations", link: "/provider-operations" }, + { text: "Troubleshooting", link: "/troubleshooting" }, + { text: "Planning Boards", link: "/planning/" } + ] + }, + { + text: "Reference", + items: [ + { text: "Routing and Models", link: "/routing-reference" }, + { text: "Feature Guides", link: "/features/" }, + { text: "Docsets", link: "/docsets/" } + ] + }, + { + text: "API", + items: [ + { text: "API Index", link: "/api/" }, + { text: "OpenAI-Compatible API", link: "/api/openai-compatible" }, + { text: "Management API", link: "/api/management" }, + { text: "Operations API", link: "/api/operations" } + ] + } + ], search: { provider: 'local' }, socialLinks: [{ icon: 'github', link: 'https://github.com/KooshaPari/cliproxyapi-plusplus' }] } diff --git a/docs/FEATURE_CHANGES_PLUSPLUS.md b/docs/FEATURE_CHANGES_PLUSPLUS.md index e8f63981b9..7c6f93e254 100644 --- a/docs/FEATURE_CHANGES_PLUSPLUS.md +++ b/docs/FEATURE_CHANGES_PLUSPLUS.md @@ -1,6 +1,6 @@ -# cliproxyapi++ Feature Change Reference (`++` vs baseline) +# cliproxyapi-plusplus Feature Change Reference (`plusplus` vs baseline) -This document explains what changed in `cliproxyapi++`, why it changed, and how it affects users, integrators, and maintainers. +This document explains what changed in `cliproxyapi-plusplus`, why it changed, and how it affects users, integrators, and maintainers. ## 1. Architecture Changes diff --git a/docs/OPTIMIZATION_PLAN_2026-02-23.md b/docs/OPTIMIZATION_PLAN_2026-02-23.md index 77431d8509..fbf091adee 100644 --- a/docs/OPTIMIZATION_PLAN_2026-02-23.md +++ b/docs/OPTIMIZATION_PLAN_2026-02-23.md @@ -1,4 +1,4 @@ -# cliproxyapi++ Optimization Plan — 2026-02-23 +# cliproxyapi-plusplus Optimization Plan — 2026-02-23 ## Current State (after Phase 1 fixes) - Go: ~183K LOC (after removing 21K dead runtime/executor copy) diff --git a/docs/getting-started.md b/docs/getting-started.md index 32c48e5c96..f366010249 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,6 +1,6 @@ # Getting Started -This guide gets a local `cliproxyapi++` instance running and verifies end-to-end request flow. +This guide gets a local `cliproxyapi-plusplus` instance running and verifies end-to-end request flow. ## Audience @@ -18,7 +18,7 @@ This guide gets a local `cliproxyapi++` instance running and verifies end-to-end ```bash mkdir -p ~/cliproxy && cd ~/cliproxy curl -fsSL -o config.yaml \ - https://raw.githubusercontent.com/KooshaPari/cliproxyapi-plusplus/main/config.example.yaml + https://raw.githubusercontent.com/kooshapari/cliproxyapi-plusplus/main/config.example.yaml mkdir -p auths logs chmod 700 auths ``` @@ -59,7 +59,7 @@ You can also configure other provider blocks from `config.example.yaml`. cat > docker-compose.yml << 'EOF_COMPOSE' services: cliproxy: - image: KooshaPari/cliproxyapi-plusplus:latest + image: kooshapari/cliproxyapi-plusplus:latest container_name: cliproxyapi-plusplus ports: - "8317:8317" @@ -93,7 +93,7 @@ curl -sS -X POST http://localhost:8317/v1/chat/completions \ -d '{ "model": "claude-3-5-sonnet", "messages": [ - {"role": "user", "content": "Say hello from cliproxyapi++"} + {"role": "user", "content": "Say hello from cliproxyapi-plusplus"} ], "stream": false }' diff --git a/docs/index.md b/docs/index.md index 1b1e52fa5a..cb4f7607ea 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,13 +1,64 @@ -# CLIProxyAPI++ - - +# cliproxyapi-plusplus Welcome to the unified docs surface. -## Super Categories +# cliproxyapi-plusplus Docs + +`cliproxyapi-plusplus` is an OpenAI-compatible proxy that routes one client API surface to multiple upstream providers. + +## Who This Documentation Is For + +- Operators running a shared internal LLM gateway. +- Platform engineers integrating existing OpenAI-compatible clients. +- Developers embedding cliproxyapi-plusplus in Go services. +- Incident responders who need health, logs, and management endpoints. + +## What You Can Do + +- Use one endpoint (`/v1/*`) across heterogeneous providers. +- Configure routing and model-prefix behavior in `config.yaml`. +- Manage credentials and runtime controls through management APIs. +- Monitor health and per-provider metrics for operations. + +## Start Here + +1. [Getting Started](/getting-started) for first run and first request. +2. [Install](/install) for Docker, binary, and source options. +3. [Provider Usage](/provider-usage) for provider strategy and setup patterns. +4. [Provider Quickstarts](/provider-quickstarts) for provider-specific 5-minute success paths. +5. [Provider Catalog](/provider-catalog) for provider block reference. +6. [Provider Operations](/provider-operations) for on-call runbook and incident workflows. +7. [Routing and Models Reference](/routing-reference) for model resolution behavior. +8. [Troubleshooting](/troubleshooting) for common failures and concrete fixes. +9. [Planning Boards](/planning/) for source-linked execution tracking and import-ready board artifacts. + +## API Surfaces + +- [API Index](/api/) for endpoint map and when to use each surface. +- [OpenAI-Compatible API](/api/openai-compatible) for `/v1/*` request patterns. +- [Management API](/api/management) for runtime inspection and control. +- [Operations API](/api/operations) for health and operational workflows. + +## Audience-Specific Guides + +- [Docsets](/docsets/) for user, developer, and agent-focused guidance. +- [Feature Guides](/features/) for deeper behavior and implementation notes. +- [Planning Boards](/planning/) for source-to-solution mapping across issues, PRs, discussions, and external requests. + +## Fast Verification Commands + +```bash +# Basic process health +curl -sS http://localhost:8317/health + +# List models exposed by your current auth + config +curl -sS http://localhost:8317/v1/models | jq '.data[:5]' + +# Check provider-side rolling stats +curl -sS http://localhost:8317/v1/metrics/providers | jq +``` + +## Project Links -- [Wiki (User Guides)](/wiki/) -- [Development Guide](/development/) -- [Document Index](/index/) -- [API](/api/) -- [Roadmap](/roadmap/) +- [Main Repository README](https://github.com/kooshapari/cliproxyapi-plusplus/blob/main/README.md) +- [Feature Changes in ++](./FEATURE_CHANGES_PLUSPLUS.md) diff --git a/docs/install.md b/docs/install.md index 91c3330d8f..716a2897ad 100644 --- a/docs/install.md +++ b/docs/install.md @@ -1,6 +1,6 @@ # Install -`cliproxyapi++` can run as a container, standalone binary, or embedded SDK. +`cliproxyapi-plusplus` can run as a container, standalone binary, or embedded SDK. ## Audience Guidance @@ -11,7 +11,7 @@ ## Option A: Docker (Recommended) ```bash -docker pull KooshaPari/cliproxyapi-plusplus:latest +docker pull kooshapari/cliproxyapi-plusplus:latest ``` Minimal run command: @@ -22,7 +22,7 @@ docker run -d --name cliproxyapi-plusplus \ -v "$PWD/config.yaml:/CLIProxyAPI/config.yaml" \ -v "$PWD/auths:/root/.cli-proxy-api" \ -v "$PWD/logs:/CLIProxyAPI/logs" \ - KooshaPari/cliproxyapi-plusplus:latest + kooshapari/cliproxyapi-plusplus:latest ``` Validate: @@ -42,7 +42,7 @@ docker run --platform linux/arm64 -d --name cliproxyapi-plusplus \ -v "$PWD/config.yaml:/CLIProxyAPI/config.yaml" \ -v "$PWD/auths:/root/.cli-proxy-api" \ -v "$PWD/logs:/CLIProxyAPI/logs" \ - KooshaPari/cliproxyapi-plusplus:latest + kooshapari/cliproxyapi-plusplus:latest ``` - Verify architecture inside the running container: @@ -57,22 +57,22 @@ Expected output for ARM hosts: `aarch64`. Releases: -- https://github.com/KooshaPari/cliproxyapi-plusplus/releases +- https://github.com/kooshapari/cliproxyapi-plusplus/releases Example download and run (adjust artifact name for your OS/arch): ```bash curl -fL \ - https://github.com/KooshaPari/cliproxyapi-plusplus/releases/latest/download/cliproxyapi++-darwin-amd64 \ - -o cliproxyapi++ -chmod +x cliproxyapi++ -./cliproxyapi++ --config ./config.yaml + https://github.com/kooshapari/cliproxyapi-plusplus/releases/latest/download/cliproxyapi-plusplus-darwin-amd64 \ + -o cliproxyapi-plusplus +chmod +x cliproxyapi-plusplus +./cliproxyapi-plusplus --config ./config.yaml ``` ## Option C: Build From Source ```bash -git clone https://github.com/KooshaPari/cliproxyapi-plusplus.git +git clone https://github.com/kooshapari/cliproxyapi-plusplus.git cd cliproxyapi-plusplus go build ./cmd/cliproxyapi ./cliproxyapi --config ./config.example.yaml @@ -189,7 +189,7 @@ brew services restart cliproxyapi-plusplus Run as Administrator: ```powershell -.\examples\windows\cliproxyapi-plusplus-service.ps1 -Action install -BinaryPath "C:\Program Files\cliproxyapi-plusplus\cliproxyapi++.exe" -ConfigPath "C:\ProgramData\cliproxyapi-plusplus\config.yaml" +.\examples\windows\cliproxyapi-plusplus-service.ps1 -Action install -BinaryPath "C:\Program Files\cliproxyapi-plusplus\cliproxyapi-plusplus.exe" -ConfigPath "C:\ProgramData\cliproxyapi-plusplus\config.yaml" .\examples\windows\cliproxyapi-plusplus-service.ps1 -Action start .\examples\windows\cliproxyapi-plusplus-service.ps1 -Action status ``` @@ -197,7 +197,7 @@ Run as Administrator: ## Option E: Go SDK / Embedding ```bash -go get github.com/KooshaPari/cliproxyapi-plusplus/sdk/cliproxy +go get github.com/kooshapari/cliproxyapi-plusplus/sdk/cliproxy ``` Related SDK docs: diff --git a/docs/operations/devops-cicd.md b/docs/operations/devops-cicd.md new file mode 100644 index 0000000000..cf70e7ba0a --- /dev/null +++ b/docs/operations/devops-cicd.md @@ -0,0 +1,46 @@ +# DevOps and CI/CD + +This repository uses a shared Phenotype DevOps helper surface for checks and push fallback behavior. + +## Local Delivery Helpers + +Run these repository-root commands: + +- `task devops:status` + - Show branch, remote, and status for fast handoff +- `task devops:check` + - Run shared preflight checks and local quality probes +- `task devops:check:ci` + - Include CI-oriented checks and policies +- `task devops:check:ci-summary` + - Same as CI check but emit a machine-readable summary +- `task devops:push` + - Push with primary remote-first then fallback on failure +- `task devops:push:origin` + - Push to fallback remote only (primary skipped) + +## Cross-Project Reuse and Pattern + +These helpers are part of a shared pattern used by sibling repositories: + +- `thegent` + - Uses `scripts/push-thegent-with-fallback.sh` + - `Taskfile.yml` task group: `devops:*` +- `portage` + - Uses `scripts/push-portage-with-fallback.sh` + - `Taskfile.yml` task group: `devops:*` +- `heliosCLI` + - Uses `scripts/push-helioscli-with-fallback.sh` + - `justfile` task group: `devops-*` + +The concrete implementation is centralized in `../agent-devops-setups` and reused via env overrides: + +- `PHENOTYPE_DEVOPS_REPO_ROOT` +- `PHENOTYPE_DEVOPS_PUSH_HELPER` +- `PHENOTYPE_DEVOPS_CHECKER_HELPER` + +## Fallback policy in practice + +`repo-push-fallback.sh` prefers the project’s configured push remote first. If push fails because +branch divergence or transient network issues, it falls back to the Airlock-style remote. +Use `task devops:push` in normal operations and `task devops:push:origin` for forced fallback testing. diff --git a/docs/operations/index.md b/docs/operations/index.md index a4ff651270..b642e8b999 100644 --- a/docs/operations/index.md +++ b/docs/operations/index.md @@ -5,6 +5,7 @@ This section centralizes first-response runbooks for active incidents. ## Status Tracking - [Distributed FS/Compute Status](./distributed-fs-compute-status.md) +- [DevOps and CI/CD](./devops-cicd.md) ## Use This Order During Incidents @@ -12,6 +13,8 @@ This section centralizes first-response runbooks for active incidents. 2. [Auth Refresh Failure Symptom/Fix Table](./auth-refresh-failure-symptom-fix.md) 3. [Critical Endpoints Curl Pack](./critical-endpoints-curl-pack.md) 4. [Checks-to-Owner Responder Map](./checks-owner-responder-map.md) +5. [Provider Error Runbook Snippets](./provider-error-runbook.md) +6. [DevOps and CI/CD](./devops-cicd.md) ## Freshness Pattern diff --git a/docs/provider-catalog.md b/docs/provider-catalog.md index 57c93a9ab2..f24836ee97 100644 --- a/docs/provider-catalog.md +++ b/docs/provider-catalog.md @@ -1,6 +1,6 @@ # Provider Catalog -This page is the provider-first reference for `cliproxyapi++`: what each provider block is for, how to configure it, and when to use it. +This page is the provider-first reference for `cliproxyapi-plusplus`: what each provider block is for, how to configure it, and when to use it. ## Provider Groups diff --git a/docs/provider-usage.md b/docs/provider-usage.md index 8435e811bd..fdeec001fb 100644 --- a/docs/provider-usage.md +++ b/docs/provider-usage.md @@ -1,6 +1,6 @@ # Provider Usage -`cliproxyapi++` routes OpenAI-style requests to many provider backends through a unified auth and translation layer. +`cliproxyapi-plusplus` routes OpenAI-style requests to many provider backends through a unified auth and translation layer. This page covers provider strategy and high-signal setup patterns. For full block-by-block coverage, use [Provider Catalog](/provider-catalog). @@ -24,7 +24,7 @@ This page covers provider strategy and high-signal setup patterns. For full bloc ## Provider-First Architecture -`cliproxyapi++` keeps one client-facing API (`/v1/*`) and pushes provider complexity into configuration: +`cliproxyapi-plusplus` keeps one client-facing API (`/v1/*`) and pushes provider complexity into configuration: 1. Inbound auth is validated from top-level `api-keys`. 2. Model names are resolved by prefix + alias. diff --git a/docs/routing-reference.md b/docs/routing-reference.md index 13fc99e635..e0f1db87b6 100644 --- a/docs/routing-reference.md +++ b/docs/routing-reference.md @@ -1,6 +1,6 @@ # Routing and Models Reference -This page explains how `cliproxyapi++` selects credentials/providers and resolves model names. +This page explains how `cliproxyapi-plusplus` selects credentials/providers and resolves model names. ## Audience Guidance diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 32a99dc2de..f0ba4bf012 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -50,7 +50,7 @@ curl -sS http://localhost:8317/v1/metrics/providers | jq | Gemini 3 Pro / Roo shows no response | Model is missing from current auth inventory or stream path dropped before translator dispatch | Check `/v1/models` for `gemini-3-pro-preview` and run one non-stream canary | Refresh auth inventory, re-login if needed, and only enable Roo stream mode after non-stream canary passes | | `candidate_count` > 1 returns only one answer | Provider path does not support multi-candidate fanout yet | Re-run with `candidate_count: 1` and compare logs/request payload | Treat multi-candidate as gated rollout: document unsupported path, keep deterministic single-candidate behavior, and avoid silent fanout assumptions | | Runtime config write errors | Read-only mount or immutable filesystem | `find /CLIProxyAPI -maxdepth 1 -name config.yaml -print` | Use writable mount, re-run with read-only warning, confirm management persistence status | -| Kiro/OAuth auth loops | Expired or missing token refresh fields | Re-run `cliproxyapi++ auth`/reimport token path | Refresh credentials, run with fresh token file, avoid duplicate token imports | +| Kiro/OAuth auth loops | Expired or missing token refresh fields | Re-run `cliproxyapi-plusplus auth`/reimport token path | Refresh credentials, run with fresh token file, avoid duplicate token imports | | Streaming hangs or truncation | Reverse proxy buffering / payload compatibility issue | Reproduce with `stream: false`, then compare SSE response | Verify reverse-proxy config, compare tool schema compatibility and payload shape | | `Cherry Studio can't find the model even though CLI runs succeed` (CPB-0373) | Workspace-specific model filters (Cherry Studio) do not include the alias/prefix that the CLI is routing, so the UI never lists the model. | `curl -sS http://localhost:8317/v1/models -H "Authorization: Bearer CLIENT_KEY" | jq '.data[].id' | rg 'WORKSPACE_PREFIX'` and compare with the workspace filter used in Cherry Studio. | Add the missing alias/prefix to the workspace's allowed set or align the workspace selection with the alias returned by `/v1/models`, then reload Cherry Studio so it sees the same inventory as CLI. | | `Antigravity 2 API Opus model returns Error searching files` (CPB-0375) | The search tool block is missing or does not match the upstream tool schema, so translator rejects `tool_call` payloads when the Opus model tries to access files. | Replay the search payload against `/v1/chat/completions` and tail the translator logs for `tool_call`/`SearchFiles` entries to see why the tool request was pruned or reformatted. | Register the `searchFiles` alias for the Opus provider (or the tool name Cherry Studio sends), adjust the `tools` block to match upstream requirements, and rerun the flow so the translator forwards the tool call instead of aborting. | @@ -163,10 +163,10 @@ Remediation: ```bash # Pick an unused callback port explicitly -./cliproxyapi++ auth --provider antigravity --oauth-callback-port 51221 +./cliproxyapi-plusplus auth --provider antigravity --oauth-callback-port 51221 # Server mode -./cliproxyapi++ --oauth-callback-port 51221 +./cliproxyapi-plusplus --oauth-callback-port 51221 ``` If callback setup keeps failing, run with `--no-browser`, copy the printed URL manually, and paste the callback URL back into the CLI prompt. diff --git a/package.json b/package.json new file mode 100644 index 0000000000..a7c9b96000 --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "cliproxyapi-plusplus-oxc-tools", + "private": true, + "type": "module", + "scripts": { + "lint": "oxlint --config .oxlintrc.json docs/.vitepress && (test -f tsconfig.json && oxlint-tsgolint --tsconfig tsconfig.json || echo '[SKIP] tsconfig.json not found; skipping oxlint-tsgolint')", + "format": "oxfmt --config .oxfmtrc.json --write docs/.vitepress", + "format:check": "oxfmt --config .oxfmtrc.json --check docs/.vitepress" + }, + "devDependencies": { + "oxfmt": "^0.36.0", + "oxlint": "^1.51.0", + "oxlint-tsgolint": "^0.16.0" + } +} diff --git a/scripts/devops-checker.sh b/scripts/devops-checker.sh new file mode 100755 index 0000000000..119271c79b --- /dev/null +++ b/scripts/devops-checker.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +SHARED_HELPER_DIR="${PHENOTYPE_DEVOPS_REPO_ROOT:-$REPO_ROOT/../agent-devops-setups}" +DEFAULT_CHECKER_HELPER="$SHARED_HELPER_DIR/scripts/repo-devops-checker.sh" +SHARED_HELPER="${PHENOTYPE_DEVOPS_CHECKER_HELPER:-$DEFAULT_CHECKER_HELPER}" + +if [[ ! -x "$SHARED_HELPER" ]]; then + echo "Shared devops checker not found or not executable: $SHARED_HELPER" >&2 + echo "Set PHENOTYPE_DEVOPS_REPO_ROOT or PHENOTYPE_DEVOPS_CHECKER_HELPER" >&2 + echo "to point at a valid shared script." >&2 + exit 1 +fi + +exec "$SHARED_HELPER" --repo-root "$REPO_ROOT" "$@" diff --git a/scripts/push-cliproxyapi-plusplus-with-fallback.sh b/scripts/push-cliproxyapi-plusplus-with-fallback.sh new file mode 100755 index 0000000000..8a1cd44c2c --- /dev/null +++ b/scripts/push-cliproxyapi-plusplus-with-fallback.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" +SHARED_HELPER_DIR="${PHENOTYPE_DEVOPS_REPO_ROOT:-$REPO_ROOT/../agent-devops-setups}" +DEFAULT_PUSH_HELPER="$SHARED_HELPER_DIR/scripts/repo-push-fallback.sh" +SHARED_HELPER="${PHENOTYPE_DEVOPS_PUSH_HELPER:-$DEFAULT_PUSH_HELPER}" + +if [[ ! -x "$SHARED_HELPER" ]]; then + echo "Shared push helper not found or not executable: $SHARED_HELPER" >&2 + echo "Set PHENOTYPE_DEVOPS_REPO_ROOT or PHENOTYPE_DEVOPS_PUSH_HELPER" >&2 + echo "to point at a valid shared script." >&2 + exit 1 +fi + +exec "$SHARED_HELPER" --repo-root "$REPO_ROOT" "$@"