Skip to content

ci: initial simple ci setup - #1

Merged
aorumbayev merged 1 commit into
mainfrom
ci-cd-release
Jul 8, 2026
Merged

ci: initial simple ci setup#1
aorumbayev merged 1 commit into
mainfrom
ci-cd-release

Conversation

@aorumbayev

Copy link
Copy Markdown
Member

No description provided.

@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR sets up npm publishing and release automation for the plugin. The main changes are:

  • New GitHub release workflow using semantic-release.
  • Scoped npm package metadata and publish settings.
  • Package tarball and consumer import smoke test.
  • Updated install docs for the npm package.
  • License and release convention documentation.

Confidence Score: 4/5

The 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 bun ci workflow changes match the pinned Bun version and look safe.

package.json and .releaserc.json

T-Rex T-Rex Logs

What T-Rex did

  • The root package import is blocked and reproduced by a consumer harness that loads local package metadata and dynamically imports the package root and subpaths, showing ERR_PACKAGE_PATH_NOT_EXPORTED for the root while subpaths resolve to exported targets.
  • The initial release alpha path was analyzed by a narrow Node harness using semantic-release's commit analyzer, which produced a major release type and computed the next version as 1.0.0 from base 0.0.0.
  • A CI-style check was run to verify code formatting, resulting in a failure of prettier --check and an exit code of 1, as reported in the check log.
  • Artifacts were collected to support review, linking the root-and-subpath repro, the semantic-release repro, and the CI check log for inspection and validation.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

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)

  1. package.json, line 53-56 (link)

    P1 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)

    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.

    View artifacts

    T-Rex 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.

    Fix in Claude Code Fix in Codex

Fix All in Claude Code Fix All in Codex

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

Comment thread .releaserc.json
Comment on lines +5 to +8
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 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!

Fix in Claude Code Fix in Codex

@aorumbayev
aorumbayev merged commit c15d25b into main Jul 8, 2026
2 checks passed
@aorumbayev
aorumbayev deleted the ci-cd-release branch July 8, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant