Skip to content

Feat/claude desktop - #99

Closed
veerareddyvishal144 wants to merge 3 commits into
mainfrom
feat/claude-desktop
Closed

Feat/claude desktop#99
veerareddyvishal144 wants to merge 3 commits into
mainfrom
feat/claude-desktop

Conversation

@veerareddyvishal144

@veerareddyvishal144 veerareddyvishal144 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added desktop-token tools for configuring, checking, and restoring Claude Desktop integration on macOS.
    • Added a restart command with startup and health-status reporting.
    • Added Claude Desktop model selection and gateway support.
    • Added automatic handling for web search and page-fetch requests.
  • Bug Fixes
    • Improved streaming, usage reporting, provider fallback, timeouts, and error handling.
    • Improved duplicate tool-call detection and conversation history summaries.
  • Documentation
    • Added Claude Desktop setup, configuration, troubleshooting, and restoration guidance.

vishal veerareddy and others added 3 commits August 29, 2026 23:24
Lint failure on PR #98 (no-unused-vars). Leftover from resolving the
merge conflict against upstream's captureUsage()/finalUsage() usage-
accounting rewrite in forwardAnthropicStreamAsOpenAIChunks — I kept
upstream's version but missed that these two local vars, and their
assignments in message_start/message_delta, became dead once
finalUsage() reads from usageAcc instead.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@veerareddyvishal144
veerareddyvishal144 deleted the feat/claude-desktop branch August 30, 2026 06:51
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1991e8a3-a228-49da-9f27-0b3d5e9eb291

📥 Commits

Reviewing files that changed from the base of the PR and between c10d5bc and a40eb3e.

📒 Files selected for processing (23)
  • bin/cli.js
  • bin/lynkr-desktop-token.js
  • bin/lynkr-restart.js
  • documentation/README.md
  • documentation/claude-desktop.md
  • nodemon.json
  • scripts/claude-desktop.js
  • src/api/claude-desktop-gateway.js
  • src/api/openai-router.js
  • src/api/router.js
  • src/clients/databricks.js
  • src/clients/gpt-utils.js
  • src/clients/provider-capabilities.js
  • src/context/compression.js
  • src/orchestrator/azure-responses-sse.js
  • src/orchestrator/index.js
  • src/orchestrator/sse-transformer.js
  • src/routing/model-slots.js
  • src/routing/openai-model-slots.js
  • src/tools/web-search-exec.js
  • test/azure-responses-sse.test.js
  • test/gpt-utils.test.js
  • test/web-search-exec.test.js

📝 Walkthrough

Walkthrough

This PR adds Claude Desktop integration, CLI token and restart commands, explicit model routing, provider streaming and fallback updates, server-side web tool resolution, tool deduplication, and richer compressed history summaries.

Changes

Claude Desktop integration and routing

Layer / File(s) Summary
Desktop commands and profile setup
bin/cli.js, bin/lynkr-desktop-token.js, bin/lynkr-restart.js, scripts/claude-desktop.js, documentation/..., nodemon.json
Adds Desktop token, restore, status, and restart workflows. Documents macOS setup and updates Nodemon watching.
Claude Desktop gateway models
src/api/claude-desktop-gateway.js, src/api/router.js
Serves configured tiers through Anthropic-compatible model discovery and falls through when the gateway does not apply.
Explicit model and effort routing
src/routing/..., src/api/router.js, src/api/openai-router.js
Maps Claude Desktop and OpenAI model selections to fixed tiers and providers. Buffered chat streams now emit usage-only chunks.

Provider streaming and request handling

Layer / File(s) Summary
Request timeouts and provider fallback
src/clients/databricks.js, src/clients/provider-capabilities.js
Adds per-attempt abort timeouts, rate-limit escalation, provider-specific streaming behavior, minimum token handling, and thinking parameters.
Azure Responses stream adapter
src/orchestrator/azure-responses-sse.js, src/clients/databricks.js
Converts Azure Responses events into OpenAI-compatible text, tool-call, usage, completion, and error streams.
SSE transformer defaults and validation
src/orchestrator/sse-transformer.js, test/azure-responses-sse.test.js
Adds Baidu transformation defaults, changes llama.cpp buffering defaults, exports shared SSE helpers, and tests Azure conversion paths.

Agent tools and context handling

Layer / File(s) Summary
Server-side web search and fetch resolution
src/tools/web-search-exec.js, src/orchestrator/index.js, test/web-search-exec.test.js
Resolves complete web tool batches for unrecognized clients with allowlisted hosts, bounded reads, retries, redirects, and structured tool results.
Tool deduplication and history compression
src/clients/gpt-utils.js, src/context/compression.js, test/gpt-utils.test.js
Uses file paths for read-call deduplication and preserves tool arguments, results, errors, and both ends of long text in compressed history.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ClaudeDesktop
  participant Router
  participant ClaudeDesktopGateway
  participant Provider
  ClaudeDesktop->>Router: Request selected model
  Router->>ClaudeDesktopGateway: Resolve model metadata
  ClaudeDesktopGateway-->>Router: Return tier model
  Router->>Provider: Send request to selected provider
  Provider-->>ClaudeDesktop: Stream response and usage
Loading
sequenceDiagram
  participant AgentLoop
  participant WebResolver
  participant SearchOrFetch
  AgentLoop->>WebResolver: Submit web tool batch
  WebResolver->>SearchOrFetch: Execute search or fetch
  SearchOrFetch-->>WebResolver: Return bounded result
  WebResolver-->>AgentLoop: Append tool-use and tool-result messages
Loading
✨ Finishing Touches 💡 1
⚔️ Resolve merge conflicts 💡
  • Resolve merge conflict in branch feat/claude-desktop
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/claude-desktop

Warning

Some tools did not complete. Review the errors below.

🔧 Biome (2.5.7)
bin/cli.js

File contains syntax errors that prevent linting: Line 30: Illegal return statement outside of a function


Comment @coderabbitai help to get the list of available commands.

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