Repository navigation
Publish @nodespaceai/agent-tools to npm (#1183) - #1188
Conversation
- Rename package to @nodespaceai/agent-tools scope - Add publishConfig, update files field to match npm publish spec - Add README with installation and API docs - Wire publish-npm job to release.yml (triggers on GitHub release events, after build-tauri) Co-Authored-By: Claude <[email protected]>
Code Review — Initial ReviewPR: #1188 — Publish @nodespaceai/agent-tools to npm Overall AssessmentThis is a well-scoped, self-contained change. The scope matches the issue exactly: rename the package, add publish config, add README, wire CI. The implementation is clean and the diff is minimal. Two issues need attention before this is production-ready: a workflow coupling problem that blocks the npm publish when any Tauri binary build fails, and a missing version bump guard that will silently no-op on every release after the first. Requirements Check
Findings🟡 Important: publish-npm is blocked if any Tauri matrix build fails
needs: build-tauri
The design couples two completely independent release operations. The Recommendation: Remove publish-npm:
name: Publish @nodespaceai/agent-tools
runs-on: ubuntu-latest
# Removed: needs: build-tauri (no artifact dependency; don't let binary failures block npm)
if: github.event_name == 'release'Engineering Principle: Jobs should only declare dependencies on other jobs when they consume artifacts or require state produced by those jobs (data dependency). Using 🟡 Important: No version guard — re-publishing
|
| Finding | Severity | File | Blocks Merge? |
|---|---|---|---|
needs: build-tauri couples independent jobs |
🟡 Important | release.yml:204 |
No, but should fix |
| No version bump — second publish will fail | 🟡 Important | release.yml:229 |
Yes — workflow breaks on release 2+ |
src/ in files ships raw TypeScript |
🟢 Suggestion | package.json:16 |
No |
preinstall path breaks external installs |
🟢 Suggestion | package.json:20 |
No (Bun consumers unaffected today) |
Recommendation: REQUEST CHANGES
The version bump issue is a hard blocker for a working CI release pipeline — the workflow will fail on every release after the first. The needs: coupling is a reliability concern that will surface in practice when Tauri builds are flaky (they often are, given signing and model download steps). Both can be fixed with small, targeted changes to release.yml.
- Remove needs: build-tauri so npm publish isn't blocked by Tauri matrix failures (jobs are independent — no shared artifacts) - Add version-from-tag step to stamp package.json before publish, preventing E403 on second and subsequent releases - Make preinstall script conditional on file existence so external consumers installing the published package don't hit file-not-found Co-Authored-By: Claude <[email protected]>
Review AddressedAll 🟡 Important recommendations have been fixed. One 🟢 Suggestion skipped. ✅ AddressedRemove Version from release tag — Added a "Set version from release tag" step that runs
⏭️ SkippedRemove
|
* Publish @nodespaceai/agent-tools to npm (closes #1183) - Rename package to @nodespaceai/agent-tools scope - Add publishConfig, update files field to match npm publish spec - Add README with installation and API docs - Wire publish-npm job to release.yml (triggers on GitHub release events, after build-tauri) Co-Authored-By: Claude <[email protected]> * Address review: fix release workflow and preinstall script - Remove needs: build-tauri so npm publish isn't blocked by Tauri matrix failures (jobs are independent — no shared artifacts) - Add version-from-tag step to stamp package.json before publish, preventing E403 on second and subsequent releases - Make preinstall script conditional on file existence so external consumers installing the published package don't hit file-not-found Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Michael Libio <[email protected]> Co-authored-by: Claude <[email protected]>
Summary
@nodespaceai/agent-toolsnpm scopepublishConfig: { access: "public" }and updatefilesfieldpublish-npmjob torelease.yml— runs on GitHub release events afterbuild-tauricompletes, usesNPM_TOKENsecretNotes
npm publish --access publicfrompackages/agent-tools/) still needed to bootstrap the registry entry — requiresNPM_TOKENin the environmentTest plan
bun run buildsucceeds inpackages/agent-tools/(TypeScript compiles with types)bun run testinpackages/agent-tools/)release.ymlpublish-npmjob only runs onreleaseevents (notworkflow_dispatch)npm publish --access publicfrompackages/agent-tools/with validNPM_TOKENnpm install @nodespaceai/agent-toolsworks after initial publishCloses #1183
🤖 Generated with Claude Code