add client info into agentic for allow ACP whitelist #87
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Add client identification (clientInfo) to the ACP (Agent Communication Protocol) initialize request to enable proper client whitelisting by ACP agents.
Problem
When Agentic.nvim connects to ACP agents like auggie, the agent needs to identify and whitelist the connecting client. Currently, Agentic.nvim only sends
protocolVersionandclientCapabilitiesduring the ACP initialization handshake, but is missing theclientInfofield that contains the client's name and version.This causes issues with ACP agents that require client identification for whitelisting purposes. For example, auggie logs show it expects a user-agent string:
Without clientInfo, ACP agents cannot properly identify Agentic.nvim clients, potentially blocking or limiting functionality.
Solution
This PR adds
clientInfosupport to the ACP client implementation with sensible defaults.Changes Made
ACPClient:_connect()to includeclientInfoin the initialize request parametersclientInfofield (already defined in capabilities) is now explicitly sent as a separate parameterACP Initialize Request (Before)
{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": 1, "clientCapabilities": { "fs": { "readTextFile": true, "writeTextFile": true }, "terminal": false, "clientInfo": { "name": "Agentic.nvim", "version": "0.0.1" } } } }ACP Initialize Request (After)
{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": 1, "clientInfo": { "name": "Agentic.nvim", "version": "0.0.1" }, "clientCapabilities": { "fs": { "readTextFile": true, "writeTextFile": true }, "terminal": false, "clientInfo": { "name": "Agentic.nvim", "version": "0.0.1" } } } }Testing
Tested with auggie ACP client to verify:
clientInfois properly sent in the initialize requestUse this config
Before:

After:

Impact
This change enables Agentic.nvim to work properly with ACP agents that require client identification for whitelisting, such as auggie and other ACP-compliant agents. It follows the ACP protocol specification (similar to LSP) which requires clients to identify themselves during initialization.