Skip to content

RFC: Session API #3446

@chabou

Description

@chabou

Goal

Session and pty decoupled.
Some plugins need more control about Session instances in main process. It would be required, for example, if a plugin want to launch the pty in another host (like #2978) or intercept pty stream to duplicate/record/stream/log it.
Interception can already be done with a middleware in renderer process, but having a Session without a pty can't.

Proposal

I would suggest to add a new API entry: decorateSessionClass(Session). A plugin can expose this function that would return a new class that inherit from the (kind of) Session class received in parameter.

If multiple plugins declare this hook, we would finally get a class that have been multiple times inherited. It can lead to some conflicts but this is already the case for other decorate functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions