-
Notifications
You must be signed in to change notification settings - Fork 0
0.6.0 #19
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
0.6.0 #19
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8aa4e51
Add issue auto-assign workflow
Nek-12 82c5ad4
Add MCP server and tests
Nek-12 3d7c6e8
mcp: return plaintext content only
Nek-12 524e7ef
cat: accept more line range delimiters
Nek-12 2cd024e
mcp: clarify parameter defaults
Nek-12 f769758
docs: record mcp tool decision
Nek-12 e6e93f6
release: 0.6.0
Nek-12 f82d99f
fmt: gofmt mcpserver
Nek-12 f56fa24
Update internal/mcpserver/handlers.go
Nek-12 d0ca5ef
mcp: default search to all when no selector
Nek-12 b201041
mcp: emit diagnostics for file-id where
Nek-12 47c6774
mcp: emit diagnostics for cat
Nek-12 f7f7387
cat: reject negative line ranges
Nek-12 ed366cb
mcp: guard nil Params in decodeInput
Nek-12 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 |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "ksrc", | ||
| "description": "Ksrc CLI skill for searching/reading Kotlin dependency sources", | ||
| "version": "0.5.2", | ||
| "version": "0.6.0", | ||
| "repository": "https://github.com/respawn-app/ksrc" | ||
| } |
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,20 @@ | ||
| name: Auto-assign issues | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened, reopened] | ||
|
|
||
| permissions: | ||
| issues: write | ||
|
|
||
| jobs: | ||
| auto-assign: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Auto-assign issue | ||
| uses: pozil/auto-assign-issue@v2 | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| assignees: Nek-12 | ||
| numOfAssignee: 1 | ||
| allowSelfAssign: true | ||
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
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| 0.5.2 | ||
| 0.6.0 |
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
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,59 @@ | ||
| # Release workflow | ||
|
|
||
| This document describes how a release is cut, what must be bumped, and what automation runs. | ||
|
|
||
| ## Files and locations | ||
|
|
||
| - Version source: `VERSION` | ||
| - Claude plugin version: `.claude-plugin/plugin.json` | ||
| - Release workflow: `.github/workflows/release.yml` | ||
| - Tap update script: `scripts/update-brew-tap.sh` | ||
| - Homebrew tap repo (separate): `../homebrew-tap` or https://github.com/respawn-app/homebrew-tap. | ||
| - Formula: `../homebrew-tap/Formula/ksrc.rb` | ||
| - Tap CI: | ||
| - `../homebrew-tap/.github/workflows/tests.yml` (brew test-bot) | ||
| - `../homebrew-tap/.github/workflows/publish.yml` (brew pr-pull) | ||
|
|
||
| ## What to bump before a release | ||
|
|
||
| 1. `VERSION` | ||
| - This becomes the tag `vX.Y.Z` and the CLI version. | ||
| 2. `.claude-plugin/plugin.json` | ||
| - Keep plugin version aligned with the release version. | ||
|
|
||
| Optional (as needed): | ||
| - Update docs in `docs/` and skills in `skills/` when CLI flags, outputs, APIs or formats change. | ||
|
|
||
| ## How a release is cut | ||
|
|
||
| Trigger the workflow: | ||
| - `gh workflow run release.yml --ref main` | ||
|
|
||
| What it does: | ||
| 1. Reads `VERSION` and computes the tag `vX.Y.Z`. | ||
| 2. Creates the git tag (if missing) and pushes it. | ||
| 3. Builds release binaries for all OS/arch pairs and uploads them to a draft GitHub release. | ||
| 4. Updates the Homebrew tap by opening a PR in `respawn-app/homebrew-tap`: | ||
| - `scripts/update-brew-tap.sh` updates the source tarball URL + sha256. | ||
| - The script also removes any existing `bottle do` block, so bottles are regenerated. | ||
|
|
||
| ## Tap publishing (bottles) | ||
|
|
||
| Bottles are generated and uploaded by the tap repo: | ||
|
|
||
| 1. The release workflow opens a tap PR with label `pr-pull`. | ||
| 2. `../homebrew-tap/.github/workflows/publish.yml` runs `brew pr-pull` on that PR. | ||
| 3. `brew pr-pull` builds bottles and writes the `bottle do` block back into the formula. | ||
| 4. The PR is merged, and users can install via bottles by default. | ||
|
|
||
| Notes: | ||
| - `brew install -s ksrc` still builds from source because the formula points at the source tarball. | ||
| - If bottles become mismatched with the formula (version/revision/license), re-run pr-pull on a fresh PR with no bottle block. | ||
|
|
||
| ## Post-release checks | ||
|
|
||
| - Verify the draft release assets are present and correct. | ||
| - Verify the tap PR is opened and `pr-pull` ran successfully. | ||
| - On macOS 26 Tahoe (arm64), run: | ||
| - `brew tap respawn-app/tap` | ||
| - `brew install ksrc` |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,22 @@ | ||
| github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= | ||
| github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= | ||
| github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= | ||
| github.com/google/jsonschema-go v0.3.0 h1:6AH2TxVNtk3IlvkkhjrtbUc4S8AvO0Xii0DxIygDg+Q= | ||
| github.com/google/jsonschema-go v0.3.0/go.mod h1:r5quNTdLOYEz95Ru18zA0ydNbBuYoo9tgaYcxEYhJVE= | ||
| github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= | ||
| github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= | ||
| github.com/modelcontextprotocol/go-sdk v1.1.0 h1:Qjayg53dnKC4UZ+792W21e4BpwEZBzwgRW6LrjLWSwA= | ||
| github.com/modelcontextprotocol/go-sdk v1.1.0/go.mod h1:6fM3LCm3yV7pAs8isnKLn07oKtB0MP9LHd3DfAcKw10= | ||
| github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= | ||
| github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= | ||
| github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= | ||
| github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= | ||
| github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= | ||
| github.com/yosida95/uritemplate/v3 v3.0.2 h1:Ed3Oyj9yrmi9087+NczuL5BwkIc4wvTb5zIM+UJPGz4= | ||
| github.com/yosida95/uritemplate/v3 v3.0.2/go.mod h1:ILOh0sOhIJR3+L/8afwt/kE++YT040gmv5BQTMR2HP4= | ||
| go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= | ||
| golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= | ||
| golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= | ||
| golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo= | ||
| golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= | ||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| package cli | ||
|
|
||
| import ( | ||
| "archive/zip" | ||
| "os" | ||
| "path/filepath" | ||
| "testing" | ||
|
|
||
| "github.com/respawn-app/ksrc/internal/resolve" | ||
| ) | ||
|
|
||
| func TestFindFileInJarsAllowsEmptyFile(t *testing.T) { | ||
| jarPath := filepath.Join(t.TempDir(), "empty.jar") | ||
| inner := "com/example/Empty.kt" | ||
| if err := writeZipFile(jarPath, inner, ""); err != nil { | ||
| t.Fatalf("write zip: %v", err) | ||
| } | ||
|
|
||
| sources := []resolve.SourceJar{{ | ||
| Coord: resolve.Coord{Group: "com.example", Artifact: "demo", Version: "1.0.0"}, | ||
| Path: jarPath, | ||
| }} | ||
|
|
||
| path, foundInner, err := findFileInJars(sources, inner) | ||
| if err != nil { | ||
| t.Fatalf("findFileInJars error: %v", err) | ||
| } | ||
| if path != jarPath { | ||
| t.Fatalf("unexpected jar path: %s", path) | ||
| } | ||
| if foundInner != inner { | ||
| t.Fatalf("unexpected inner path: %s", foundInner) | ||
| } | ||
| } | ||
|
|
||
| func writeZipFile(path, inner, content string) error { | ||
| f, err := os.Create(path) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| zw := zip.NewWriter(f) | ||
| w, err := zw.Create(inner) | ||
| if err != nil { | ||
| _ = zw.Close() | ||
| _ = f.Close() | ||
| return err | ||
| } | ||
| if _, err := w.Write([]byte(content)); err != nil { | ||
| _ = zw.Close() | ||
| _ = f.Close() | ||
| return err | ||
| } | ||
| if err := zw.Close(); err != nil { | ||
| _ = f.Close() | ||
| return err | ||
| } | ||
| return f.Close() | ||
| } |
Oops, something went wrong.
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.