Skip to content

Commit de73f8a

Browse files
Update ToolHive reference docs for v0.12.5 (#634)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 1b66d11 commit de73f8a

2 files changed

Lines changed: 186 additions & 2 deletions

File tree

docs/toolhive/reference/crd-spec.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,21 @@ _Appears in:_
538538
| `perWorkload` _object (keys:string, values:[vmcp.config.Duration](#vmcpconfigduration))_ | PerWorkload defines per-workload timeout overrides. | | Optional: \{\} <br /> |
539539

540540

541+
#### vmcp.config.ToolAnnotationsOverride
542+
543+
_Underlying type:_ _[vmcp.config.struct{Title *string "json:\"title,omitempty\" yaml:\"title,omitempty\""; ReadOnlyHint *bool "json:\"readOnlyHint,omitempty\" yaml:\"readOnlyHint,omitempty\""; DestructiveHint *bool "json:\"destructiveHint,omitempty\" yaml:\"destructiveHint,omitempty\""; IdempotentHint *bool "json:\"idempotentHint,omitempty\" yaml:\"idempotentHint,omitempty\""; OpenWorldHint *bool "json:\"openWorldHint,omitempty\" yaml:\"openWorldHint,omitempty\""}](#vmcpconfigstruct{title *string "json:\"title,omitempty\" yaml:\"title,omitempty\""; readonlyhint *bool "json:\"readonlyhint,omitempty\" yaml:\"readonlyhint,omitempty\""; destructivehint *bool "json:\"destructivehint,omitempty\" yaml:\"destructivehint,omitempty\""; idempotenthint *bool "json:\"idempotenthint,omitempty\" yaml:\"idempotenthint,omitempty\""; openworldhint *bool "json:\"openworldhint,omitempty\" yaml:\"openworldhint,omitempty\""})_
544+
545+
ToolAnnotationsOverride defines overrides for tool annotation fields.
546+
All fields use pointers so nil means "don't override" while zero values
547+
(empty string, false) mean "explicitly set to this value."
548+
549+
550+
551+
_Appears in:_
552+
- [vmcp.config.ToolOverride](#vmcpconfigtooloverride)
553+
554+
555+
541556
#### vmcp.config.ToolConfigRef
542557

543558

@@ -559,7 +574,7 @@ _Appears in:_
559574

560575

561576

562-
ToolOverride defines tool name and description overrides.
577+
ToolOverride defines tool name, description, and annotation overrides.
563578

564579

565580

@@ -570,6 +585,7 @@ _Appears in:_
570585
| --- | --- | --- | --- |
571586
| `name` _string_ | Name is the new tool name (for renaming). | | Optional: \{\} <br /> |
572587
| `description` _string_ | Description is the new tool description. | | Optional: \{\} <br /> |
588+
| `annotations` _[vmcp.config.ToolAnnotationsOverride](#vmcpconfigtoolannotationsoverride)_ | Annotations overrides specific tool annotation fields.<br />Only specified fields are overridden; others pass through from the backend. | | Optional: \{\} <br /> |
573589

574590

575591

@@ -2818,6 +2834,28 @@ _Appears in:_
28182834
| `expiresInPath` _string_ | ExpiresInPath is the dot-notation path to the expires_in value (in seconds).<br />If not specified, defaults to "expires_in". | | Optional: \{\} <br /> |
28192835

28202836

2837+
#### api.v1alpha1.ToolAnnotationsOverride
2838+
2839+
2840+
2841+
ToolAnnotationsOverride defines overrides for tool annotation fields.
2842+
All fields use pointers so nil means "don't override" while zero values
2843+
(empty string, false) mean "explicitly set to this value."
2844+
2845+
2846+
2847+
_Appears in:_
2848+
- [api.v1alpha1.ToolOverride](#apiv1alpha1tooloverride)
2849+
2850+
| Field | Description | Default | Validation |
2851+
| --- | --- | --- | --- |
2852+
| `title` _string_ | Title overrides the human-readable title annotation. | | Optional: \{\} <br /> |
2853+
| `readOnlyHint` _boolean_ | ReadOnlyHint overrides the read-only hint annotation. | | Optional: \{\} <br /> |
2854+
| `destructiveHint` _boolean_ | DestructiveHint overrides the destructive hint annotation. | | Optional: \{\} <br /> |
2855+
| `idempotentHint` _boolean_ | IdempotentHint overrides the idempotent hint annotation. | | Optional: \{\} <br /> |
2856+
| `openWorldHint` _boolean_ | OpenWorldHint overrides the open-world hint annotation. | | Optional: \{\} <br /> |
2857+
2858+
28212859
#### api.v1alpha1.ToolConfigRef
28222860

28232861

@@ -2853,6 +2891,7 @@ _Appears in:_
28532891
| --- | --- | --- | --- |
28542892
| `name` _string_ | Name is the redefined name of the tool | | Optional: \{\} <br /> |
28552893
| `description` _string_ | Description is the redefined description of the tool | | Optional: \{\} <br /> |
2894+
| `annotations` _[api.v1alpha1.ToolAnnotationsOverride](#apiv1alpha1toolannotationsoverride)_ | Annotations overrides specific tool annotation fields.<br />Only specified fields are overridden; others pass through from the backend. | | Optional: \{\} <br /> |
28562895

28572896

28582897
#### api.v1alpha1.UpstreamProviderConfig

static/api-specs/toolhive-api.yaml

Lines changed: 146 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,11 @@ components:
326326
description: 'HeaderStrategy determines how to inject the token: "replace"
327327
(default) or "custom".'
328328
type: string
329+
provider_name:
330+
description: |-
331+
ProviderName identifies which upstream provider's tokens to retrieve for injection.
332+
This is required and must match a configured upstream provider name.
333+
type: string
329334
type: object
330335
github_com_stacklok_toolhive_pkg_authserver.OAuth2UpstreamRunConfig:
331336
description: |-
@@ -462,7 +467,7 @@ components:
462467
description: |-
463468
Upstreams configures connections to upstream Identity Providers.
464469
At least one upstream is required - the server delegates authentication to these providers.
465-
Currently only a single upstream is supported.
470+
Multiple upstreams are supported for sequential authorization chains.
466471
items:
467472
$ref: '#/components/schemas/github_com_stacklok_toolhive_pkg_authserver.UpstreamRunConfig'
468473
type: array
@@ -821,6 +826,23 @@ components:
821826
type: array
822827
uniqueItems: false
823828
type: object
829+
github_com_stacklok_toolhive_pkg_registry.OAuthPublicConfig:
830+
description: |-
831+
AuthConfig contains the non-secret OAuth configuration when auth is configured.
832+
Nil when auth_status is "none".
833+
properties:
834+
audience:
835+
type: string
836+
client_id:
837+
type: string
838+
issuer:
839+
type: string
840+
scopes:
841+
items:
842+
type: string
843+
type: array
844+
uniqueItems: false
845+
type: object
824846
github_com_stacklok_toolhive_pkg_runner.HeaderForwardConfig:
825847
description: HeaderForward contains configuration for injecting headers into
826848
requests to remote servers.
@@ -961,6 +983,8 @@ components:
961983
type: string
962984
runtime_config:
963985
$ref: '#/components/schemas/github_com_stacklok_toolhive_pkg_container_templates.RuntimeConfig'
986+
scaling_config:
987+
$ref: '#/components/schemas/github_com_stacklok_toolhive_pkg_runner.ScalingConfig'
964988
schema_version:
965989
description: SchemaVersion is the version of the RunConfig schema
966990
type: string
@@ -1027,6 +1051,24 @@ components:
10271051
type: array
10281052
uniqueItems: false
10291053
type: object
1054+
github_com_stacklok_toolhive_pkg_runner.ScalingConfig:
1055+
description: |-
1056+
ScalingConfig contains configuration for horizontal scaling of the proxy runner.
1057+
Only applicable when running in Kubernetes with the ToolHive operator.
1058+
When nil, no scaling configuration is applied (single-replica default behavior).
1059+
properties:
1060+
backend_replicas:
1061+
description: |-
1062+
BackendReplicas is the desired StatefulSet replica count for the proxy runner backend.
1063+
When nil, replicas are unmanaged (preserving HPA or manual kubectl control).
1064+
When set (including 0), the value is an explicit replica count.
1065+
type: integer
1066+
session_cache_size:
1067+
description: |-
1068+
SessionCacheSize is the maximum number of sessions held in the local LRU cache.
1069+
When nil, consuming code applies a sensible default (e.g. 1000).
1070+
type: integer
1071+
type: object
10301072
github_com_stacklok_toolhive_pkg_runner.ToolOverride:
10311073
properties:
10321074
description:
@@ -1365,6 +1407,25 @@ components:
13651407
- RegistryTypeURL
13661408
- RegistryTypeAPI
13671409
- RegistryTypeDefault
1410+
pkg_api_v1.UpdateRegistryAuthRequest:
1411+
description: OAuth authentication configuration (optional)
1412+
properties:
1413+
audience:
1414+
description: OAuth audience (optional)
1415+
type: string
1416+
client_id:
1417+
description: OAuth client ID
1418+
type: string
1419+
issuer:
1420+
description: OIDC issuer URL
1421+
type: string
1422+
scopes:
1423+
description: OAuth scopes (optional)
1424+
items:
1425+
type: string
1426+
type: array
1427+
uniqueItems: false
1428+
type: object
13681429
pkg_api_v1.UpdateRegistryRequest:
13691430
description: Request containing registry configuration updates
13701431
properties:
@@ -1374,6 +1435,8 @@ components:
13741435
api_url:
13751436
description: MCP Registry API URL
13761437
type: string
1438+
auth:
1439+
$ref: '#/components/schemas/pkg_api_v1.UpdateRegistryAuthRequest'
13771440
local_path:
13781441
description: Local registry file path
13791442
type: string
@@ -1588,6 +1651,18 @@ components:
15881651
pkg_api_v1.getRegistryResponse:
15891652
description: Response containing registry details
15901653
properties:
1654+
auth_config:
1655+
$ref: '#/components/schemas/github_com_stacklok_toolhive_pkg_registry.OAuthPublicConfig'
1656+
auth_status:
1657+
description: |-
1658+
AuthStatus is one of: "none", "configured", "authenticated".
1659+
Intentionally omits omitempty — see registryInfo for rationale.
1660+
type: string
1661+
auth_type:
1662+
description: |-
1663+
AuthType is "oauth", "bearer" (future), or empty string when no auth.
1664+
Intentionally omits omitempty — see registryInfo for rationale.
1665+
type: string
15911666
last_updated:
15921667
description: Last updated timestamp
15931668
type: string
@@ -1775,6 +1850,20 @@ components:
17751850
pkg_api_v1.registryInfo:
17761851
description: Basic information about a registry
17771852
properties:
1853+
auth_config:
1854+
$ref: '#/components/schemas/github_com_stacklok_toolhive_pkg_registry.OAuthPublicConfig'
1855+
auth_status:
1856+
description: |-
1857+
AuthStatus is one of: "none", "configured", "authenticated".
1858+
Intentionally omits omitempty so clients always receive the field,
1859+
even when the value is "none" (the zero-value equivalent).
1860+
type: string
1861+
auth_type:
1862+
description: |-
1863+
AuthType is "oauth", "bearer" (future), or empty string when no auth.
1864+
Intentionally omits omitempty so clients can distinguish "no auth
1865+
configured" (empty string) from "field missing" without extra logic.
1866+
type: string
17781867
last_updated:
17791868
description: Last updated timestamp
17801869
type: string
@@ -3037,6 +3126,62 @@ paths:
30373126
summary: Get a server from a registry
30383127
tags:
30393128
- registry
3129+
/api/v1beta/registry/auth/login:
3130+
post:
3131+
description: Trigger an interactive OAuth flow to authenticate with the configured
3132+
registry. Only available in serve mode.
3133+
responses:
3134+
"200":
3135+
content:
3136+
application/json:
3137+
schema:
3138+
additionalProperties:
3139+
type: string
3140+
type: object
3141+
description: Authenticated successfully
3142+
"400":
3143+
content:
3144+
application/json:
3145+
schema:
3146+
type: string
3147+
description: Bad Request - Registry OAuth not configured
3148+
"500":
3149+
content:
3150+
application/json:
3151+
schema:
3152+
type: string
3153+
description: Internal Server Error
3154+
summary: Registry login
3155+
tags:
3156+
- registry
3157+
/api/v1beta/registry/auth/logout:
3158+
post:
3159+
description: Clear cached OAuth tokens for the configured registry. Only available
3160+
in serve mode.
3161+
responses:
3162+
"200":
3163+
content:
3164+
application/json:
3165+
schema:
3166+
additionalProperties:
3167+
type: string
3168+
type: object
3169+
description: Logged out successfully
3170+
"400":
3171+
content:
3172+
application/json:
3173+
schema:
3174+
type: string
3175+
description: Bad Request - Registry OAuth not configured
3176+
"500":
3177+
content:
3178+
application/json:
3179+
schema:
3180+
type: string
3181+
description: Internal Server Error
3182+
summary: Registry logout
3183+
tags:
3184+
- registry
30403185
/api/v1beta/secrets:
30413186
post:
30423187
description: Setup the secrets provider with the specified type and configuration.

0 commit comments

Comments
 (0)