Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.32.1

- name: Setup Node.js
uses: actions/setup-node@v5
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.32.1

- name: Setup Node.js
uses: actions/setup-node@v5
Expand Down Expand Up @@ -67,6 +69,8 @@ jobs:

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.32.1

- name: Setup Node.js
uses: actions/setup-node@v5
Expand Down
12 changes: 6 additions & 6 deletions .vibe/docs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Complex requirements for unwanted behavior also include the If-Then keywords.

- The system SHALL be distributable as NPM package
- The system SHALL provide executable binary for MCP server
- WHEN installed globally THEN the system SHALL be available as "agentic-knowledge-mcp" command
- WHEN installed globally THEN the system SHALL be available as "npx @codemcp/knowledge" command
- The system SHALL follow semantic versioning for releases
- The system SHALL include TypeScript type definitions for programmatic use

Expand All @@ -206,7 +206,7 @@ Complex requirements for unwanted behavior also include the If-Then keywords.

**Acceptance Criteria:**

- WHEN CLI command "agentic-knowledge init {docset-id}" executed THEN the system SHALL clone configured Git repositories
- WHEN CLI command "npx @codemcp/knowledge init {docset-id}" executed THEN the system SHALL clone configured Git repositories
- WHEN Git repository requires authentication THEN the system SHALL use system Git credentials
- WHEN Git repository URL is invalid THEN the system SHALL return clear error message
- WHEN Git repository is unreachable THEN the system SHALL return network error with retry suggestion
Expand Down Expand Up @@ -234,10 +234,10 @@ Complex requirements for unwanted behavior also include the If-Then keywords.

**Acceptance Criteria:**

- WHEN "agentic-knowledge init {docset-id}" executed AND docset has web_sources THEN the system SHALL download all configured sources
- WHEN "agentic-knowledge refresh" executed without docset-id THEN the system SHALL refresh all docsets with web_sources
- WHEN "agentic-knowledge refresh {docset-id}" executed THEN the system SHALL refresh only specified docset
- WHEN "agentic-knowledge status" executed THEN the system SHALL show last update time for each web source
- WHEN "npx @codemcp/knowledge init {docset-id}" executed AND docset has web_sources THEN the system SHALL download all configured sources
- WHEN "npx @codemcp/knowledge refresh" executed without docset-id THEN the system SHALL refresh all docsets with web_sources
- WHEN "npx @codemcp/knowledge refresh {docset-id}" executed THEN the system SHALL refresh only specified docset
- WHEN "npx @codemcp/knowledge status" executed THEN the system SHALL show last update time for each web source
- WHEN network is unavailable during refresh THEN the system SHALL report error but continue with other sources
- The system SHALL show progress indicators for long-running downloads

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ Add to your coding agent config something along the lines of

```bash
# For a Git repository
npx agentic-knowledge-mcp create \
npx @codemcp/knowledge create \
--preset git-repo \
--id react-docs \
--name "React Documentation" \
--url https://github.com/facebook/react.git

# Initialize (downloads the docs)
npx agentic-knowledge-mcp init react-docs
npx @codemcp/knowledge init react-docs

# The MCP server starts automatically when Claude Desktop launches
```
Expand Down
21 changes: 15 additions & 6 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,32 @@ This guide shows you how to manually test the agentic knowledge MCP server to ve
## Quick Test with curl/manual MCP calls

1. **Start the server in a project with configuration**:

```bash
cd your-project-with-knowledge-config
npx agentic-knowledge
npx @codemcp/knowledge
```

2. **Test tools/list request**:

```bash
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | npx agentic-knowledge
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | npx @codemcp/knowledge
```

Expected response: JSON with `search_docs` and `list_docsets` tools.

3. **Test list_docsets**:

```bash
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_docsets","arguments":{}}}' | npx agentic-knowledge
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_docsets","arguments":{}}}' | npx @codemcp/knowledge
```

Expected response: List of available docsets from your configuration.

4. **Test search_docs**:

```bash
echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_docs","arguments":{"docset_id":"your-docset-id","keywords":"search terms","generalized_keywords":"related terms"}}}' | npx agentic-knowledge
echo '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_docs","arguments":{"docset_id":"your-docset-id","keywords":"search terms","generalized_keywords":"related terms"}}}' | npx @codemcp/knowledge
```

Expected response: Intelligent search instructions based on your template.
Expand All @@ -53,13 +57,15 @@ This ensures LLMs understand how to properly use the search functionality.
## Performance Validation

The tests validate:

- ✅ Server creation: <1ms
- ✅ E2E response time: <1ms (well under 10ms requirement)
- ✅ E2E response time: <1ms (well under 10ms requirement)
- ✅ Memory usage: <1MB

## What the Tests Cover

### Unit Tests (84 + 11 = 95)

- Configuration discovery and loading
- YAML parsing and validation
- Path calculation and resolution
Expand All @@ -68,6 +74,7 @@ The tests validate:
- Server lifecycle and caching

### E2E Tests (12)

- MCP protocol compliance
- Real client-server communication
- Tool schema validation
Expand All @@ -79,13 +86,15 @@ The tests validate:
## Expected Test Output

All tests should pass:

```
Test Files 1 passed (1)
Tests 12 passed (12)
Duration ~1.5s
```

If any tests fail, check:

1. All dependencies installed (`pnpm install`)
2. Project built successfully (`pnpm build`)
3. No configuration conflicts in test environment
3. No configuration conflicts in test environment
Loading
Loading