mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-06 08:24:46 +00:00
feat(plugin): provider plugins declare option controls and receive option changes
A provider plugin reports `controls` and the `providerOptions` it runs in `session.config`, and receives running-session changes as `session.configure` `changes.providerOptions` (null returns a key to its default), under the same apply-or-throw contract as built-in providers. A control may declare a `defaultValue`; a value a plugin reports at that default for a key nobody set stays unset instead of being pinned to the agent. A plugin that still reports `settings` keeps working: the daemon reads each setting as a control plus an option and sends changes in both shapes (COMPAT(plugin-provider-settings)). The app resolves a control's icon as a Lucide name when it is not one of the built-in kebab-case names, so a plugin's icon shows live and in drafts. Public docs and the provider-direct example use only `providerOptions` and controls; the migration doc gains the rows.
This commit is contained in:
@@ -409,7 +409,7 @@ process, credential, and other machine-local work under `server/`. A plugin with
|
||||
### Providers
|
||||
|
||||
Follow [Build a provider plugin](/docs/plugins/providers) for direct and ACP implementations,
|
||||
session lifecycle, composer settings, timeline renderers, testing, and distribution.
|
||||
session lifecycle, option controls, timeline renderers, testing, and distribution.
|
||||
|
||||
Call `server.registerProvider()` with a `ProviderRegistration` from
|
||||
`@getpaseo/plugin/server/provider`. Its connection accepts inputs with `send()` and emits complete state
|
||||
@@ -420,10 +420,12 @@ Use the single `session.prompt` input for messages, structured commands, steerin
|
||||
effects. Repeat `clientMessageId` on the live user timeline item and publish exactly one matching
|
||||
`session.prompt_result`. Publish provider-created children as sessions with `parentSessionId`.
|
||||
|
||||
Provider settings are toggle/select descriptors that Paseo renders in the composer. Keep
|
||||
provider-private options under `ProviderSessionConfig.providerOptions` on `session.open`.
|
||||
This record includes configured defaults and per-agent overrides; validate and apply it in your
|
||||
provider. See [Provider options](/docs/sdk/provider-options) for configuration and merge semantics.
|
||||
Provider options are one record, `ProviderSessionConfig.providerOptions` on `session.open`. It
|
||||
includes configured defaults and per-agent overrides; validate and apply it in your provider. Report
|
||||
`controls` in `session.config` for the top-level keys that get a toggle or select in the composer,
|
||||
with the values the session runs under `providerOptions`. A running-session change arrives as
|
||||
`session.configure` with `changes.providerOptions`. See [Provider options](/docs/sdk/provider-options)
|
||||
for configuration and merge semantics.
|
||||
Host tools arrive as MCP servers in the complete
|
||||
session config.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user