Epic: Endo Pet Daemon / Familiar Chat / Chat Familier 🐈⬛
[2022-01-27 by @kriskowal]
We need a vessel that can be white-labeled by alternately Agoric or MetaMask for shipping an open-ended host and user agent for installable applications that run on the platform of hardened JavaScript and eventual-send over CapTP. This vessel needs to be able to support plugins that run with all the power of the user, such that the powers available to applications are extensible by white-labels, for example Agoric’s ag-solo.
Tasks:
- [x] Endo Daemon
- [x] Endo Daemon Worker https://github.com/endojs/endo/issues/1036
- [x] Endo Daemon Worker Plugin API https://github.com/endojs/endo/issues/1005
- [x] Endo Application Worker https://github.com/endojs/endo/issues/1037
- [x] Endo Application Installer / CLI
- [x] Endo Browser Console granting installation requests for applications https://github.com/endojs/endo/issues/1038
- [ ] Factor web user interface into a separate package
- [ ] Verify that weblets are have isolated origins in browsers x operating systems
- [ ] Serve CORS headers if necessary to prevent weblets from accepting requests from outside their origin
- [x] ~Endo Browser White-Label https://github.com/endojs/endo/issues/1039~
- [x] ~Endo Browser as vessel for Endo Daemon working on all supported platforms https://github.com/endojs/endo/issues/1041~
- [x] ~Endo Browser Release Packaging Automation https://github.com/endojs/endo/issues/1040~
- [x] ~Endo Browser Front Ends, possibly as vessel for Endo Console https://github.com/endojs/endo/issues/1006~
- [ ] Endo Chrome Extension https://github.com/endojs/endo/issues/1042
- [ ] Native Message Host connection to Endo
- [ ] Endonym transclusion
- [ ] Endo Browser Workflow for adding or removing Chrome Extension ID’s that may use native host messaging to contact Endo (or a permissionless channel from extension to extension)
- [ ] Endo Ag-solo plugin and Endo Wallet dapp https://github.com/Agoric/agoric-sdk/issues/4434
Glossary:
- Endo Pet Daemon is a daemon that runs on behalf of a user with all their powers, which in turn manages Endo Programs, Processes, Plugins, and References. The Endo Daemon communicates locally with a UNIX domain socket or named pipe.
- Endo Browser (née Exo) is an Electron browser that is a user interface for Endo, where the user manages objects, their names and representations, and grants or revokes access, manages programs and processes, and possibly surfaces web pages for applications. The Endo Browser also contains the Endo daemon and plugins. The Endo Browser can be white-labeled to package different sets of plugins and branding. Since Electron contains Node.js, the Endo Browser contains everything an end-user will need to run the Endo Daemon.
- Endo Command Line is another user interface for Endo and also contains a copy of the Endo daemon, and is suitable for developers, administration, and automation.
- Endo Plugin is a Node.js module that extends the capabilities of Endo with all of the user's powers in an Endo Process, and also describes the powers it provides so that these can be presented to the user for a new Endo Process.
- Endo Program (analogous to Zoe Installation) is a file containing code and assets and a description of the powers it needs to run in an Endo Process. Endo Programs have unique hashes that can be given Endonyms.
- Endo Process (analogous to Zoe Instance) is a worker subprocess of the Endo daemon for a particular program that communicates over CapTP and has limited access to user resources.
- Endo References “Endonyms” (which are pet names) names a user assigns to otherwise opaque identifiers like content hashes or process identifiers.
- Endo Browser Extension is a browser extension that allows web pages and other extensions to open connections to the Endo Daemon to interact with its public API, requesting user resources.
- Endo Native Messaging Host is a program that the browser extension uses to communicate with the Endo daemon over a particular message framing protocol, on which Endo layers CapTP.
We could take https://github.com/agoric-labs/Pledger and strip it down to just a bundle loader that could serve as a host for Endo bundles (Node.js code in a worker and/or UI code in a window) that communicate over CapTP. That substrate could host a SwingSet instance which could be further subdivided.
This would be called Exo.
Kris will break this into sub tickets, which will get their own estimates. The overall estimate may be around 10 units.
I’ve broken this into ten dependencies that conclude with us having a wallet that can communicate with ag-solo through Endo, which is as far as I can see through the waving veil at present.
Some notes from design jam with @warner and @michaelfig: Ephemeral workers need to be able to reunite with references that were previously granted by the user, if Endo Daemon restarts, the host reboots, or (maybe someday) if the daemon evicts an huge/idle worker. To that end, we should distinguish powers.provideDurableCapability(localName, descriptionOfRequestedCapability) vs provideEphemeralCapability, by whatever name. The Endo Daemon would become responsible for tracking durable capabilities and the sequence of operations necessary to construct them from other durable capabilities. An ephemeral capability can perhaps be named but would not be stored and thus can’t be restored.
Naming hints much appreciated.