Skip to content

chore: remove bundled connector system#97

Merged
graydawnc merged 2 commits intomainfrom
chore/remove-bundled-connectors
Apr 17, 2026
Merged

chore: remove bundled connector system#97
graydawnc merged 2 commits intomainfrom
chore/remove-bundled-connectors

Conversation

@graydawnc
Copy link
Copy Markdown
Collaborator

Summary

  • Remove the entire bundled connector mechanism — all connectors are now user-installed via spool connector install or the app UI
  • Publish @spool-lab/connector-twitter-bookmarks@0.1.0 to npm (was the only bundled connector)
  • Delete bundle-extract.ts, build-bundled-connectors.sh, .do-not-restore mechanism
  • Remove ConnectorStatus.bundled field, bundledConnectorIds tracking, and related UI conditionals
  • Simplify dev mode to symlink ALL workspace connectors instead of only those in FIRST_PARTY_PLUGINS
  • Net -526 lines / +39 lines

Test plan

  • Core tests pass (147 tests)
  • CLI tests pass (32 tests)
  • @spool-lab/connector-twitter-bookmarks published to npm and installable via spool connector install
  • App build scripts no longer reference bundled connectors

🤖 Generated with Claude Code

graydawnc and others added 2 commits April 17, 2026 13:28
All connectors are now installed via `spool connector install` or the
app's install UI. No more built-in/bundled connectors.

Changes:
- Publish @spool-lab/connector-twitter-bookmarks@0.1.0 to npm
- Delete bundle-extract.ts and build-bundled-connectors.sh
- Remove bundledConnectorsDir from LoadDeps and all callers
- Remove .do-not-restore mechanism from uninstallConnector
- Remove ConnectorStatus.bundled field and UI guards
- Remove bundledConnectorIds tracking from app
- Remove extraResources and prebuild:connectors from app build
- Simplify dev-connectors to link ALL workspace connectors (not just
  those listed in FIRST_PARTY_PLUGINS)
- Remove bundled uninstall guard from CLI
- Update all tests

BREAKING: First-time app users will not have twitter-bookmarks
pre-installed. They can install it via the CLI or app UI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove `bundled` field from registry.json and connectors page
- All connectors now show Install + Copy CLI buttons (no more "Built-in" badge)
- Display actual author from registry instead of hardcoded "Spool Lab"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@graydawnc graydawnc merged commit 8ebbf38 into main Apr 17, 2026
3 checks passed
@graydawnc graydawnc deleted the chore/remove-bundled-connectors branch April 17, 2026 05:43
graydawnc added a commit that referenced this pull request Apr 23, 2026
Root cause of the "Installing..." → reverts to "Install" regression:

1. PR #97 removed the bundled-connector system that shipped
   @spool-lab/connector-sdk into ~/.spool/connectors/node_modules at
   app startup. After that, packaged builds had no SDK on the user's
   disk for installed connectors to import.
2. core/types.ts did `e instanceof SdkSyncError` — a class-identity
   check across the plugin boundary. Even when an SDK copy is present,
   any duplicated copy (a connector bundling its own) breaks this
   check: connector errors get misclassified as generic CONNECTOR_ERROR
   instead of AUTH_*, API_RATE_LIMITED, etc.

Fix treats the SDK the way mature plugin systems (VS Code, Obsidian) do:
the cross-boundary contract is types + tags, not class identity.

- Add isSyncError structural guard (_tag === 'SyncError'); switch
  core/types.ts and SDK's own SyncError.from() to use it.
- Each connector now declares @spool-lab/connector-sdk as a regular
  dependency + bundledDependencies, so its tarball is self-contained.
  No host-side SDK provisioning needed.
- Keep rmSync-before-mkdirSync and pruneBrokenConnectorLinks as
  independent hygiene (they handle stale dev symlinks from deleted
  worktrees, which caused the original ENOENT symptom).

Delivery:
- scripts/pack-connector.sh produces publish-ready tarballs. pnpm pack
  alone errors with ERR_PNPM_BUNDLED_DEPENDENCIES_WITHOUT_HOISTED under
  the workspace's isolated node-linker, so we run
  `pnpm deploy --prod --config.node-linker=hoisted` → `npm pack`.
- phantom-independence-check.sh rewritten to use the new pack script;
  no longer installs SDK separately (it's bundled).

Versions published to npm:
  @spool-lab/connector-sdk@0.1.2
  @spool-lab/connector-github@0.1.3
  @spool-lab/connector-hackernews-hot@0.1.2
  @spool-lab/connector-reddit@0.1.2
  @spool-lab/connector-twitter-bookmarks@0.1.1
  @spool-lab/connector-typeless@0.1.2
  @spool-lab/connector-xiaohongshu@0.1.2

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
graydawnc added a commit that referenced this pull request Apr 23, 2026
…#106)

* fix(connectors): bundle SDK per connector; structural SyncError check

Root cause of the "Installing..." → reverts to "Install" regression:

1. PR #97 removed the bundled-connector system that shipped
   @spool-lab/connector-sdk into ~/.spool/connectors/node_modules at
   app startup. After that, packaged builds had no SDK on the user's
   disk for installed connectors to import.
2. core/types.ts did `e instanceof SdkSyncError` — a class-identity
   check across the plugin boundary. Even when an SDK copy is present,
   any duplicated copy (a connector bundling its own) breaks this
   check: connector errors get misclassified as generic CONNECTOR_ERROR
   instead of AUTH_*, API_RATE_LIMITED, etc.

Fix treats the SDK the way mature plugin systems (VS Code, Obsidian) do:
the cross-boundary contract is types + tags, not class identity.

- Add isSyncError structural guard (_tag === 'SyncError'); switch
  core/types.ts and SDK's own SyncError.from() to use it.
- Each connector now declares @spool-lab/connector-sdk as a regular
  dependency + bundledDependencies, so its tarball is self-contained.
  No host-side SDK provisioning needed.
- Keep rmSync-before-mkdirSync and pruneBrokenConnectorLinks as
  independent hygiene (they handle stale dev symlinks from deleted
  worktrees, which caused the original ENOENT symptom).

Delivery:
- scripts/pack-connector.sh produces publish-ready tarballs. pnpm pack
  alone errors with ERR_PNPM_BUNDLED_DEPENDENCIES_WITHOUT_HOISTED under
  the workspace's isolated node-linker, so we run
  `pnpm deploy --prod --config.node-linker=hoisted` → `npm pack`.
- phantom-independence-check.sh rewritten to use the new pack script;
  no longer installs SDK separately (it's bundled).

Versions published to npm:
  @spool-lab/connector-sdk@0.1.2
  @spool-lab/connector-github@0.1.3
  @spool-lab/connector-hackernews-hot@0.1.2
  @spool-lab/connector-reddit@0.1.2
  @spool-lab/connector-twitter-bookmarks@0.1.1
  @spool-lab/connector-typeless@0.1.2
  @spool-lab/connector-xiaohongshu@0.1.2

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: regenerate pnpm-lock after moving SDK to bundled dep

---------

Co-authored-by: Chen <99816898+donteatfriedrice@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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