Skip to content

feat(desktop): import external sessions - #2507

Merged
likun666661 merged 4 commits into
apache:mainfrom
likun666661:feat/external-session-import-desktop
Aug 8, 2026
Merged

feat(desktop): import external sessions#2507
likun666661 merged 4 commits into
apache:mainfrom
likun666661:feat/external-session-import-desktop

Conversation

@likun666661

Copy link
Copy Markdown
Member

Summary

  • add bounded Runtime Host operations for external Agent discovery, Session listing, and import
  • keep source-specific transcript reads and conversion inside Runtime Host so raw histories never cross Desktop IPC
  • expose a typed Electron main/preload bridge and a localized Desktop import picker
  • create each import atomically through the existing ExternalSessionImporter; importing the same source again creates an independent copy

Part of #2499 (Desktop/IPC phase).

Architecture

Desktop renderer
  -> typed Electron IPC (adapterId + sourceSessionId only)
  -> Desktop Runtime Host client
  -> bounded external-session.* operations
  -> ExternalSessionAdapterRegistry / source adapter
  -> ExternalSessionImporter
  -> atomic createImportedSession

The external source remains read-only. Catalog pages are capped by item count and encoded byte size, unsupported/internal Agent threads remain the adapter responsibility, and commit uncertainty drains the Host instead of silently retrying. The closed Runtime Host operation schema advances compatibility epoch 5 -> 6.

Desktop behavior

  • add an Import conversation action to the Session sidebar
  • detect supported local Agents and page their root Sessions
  • optionally include archived Sessions
  • show localized loading, empty, unavailable, retry, and import-failure states
  • upsert and navigate to the imported Maka Session on success

Verification

  • Storage, Runtime Host, UI, and Desktop typechecks
  • Runtime Host protocol, coordinator, composition, and catalog regression tests
  • Desktop IPC and candidate lifecycle tests
  • UI import-action regression test
  • Desktop preload and renderer production builds
  • Biome, copy, accessibility, console, and git diff --check checks

…-import-desktop

# Conflicts:
#	apps/desktop/e2e/fixtures.ts
#	apps/desktop/src/main/boot.ts
#	apps/desktop/src/main/sessions-ipc-main.ts
#	packages/runtime-host/package.json
#	packages/runtime-host/src/protocol/index.ts
@likun666661
likun666661 marked this pull request as ready for review August 8, 2026 14:29
@likun666661
likun666661 merged commit fcc3835 into apache:main Aug 8, 2026
13 checks passed
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