We have found that an html script sandboxed within a Frame plugin must distinguish three resource locations: origin, site and host.
The three locations are often the same as when an origin hosts html assets that it uses on its own pages. However, workflow scripts will be maximally sharable if attention has been paid to these distinctions.
# Origin
The origin is where the resources subject to a workflow reside. A logged in author writes pages to the origin and uploads assets to the origin.
let origin = (await requestNeighborhood())[0]
A visitor may start browsing at an origin that they do not own and may invoke workflow steps including making ghost pages and downloading constructed resources without changing the origin.
# Site
The site is where pages containing Frame plugins invoking html scripts have been found.
let site = (await frameContext()).site
When a site has been assembled to describe a complete workflow, the origin employing the workflow will see these as remote pages prepared to perform workflow steps with the origin's resources.
# Host
The host has served the text of the running html script. It is specified as part of the Frame plugin's markup.
let host = location.host
A running script can access additional resources from the host using relative urls. These might be used for importing modules or fetching other standard resources.
.
These distinctions were first noticed when sharing the "trails" workflow later refined in the Seattle implementation and then applied as remote pages by Jeff Miller. lineup