nimbus-dev-sdk
The MIT-licensed, dependency-free authoring contract for Nimbus connectors and extensions — Python binding.
pip install nimbus-dev-sdk # note: nimbus-dev-sdk, NOT nimbus-sdk
import nimbus_sdk # the import name differs from the distribution name
PyPI has a flat namespace and nimbus-sdk belongs to an unrelated project, so the
distribution is published as nimbus-dev-sdk.
Quickstart
To go from nothing to a connector that performs the contract-version handshake and then
serves MCP tools over the same two streams, follow
quickstart-python.md.
It scaffolds a project whose manifest.py declares "runtime": "python" — legal only
since RFC-0009 widened the enum — and whose tests spawn the connector as a real process.
npx @nimbus-dev/create-connector@latest my-connector --lang python
The scaffolder is a Node CLI published on npm, not a pip-installable front end. Running it
needs Node 22+, but only at scaffold time — the project it generates has no Node dependency;
neither pyproject.toml nor any test in the generated tree mentions it.
What this is
The contract is defined once, language-neutrally, in
docs/spec/. This
package carries that specification data and binds it to Python. The
TypeScript SDK is the reference
implementation; both are held to the same conformance corpus.
The specification data is bundled into the distribution, so it is available without a network call or a checkout:
from nimbus_sdk import load_schema, negotiate_contract_version
schema = load_schema("nimbus-item.schema.json")
result = negotiate_contract_version(["1"], ["1"]) # NegotiationOk(version="1")
Status
Early. This release carries the contract-version constants, the negotiation algorithm,
and the published JSON Schemas. It also carries the IPC surface —
from nimbus_sdk.ipc import NdjsonLineReader, parse_hello, perform_handshake —
deliberately a separate import root from nimbus_sdk, mirroring the . vs ./ipc
split the TypeScript package publishes. It now also carries the diagnostics /
telemetry contract v0 — from nimbus_sdk.diagnostics import encode_diagnostic, parse_diagnostic, meets_level — a third, likewise separate import root, running the
same conformance corpus as the TypeScript reference byte-identically, plus a
Python-only format_timestamp helper: datetime.isoformat() emits six fractional
digits and a +00:00 offset, and timespec="milliseconds" fixes only the first, so
neither produces the contract's timestamp format on its own. This package ships no
emitter — there is no Python counterpart to TypeScript's createEmitter — so
writing an encoded line to a sink is left to the caller. It now also carries the
connector_kit batteries for hand-rolled MCP connectors — from nimbus_sdk.connector_kit import resolve_url_with_base, json_result, require_env — a fourth, likewise separate
import root. It carries URL resolution (the kit's SSRF chokepoint) and the
should_strip_auth predicate that goes with it, the environment seam, the MCP result
builders, the search helpers, an HTTP transport behind a replaceable Transport
Protocol, a ToolRouter, and the two REST factories. UrllibTransport enforces
url-resolution.md
§8 itself — urllib carries Authorization across a cross-origin redirect where
fetch strips it, so the kit installs a redirect handler that drops the credential on
an origin change, and only on an origin change.
perform_handshake is the one exchange this package performs end to end: write our
hello, read the peer's, agree on a contract major or refuse. The stream is injected,
never opened — the package does no I/O of its own — and a refusal comes back as a value,
because nothing here owns a process to exit.
from nimbus_sdk.ipc import HandshakeOk, NdjsonLineReader, perform_handshake
# `io` is any object with `read() -> bytes | None` and `write(bytes) -> None`. Return
# None at end of stream: sys.stdin.buffer.read() gives b"" there, which would loop.
reader = NdjsonLineReader() # supply your own if the session keeps reading this stream
result = perform_handshake(io, reader=reader)
if isinstance(result, HandshakeOk):
result.version # the agreed contract major, e.g. "1"
result.pending # frames the peer sent right after its hello — process these first
It is synchronous, where the TypeScript binding is async. Python's standard streams
block and a startup handshake has nothing to overlap with, so async def would drag every
connector into an event loop for nothing; an asyncio caller wraps it with
await asyncio.to_thread(perform_handshake, io).
Connector kit
nimbus_sdk.connector_kit is the Python binding of @nimbus-dev/sdk/connector-kit —
batteries for a hand-rolled MCP connector, not a contract: unlike ipc and
diagnostics, it has no conformance corpus of its own beyond url-resolution, which
resolve_url_with_base binds. It is deliberately a separate import root from
nimbus_sdk, matching the boundary the TypeScript exports map has published since
1.15.0 by giving connector-kit its own entry point.
from nimbus_sdk.connector_kit import json_result, resolve_url_with_base
# resolve_url_with_base is the kit's SSRF chokepoint: a relative path is prefixed onto
# the base, and an absolute URL only passes through when it shares the base's origin.
url = resolve_url_with_base("https://api.example.com", "/v1/issues")
print(url) # https://api.example.com/v1/issues
result = json_result({"matches": []})
print(result["content"][0]["text"]) # a pretty-printed JSON text block
License
MIT — see LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nimbus_dev_sdk-0.11.0.tar.gz.
File metadata
- Download URL: nimbus_dev_sdk-0.11.0.tar.gz
- Upload date:
- Size: 149.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b432c674a9c871a3bbd313019be6ac80b8272faf236b40444c2b220a0c5397e
|
|
| MD5 |
6417d71aa73b8557c7161445cf3929ff
|
|
| BLAKE2b-256 |
b2be940d54501acb8c6fc2144f8a91e7918c641e7e17916088dc9a0eac32e4c8
|
Provenance
The following attestation bundles were made for nimbus_dev_sdk-0.11.0.tar.gz:
Publisher:
release.yml on nimbus-agent/nimbus-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nimbus_dev_sdk-0.11.0.tar.gz -
Subject digest:
0b432c674a9c871a3bbd313019be6ac80b8272faf236b40444c2b220a0c5397e - Sigstore transparency entry: 2574816653
- Sigstore integration time:
-
Permalink:
nimbus-agent/nimbus-sdk@00c60594e8898a8f8de12405127e1bf8de9936ec -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nimbus-agent
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@00c60594e8898a8f8de12405127e1bf8de9936ec -
Trigger Event:
push
-
Statement type:
File details
Details for the file nimbus_dev_sdk-0.11.0-py3-none-any.whl.
File metadata
- Download URL: nimbus_dev_sdk-0.11.0-py3-none-any.whl
- Upload date:
- Size: 234.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31bdcf7a9835f01c5ba90e7f5e4dfa29b8d50ef94201a6a17184e0b6562129f2
|
|
| MD5 |
e8657e15b5142a500430d8ae2d975e82
|
|
| BLAKE2b-256 |
95a290750ab06d2dca28c05d508859a512aa02ab8c512ec26168e1e0d37495df
|
Provenance
The following attestation bundles were made for nimbus_dev_sdk-0.11.0-py3-none-any.whl:
Publisher:
release.yml on nimbus-agent/nimbus-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nimbus_dev_sdk-0.11.0-py3-none-any.whl -
Subject digest:
31bdcf7a9835f01c5ba90e7f5e4dfa29b8d50ef94201a6a17184e0b6562129f2 - Sigstore transparency entry: 2574816938
- Sigstore integration time:
-
Permalink:
nimbus-agent/nimbus-sdk@00c60594e8898a8f8de12405127e1bf8de9936ec -
Branch / Tag:
refs/heads/main - Owner: https://github.com/nimbus-agent
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@00c60594e8898a8f8de12405127e1bf8de9936ec -
Trigger Event:
push
-
Statement type: