-
Notifications
You must be signed in to change notification settings - Fork 23
feat: rulebook standard structuring support #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
af9fd67
feat: slim down catalog bundle structure
captjt b3ea76e
chore: merge in main changes
captjt 755560b
feat: converge rulebook formatting with `init` and engine processing
captjt 7569d2d
docs: include standardized format for rulebooks to mirror catalog str…
captjt c91aa33
docs: regen latest cli command assets
captjt f4532d9
chore: PR comments
captjt 5455ca5
chore: fix clippy errors
captjt 4eaa962
ci: split out opencode plugin to its own release workflow
captjt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: CI - OpenCode Plugin | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'cupcake-plugins/opencode/**' | ||
| - '.github/workflows/ci-opencode-plugin.yml' | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'cupcake-plugins/opencode/**' | ||
| - '.github/workflows/ci-opencode-plugin.yml' | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build & Type Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: latest | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: cupcake-plugins/opencode | ||
| run: bun install | ||
|
|
||
| - name: Type check | ||
| working-directory: cupcake-plugins/opencode | ||
| run: bun run typecheck | ||
|
|
||
| - name: Build | ||
| working-directory: cupcake-plugins/opencode | ||
| run: bun run build | ||
|
|
||
| - name: Verify output exists | ||
| working-directory: cupcake-plugins/opencode | ||
| run: | | ||
| if [ ! -f dist/cupcake.js ]; then | ||
| echo "Error: dist/cupcake.js not found" | ||
| exit 1 | ||
| fi | ||
| echo "Build output size: $(wc -c < dist/cupcake.js) bytes" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| name: Release OpenCode Plugin | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - 'cupcake-plugins/opencode/**' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-and-release: | ||
| name: Build and Release Plugin | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: latest | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: cupcake-plugins/opencode | ||
| run: bun install | ||
|
|
||
| - name: Type check | ||
| working-directory: cupcake-plugins/opencode | ||
| run: bun run typecheck | ||
|
|
||
| - name: Build plugin | ||
| working-directory: cupcake-plugins/opencode | ||
| run: bun run build | ||
|
|
||
| - name: Generate checksum | ||
| working-directory: cupcake-plugins/opencode/dist | ||
| run: | | ||
| sha256sum cupcake.js > cupcake.js.sha256 | ||
| echo "Generated checksum:" | ||
| cat cupcake.js.sha256 | ||
|
|
||
| - name: Get commit info | ||
| id: commit | ||
| run: | | ||
| echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
| echo "date=$(date -u +%Y-%m-%d)" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Update plugin release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: opencode-plugin-latest | ||
| name: OpenCode Plugin (Latest) | ||
| body: | | ||
| Latest build of the Cupcake OpenCode plugin. | ||
|
|
||
| This release is automatically updated when changes are merged to main. | ||
|
|
||
| **Build:** ${{ steps.commit.outputs.sha_short }} (${{ steps.commit.outputs.date }}) | ||
|
|
||
| ## Files | ||
| - `opencode-plugin.js` - The plugin file | ||
| - `opencode-plugin.js.sha256` - SHA256 checksum | ||
|
|
||
| ## Installation | ||
|
|
||
| The plugin is automatically downloaded when you run: | ||
| ```bash | ||
| cupcake init --harness opencode | ||
| ``` | ||
|
|
||
| Or manually download: | ||
| ```bash | ||
| curl -fsSL https://github.com/eqtylab/cupcake/releases/download/opencode-plugin-latest/opencode-plugin.js \ | ||
| -o .opencode/plugin/cupcake.js | ||
| ``` | ||
| files: | | ||
| cupcake-plugins/opencode/dist/cupcake.js#opencode-plugin.js | ||
| cupcake-plugins/opencode/dist/cupcake.js.sha256#opencode-plugin.js.sha256 | ||
| make_latest: false | ||
| prerelease: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.