Catalog PyPI
PACKAGE EXPLORERView in registry

ai-native-bridge

PyPI

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

agentic-codingai-agentscode-generationdeveloper-toolsjson-rpcmcpvscode
Versions collected1
Direct dependencies5From release 0.1.0
Last observed21 Oct, 11:26 UTC

README

Version 0.1.0 documentation

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

ClassPurpose
BridgeClientOne-shot async JSON-RPC calls
GeneratedBridgeClientBridgeClient + auto-generated method wrappers
BridgeEventStreamPersistent WebSocket for event subscriptions
BridgeErrorStructured error with .code, .message, .data

License

Apache-2.0

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.022 Feb 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
harkirat155/ai-native

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:26 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:845174f093bb1b1390742121a3b61e649f84c15fe1eafcd5c098267c72d8c8ba