Skip to content

chore(m5): cut connector main IPC + preload + agent prompt#113

Merged
graydawnc merged 2 commits intomainfrom
chore/m5-pr2-main-ipc
Apr 28, 2026
Merged

chore(m5): cut connector main IPC + preload + agent prompt#113
graydawnc merged 2 commits intomainfrom
chore/m5-pr2-main-ipc

Conversation

@graydawnc
Copy link
Copy Markdown
Collaborator

@graydawnc graydawnc commented Apr 28, 2026

Summary

Continuation of #112. Strips the connector subsystem from the Electron main process, the preload bridge, and the agent search prompt. The renderer surface was already removed in #112; this PR cuts the IPC + framework wiring behind it. Captures table + connector core code stay until a later PR (DB migration + queries refactor).

main/index.ts

  • Remove ConnectorRegistry / SyncScheduler / TrustStore / PrerequisiteChecker globals + init block, the proxy fetch for connector capabilities, the focus → recheck-prereqs loop, the powerMonitor resumeonWake, and the before-quit syncScheduler.stop()
  • Remove the spool://connector/install/... deep-link parser + dialog (open-url handler + the spool:// branch in second-instance)
  • Remove all 18 connector:* IPC handlers + their helpers (installConnectorPackage, reloadConnectors, runConnectorUpdateCheck, getInstalledConnectorPackages, pkgIdForConnector, resolveCliPrereq, withConnectorLock, makePrerequisitesFor, etc.)
  • Narrow spool:search and spool:search-preview to fragments-only; drop searchAll / searchCaptures from core imports
  • Drop the now-dead installE2ETestHooks (its only caller was removed in chore(m5): cut connector UI from renderer (PR1 of 7) #112)
  • Drop unused Notification / shell electron imports + node:os / node:fs / node:child_process / path.resolve

preload/index.ts

  • Delete the connectors namespace (20+ methods)
  • Drop ConnectorStatus / AuthStatus / SchedulerStatus / RegistryConnector type imports
  • Narrow getStarredUuids return type to { session: string[] }

acp.ts

  • Strip the connector captures schema + example queries from the agent search prompt; the agent now only knows about sessions / messages

Deleted

-1185 / +28 net. main/index.ts shrinks from 1146 → 432 lines.

Bundle size impact (electron-vite):

  • out/main/index.js: 122.91 kB → 56.65 kB
  • out/main/chunks/loader-*.js: 610.30 kB → 308.57 kB

Test plan

  • pnpm exec tsc --noEmit clean
  • pnpm build:electron passes (core + connector-sdk + main + preload + renderer all rebuild)
  • Smoke test: launch app, search sessions, agent search, star/unstar — all work
  • Smoke test: confirm spool://connector/install/... URLs are now silently ignored (deep-link handler removed)

🤖 Generated with Claude Code

graydawnc and others added 2 commits April 28, 2026 16:44
PR2 of M5. Strips the connector subsystem from the Electron main
process, the preload bridge, and the agent search prompt.

main/index.ts:
- Remove ConnectorRegistry / SyncScheduler / TrustStore /
  PrerequisiteChecker globals and their init block, the proxy fetch
  for connector capabilities, the focus → recheck-prereqs loop, the
  powerMonitor 'resume' onWake, and the before-quit syncScheduler.stop()
- Remove the spool:// deep-link parser + dialog handler (open-url + the
  spool:// branch in second-instance)
- Remove all 18 connector:* IPC handlers + their helpers
  (installConnectorPackage, reloadConnectors, runConnectorUpdateCheck,
  getInstalledConnectorPackages, pkgIdForConnector, resolveCliPrereq,
  withConnectorLock, makePrerequisitesFor, etc.)
- Narrow spool:search and spool:search-preview to fragments-only;
  drop searchAll / searchCaptures from imports
- Drop the now-dead installE2ETestHooks (its only caller was deleted in PR1)
- Drop unused Notification / shell electron imports + node:os, node:fs,
  node:child_process, node:path resolve

preload/index.ts:
- Delete the connectors namespace (20+ methods)
- Drop ConnectorStatus / AuthStatus / SchedulerStatus / RegistryConnector
  type imports
- Narrow getStarredUuids return type to { session: string[] }

acp.ts:
- Strip the connector captures schema + example queries from the
  agent search prompt; agent now only knows about sessions/messages

Deleted:
- packages/app/src/main/dev-connectors.ts + dev-connectors.test.ts
- packages/app/e2e/helpers/seed.ts (only consumer was the e2e test
  removed in PR1)

Net: -1185 / +28. main bundle drops from 122.91 kB → 56.65 kB; loader
chunk drops from 610.30 kB → 308.57 kB.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous commit replaced searchAll() with searchFragments() in the
spool:search handler. searchFragments returns FragmentResult without a
discriminator; searchAll's wrapper added { kind: 'fragment' as const }
before returning. The renderer narrows results with r.kind === 'fragment'
and was dropping every row, so e2e search tests saw zero matches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@graydawnc graydawnc merged commit c5f3b43 into main Apr 28, 2026
4 checks passed
@graydawnc graydawnc deleted the chore/m5-pr2-main-ipc branch April 28, 2026 09:02
@graydawnc graydawnc changed the title chore(m5): cut connector main IPC + preload + agent prompt (PR2 of 7) chore(m5): cut connector main IPC + preload + agent prompt Apr 28, 2026
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