feat: Add Pi agent support - #660
Closed
zh-xl-kang wants to merge 2 commits into
Closed
Conversation
Add MCP server detection and configuration for Pi agent (~/.pi/agent/). Changes: - cli.h: Add 'pi' field to cbm_detected_agents_t struct - cli.h: Declare cbm_upsert_pi_mcp() and cbm_remove_pi_mcp() - cli.c: Detect Pi agent via ~/.pi/agent/ directory - cli.c: Implement upsert/remove using cbm_install_editor_mcp() format - cli.c: Add Pi agent to install/uninstall workflows - cli.c: Add display names 'Pi agent' and 'pi' Pi agent uses standard mcpServers format in ~/.pi/agent/mcp.json
- Add cli_detect_agents_finds_pi test - Add ASSERT_FALSE(agents.pi) in cli_detect_agents_none_found - Add cli_upsert_pi_mcp_fresh and cli_upsert_pi_mcp_replace tests - Update README.md: 11 agents → 12 agents, add Pi configuration row - Update docs/index.html, docs/llms.txt, pkg/npm/README.md with Pi support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 MCP server detection and configuration support for Pi agent.
Changes
cli.h
bool pifield tocbm_detected_agents_tstructcbm_upsert_pi_mcp()andcbm_remove_pi_mcp()functionscli.c
~/.pi/agent/directory~/.pi/agent/mcp.jsonandAGENTS.mdImplementation
Pi agent uses the standard mcpServers format:
{ "mcpServers": { "codebase-memory-mcp": { "command": "/path/to/codebase-memory-mcp", "args": [], "disabled": false } } }Testing
-WerrorVerification
cd /data/code/codebase-memory-mcp cc -std=c11 -D_DEFAULT_SOURCE -D_GNU_SOURCE -Wall -Wextra -Werror \ -Wno-unused-parameter -Wno-sign-compare -Wno-format-truncation \ -Wno-unused-result -Wno-stringop-truncation -Wno-alloc-size-larger-than \ -Isrc -Ivendored -Ivendored/sqlite3 -Ivendored/mimalloc/include \ -Iinternal/cbm -Iinternal/cbm/vendored/ts_runtime/include \ -O2 -DCBM_BIND_TS_ALLOCATOR=1 \ -c -o /tmp/cli_test.o src/cli/cli.c