docs: rebrand Happy to HAPI and add component documentation

This commit rebrands the project from "Happy" to "HAPI" throughout the codebase, including documentation, comments, logs, and tool references. It also adds comprehensive README files for the server and web components, clarifies the monorepo structure in AGENTS.md and root README.md, and removes the outdated roadmap.md file.

Changes include:
- Rebrand references from Happy to HAPI in CLI, server, and web components
- MCP tool names updated from mcp__happy__ to mcp__hapi__
- Process/service names updated consistently
- New server/README.md with deployment and configuration guide
- New web/README.md with stack and development instructions
- Updated root README.md with quickstart guide
- Updated AGENTS.md with cleaner structure documentation
- Removed cli/roadmap.md (now superseded by documentation)
This commit is contained in:
weishu
2025-12-21 18:49:04 +08:00
parent 56ae2c85a2
commit 4f03f29ac3
44 changed files with 442 additions and 683 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ export class CodexMcpClient {
constructor() {
this.client = new Client(
{ name: 'happy-codex-client', version: '1.0.0' },
{ name: 'hapi-codex-client', version: '1.0.0' },
{ capabilities: { elicitation: {} } }
);
+8 -8
View File
@@ -1,11 +1,11 @@
/**
* Happy MCP STDIO Bridge
* HAPI MCP STDIO Bridge
*
* Minimal STDIO MCP server exposing a single tool `change_title`.
* On invocation it forwards the tool call to an existing Happy HTTP MCP server
* On invocation it forwards the tool call to an existing HAPI HTTP MCP server
* using the StreamableHTTPClientTransport.
*
* Configure the target HTTP MCP URL via env var `HAPPY_HTTP_MCP_URL` or
* Configure the target HTTP MCP URL via env var `HAPI_HTTP_MCP_URL` or
* via CLI flag `--url <http://127.0.0.1:PORT>`.
*
* Note: This process must not print to stdout as it would break MCP STDIO.
@@ -33,12 +33,12 @@ export async function runHappyMcpStdioBridge(argv: string[]): Promise<void> {
try {
// Resolve target HTTP MCP URL
const { url: urlFromArgs } = parseArgs(argv);
const baseUrl = urlFromArgs || process.env.HAPPY_HTTP_MCP_URL || '';
const baseUrl = urlFromArgs || process.env.HAPI_HTTP_MCP_URL || '';
if (!baseUrl) {
// Write to stderr; never stdout.
process.stderr.write(
'[happy-mcp] Missing target URL. Set HAPPY_HTTP_MCP_URL or pass --url <http://127.0.0.1:PORT>\n'
'[hapi-mcp] Missing target URL. Set HAPI_HTTP_MCP_URL or pass --url <http://127.0.0.1:PORT>\n'
);
process.exit(2);
}
@@ -48,7 +48,7 @@ export async function runHappyMcpStdioBridge(argv: string[]): Promise<void> {
async function ensureHttpClient(): Promise<Client> {
if (httpClient) return httpClient;
const client = new Client(
{ name: 'happy-stdio-bridge', version: '1.0.0' },
{ name: 'hapi-stdio-bridge', version: '1.0.0' },
{ capabilities: {} }
);
@@ -60,7 +60,7 @@ export async function runHappyMcpStdioBridge(argv: string[]): Promise<void> {
// Create STDIO MCP server
const server = new McpServer({
name: 'Happy MCP Bridge',
name: 'HAPI MCP Bridge',
version: '1.0.0',
});
@@ -96,7 +96,7 @@ export async function runHappyMcpStdioBridge(argv: string[]): Promise<void> {
await server.connect(stdio);
} catch (err) {
try {
process.stderr.write(`[happy-mcp] Fatal: ${err instanceof Error ? err.message : String(err)}\n`);
process.stderr.write(`[hapi-mcp] Fatal: ${err instanceof Error ? err.message : String(err)}\n`);
} finally {
process.exit(1);
}
+4 -4
View File
@@ -271,7 +271,7 @@ export async function runCodex(opts: {
await session.close();
}
// Stop Happy MCP server
// Stop HAPI MCP server
happyServer.stop();
logger.debug('[Codex] Session termination complete, exiting');
@@ -520,11 +520,11 @@ export async function runCodex(opts: {
}
});
// Start Happy MCP server (HTTP) and prepare STDIO bridge config for Codex
// Start HAPI MCP server (HTTP) and prepare STDIO bridge config for Codex
const happyServer = await startHappyServer(session);
const bridgeCommand = getHappyCliCommand(['mcp', '--url', happyServer.url]);
const mcpServers = {
happy: {
hapi: {
command: bridgeCommand.command,
args: bridgeCommand.args
}
@@ -727,7 +727,7 @@ export async function runCodex(opts: {
logger.debug('[codex]: client.disconnect begin');
await client.disconnect();
logger.debug('[codex]: client.disconnect done');
// Stop Happy MCP server
// Stop HAPI MCP server
logger.debug('[codex]: happyServer.stop');
happyServer.stop();