@forcedream/mcp-server 0.1.0 → 0.1.2
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/dist/search_agents.js +17 -2
- package/package.json +2 -1
package/dist/search_agents.js
CHANGED
|
@@ -12,9 +12,23 @@ async function fetchJson(url) {
|
|
|
12
12
|
}
|
|
13
13
|
// Discover ForceDream agents. Keyless (public registry). Honest system-derived metrics only.
|
|
14
14
|
// Server has no working capability filter -> filter client-side.
|
|
15
|
+
// Real health telemetry addition: merges in /v1/agents/reliability (a real, separate, already-live
|
|
16
|
+
// endpoint) rather than inventing any new health computation -- matching the identical fix
|
|
17
|
+
// already made to the remote MCP server's own mcpSearchAgents. A reliability-fetch failure never
|
|
18
|
+
// blocks the core listing; health is honestly null where no real reliability data exists yet.
|
|
15
19
|
export async function searchAgents(args) {
|
|
16
|
-
const data = await
|
|
20
|
+
const [data, relData] = await Promise.all([
|
|
21
|
+
fetchJson(`${FD_API}/v1/agents/list`),
|
|
22
|
+
fetchJson(`${FD_API}/v1/agents/reliability`).catch(() => null),
|
|
23
|
+
]);
|
|
17
24
|
let agents = Array.isArray(data?.agents) ? data.agents : [];
|
|
25
|
+
const reliabilityBySlug = {};
|
|
26
|
+
if (relData && Array.isArray(relData.agents)) {
|
|
27
|
+
for (const ra of relData.agents) {
|
|
28
|
+
if (ra.agent_slug)
|
|
29
|
+
reliabilityBySlug[ra.agent_slug] = ra.reliability;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
18
32
|
if (args.capability) {
|
|
19
33
|
const cap = args.capability.toLowerCase();
|
|
20
34
|
agents = agents.filter((a) => (a.capabilities || []).some((c) => c.toLowerCase() === cap));
|
|
@@ -27,6 +41,7 @@ export async function searchAgents(args) {
|
|
|
27
41
|
}
|
|
28
42
|
const enriched = agents.map((a) => ({
|
|
29
43
|
...a,
|
|
44
|
+
health: reliabilityBySlug[a.slug] || null,
|
|
30
45
|
verify_proofs: `${FD_API}/v1/agents/${a.slug}/proofs`,
|
|
31
46
|
invoke: `${FD_API}/v1/agents/${a.slug}/invoke`,
|
|
32
47
|
}));
|
|
@@ -35,6 +50,6 @@ export async function searchAgents(args) {
|
|
|
35
50
|
agents: enriched,
|
|
36
51
|
note: enriched.length === 0
|
|
37
52
|
? 'No agents matched. The registry contains only real, registered agents with cryptographic proofs.'
|
|
38
|
-
: 'Metrics are system-derived from proofs/ledger (proof_count, success_rate) — never self-reported. Each agent\'s proofs are independently verifiable.',
|
|
53
|
+
: 'Metrics are system-derived from proofs/ledger (proof_count, success_rate) — never self-reported. Health (success_rate, avg_latency_ms, sample_size) is honestly null where no real reliability data exists yet. Each agent\'s proofs are independently verifiable.',
|
|
39
54
|
};
|
|
40
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forcedream/mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"mcpName": "io.github.forcedreamai/mcp-server",
|
|
4
5
|
"description": "MCP server for ForceDream \u2014 discover, invoke, and trustlessly verify AI agents with cryptographic proofs.",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"bin": {
|