Repository navigation
fix: lazy-load optional runtime SDK peers (0.8.3) - #44
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
Static imports of @cursor/sdk and @cline/sdk at module load broke every CLI when optional peers were not installed. Runtime SDKs now load via dynamic import() only when that runtime is selected; missing peers get an actionable install hint. Adds npm pack clean-install regression tests and CI smoke step. Co-authored-by: Paul Zgordan <dancingteeth@users.noreply.github.com>
7a955f9 to
39935f6
Compare
|
Reviewey Ray sensor (not a merge decision; human owns merge). Full UCR: HIGH via REVIEWS.md keyword "cline sdk" (the Cline SDK load path changed). Repo commit count 39. RiskHIGH What could go wrong?
Review depth
VerdictBLOCKERS Blockers
Advisory
Nits
Agent loops may act only on |
|
Owner decision, per Paul in chat (2026-10-21 16:55 Tbilisi): the next release, which bundles #45 (merged), #44 and the harness2 work, ships as 0.8.3, not 0.9.0. package.json, the README "current" line and the CHANGELOG heading should all say 0.8.3 when the release bump happens. Until then, keep these notes under Unreleased. — Reviewey Ray (sensor; human owns merge) |
…lazy-load tests - CI/test: fail on merge conflict markers in tracked files - isOptionalPeerModuleNotFound requires peer specifier in message - pi-ai/compat via importOptionalPeer; pack test builds once in before() - Vitest lazy peer session tests; check.ts uses formatErrorChain - Drop duplicate clean-install CI step (covered by test:coverage) Co-authored-by: Paul Zgordan <dancingteeth@users.noreply.github.com>
|
Reviewey Ray sensor (not a merge decision; human owns merge). Full Unified Code Review, 10-commit boundary (repo count 40), and HIGH via REVIEWS.md overlay. Head RiskHIGH What could go wrong?
Review depth
Overlay (REVIEWS.md, Pass 1b): "### HIGH — network egress, agentic tools, cline sdk, secondary judge, review gate". The Prior findings: the CHANGELOG conflict-marker blocker is fixed and now guarded by VerdictADVISORY Advisory
Nits
|
- Pi subpath imports blame @earendil-works/pi-ai; ignore transitive misses - Cline missing-SDK hint uses cline-pass vs cline runtime label - Conflict-marker scan: 7-char markers + line numbers in failures Co-authored-by: Paul Zgordan <dancingteeth@users.noreply.github.com>
|
Reviewey Ray sensor (not a merge decision; human owns merge). Full Unified Code Review (HIGH via REVIEWS.md overlay: the RiskHIGH What could go wrong?
Review depth
Overlay (REVIEWS.md, Pass 1b): "### HIGH — network egress, agentic tools, cline sdk, secondary judge, review gate". Prior findings: both advisories from the last sensor are fixed. The matcher now compares Node's quoted package name to the peer's base package (Pi VerdictPASS Nits
|
- package.json 0.8.3 (lockfile has no root version; unchanged). - Version labels kept in sync: README current line, CONSUMERS.md, docs/embed-api.md, llms.txt, site/ pages + site/llms.txt, and the site version test. - CHANGELOG: Unreleased -> 0.8.3 — 2026-10-21 with PR links (#44 #45 #46 #47); adds the parked-runs-exit-2 and deliverables-confined entries. Co-authored-by: dancingteeth <dancingteeth@users.noreply.github.com>
Problem
On 0.8.2 (npm), a clean install with only
@dancingteeth/agent-loopercrashes on every bin — evenagent-loop --version— becauseagentRunner/oneShotAgentRunstatically importedcursorAgent.js, which statically imported@cursor/sdk(optional peer).Repro (published 0.8.2):
Root cause
Optional runtime SDKs are optional
peerDependencies, but several agent modules still used staticimportat module evaluation time. CLI entrypoints loadagentLoop→agentRunnerbefore--version/--helphandling.Fix (targets next release; package version stays 0.8.2 until release cut)
Changelog entries live under Unreleased (with #45 harness work already on
main).importOptionalPeerhelper — dynamicimport(); missing peers match Node’s quotedCannot find package '…'against the base package (subpath exports like@earendil-works/pi-ai/compat→@earendil-works/pi-ai) so transitive misses inside an installed SDK are not blamed on the peer.cline-passvscline).agent-check— actionable install line viaformatErrorChainon failure.scripts/clean-install-pack.test.mjs(single build/pack inbefore()),scripts/no-merge-conflict-markers.test.mjs, vitest lazy-session tests; all run viapnpm test/ CItest:coverage.Verification
pnpm typecheck && pnpm testgreen locally.Packed tarball, zero optional peers:
Not done: npm publish, version bump in
package.json, merge.