Skip to content

feat(request-router): let a plugin leave connection settings to the r… - #68

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

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

Conversation

@grtn91

@grtn91 grtn91 commented Nov 12, 2026 •

Copy link
Copy Markdown

Problem

Closes #67
Related issue: Silo-Community/silo-plugins-requests-seerr#10 (the plugin issue this change comes from; the fix spans this SDK, silo-server and the plugin)

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 (silo-server) and the first plugin to declare options (silo-plugins-requests-seerr) are separate PRs; links to follow once they are open.

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.

Related PRs:

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

Note

Add requester-option declarations to request-router plugin manifest

  • Plugins can now declare requester options on the request-router capability. Each option names an admin-form select field, a media type (empty, movie, or series), a label, and an optional chooser field. Added via RequesterOption and a repeated requester_options field (number 6) on RequestRouterDescriptor in request_router.proto.
  • New validateRequesterOptions in manifest.go checks that each option's field is a dynamic admin-form select with a string JSON-schema type, media types do not overlap for the same field, labels respect the wording label limit, and a chooser field is a static select with only supported values.
  • Documents the manifest format, supported media types, chooser values, and host compatibility in README.md and docs/compatibility.md.
  • Risk: manifest loading now rejects previously-accepted request-router capabilities that include invalid requester-option fields, duplicate/overlapping entries, or unsupported chooser values.

Macroscope summarized 1fe3386.

…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>
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c3397ea-9409-4b16-9af3-a35e0041c7c3
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-triage silo-triage Bot added the size/XL 500–999 added + deleted lines (all files); change volume, not priority. label Nov 12, 2026
@silo-kody

silo-kody Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@grtn91 grtn91 closed this Nov 12, 2026
@grtn91 grtn91 reopened this Nov 12, 2026
Comment thread README.md Resolved
Comment thread pkg/pluginsdk/manifest/manifest.go Resolved
… 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>
@silo-kody

silo-kody Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 3 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Share optional authentication service resolution across interface types
  • Find the last complete-line boundary with bounded memory
  • Identify the actual first SDK release containing new Go APIs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code size/XL 500–999 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let a request router plugin leave connection settings to the requester or approver

1 participant