Current collected state Current
Observed since 21 Oct, 11:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
ai-native-bridge
Async Python SDK for the AI-Native VS Code Bridge — drive VS Code from agents via JSON-RPC over WebSocket.
Async Python SDK for the AI-Native VS Code Bridge — drive VS Code from agents via JSON-RPC over WebSocket.
pip install ai-native-bridge
Or for development:
pip install -e ./python-sdk
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())
client.call() opens a fresh WebSocket (simple + robust).BridgeEventStream for real-time diagnostics, file changes, debug events.GeneratedBridgeClient with typed methods for every RPC endpoint.$BRIDGE_TOKEN, --token-file, or .vscode/bridge.token.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)
| 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 |
Apache-2.0
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
websocketsEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | websockets>=12.0 | runtime |
langgraphEnvironment{
"extras": "",
"marker": "extra == \"langgraph\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | langgraph>=0.0.20; extra == "langgraph" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest; extra == "dev" | runtime |
pytest-asyncioEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | pytest-asyncio; extra == "dev" | runtime |
mypyEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.10",
"evaluation": "NOT_EVALUATED"
} | mypy; extra == "dev" | runtime |
bdist_wheel · 5.54 KB · Python py3
sdist · 5.06 KB · Python source
Observed since 21 Oct, 11:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:2b22fab5662cdb7d7b77782abd82fa2a0c8e0fb1785fd35e7922dc8ab0870b9e