Skip to content

fix(native): resolve platform runtime dependencies - #249

Merged
ian-pascoe merged 1 commit into
mainfrom
worktree/green-valley-e43b
Jul 27, 2026
Merged

fix(native): resolve platform runtime dependencies#249
ian-pascoe merged 1 commit into
mainfrom
worktree/green-valley-e43b

Conversation

@ian-pascoe

@ian-pascoe ian-pascoe commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • externalize the declared @caplets/core runtime exports from the Pi bundle
  • apply the same packaging boundary to the OpenCode integration
  • add patch changesets for both native packages

Problem

Bundling Caplets core into the native integration artifacts moved libSQL's dynamic native-module load into each integration bundle. Node then resolved from the integration package root and could not find @libsql/linux-x64-gnu, preventing Pi and OpenCode from loading.

Verification

  • pi starts with the Caplets extension enabled (caplets ✓)
  • built Pi and OpenCode bundles import successfully under Node
  • pnpm --filter @caplets/pi test (47 passed)
  • pnpm --filter @caplets/pi typecheck
  • pnpm --filter @caplets/opencode test (10 passed)
  • pnpm --filter @caplets/opencode typecheck
  • pre-push pnpm verify passed

Summary by CodeRabbit

  • Bug Fixes

    • Improved platform-specific runtime resolution for Pi and OpenCode integrations.
    • Fixed packaging so native runtime components and generated tool schemas load correctly.
  • Chores

    • Updated patch release metadata for the Pi and OpenCode packages.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b89b30ff-8e3e-4493-bfc3-4b2468073b3d

📥 Commits

Reviewing files that changed from the base of the PR and between 76f55bb and c94fe2a.

📒 Files selected for processing (3)
  • .changeset/fix-native-core-runtime.md
  • packages/opencode/rolldown.config.ts
  • packages/pi/rolldown.config.ts

📝 Walkthrough

Walkthrough

Pi and OpenCode Rolldown configurations now externalize Caplets core runtime modules. A Changeset records patch releases and documents loading Caplets core through its declared package exports.

Changes

Runtime externalization

Layer / File(s) Summary
Bundler externalization and release metadata
packages/pi/rolldown.config.ts, packages/opencode/rolldown.config.ts, .changeset/fix-native-core-runtime.md
Both integrations externalize @caplets/core/generated-tool-input-schema and @caplets/core/native while retaining their existing externals. The Changeset adds patch releases for @caplets/pi and @caplets/opencode.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Poem

A bunny hops through bundles bright,
Keeping native paths just right.
Pi and OpenCode share the way,
Core exports guide the day.
Patch notes twitch their tiny nose—
External runtime, off it goes!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing native runtime dependency resolution for Pi and OpenCode.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree/green-valley-e43b

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Externalizes the two declared @caplets/core runtime entry points from both native integration bundles and adds patch changesets for the Pi and OpenCode packages.

  • Leaves @caplets/core/native and @caplets/core/generated-tool-input-schema for Node to resolve through the installed core package.
  • Applies the same packaging boundary to both Rolldown configurations.
  • Records patch releases for @caplets/pi and @caplets/opencode.

Confidence Score: 5/5

The PR appears safe to merge, with both integrations externalizing only declared core exports supplied by their existing runtime dependency.

Every changed external specifier matches an existing integration import and a published @caplets/core subpath, while both integration manifests already install core as a production dependency.

Important Files Changed

Filename Overview
packages/opencode/rolldown.config.ts Externalizes both core subpath imports used by OpenCode; the core package is a runtime dependency and publishes both exports.
packages/pi/rolldown.config.ts Externalizes both core subpath imports used by Pi; the core package is a runtime dependency and publishes both exports.
.changeset/fix-native-core-runtime.md Correctly records patch releases for both affected native integration packages.

Reviews (1): Last reviewed commit: "fix(native): externalize core runtime im..." | Re-trigger Greptile

@ian-pascoe
ian-pascoe merged commit 22119c0 into main Jul 27, 2026
11 checks passed
@ian-pascoe
ian-pascoe deleted the worktree/green-valley-e43b branch July 27, 2026 13:33
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