Documentation
¶
Overview ¶
Package scriptlingserver implements the plugin the scriptling CLI loads to use knot libraries and scripts. When scriptling spawns the knot executable as a plugin peer it sets SCRIPTLING_PLUGIN_PEER in the environment, so a bare `knot` invocation (optionally carrying plugin options like --alias from scriptling's --plugin-arg) can divert here without a subcommand — the CLI never needs to know one exists.
Index ¶
Constants ¶
const MinPeerVersion = "0.23.0"
MinPeerVersion is the earliest scriptling version whose plugin protocol this build of knot can serve. The fetcher contract (one scheme, no manifest, bytes in/out) landed in 0.23.0.
const PeerEnvVar = "SCRIPTLING_PLUGIN_PEER"
PeerEnvVar is the environment variable scriptling sets on spawned plugin peers. A knot process that sees it diverts to the plugin server instead of running the CLI, desktop or agent.
Variables ¶
This section is empty.
Functions ¶
func AutoStartCmd ¶
AutoStartCmd returns the command that serves the plugin when scriptling spawns the knot binary. Plugin arguments passed via scriptling's --plugin-arg arrive as this process's argv, so the standard CLI machinery parses them: --alias selects the configured server alias to talk to (default "default"), and --server/--token address a server outright.
func ShouldAutoStart ¶
func ShouldAutoStart() bool
ShouldAutoStart reports whether this process was spawned by scriptling as a plugin peer: scriptling sets SCRIPTLING_PLUGIN_PEER (carrying its version) on the knot executable it spawns.
Types ¶
This section is empty.