···2222## v? - Extensibility
23232424Peek extensions
2525-- [ ] better name that "extension"
2626-- [ ] figure out background app vs other
2727-- [ ] maybe cmd stays in core?
2828-- [ ] is background runtime aware? eg mobile/extension/desktop
2929-- [ ] background app separation from "feature" apps, is runtime aware
3030-- [ ] annotate all data with source creator/editor (sys vs extension)
3131-- [ ] figure out in-extension settings vs jamming in global settings
3232-- [ ] syncable settings (extension decides)
3333-- [ ] App cmds (eg Editor -> cmd to edit note X)
2525+- [ ] see notes/extensibility.md
34263527Web extensions
3628- [ ] WebExtension integration for priority only, on some platforms
37293830## v? Portability
3131+3232+does this need to be done before extensions?
39334034- [ ] Common background runtime
4135 - [ ] Datastore -> background
+27-6
notes/extensibility.md
···2233Balance minimal install/development/distribution barriers with web-level safety at runtime.
4455+Key bits:
66+57- Extensions are a folder with a PWA manifest and web content files
68- They're opened under the peek:// protocol, each in a web content process
79- Their main window is hidden, like the Peek background content process
810- Extensions are run directly from their local folder (wherever the user selected)
99-- Hot reloading, Peek watches folder for changes, and reloads
1010-- Extensions are managed in the settings app, eg add/remove, enable/disable
1111-- User can open/close devtools for a given extension
1111+- Extensions are managed in the main settings app, eg add/remove, enable/disable
1212+1313+Implementation
1414+1515+- New table in datastore for extensions
1616+- New section in settings app, where users can:
1717+ - Add/remove
1818+ - Enable/disable
1919+ - Activate/suspend/reload
2020+ - Click to access settings
2121+2222+Note: The implementation will also instigate another shift, moving as much logic into the background web app as possible, vs in node.js space, so we can eventually move to other back-ends than Electron.
12231313-Capabilities:
2424+Capabilities via injected API:
14251526- Window management
1627- Datastore access
···1829- Hotkey registration
1930- Pubsub messaging
20312121-Open questions for later:
3232+Dev workflow:
3333+3434+- User can open/close devtools for a given extension (via a cmd)
3535+- User can reload a given extension (via a cmd)
3636+- Hot reloading using node fs watcher to watch folder for changes, and reload
3737+3838+Open questions, for later:
22392340- Dirty writes - add ext or sys as source. also ensure no direct writes, only api adds
2441- Sharded space, in/outbox style too maybe
···2845- How to do extension-specific settings? Manifest link to bundled settings UI? Or a api for placement into Settings app?
2946- How to allow for maximal unloading vs always persistent
3047- How to do remixes, eg take verified extension X, copy and hack
4848+- figure out in-extension settings vs jamming in global settings
4949+- syncable settings (extension decides)
31503232-Mobile:
5151+Mobile, for later:
3352- open web pages
3453- if calls a registration api, user can choose to add
3554- permissions
3655- expose peek api upon approval
3756- also, preverification via sync
5757+5858+