diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..4b6c1e5 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# Default: repository owner reviews every change (paired with the main-branch ruleset's code-owner review requirement). +* @mrzturn diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b933935 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +name: CI + +# [2026-09-06]-[PR gate for main: typecheck + unit tests + warning-free build; checks are required by the main-branch ruleset]-[blocks merges that fail typecheck/tests/build or emit build warnings] +on: + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - uses: oven-sh/setup-bun@v2 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Typecheck + run: bun run typecheck + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - uses: oven-sh/setup-bun@v2 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Unit tests + run: bun test + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - uses: oven-sh/setup-bun@v2 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Build without errors or warnings + run: | + set -o pipefail + bun run build 2>&1 | tee /tmp/build.log + if grep -qiE 'warn(ing)?|error' /tmp/build.log; then + echo "::error::build output contains warnings or errors" + grep -inE 'warn(ing)?|error' /tmp/build.log + exit 1 + fi diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a96d7f0..ff51f40 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,6 +9,8 @@ permissions: jobs: publish: + # [2026-09-06]-[only main-branch releases may publish to npm; dev-branch releases are ignored]-[prevents accidental npm publish from dev] + if: github.event.release.target_commitish == 'main' runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 diff --git a/.gitignore b/.gitignore index dc3bf51..b837cf6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,3 @@ node_modules/ dist/ *.tgz .switchman/ -# BEGIN oh-my-opencode-slim clonedeps -.slim/clonedeps/repos/ -# END oh-my-opencode-slim clonedeps diff --git a/.ignore b/.ignore deleted file mode 100644 index 32dbf4f..0000000 --- a/.ignore +++ /dev/null @@ -1,9 +0,0 @@ -# BEGIN oh-my-opencode-slim clonedeps -!.slim/ -!.slim/clonedeps.json -!.slim/clonedeps/ -!.slim/clonedeps/repos/ -!.slim/clonedeps/repos/** -.slim/clonedeps/repos/**/.git/ -.slim/clonedeps/repos/**/.git/** -# END oh-my-opencode-slim clonedeps diff --git a/.slim/clonedeps.json b/.slim/clonedeps.json deleted file mode 100644 index bba2163..0000000 --- a/.slim/clonedeps.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "version": "1.0.0", - "updatedAt": "2026-08-29T10:43:44.002639+08:00", - "dependencies": [ - { - "name": "@opencode-ai/plugin", - "resolvedVersion": "dev (HEAD dc4449d)", - "repoUrl": "https://github.com/anomalyco/opencode.git", - "ref": "dc4449df0d52199704ea4989a5a993ebbc605612", - "path": ".slim/clonedeps/repos/anomalyco__opencode", - "packagePath": "packages/plugin", - "reason": "Plugin API source; plus monorepo internals (core/tui/app) for matrix-dynamic feature research" - } - ] -}