discovery API
SDK 1.0.1. This reference describes the supported authoring interface.
DiscoveryErrorCode
type DiscoveryErrorCode = Literal['invalid_directory', 'limit', 'denied', 'unsupported', 'unavailable', 'timeout']
Mode
type Mode = Literal['unary', 'server_streaming', 'client_streaming', 'bidirectional']
Domain
type Domain = Literal['local', 'private_site', 'external']
DiscoveryError
A sanitized discovery refusal; responses, URLs and credentials stay private.
DiscoveryError.__init__
Expose a bounded error code without retaining the failed response.
def __init__(self, code: DiscoveryErrorCode) -> None:
...
CapabilityOffer
An immutable observation, with exact descriptor binding and no grant.
Runtime and incarnation describe the observed generation. Core independently authenticates the actual caller and rechecks current custody at dispatch.
Fields
plugin_id: str
runtime_digest: str
incarnation: str
endpoint: CapabilityEndpoint
behavior: Literal['read', 'inference']
processing_domain: Domain
io_mode: Mode
stream_seconds: float
cleanup_seconds: float
startup_seconds: float
inference_seconds: float | None
| Field | Description | Declared defaults and constraints |
|---|---|---|
plugin_id | — | — |
runtime_digest | — | — |
incarnation | — | — |
endpoint | — | — |
behavior | — | — |
processing_domain | — | — |
io_mode | — | — |
stream_seconds | — | — |
cleanup_seconds | — | — |
startup_seconds | — | — |
inference_seconds | — | — |
CapabilityDirectory
A complete validated observation; it is neither cached authority nor routing.
CapabilityDirectory.from_json
Admit one bounded Core directory atomically through native descriptors.
Reject duplicate JSON keys, unsupported fields, inconsistent identities, duplicate destinations and any malformed offer without returning a subset.
def from_json(cls, source: bytes) -> CapabilityDirectory:
...
CapabilityDirectory.select
Select an exact installed identity; absent or ambiguous matches refuse.
def select(self, plugin_id: str, capability_id: str, version: str, *, node_id: str | None=None) -> CapabilityOffer:
...
Fields
offers: tuple[CapabilityOffer, ...]
| Field | Description | Declared defaults and constraints |
|---|---|---|
offers | — | — |
discover_capabilities
Read fresh caller-authorized offers, owning HTTP cleanup on every outcome.
Install the native-discovery extra and an admitted native kernel. Supply
an enrolled Skulk™ client bearer, never provider credentials. Remote origins
require HTTPS; redirects and environment proxies are disabled. The optional
timeout bounds this metadata read, independently of all inference lifetimes.
certificate_authority optionally supplies the cluster's trusted PEM CA;
certificate and hostname verification remain enabled. No request,
authorization failure or stale observation is retried automatically.
async def discover_capabilities(base_url: str, bearer: str, *, timeout_seconds: float=30, certificate_authority: str | None=None) -> CapabilityDirectory:
...