-
Notifications
You must be signed in to change notification settings - Fork 60
feat(web): report the runtime inputs a connector declares #2132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AlexLiu190625
merged 5 commits into
xorbitsai:main
from
AlexLiu190625:feat/connector-runtime-web-endpoints
Sep 7, 2026
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
04db043
feat(web): add connector runtime requirements read endpoints
AlexLiu190625 10d04f4
feat(web): report missing connector runtime inputs on task create
AlexLiu190625 8756d47
fix(web): align the connector runtime report with the per-turn path
AlexLiu190625 d3e8f27
docs(web): state what the runtime requirements report actually promises
AlexLiu190625 af86727
fix(web): fail the runtime requirements report on any malformed decla…
AlexLiu190625 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| """Connector runtime requirements: the shared response shape both read | ||
| endpoints return. | ||
|
|
||
| The agent-keyed and task-keyed read endpoints both return this same | ||
| requirements report -- which runtime inputs a task's (or a prospective | ||
| task's) connectors declare, and whether each one already has a value -- | ||
| never a stored value itself, and never a connector's transport or | ||
| authentication configuration. | ||
|
|
||
| Placed in its own module rather than ``schemas/chat.py`` because a values- | ||
| submission endpoint lands on top of it shortly and will share this same | ||
| response shape as its own 200 body; putting it here now avoids a later | ||
| move that would touch every existing importer. | ||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from pydantic import BaseModel | ||
|
|
||
|
|
||
| class ConnectorRuntimeRefModel(BaseModel): | ||
| """Wire identity of a connector, as returned in a requirements report.""" | ||
|
|
||
| connector_type: str | ||
| connector_id: int | ||
|
|
||
|
|
||
| class ConnectorRuntimeInputModel(BaseModel): | ||
| """One declared runtime input and whether it is currently satisfied. | ||
|
|
||
| ``key`` is the raw key name a connector owner wrote when declaring the | ||
| input -- there is no human-readable label anywhere in the declaration. | ||
| ``type`` is already normalized server-side to ``"string"`` or | ||
| ``"object"``; a client must not normalize it again or expect any other | ||
| value. ``satisfied`` and ``expired`` are constants in this phase for the | ||
| ``secrets``/``auth_selector`` sections: no secret store exists yet, so | ||
| both are always ``False``. | ||
| """ | ||
|
|
||
| section: str | ||
| key: str | ||
| type: str | ||
| required: bool | ||
| satisfied: bool | ||
| expired: bool = False | ||
|
|
||
|
|
||
| class ConnectorRuntimeConnectorModel(BaseModel): | ||
| """One connector's declared runtime inputs. | ||
|
|
||
| ``name`` is the only piece of connector identity beyond the ref that is | ||
| ever included -- never the connector's URL, headers, environment, or | ||
| authentication configuration. | ||
| """ | ||
|
|
||
| connector_ref: ConnectorRuntimeRefModel | ||
| name: str | ||
| inputs: list[ConnectorRuntimeInputModel] | ||
|
|
||
|
|
||
| class ConnectorRuntimeRequirementsModel(BaseModel): | ||
| """A requirements report. Every field always appears. | ||
|
|
||
| ``connectors`` is empty, never omitted, when nothing is selected or | ||
| declares a runtime input. ``secrets_expires_at`` is a constant ``null`` | ||
| in this phase; a later phase gives it a real value without changing | ||
| its meaning or making it optional. | ||
| """ | ||
|
|
||
| satisfied: bool | ||
| secrets_expires_at: str | None | ||
| connectors: list[ConnectorRuntimeConnectorModel] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.