MCPcopy
hub / github.com/larksuite/cli / Register

Function Register

extension/platform/register.go:19–21  ·  view source on GitHub ↗

Register adds a plugin to the global registry. Plugins call this from init() (typically through a blank import in the embedder's main). Register is intentionally tolerant of malformed input: validation happens later in the host's InstallAll phase, where errors can be surfaced through the typed plug

(p Plugin)

Source from the content-addressed store, hash-verified

17// The registry holds plugins in insertion order so InstallAll can
18// process them deterministically.
19func Register(p Plugin) {
20 pluginRegistry.add(p)
21}
22
23// RegisteredPlugins returns a snapshot of the global plugin registry.
24// Order matches Register insertion. The host reads this once during

Calls 1

addMethod · 0.80