From b68190fceb8434fd19d44e31f233cf73ca8fc1f4 Mon Sep 17 00:00:00 2001 From: "M.M" Date: Sun, 24 May 2026 20:48:36 +0200 Subject: [PATCH] fix: add xhigh+max to effortLevel schema; add opencode-plugin publish job (#2666) Integrated into release/v3.8.3 --- .github/workflows/npm-publish.yml | 39 +++++++++++++++++++++++++++++++ src/shared/validation/schemas.ts | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 3f38d74570..059d467d8b 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -131,3 +131,42 @@ jobs: echo "✅ Action finished for GitHub Packages" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + publish-opencode-plugin: + runs-on: ubuntu-latest + environment: NPM_TOKEN + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: ${{ env.NPM_PUBLISH_NODE_VERSION }} + registry-url: https://registry.npmjs.org + + - name: Install plugin dependencies + working-directory: "@omniroute/opencode-plugin" + run: npm install --no-audit --no-fund + + - name: Build plugin + working-directory: "@omniroute/opencode-plugin" + run: npm run clean && npm run build + + - name: Test plugin + working-directory: "@omniroute/opencode-plugin" + run: npm test + + - name: Publish @omniroute/opencode-plugin to npm + working-directory: "@omniroute/opencode-plugin" + run: | + PKG_VERSION=$(node -p "require('./package.json').version") + PKG_NAME=$(node -p "require('./package.json').name") + if npm view "${PKG_NAME}@${PKG_VERSION}" version --silent 2>/dev/null | grep -q "^${PKG_VERSION}$"; then + echo "⚠️ ${PKG_NAME}@${PKG_VERSION} is already published on npm — skipping." + exit 0 + fi + npm publish --access public --ignore-scripts + echo "✅ Published ${PKG_NAME}@${PKG_VERSION}" + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/src/shared/validation/schemas.ts b/src/shared/validation/schemas.ts index 0113e89619..68a1197a5a 100644 --- a/src/shared/validation/schemas.ts +++ b/src/shared/validation/schemas.ts @@ -1134,7 +1134,7 @@ export const updateThinkingBudgetSchema = z .object({ mode: z.enum(["passthrough", "auto", "custom", "adaptive"]).optional(), customBudget: z.coerce.number().int().min(0).max(131072).optional(), - effortLevel: z.enum(["none", "low", "medium", "high"]).optional(), + effortLevel: z.enum(["none", "low", "medium", "high", "xhigh", "max"]).optional(), baseBudget: z.coerce.number().int().min(0).max(131072).optional(), complexityMultiplier: z.coerce.number().min(0).optional(), })