Documentation
¶
Overview ¶
Command plugins is a Go app that installs and runs signed TSX packages: it verifies greeter.nsgopkg against the root key rootKey, off the engine's goroutine, asks the user to grant what its capabilities declare, installs it in the app's data directory and shows it in tsx.View, which reaches the app only through a host channel of its own; or it shows why the package was refused. search.nsgopkg is a plugin of functions, which the app loads with tsx.Load and calls.
The web cannot isolate a package from the page, so there both are refused with tsx.ErrUnisolated: the app does not set Sandbox.WebUnisolated, which would give them the page's authority whatever they declare.
The packages are the apps in plugin/ and search/, signed by a release key of a root whose secret was thrown away. To sign them again, print a root and a release key with go tool nsgo keygen, keep their secret keys out of the repository, set rootKey to the root's public key, then, in this directory:
NSGO_ROOT_KEY=<root secret> go tool nsgo certify -key <release public> -apps 'dev.oneo.nsgo.plugins.*' -out ~/keys/release.cert export NSGO_RELEASE_KEY=<release secret> go tool nsgo publish -cert ~/keys/release.cert -out greeter.nsgopkg plugin go tool nsgo publish -cert ~/keys/release.cert -entry App.ts -out search.nsgopkg search