Types Reference¶
nautilus_adapter_sdk.types
¶
Adapter SDK Pydantic models — independent copies of nautilus core types.
These are standalone mirrors so adapter packages have zero import dependency
on the nautilus core library. Mirror means field for field: the broker
reads these objects directly, so a field that differs from
nautilus.core.models is a runtime failure in every adapter written the
documented way, not a stylistic difference. tests/defects/test_blockers.py
pins the two shapes together.
IntentAnalysis
¶
Bases: BaseModel
Structured intent analysis forwarded to adapters by the broker.
Mirrors :class:nautilus.core.models.IntentAnalysis. The stated purpose
is not here: it travels in the context dict passed to
:meth:Adapter.execute, not on the intent.
Source code in packages/nautilus-adapter-sdk/src/nautilus_adapter_sdk/types.py
ScopeConstraint
¶
Bases: BaseModel
Per-source WHERE-clause fragment passed to :meth:Adapter.execute.
Adapters use these constraints to restrict query results at the data-source level (e.g., field-level redaction, row filtering).
Source code in packages/nautilus-adapter-sdk/src/nautilus_adapter_sdk/types.py
ErrorRecord
¶
Bases: BaseModel
Structured error report emitted when an adapter fails.
Mirrors :class:nautilus.core.models.ErrorRecord. trace_id
correlates back to the request id; adapters may leave it empty and the
broker fills it in.
Source code in packages/nautilus-adapter-sdk/src/nautilus_adapter_sdk/types.py
AdapterResult
¶
Bases: BaseModel
Result returned by an adapter after executing a scoped query.
Mirrors :class:nautilus.core.models.AdapterResult, which the broker
reads as res.rows and res.error. Success populates rows and
leaves error None; failure returns empty rows with error
set, so the broker can bucket the source into sources_errored without
raising.
There is deliberately no response-hash field: the per-source
chain-of-custody digest is computed by the broker over rows, because
an adapter-supplied digest would be an unverifiable trust channel into
the signed attestation.
Source code in packages/nautilus-adapter-sdk/src/nautilus_adapter_sdk/types.py
AuthConfig
¶
Bases: BaseModel
Authentication credentials for connecting to a data source.
The auth_type field selects the authentication strategy
(e.g., "bearer", "basic", "api_key").
Source code in packages/nautilus-adapter-sdk/src/nautilus_adapter_sdk/types.py
EndpointSpec
¶
Bases: BaseModel
HTTP endpoint specification for REST-based adapters.
Provides URL, method, optional headers, and a per-request timeout.