The plugin API object provided by the gateway.
Optionalctx: PluginContext
Hook or tool-factory context, when available.
Absolute path to the workspace.
In order (spec 5.8, #138):
agents.defaults.workspace from the OpenClaw config, ~ expanded;ctx.workspaceDir from a hook or tool-factory context;Never returns the plugin root (api.resolvePath resolves against it) and
never throws.
Resolve the agent workspace directory.