Skip to main content

ai-native-bridge

Async Python SDK for the AI-Native VS Code Bridge — drive VS Code from agents via JSON-RPC over WebSocket.

Install

pip install ai-native-bridge

Or for development:

pip install -e ./python-sdk

Quick Start

import asyncio
from ai_native_vscode_bridge import BridgeClient

async def main():
    client = BridgeClient.from_workspace(port=57110)

    # Check connectivity
    pong = await client.call("bridge.ping")
    print(pong)  # {"ok": true, "protocol": "v1-draft"}

    # List all diagnostics (errors & warnings)
    diags = await client.call("diagnostics.list")
    for file_entry in diags.get("files", []):
        print(f"{file_entry['uri']}: {len(file_entry['diagnostics'])} issues")

asyncio.run(main())

Features

  • One-shot async calls — each client.call() opens a fresh WebSocket (simple + robust).
  • Event streaming — BridgeEventStream for real-time diagnostics, file changes, debug events.
  • Auto-generated method wrappers — GeneratedBridgeClient with typed methods for every RPC endpoint.
  • Token auto-discovery — reads $BRIDGE_TOKEN, --token-file, or .vscode/bridge.token.

Event Streaming

from ai_native_vscode_bridge import BridgeEventStream

async def watch():
    async with BridgeEventStream.from_workspace(
        events=["diagnostics.changed", "doc.saved"]
    ) as stream:
        async for event in stream:
            print(event)

API Reference

Class Purpose
BridgeClient One-shot async JSON-RPC calls
GeneratedBridgeClient BridgeClient + auto-generated method wrappers
BridgeEventStream Persistent WebSocket for event subscriptions
BridgeError Structured error with .code, .message, .data

License

Apache-2.0

Metadata

Release files for ai-native-bridge 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ai-native-bridge 0.1.0
File Size Uploaded Provenance
ai_native_bridge-0.1.0.tar.gz 5.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-native-bridge 0.1.0
File Interpreter ABI Platform
ai_native_bridge-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / ai_native_bridge-0.1.0.tar.gz

Download URL ai_native_bridge-0.1.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2dc06822f591b93933c555e1a4683771cb1e4f6b091ef9ff54e371afb559b606
BLAKE2b-256 checksum
How to use checksums
f6ff8b00d25b92b5b212ee6111e59433e9011ca0a10a75e81033a81937f9beed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 22, 2026.

Transparency log

Release files / ai_native_bridge-0.1.0-py3-none-any.whl

Download URL ai_native_bridge-0.1.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7a1da44c8a2449fbfe1979eda849cdea9daa200b1dec005e705f3617638ddad
BLAKE2b-256 checksum
How to use checksums
d5a78d28cbb5dbbb0a18b33d81313b4bd82c474b3f7da887326f5a007562c11f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 22, 2026.

Transparency log

Security for ai-native-bridge 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ai_native_bridge-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page