ci: initial simple ci setup - #1
Conversation
Greptile SummaryThis PR sets up npm publishing and release automation for the plugin. The main changes are:
Confidence Score: 4/5The npm package loading path and first release calculation need fixes before merging. The package exports do not expose the root package name used by the new install docs, and the first semantic-release run can analyze old breaking-style commits and publish outside the intended alpha line. The package.json and .releaserc.json
What T-Rex did
|
| Filename | Overview |
|---|---|
| package.json | Adds scoped package metadata, publish config, exports, package files, dependencies, and the package check script hook. |
| .github/workflows/release.yml | Adds the main-branch release workflow with Bun setup, checks, semantic-release, npm token, and provenance permission. |
| .releaserc.json | Adds semantic-release branch, tag, npm, GitHub, commit analyzer, and release notes configuration. |
| scripts/package-check.ts | Adds a packaging check that verifies packed files, installs the tarball, and imports the server and TUI subpaths. |
| .github/workflows/check.yml | Switches dependency installation from frozen lockfile install to bun ci. |
| .github/workflows/docs.yml | Switches the docs workflow dependency installation to bun ci. |
| README.md | Updates the quick install path from the GitHub plugin URL to the scoped npm package. |
| docs/quickstart.md | Updates quickstart installation text for the npm package and local OpenCode config files. |
| docs/reference/configuration.md | Updates configuration examples to use the scoped npm package name. |
Comments Outside Diff (1)
-
package.json, line 53-56 (link)Root Package Import Is Blocked
The new docs configure OpenCode with
@kagan-sh/kagan, but thisexportsmap only permits@kagan-sh/kagan/serverand@kagan-sh/kagan/tui. If OpenCode first imports the configured package root to discover the plugin module, the package loader will fail with a package-path-not-exported error before either entry point can load.Context Used: AGENTS.md (source)
Artifacts
Repro: consumer harness for root and subpath package imports
- Contains supporting evidence from the run (text/javascript; charset=utf-8).
Repro: runtime import output showing ERR_PACKAGE_PATH_NOT_EXPORTED for the package root
- Keeps the command output available without making the summary code-heavy.
Ran code and verified through T-Rex
Prompt To Fix With AI
This is a comment left during a code review. Path: package.json Line: 53-56 Comment: **Root Package Import Is Blocked** The new docs configure OpenCode with `@kagan-sh/kagan`, but this `exports` map only permits `@kagan-sh/kagan/server` and `@kagan-sh/kagan/tui`. If OpenCode first imports the configured package root to discover the plugin module, the package loader will fail with a package-path-not-exported error before either entry point can load. **Context Used:** AGENTS.md ([source](https://app.greptile.com/kagan/github/kagan-sh/kagan/-/custom-context?memory=88a14340-9a15-4297-925d-3656d144ad2a)) How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
package.json:53-56
**Root Package Import Is Blocked**
The new docs configure OpenCode with `@kagan-sh/kagan`, but this `exports` map only permits `@kagan-sh/kagan/server` and `@kagan-sh/kagan/tui`. If OpenCode first imports the configured package root to discover the plugin module, the package loader will fail with a package-path-not-exported error before either entry point can load.
### Issue 2 of 2
.releaserc.json:5-8
**Initial Release Can Leave Alpha**
The new release job checks out full history and this config uses the default commit analyzer, so the first run can classify existing breaking-style commits as a major release. That can publish `v1.0.0` immediately, which conflicts with the new 0.x release convention that reserves breaking releases for the 1.0 transition.
Reviews (1): Last reviewed commit: "ci: initial simple ci setup" | Re-trigger Greptile
| "@semantic-release/commit-analyzer", | ||
| "@semantic-release/release-notes-generator", | ||
| "@semantic-release/npm", | ||
| "@semantic-release/github" |
There was a problem hiding this comment.
Initial Release Can Leave Alpha
The new release job checks out full history and this config uses the default commit analyzer, so the first run can classify existing breaking-style commits as a major release. That can publish v1.0.0 immediately, which conflicts with the new 0.x release convention that reserves breaking releases for the 1.0 transition.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: .releaserc.json
Line: 5-8
Comment:
**Initial Release Can Leave Alpha**
The new release job checks out full history and this config uses the default commit analyzer, so the first run can classify existing breaking-style commits as a major release. That can publish `v1.0.0` immediately, which conflicts with the new 0.x release convention that reserves breaking releases for the 1.0 transition.
**Context Used:** AGENTS.md ([source](https://app.greptile.com/kagan/github/kagan-sh/kagan/-/custom-context?memory=88a14340-9a15-4297-925d-3656d144ad2a))
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
No description provided.