Documentation
    Preparing search index...

    Function adaptHooks

    • Convert ShellAdapter (browser-facing) into RuntimeAdapter (environment-agnostic).

      The adapter is the single translation layer between browser APIs and the runtime's abstract interfaces. It:

      • Converts Window references to windowId strings via originRegistry
      • Wraps localStorage-backed singletons into persistence interfaces
      • Translates relay pool API shapes (Observable → callback)

      Parameters

      • shellHooks: ShellAdapter

        The browser-oriented ShellAdapter provided by the host app

      • deps: BrowserDeps

        Browser-specific singletons (originRegistry, aclStore, etc.)

      Returns RuntimeAdapter

      RuntimeAdapter suitable for createRuntime()

      const runtimeHooks = adaptHooks(shellHooks, {
      originRegistry, manifestCache, aclStore, audioManager, nappKeyRegistry,
      });
      const runtime = createRuntime(runtimeHooks);