Skip to content

SDK Improvements#354

Merged
khaliqgant merged 7 commits intomainfrom
feature/sdk-improvements
Feb 1, 2026
Merged

SDK Improvements#354
khaliqgant merged 7 commits intomainfrom
feature/sdk-improvements

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Jan 30, 2026

  • For easier integration

Open with Devin

khaliqgant and others added 2 commits January 30, 2026 20:51
This commit implements four SDK improvements from the friction report:

1. **WebSocket/browser transport** - Transport abstraction layer with
   - `SocketTransport` for Unix sockets (Node.js)
   - `WebSocketTransport` for WebSocket (browser/Node.js)
   - `BrowserRelayClient` - browser-compatible client
   - Auto-detection utilities (`isBrowser()`, `createAutoTransport()`)

2. **Native RPC pattern** - `client.request()` method with correlation ID
   tracking for request/response messaging. Includes `respond()` for
   responders and automatic timeout handling.

3. **Electron integration guide** - Comprehensive docs/guides/electron-integration.mdx
   with main process setup, preload scripts, contextBridge patterns,
   React hooks, lifecycle management, and security considerations.

4. **Spawn readiness signal** - `AGENT_READY` protocol message broadcast
   when agents complete HELLO/WELCOME handshake. SDK gains:
   - `onAgentReady` callback for all agent connections
   - `waitForReady` option on `spawn()` to block until ready
   - `waitForAgentReady()` standalone method

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View issue and 5 additional flags in Devin Review.

Open in Devin Review

Comment thread packages/sdk/src/browser-client.ts
…nce reconnection

- Resolve package.json conflict: keep both browser/transports exports AND
  discovery/errors exports
- Fix BrowserRelayClient reconnection: when using transportInstance config,
  auto-reconnection is not possible since we cannot recreate an externally
  provided transport. Now properly warns and transitions to DISCONNECTED
  state instead of silently failing

Addresses PR review feedback from devin-ai-integration bot.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View issue and 8 additional flags in Devin Review.

Open in Devin Review

Comment thread packages/sdk/src/browser-client.ts Outdated
Add dedicated SDK reference page covering:
- RelayClient and BrowserRelayClient APIs
- New request/response RPC pattern (request/respond methods)
- Spawn with readiness signals (waitForReady, onAgentReady)
- Transport abstraction (Socket, WebSocket, auto-detection)
- Standalone relay for simple use cases
- Discovery utilities for socket and cloud workspace detection
- Error types for better error handling
- Complete examples for common patterns

Add SDK reference to docs navigation (first in Reference section).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

View issues and 15 additional flags in Devin Review.

Open in Devin Review

Comment thread packages/sdk/src/browser-client.ts
Comment thread packages/sdk/src/client.ts
@khaliqgant khaliqgant merged commit c8c7ce7 into main Feb 1, 2026
30 checks passed
@khaliqgant khaliqgant deleted the feature/sdk-improvements branch February 1, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant