Skip to content

feat(request-router): let a plugin leave connection settings to the requester or approver - #1

Open
grtn91 wants to merge 2 commits into
mainfrom
grtn91/request-router-requester-options
Open

grtn91 wants to merge 2 commits into
mainfrom
grtn91/request-router-requester-options

Conversation

@grtn91

@grtn91 grtn91 commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Problem

Related issue: Silo-Community/silo-plugins-requests-seerr#10

That issue is filed against the Seerr plugin, but the fix spans several repos: this SDK contract, silo-server and the plugin. There is no SDK issue yet; CONTRIBUTING asks for one before a protobuf change, so one may be needed.

A request router plugin reads every setting of a request from the connection config an admin saved, or from a routing rule. A host cannot tell that one of those settings, such as a quality profile or a root folder, could be chosen per request. Today only the admin can choose, and only in advance. Someone with one download server that serves several uses cannot say which profile or folder a title should get, even though the requester or the approving admin knows.

Approach

RequestRouterDescriptor.requester_options lists the config fields that may be chosen per request. Each entry names:

  • field: a select with dynamic_options, the setting being chosen;
  • an optional media type and label;
  • chooser_field: a select in the same admin form where the admin says, per server, who chooses (admin, requester or approver).

The host offers the values ListConfigOptions returns, checks the pick against them and passes it as that key of RouterConnection.config. The plugin's RPCs do not change.

chooser_field is a select rather than a boolean so one setting can be left to the admin, the requester or the approver without another field. Manifest validation checks that field is a select with dynamic_options and that chooser_field is a static select offering only those three values.

Validation

go vet ./...    exit 0
go test ./...   all packages ok

Not run: buf generate (no diff check) and anything outside this repo. The host side is grtn91/silo-server#1; the first plugin to declare options is grtn91/silo-plugins-requests-seerr#1.

Risks

  • A host that predates the field drops it and never offers the choice, so a plugin can declare options without raising its minimum host version.
  • A Silo host that predates the field refuses a bare plugin binary that declares it, because it reads a binary's manifest strictly. There the plugin must be installed from an archive. Both points are in docs/compatibility.md.
  • The change adds a field; no existing field changes meaning.

Checklist

  • I read and can explain the complete diff.
  • This pull request addresses one concern.

AI Disclosure

  • Harness: Claude Code
  • Tool(s): Claude Code
  • Model(s): claude-fable-5-2 (code and commit message), claude-sonnet-5-5 (this description)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: n/a

🤖 Generated with Claude Code

…equester or approver

A request router plugin reads every setting of a request from the
connection config an admin saved, or a routing rule's. A host had no way
to know that one of those settings, such as a quality profile or a root
folder, could instead be chosen per request, so the choice could only be
made by the admin in advance.

RequestRouterDescriptor.requester_options lists the config fields that
may be chosen per request. Each names a select with dynamic_options, an
optional media type and label, and a chooser_field: a select in the same
form in which an admin says per server who chooses (admin, requester or
approver). The host offers the values ListConfigOptions returns, checks
the pick against them and passes it as that key of
RouterConnection.config, so the plugin's RPCs do not change.

Manifest validation checks the declaration against the admin form.
Hosts that predate the field drop it and never offer the choice.

AI disclosure: written with Claude Fable 5.2 in Claude Code. go test ./... and
go vet pass locally.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
… scope the compatibility note

A requester option's pick is a ConfigOption value, which is a string. A
select may sit on a numeric json_schema property, and setting the pick
there would change the type the plugin reads. Manifest validation now
refuses a requester option whose field is not a string property.

The compatibility note said older hosts ignore the field. That holds for
loading a manifest, which every SDK version does leniently. It now also
names the two stricter paths: Silo's read of a bare binary's manifest, and
stored capability metadata on an SDK older than v0.13.1.

AI disclosure: written with Claude Fable 5.2 in Claude Code. go vet and
go test pass locally; pkg/pluginproto was regenerated with buf.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant