Skip to content

Commit 66a0adf

Browse files
committed
Merge branch 'develop'
2 parents 0cdc9f8 + e071daa commit 66a0adf

File tree

242 files changed

+29586
-11706
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+29586
-11706
lines changed

tests/mcp/node/AGENTS.md renamed to .github/instructions/mcp-node-tests.instructions.md

Lines changed: 55 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# MCP Conductor - Programmatic Testing Guide for AI Agents
1+
---
2+
applyTo: "**/*.programmatic.test.js"
3+
---
4+
# MCP Aegis - Programmatic Testing Guide for AI Agents
25

36
**Target Audience**: AI coding assistants generating JavaScript/TypeScript programmatic t# Debugging and monitoring
47
const stderr = client.getStderr(); // Get captured stderr
@@ -27,8 +30,8 @@ client.clearStderr(); // Clear stderr buffer (REQUIRED in befo
2730
- Advanced error recovery and resilience testing
2831

2932
### 📚 Key Resources
30-
- **[Programmatic Testing Documentation](https://conductor.rhino-inquisitor.com/programmatic-testing.html)** - Complete guide
31-
- **[API Reference](https://conductor.rhino-inquisitor.com/api-reference.html)** - All methods and properties
33+
- **[Programmatic Testing Documentation](https://aegis.rhino-inquisitor.com/programmatic-testing.html)** - Complete guide
34+
- **[API Reference](https://aegis.rhino-inquisitor.com/api-reference.html)** - All methods and properties
3235
- **[Examples Directory](../../examples/)** - Real-world programmatic test files
3336
- **[YAML Testing Guide](../yaml/AGENTS.md)** - Recommended for basic testing scenarios
3437

@@ -37,14 +40,13 @@ client.clearStderr(); // Clear stderr buffer (REQUIRED in befo
3740
### 1. Installation and Initialization
3841
```bash
3942
# Install in project
40-
npm install --save-dev mcp-conductor
41-
42-
# Initialize configuration (creates conductor.config.json)
43-
npx mcp-conductor init
43+
npm install --save-dev mcp-aegis
44+
# OR
45+
npx mcp-aegis init
4446
```
4547

4648
### 2. Configuration File
47-
Always create `conductor.config.json` first:
49+
Always create `aegis.config.json` first:
4850

4951
```json
5052
{
@@ -64,13 +66,13 @@ File naming convention: `*.programmatic.test.js`
6466
```javascript
6567
import { test, describe, before, after, beforeEach } from 'node:test';
6668
import { strict as assert } from 'node:assert';
67-
import { connect } from 'mcp-conductor';
69+
import { connect } from 'mcp-aegis';
6870

6971
describe('[SERVER_NAME] Programmatic Tests', () => {
7072
let client;
7173

7274
before(async () => {
73-
client = await connect('./conductor.config.json');
75+
client = await connect('./aegis.config.json');
7476
});
7577

7678
after(async () => {
@@ -105,13 +107,13 @@ Before writing comprehensive programmatic tests, use the `query` command to rapi
105107
106108
```bash
107109
# List all available tools
108-
conductor query --config conductor.config.json
110+
aegis query --config aegis.config.json
109111

110112
# Test specific tool with arguments
111-
conductor query read_file '{"path": "test.txt"}' --config conductor.config.json
113+
aegis query read_file '{"path": "test.txt"}' --config aegis.config.json
112114

113115
# Get JSON output for inspection
114-
conductor query calculator '{"operation": "add", "a": 5, "b": 3}' --config conductor.config.json --json
116+
aegis query calculator '{"operation": "add", "a": 5, "b": 3}' --config aegis.config.json --json
115117
```
116118
117119
**Benefits for programmatic testing workflow**:
@@ -124,7 +126,7 @@ conductor query calculator '{"operation": "add", "a": 5, "b": 3}' --config condu
124126
```javascript
125127
// Use query command findings to create targeted tests
126128
test('should handle file reading as discovered via query', async () => {
127-
// Based on: conductor query read_file '{"path": "test.txt"}'
129+
// Based on: aegis query read_file '{"path": "test.txt"}'
128130
const result = await client.callTool('read_file', { path: 'test.txt' });
129131

130132
// Query command showed this response structure:
@@ -138,14 +140,14 @@ test('should handle file reading as discovered via query', async () => {
138140
139141
### Main Entry Points
140142
```javascript
141-
import { createClient, connect } from 'mcp-conductor';
143+
import { createClient, connect } from 'mcp-aegis';
142144

143145
// Option 1: Create client (not connected)
144-
const client = await createClient('./conductor.config.json');
146+
const client = await createClient('./aegis.config.json');
145147
await client.connect();
146148

147149
// Option 2: Create and auto-connect
148-
const connectedClient = await connect('./conductor.config.json');
150+
const connectedClient = await connect('./aegis.config.json');
149151

150152
// Option 3: Inline configuration
151153
const client = await connect({
@@ -452,7 +454,7 @@ describe('Error Recovery', () => {
452454
453455
### ⚠️ Critical: Avoid Concurrent Requests
454456
455-
**Never use `Promise.all()` or concurrent requests** with MCP Conductor's programmatic API. MCP communication uses a single stdio process with shared message handlers and buffers. Concurrent requests can cause:
457+
**Never use `Promise.all()` or concurrent requests** with MCP Aegis's programmatic API. MCP communication uses a single stdio process with shared message handlers and buffers. Concurrent requests can cause:
456458
457459
- **Buffer conflicts**: Multiple requests writing to the same stdout/stderr streams
458460
- **Message handler interference**: JSON-RPC messages getting mixed or corrupted
@@ -674,8 +676,8 @@ module.exports = {
674676
global.mcpClient = null;
675677

676678
beforeAll(async () => {
677-
const { connect } = require('mcp-conductor');
678-
global.mcpClient = await connect('./conductor.config.json');
679+
const { connect } = require('mcp-aegis');
680+
global.mcpClient = await connect('./aegis.config.json');
679681
});
680682

681683
afterAll(async () => {
@@ -688,13 +690,13 @@ afterAll(async () => {
688690
### Mocha Integration
689691
```javascript
690692
// test/helpers/mcp-setup.js
691-
const { connect } = require('mcp-conductor');
693+
const { connect } = require('mcp-aegis');
692694

693695
let client;
694696

695697
exports.mochaHooks = {
696698
beforeAll: async () => {
697-
client = await connect('./conductor.config.json');
699+
client = await connect('./aegis.config.json');
698700
},
699701
afterAll: async () => {
700702
if (client) {
@@ -710,13 +712,13 @@ exports.getClient = () => client;
710712
```typescript
711713
import { test, describe, before, after } from 'node:test';
712714
import { strict as assert } from 'node:assert';
713-
import { connect, MCPClient } from 'mcp-conductor';
715+
import { connect, MCPClient } from 'mcp-aegis';
714716

715717
describe('TypeScript MCP Tests', () => {
716718
let client: MCPClient;
717719

718720
before(async () => {
719-
client = await connect('./conductor.config.json');
721+
client = await connect('./aegis.config.json');
720722
});
721723

722724
after(async () => {
@@ -884,20 +886,41 @@ class FunctionalMonitor {
884886
885887
## Test Execution Commands
886888
889+
**CRITICAL**: Use the correct test commands for this SFCC Dev MCP project:
890+
887891
```bash
888-
# Run with Node.js test runner
889-
node --test "tests/**/*.programmatic.test.js"
892+
# Run individual MCP programmatic test (CORRECT for this project)
893+
node --test tests/mcp/node/specific-test.programmatic.test.js
894+
895+
# Run all MCP programmatic tests (CORRECT for this project)
896+
npm run test:mcp:node
890897

891-
# Run with Jest
892-
npx jest --testMatch="**/*.programmatic.test.js"
898+
# Run all MCP tests (YAML + programmatic) (CORRECT for this project)
899+
npm run test:mcp:all
893900

894-
# Run with Mocha
895-
npx mocha "tests/**/*.programmatic.test.js" --require test/helpers/mcp-setup.js
901+
# WRONG: Don't use npm test with individual files for MCP tests
902+
# npm test -- tests/mcp/node/specific-test.programmatic.test.js # This runs Jest!
896903
897-
# Watch mode for development
898-
node --test --watch "tests/**/*.programmatic.test.js"
904+
# ❌ WRONG: Don't use Jest for MCP programmatic tests
905+
# npx jest --testMatch="**/*.programmatic.test.js" # Jest doesn't handle MCP tests
906+
907+
# Watch mode for development (Node.js test runner)
908+
node --test --watch tests/mcp/node/*.programmatic.test.js
909+
910+
# Jest is used for unit tests only (src/ directory)
911+
jest base-handler.test.ts
912+
913+
# Complete test suite (Jest + MCP tests)
914+
npm test
899915
```
900916
917+
**Package.json Script Reference for this project:**
918+
- `npm run test:mcp:node` → `node --test tests/mcp/node/*.programmatic.test.js`
919+
- `npm run test:mcp:yaml` → Aegis YAML tests (docs-only mode)
920+
- `npm run test:mcp:yaml:full` → Aegis YAML tests (full mode)
921+
- `npm run test:mcp:all` → All MCP tests (YAML + programmatic)
922+
- `npm test` → Jest unit tests + MCP tests
923+
901924
---
902925
903926
**Key Success Factors for Programmatic Testing:**

0 commit comments

Comments
 (0)