Skip to content

feat: exec capability, GitHub connector, and multi-connector support#70

Merged
graydawnc merged 30 commits intomainfrom
feat/exec-capability-cli-connectors
Apr 14, 2026
Merged

feat: exec capability, GitHub connector, and multi-connector support#70
graydawnc merged 30 commits intomainfrom
feat/exec-capability-cli-connectors

Conversation

@graydawnc
Copy link
Copy Markdown
Collaborator

@graydawnc graydawnc commented Apr 13, 2026

Summary

  • exec capability — new SDK type + core implementation with GUI-safe PATH resolution (nvm/fnm/homebrew)
  • Multi-connector packages — loader supports spool.connectors[] manifest + mod.connectors export, backward compatible
  • parseCliJsonOutput — SDK helper for parsing CLI JSON/NDJSON output into CapturedItem[]
  • @spool-lab/connector-github — Stars (persistent, paginated) + Notifications (ephemeral) via gh CLI
  • Connector browser grouping — multi-connector packages show as single card with sub-connector details in both landing page and app Settings
  • Package-level detail view — Settings detail page shows all connectors in a package with individual controls, Uninstall at package level
  • Reliable uninstall — registry remove + cancel in-flight syncs + file deletion + best-effort DB cleanup (resilient to FTS corruption), with "Uninstalling…" UI state and all controls disabled
  • FTS corruption fix — v2 DB migration rebuilds captures FTS indexes on upgrade, preventing DELETE trigger failures from old opencli data
  • Install guard — clears stale sync_state on install so reinstalled connectors start fresh
  • Operation lock — promise-chain serialization for install/update prevents interleaving race conditions

Test plan

  • Install via deep link
  • Verify both GitHub Stars and GitHub Notifications appear
  • Verify sync works (gh CLI authenticated)
  • Verify connector browser shows "GitHub" as single card with sub-items
  • Verify uninstall removes both connectors (files, sync_state, captures all cleaned)
  • Verify re-install after uninstall starts fresh (no stale state)
  • Verify existing connectors (twitter-bookmarks, hackernews-hot, typeless) unchanged

Deferred (separate PRs)

  • Xiaohongshu connector (needs setup guide for opencli + browser bridge)
  • Connector setup guide UI

graydawnc and others added 26 commits April 13, 2026 18:22
…bilities

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ectors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Packages can now export multiple connectors via spool.connectors[] array
in package.json. The loader discovers each entry as a separate PkgInfo,
caches the module import to avoid re-loading, and matches connector classes
by id. Single-connector packages continue to work unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ons)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move from bundled to registry-based distribution — these connectors
require external CLI tools (gh, opencli) so users should opt in
rather than seeing auth failures for unused connectors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- html_url takes priority (GitHub API url is not the web URL)
- Use opencli doctor for fast auth check instead of attempting a fetch

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Xiaohongshu connector requires opencli + browser bridge setup.
Without the setup guide UI, users see "Not connected" with no
guidance. Will re-add after the setup guide feature lands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Multi-connector packages (like GitHub with Stars + Notifications)
now show as a single card with "Includes: ..." instead of separate
entries. Prevents confusion when installing one connector
unexpectedly adds another.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Each sub-connector now displays its own label and description
instead of a flat "Includes: ..." string.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- getInstalledConnectorPackages now reads spool.connectors[] array
- Uninstall removes all connectors from the same package, not just
  the one clicked (they share a single npm package on disk)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Registry.clear() on reload so stale entries don't survive
- Uninstall: remove from registry + cancel in-flight syncs before
  file deletion, with best-effort DB cleanup (resilient to FTS
  corruption)
- Install: clear stale sync_state to prevent inheriting old
  cursors/enabled flags from a prior failed uninstall
- Serialize install/update with promise-chain lock to prevent
  interleaving race conditions
- SyncScheduler.cancelIfRunning() to stop in-flight syncs and
  drain queued jobs for a specific connector
- UI: "Uninstalling…" state with all detail view controls disabled
- Fix duplicate discoverPackages loop and TS strict-null errors
  in SettingsPanel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Extract commonLabel() helper, replacing 3 duplicated word-intersection blocks
- Fix O(n²) connector grouping: replace Set+find with Map in both installed and available lists
- Memoize discoverPackages with useMemo
- Read platform from manifest instead of fragile regex derivation
- Add console.warn to silent catch blocks in install/uninstall
- Add v2 DB migration: rebuild captures FTS indexes to fix corruption
  from old opencli data that causes DELETE triggers to fail
- Add comments explaining non-obvious "why" in lock, uninstall, loader

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The SDK shouldn't hardcode platform knowledge. Content type is now
passed by each connector explicitly via parseCliJsonOutput's third
argument, defaulting to 'page'.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
parseOneItem no longer knows about GitHub's { starred_at, repo }
structure, starred_at/pushed_at/avatar_url fields, or html_url
preference. The GitHub connector now flattens its API response
before passing to the generic parser.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@graydawnc graydawnc force-pushed the feat/exec-capability-cli-connectors branch from 188a492 to 1e50aec Compare April 13, 2026 15:43
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@graydawnc graydawnc marked this pull request as ready for review April 14, 2026 03:11
# Conflicts:
#	packages/app/src/renderer/components/SettingsPanel.tsx
graydawnc and others added 2 commits April 14, 2026 11:34
…isible

- Add stripLabelPrefix helper in SettingsPanel
- Apply in detail view headers, list view group subs, available connectors
- Apply in landing page sub-connector list
- Equal card heights on landing via grid-auto-rows: 1fr + height: 100%
- Compact sub-connector styling (smaller font, tighter spacing)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fix: data flattening moved into the connector (was broken in 0.1.0
where stars captures had empty platform_id/url/title, causing dedup
failures and accumulating duplicates on every sync).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@graydawnc graydawnc merged commit c009c63 into main Apr 14, 2026
3 checks passed
@graydawnc graydawnc deleted the feat/exec-capability-cli-connectors branch April 14, 2026 03:49
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