@braynexservices/nigeria-mcp-core 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/http.js +1 -1
- package/dist/lib/cache.d.ts +1 -1
- package/dist/lib/errors.d.ts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ shared/src/
|
|
|
10
10
|
├── http.ts # Express + stateless StreamableHTTPServerTransport + API-key auth + /health
|
|
11
11
|
├── config.ts # env parsing, provider selection, key list
|
|
12
12
|
├── schemas.ts # shared Zod base types + Normalized* contracts
|
|
13
|
-
├── providers/types.ts #
|
|
13
|
+
├── providers/types.ts # typed provider interfaces per shipped lane (the seam)
|
|
14
14
|
└── lib/
|
|
15
15
|
├── normalize.ts # raw → normalized helpers
|
|
16
16
|
├── errors.ts # actionable MCP error helpers
|
|
@@ -18,7 +18,6 @@ shared/src/
|
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Design rules
|
|
21
|
-
- The **provider seam** (typed interfaces) is the
|
|
21
|
+
- The **provider seam** (typed interfaces) is the core idea — tools depend on interfaces, never concrete providers.
|
|
22
22
|
- Normalized schema stability > provider breadth.
|
|
23
23
|
|
|
24
|
-
> 🧠 Source of truth: `brain/05-plans/v1-plan.md` and `brain/08-tech-stack/core-stack.md`.
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Environment configuration for the Nigeria MCP core.
|
|
3
|
-
* No hardcoded secrets — everything comes from process.env.
|
|
3
|
+
* No hardcoded secrets — everything comes from process.env.
|
|
4
4
|
*/
|
|
5
5
|
export interface Config {
|
|
6
6
|
cacProvider: string;
|
package/dist/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Environment configuration for the Nigeria MCP core.
|
|
3
|
-
* No hardcoded secrets — everything comes from process.env.
|
|
3
|
+
* No hardcoded secrets — everything comes from process.env.
|
|
4
4
|
*/
|
|
5
5
|
function num(value, fallback) {
|
|
6
6
|
const n = Number(value);
|
package/dist/http.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Streamable-HTTP entrypoint — stateless, deployable. API-key auth + /health.
|
|
3
3
|
* Stateless mode (sessionIdGenerator: undefined) is simpler to scale. A fresh server +
|
|
4
|
-
* transport is created per request.
|
|
4
|
+
* transport is created per request.
|
|
5
5
|
*/
|
|
6
6
|
import express from "express";
|
|
7
7
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
package/dist/lib/cache.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* In-memory TTL cache. Same get/set surface a Redis-backed cache will implement later,
|
|
3
|
-
* so lanes can stay cache-agnostic.
|
|
3
|
+
* so lanes can stay cache-agnostic.
|
|
4
4
|
*/
|
|
5
5
|
export interface Cache {
|
|
6
6
|
get<T>(key: string): T | undefined;
|
package/dist/lib/errors.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Actionable errors. Tool handlers throw ToolError with a hint; buildServer converts any
|
|
3
|
-
* throw into a clean, agent-readable tool result.
|
|
3
|
+
* throw into a clean, agent-readable tool result.
|
|
4
4
|
*/
|
|
5
5
|
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
6
6
|
export declare class ToolError extends Error {
|
package/dist/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Transport-agnostic MCP server builder. Lanes hand buildServer() an array of ToolDefs;
|
|
3
|
-
* stdio.ts and http.ts wrap the result in a transport.
|
|
3
|
+
* stdio.ts and http.ts wrap the result in a transport.
|
|
4
4
|
*/
|
|
5
5
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
6
|
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
package/dist/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Transport-agnostic MCP server builder. Lanes hand buildServer() an array of ToolDefs;
|
|
3
|
-
* stdio.ts and http.ts wrap the result in a transport.
|
|
3
|
+
* stdio.ts and http.ts wrap the result in a transport.
|
|
4
4
|
*/
|
|
5
5
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
6
6
|
import { z } from "zod";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@braynexservices/nigeria-mcp-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Core runtime for the Nigeria MCP data-lane servers: MCP server builder, normalized Zod schemas, typed provider seam, and shared fetch/cache/error helpers.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|