mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-04 15:34:39 +00:00
refactor(server): providers report option differences once, after create, resume and apply
Providers used to write their own reports into the agent's options while a session was being created, resumed or updated, which needed a growing set of reconciliation, baseline and suppression rules to stay in step with the daemon. The contract is now transactional. A provider opens or updates with the options it is given and emits nothing while doing so; if the result differs it says so once, afterwards, as `options_changed`. Live apply hands the provider only the keys the patch sets and the daemon stores them onto the agent's current options when the provider accepts, so the last write wins. A change the provider makes on its own is stored and forwarded, not undone. Removing an option drops the key and sends nothing live. Controls carry no state; `options` is the only option state. A legacy `agent.create.before` hook's `featureValues` edits are applied as a patch over the returned options, so its deletions and replacements hold. The unreleased `aliases` field on option choices is gone; a pre-v0.10 Codex Fast preference is reported once as the model's tier id.
This commit is contained in:
@@ -158,11 +158,6 @@ export interface AgentOptionChoice {
|
||||
value: string;
|
||||
label: string;
|
||||
description?: string;
|
||||
/**
|
||||
* Other stored option values that select this choice. A saved value the provider has since
|
||||
* renamed still reads back as this choice.
|
||||
*/
|
||||
aliases?: string[];
|
||||
}
|
||||
|
||||
interface AgentOptionControlBase {
|
||||
|
||||
@@ -365,7 +365,6 @@ export const AgentOptionChoiceSchema = z.object({
|
||||
value: z.string(),
|
||||
label: z.string(),
|
||||
description: z.string().optional(),
|
||||
aliases: z.array(z.string()).optional(),
|
||||
});
|
||||
|
||||
export const AgentOptionToggleControlSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user