fix: add xhigh+max to effortLevel schema; add opencode-plugin publish job (#2666)

Integrated into release/v3.8.3
This commit is contained in:
M.M
2026-05-24 20:48:36 +02:00
committed by GitHub
parent 8893d377f0
commit b68190fceb
2 changed files with 40 additions and 1 deletions

View File

@@ -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 }}

View File

@@ -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(),
})