Installation
metadata.json as described in Plugin Overview.
Example: tool plugin
main.go
metadata.json for this plugin must include "features": ["plugin_tool"].
Build and install:
Lifecycle
sdk.NewPlugin()creates the client and readsNAGARE_PLUGIN_LOG_FILE,NAGARE_PLUGIN_CONFIG_DIR,NAGARE_PLUGIN_DATA_DIR.LoadMetadata(raw)loads and validates metadata. Usually used with//go:embed metadata.json.Start(ctx, onStart)connects to the gateway, callsonStart, and waits until the connection closes.- Inside
onStart, always callHandshake(ctx)first before any other command.
API reference
Tools
Each tool call has a maximum timeout of 60 seconds.