diff --git a/.githooks/pre-push b/.githooks/pre-push new file mode 100755 index 000000000..66156c51a --- /dev/null +++ b/.githooks/pre-push @@ -0,0 +1,15 @@ +#!/bin/sh +# Neuron Technologies pre-push guard. +# Warns on bun version drift and blocks pushes that break the build. + +set -e + +BUN_EXPECTED=$(bun -e 'const pkg = await Bun.file("package.json").json(); console.log(pkg.packageManager?.split("@")[1] ?? "")') +if [ -n "$BUN_EXPECTED" ]; then + if ! bun -e "import { semver } from 'bun'; if (!semver.satisfies(process.versions.bun, '^$BUN_EXPECTED')) process.exit(1)" 2>/dev/null; then + echo "WARNING: bun $(bun --version) does not satisfy ^$BUN_EXPECTED — continuing, but consider aligning your toolchain." + fi +fi + +echo "Running typecheck before push..." +bun typecheck diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index c6dfb0ebd..000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,3 +0,0 @@ -# web + desktop packages -packages/app/ @Hona @Brendonovich -packages/desktop/ @Hona @Brendonovich diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml deleted file mode 100644 index da82bde2e..000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Bug report -description: Report an issue that should be fixed (avoid pasting giant AI generated summaries or your issue may be closed/ignored) -body: - - type: textarea - id: description - attributes: - label: Description - description: Describe the bug you encountered - placeholder: What happened? - validations: - required: true - - - type: input - id: plugins - attributes: - label: Plugins - description: What plugins are you using? - validations: - required: false - - - type: input - id: opencode-version - attributes: - label: OpenCode version - description: What version of OpenCode are you using? - validations: - required: false - - - type: textarea - id: reproduce - attributes: - label: Steps to reproduce - description: How can we reproduce this issue? - placeholder: | - 1. - 2. - 3. - validations: - required: false - - - type: textarea - id: screenshot-or-link - attributes: - label: Screenshot and/or share link - description: Run `/share` to get a share link, or attach a screenshot - placeholder: Paste link or drag and drop screenshot here - validations: - required: false - - - type: input - id: os - attributes: - label: Operating System - description: what OS are you using? - placeholder: e.g., macOS 26.0.1, Ubuntu 22.04, Windows 11 - validations: - required: false - - - type: input - id: terminal - attributes: - label: Terminal - description: what terminal are you using? - placeholder: e.g., iTerm2, Ghostty, Alacritty, Windows Terminal - validations: - required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 9501a1be6..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: 💬 Discord Community - url: https://discord.gg/opencode - about: For support, troubleshooting, how-to questions, and real-time discussion. diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml deleted file mode 100644 index 42f1d3c51..000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: 🚀 Feature Request -description: Suggest an idea, feature, or enhancement -title: "[FEATURE]:" - -body: - - type: checkboxes - id: verified - attributes: - label: Feature hasn't been suggested before. - options: - - label: I have verified this feature I'm about to request hasn't been suggested before. - required: true - - - type: textarea - attributes: - label: Describe the enhancement you want to request - description: What do you want to change or add? What are the benefits of implementing this? Try to be detailed so we can understand your request better :) - validations: - required: true diff --git a/.github/TEAM_MEMBERS b/.github/TEAM_MEMBERS deleted file mode 100644 index 5268ff59d..000000000 --- a/.github/TEAM_MEMBERS +++ /dev/null @@ -1,22 +0,0 @@ -adamdotdevin -arvsrn -Brendonovich -fwang -Hona -iamdavidhill -jayair -jlongster -kitlangton -kommander -ludvigrask -MrMushrooooom -neriousy -nexxeln -R44VC0RP -rekram1-node -thdxr -simonklee -Slickstef11 -usrnk1 -vimtor -StarpTech diff --git a/.github/actions/setup-bun/action.yml b/.github/actions/setup-bun/action.yml deleted file mode 100644 index 9d29724d8..000000000 --- a/.github/actions/setup-bun/action.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: "Setup Bun" -description: "Setup Bun with caching and install dependencies" -inputs: - install-flags: - description: "Additional flags to pass to 'bun install'" - required: false - default: "" -runs: - using: "composite" - steps: - # node-gyp@latest (invoked via bunx for native install scripts) requires Node >=22; - # some runner images ship an older system Node on PATH - - name: Setup Node - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 - with: - node-version: "24" - - - name: Get baseline download URL - id: bun-url - shell: bash - run: | - if [ "$RUNNER_ARCH" = "X64" ]; then - V=$(node -p "require('./package.json').packageManager.split('@')[1]") - case "$RUNNER_OS" in - macOS) OS=darwin ;; - Linux) OS=linux ;; - Windows) OS=windows ;; - esac - echo "url=https://github.com/oven-sh/bun/releases/download/bun-v${V}/bun-${OS}-x64-baseline.zip" >> "$GITHUB_OUTPUT" - fi - - - name: Setup Bun - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 - with: - bun-version-file: ${{ !steps.bun-url.outputs.url && 'package.json' || '' }} - bun-download-url: ${{ steps.bun-url.outputs.url }} - - - name: Get cache directory - id: cache - shell: bash - run: echo "dir=$(bun pm cache)" >> "$GITHUB_OUTPUT" - - - name: Restore Bun dependencies - id: bun-cache - uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 - with: - path: ${{ steps.cache.outputs.dir }} - key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} - restore-keys: | - ${{ runner.os }}-bun- - - - name: Install setuptools for distutils compatibility - run: python3 -m pip install setuptools || pip install setuptools || true - shell: bash - - - name: Install dependencies - run: | - # Workaround for patched peer variants - # e.g. ./patches/ for standard-openapi - # https://github.com/oven-sh/bun/issues/28147 - if [ "$RUNNER_OS" = "Windows" ]; then - bun install --linker hoisted ${{ inputs.install-flags }} - else - bun install ${{ inputs.install-flags }} - fi - shell: bash - - - name: Save Bun dependencies - if: steps.bun-cache.outputs.cache-hit != 'true' && github.event_name != 'pull_request' && github.event_name != 'pull_request_target' - uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 - with: - path: ${{ steps.cache.outputs.dir }} - key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} diff --git a/.github/actions/setup-git-committer/action.yml b/.github/actions/setup-git-committer/action.yml deleted file mode 100644 index 65c974c6a..000000000 --- a/.github/actions/setup-git-committer/action.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: "Setup Git Committer" -description: "Create app token and configure git user" -inputs: - opencode-app-id: - description: "OpenCode GitHub App ID" - required: true - opencode-app-secret: - description: "OpenCode GitHub App private key" - required: true -outputs: - token: - description: "GitHub App token" - value: ${{ steps.apptoken.outputs.token }} - app-slug: - description: "GitHub App slug" - value: ${{ steps.apptoken.outputs.app-slug }} -runs: - using: "composite" - steps: - - name: Create app token - id: apptoken - uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2.2.2 - with: - app-id: ${{ inputs.opencode-app-id }} - private-key: ${{ inputs.opencode-app-secret }} - owner: ${{ github.repository_owner }} - - - name: Configure git user - run: | - slug="${{ steps.apptoken.outputs.app-slug }}" - git config --global user.name "${slug}[bot]" - git config --global user.email "${slug}[bot]@users.noreply.github.com" - shell: bash - - - name: Clear checkout auth - run: | - git config --local --unset-all http.https://github.com/.extraheader || true - shell: bash - - - name: Configure git remote - run: | - git remote set-url origin https://x-access-token:${{ steps.apptoken.outputs.token }}@github.com/${{ github.repository }} - shell: bash diff --git a/.github/publish-python-sdk.yml b/.github/publish-python-sdk.yml deleted file mode 100644 index 151ecb994..000000000 --- a/.github/publish-python-sdk.yml +++ /dev/null @@ -1,71 +0,0 @@ -# -# This file is intentionally in the wrong dir, will move and add later.... -# - -# name: publish-python-sdk - -# on: -# release: -# types: [published] -# workflow_dispatch: - -# jobs: -# publish: -# runs-on: ubuntu-latest -# permissions: -# contents: read -# steps: -# - name: Checkout repository -# uses: actions/checkout@v4 - -# - name: Setup Bun -# uses: oven-sh/setup-bun@v1 -# with: -# bun-version: 1.2.21 - -# - name: Install dependencies (JS/Bun) -# run: bun install - -# - name: Install uv -# shell: bash -# run: curl -LsSf https://astral.sh/uv/install.sh | sh - -# - name: Generate Python SDK from OpenAPI (CLI) -# shell: bash -# run: | -# ~/.local/bin/uv run --project packages/sdk/python python packages/sdk/python/scripts/generate.py --source cli - -# - name: Sync Python dependencies -# shell: bash -# run: | -# ~/.local/bin/uv sync --dev --project packages/sdk/python - -# - name: Set version from release tag -# shell: bash -# run: | -# TAG="${GITHUB_REF_NAME:-}" -# if [ -z "$TAG" ]; then -# TAG="$(git describe --tags --abbrev=0 || echo 0.0.0)" -# fi -# echo "Using version: $TAG" -# VERSION="$TAG" ~/.local/bin/uv run --project packages/sdk/python python - <<'PY' -# import os, re, pathlib -# root = pathlib.Path('packages/sdk/python') -# pt = (root / 'pyproject.toml').read_text() -# version = os.environ.get('VERSION','0.0.0').lstrip('v') -# pt = re.sub(r'(?m)^(version\s*=\s*")[^"]+("\s*)$', f"\\1{version}\\2", pt) -# (root / 'pyproject.toml').write_text(pt) -# # Also update generator config override for consistency -# cfgp = root / 'openapi-python-client.yaml' -# if cfgp.exists(): -# cfg = cfgp.read_text() -# cfg = re.sub(r'(?m)^(package_version_override:\s*)\S+$', f"\\1{version}", cfg) -# cfgp.write_text(cfg) -# PY - -# - name: Build and publish to PyPI -# env: -# PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} -# shell: bash -# run: | -# ~/.local/bin/uv run --project packages/sdk/python python packages/sdk/python/scripts/publish.py diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 393bf9051..000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,29 +0,0 @@ -### Issue for this PR - -Closes # - -### Type of change - -- [ ] Bug fix -- [ ] New feature -- [ ] Refactor / code improvement -- [ ] Documentation - -### What does this PR do? - -Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR. - -**If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!** - -### How did you verify your code works? - -### Screenshots / recordings - -_If this is a UI change, please include a screenshot or recording._ - -### Checklist - -- [ ] I have tested my changes locally -- [ ] I have not included unrelated changes in this PR - -_If you do not follow this template your PR will be automatically rejected._ diff --git a/.husky/pre-push b/.husky/pre-push deleted file mode 100755 index 5d3cc5341..000000000 --- a/.husky/pre-push +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -set -e -# Check if bun version matches package.json -# keep in sync with packages/script/src/index.ts semver qualifier -bun -e ' -import { semver } from "bun"; -const pkg = await Bun.file("package.json").json(); -const expectedBunVersion = pkg.packageManager?.split("@")[1]; -if (!expectedBunVersion) { - throw new Error("packageManager field not found in root package.json"); -} -const expectedBunVersionRange = `^${expectedBunVersion}`; -if (!semver.satisfies(process.versions.bun, expectedBunVersionRange)) { - throw new Error(`This script requires bun@${expectedBunVersionRange}, but you are using bun@${process.versions.bun}`); -} -if (process.versions.bun !== expectedBunVersion) { - console.warn(`Warning: Bun version ${process.versions.bun} differs from expected ${expectedBunVersion}`); -} -' -bun typecheck diff --git a/bun.lock b/bun.lock index 934b0ccab..52754cee3 100644 --- a/bun.lock +++ b/bun.lock @@ -18,7 +18,6 @@ "@types/mime-types": "3.0.1", "@typescript/native-preview": "catalog:", "glob": "13.0.5", - "husky": "9.1.7", "oxlint": "1.60.0", "oxlint-tsgolint": "0.21.0", "prettier": "3.6.2", @@ -3957,8 +3956,6 @@ "humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="], - "husky": ["husky@9.1.7", "", { "bin": { "husky": "bin.js" } }, "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA=="], - "i18n-iso-countries": ["i18n-iso-countries@7.14.0", "", { "dependencies": { "diacritics": "1.3.0" } }, "sha512-nXHJZYtNrfsi1UQbyRqm3Gou431elgLjKl//CYlnBGt5aTWdRPH1PiS2T/p/n8Q8LnqYqzQJik3Q7mkwvLokeg=="], "i18next": ["i18next@23.16.8", "", { "dependencies": { "@babel/runtime": "^7.23.2" } }, "sha512-06r/TitrM88Mg5FdUXAKL96dJMzgqLE5dv3ryBAra4KCwD9mJ4ndOTS95ZuymIGoE+2hzfdaMak2X11/es7ZWg=="], diff --git a/package.json b/package.json index 0f11d0c39..e293ad88e 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,6 @@ "typecheck": "bun turbo typecheck", "upgrade-opentui": "bun run script/upgrade-opentui.ts", "postinstall": "bun run --cwd packages/core fix-node-pty", - "prepare": "husky", "random": "echo 'Random script'", "sso": "aws sso login --sso-session=opencode --no-browser", "translate:app": "bun run script/translate-app.ts", @@ -101,7 +100,6 @@ "@types/mime-types": "3.0.1", "@typescript/native-preview": "catalog:", "glob": "13.0.5", - "husky": "9.1.7", "oxlint": "1.60.0", "oxlint-tsgolint": "0.21.0", "prettier": "3.6.2",