Documentation
¶
Overview ¶
Package compiledin is the registry of the compiled-in extensions an extension names by reference (createCodemodeExtension, createToolSearchExtension): Pi's factories return functions, which cannot cross the process boundary, so the SDKs send the name and the options and the host builds its own factory of that name (coding/session_graph_extension_factories.go).
A built-in registers its factory from the package that implements it (coding/extension/builtin), not from the session code that looks it up: a program that imports the coding library without the built-ins links neither the sandbox's wasm runtime nor the tool-search index, and a reference to a built-in it does not link fails as in a build that strips it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasOptions ¶
func HasOptions(options json.RawMessage) bool
HasOptions reports whether the extension passed options.
func OptionsError ¶
OptionsError is the failure of the extension name to read its options.
Types ¶
type Factory ¶
type Factory func(options json.RawMessage) (extension.InlineExtension, error)
Factory builds one compiled-in extension from the JSON options the extension passed (empty or null when it passed none). It decodes them into a struct of its own.