@mcp-com-ai/plugin-otel 1.0.2-beta.260914
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 +52 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +12 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
MCP.com.ai — Server Registry
|
|
3
|
+
Deploying & Registering MCP Servers
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<img src="https://img.shields.io/badge/MCP-Model%20Context%20Protocol-1193b0?style=for-the-badge" />
|
|
8
|
+
<img src="https://img.shields.io/badge/Server%20Registry-Deploy%20%26%20Discover-da7756?style=for-the-badge" />
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<h1 align="center">MCP Server Registry Integration</h1>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<b>Build Once. Deploy Everywhere. Discover Globally.</b><br/>
|
|
15
|
+
Self-host, deploy, and register MCP servers with confidence using HAPI CLI, Docker, or Cloudflare Workers.
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
<a href="https://mcp.com.ai"><b>Website</b></a>
|
|
20
|
+
·
|
|
21
|
+
<a href="https://docs.mcp.com.ai"><b>Docs</b></a>
|
|
22
|
+
·
|
|
23
|
+
<a href="https://registry.modelcontextprotocol.io/?q=ai.com.mcp"><b>MCP Registry</b></a>
|
|
24
|
+
·
|
|
25
|
+
<a href="https://run.mcp.com.ai"><b>Run MCP</b></a>
|
|
26
|
+
·
|
|
27
|
+
<a href="https://hapi.mcp.com.ai"><b>HAPI CLI</b></a>
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# HAPI telemetry plugin 
|
|
33
|
+
|
|
34
|
+
`@mcp-com-ai/plugin-otel` adds optional telemetry controls to a HAPI
|
|
35
|
+
installation. It does not serve an API by itself.
|
|
36
|
+
|
|
37
|
+
Install it only when you want its telemetry commands, alongside the CLI and a
|
|
38
|
+
document plugin that serves your API or workflow:
|
|
39
|
+
|
|
40
|
+
```sh
|
|
41
|
+
bun add -g \
|
|
42
|
+
@mcp-com-ai/hapi \
|
|
43
|
+
@mcp-com-ai/plugin-openapi \
|
|
44
|
+
@mcp-com-ai/plugin-otel
|
|
45
|
+
|
|
46
|
+
hapi serve --specs ./openapi.yaml --mcp
|
|
47
|
+
hapi plugins list
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Use `hapi --help` after installation to see the telemetry commands available in
|
|
51
|
+
your version. The plugin uses HAPI Core and shared utilities supplied through
|
|
52
|
+
its dependencies; keep every installed HAPI package on the same release line.
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{definePlugin as d,defineCommand as n,HAPI_CLI_API_VERSION as m}from"@mcp-com-ai/plugin-sdk";import{pkg as c,telemetry as y}from"@mcp-com-ai/core";import{loadGlobalConfig as o,saveGlobalConfig as l}from"@mcp-com-ai/shared-utils";var r="@mcp-com-ai/plugin-otel",a="1.0.2-beta.260914",u="Telemetry / OpenTelemetry surface for the HAPI CLI. Opt-in/out, status, and flush controls.";var f=n({name:"status",description:"Show current telemetry configuration and opt-out state",async run(s,t){let e=await o(),p=e.analyticsOptout===!0||process.env.HAPI_ANALYTICS_OPTOUT==="true"||process.env.HAPI_TELEMETRY_OPTOUT==="true";return t.stdout.write(`
|
|
3
|
+
HAPI telemetry status
|
|
4
|
+
`),t.stdout.write(` Opt-out (config): ${e.analyticsOptout===!0}
|
|
5
|
+
`),t.stdout.write(` Opt-out (env): ${process.env.HAPI_ANALYTICS_OPTOUT==="true"||process.env.HAPI_TELEMETRY_OPTOUT==="true"}
|
|
6
|
+
`),t.stdout.write(` Effective: ${p?"OFF":"ON (opt-in via PostHog API key)"}
|
|
7
|
+
`),t.stdout.write(` POSTHOG_API_KEY: ${process.env.POSTHOG_API_KEY?"set":"unset"}
|
|
8
|
+
|
|
9
|
+
`),0}}),g=n({name:"opt-out",description:"Persist a telemetry opt-out flag in $HAPI_HOME/config.json",async run(s,t){let e=await o();return e.analyticsOptout=!0,await l(e),t.stdout.write(`Telemetry opt-out saved. The CLI will not send analytics from this machine.
|
|
10
|
+
`),0}}),O=n({name:"opt-in",description:"Clear the persisted telemetry opt-out flag",async run(s,t){let e=await o();return e.analyticsOptout=!1,await l(e),t.stdout.write(`Telemetry opt-in saved. Analytics will be enabled when POSTHOG_API_KEY is present.
|
|
11
|
+
`),0}}),C=n({name:"flush",description:"Flush any pending telemetry events",async run(s,t){return y.shutdown?.(),t.stdout.write(`Telemetry buffer flushed.
|
|
12
|
+
`),0}}),P=d({name:r,displayName:"HAPI Telemetry",description:u,version:a,compatibility:{cliApiVersion:m,core:{version:c.version,range:"^1.0.1-beta.260912"}},commands:[{name:"otel",aliases:["telemetry"],description:"Telemetry / OpenTelemetry controls (status, opt-in, opt-out, flush)",subcommands:[f,O,g,C]}]}),w=P;export{w as default,P as plugin};
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mcp-com-ai/plugin-otel",
|
|
3
|
+
"version": "1.0.2-beta.260914",
|
|
4
|
+
"description": "Telemetry / OpenTelemetry surface for the HAPI CLI. Opt-in/out, status, and flush controls.",
|
|
5
|
+
"license": "LRL-CL",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"hapi-build-source": "./src/index.ts",
|
|
14
|
+
"bun": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": ["dist", "README.md"],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"typecheck": "bunx tsc --noEmit",
|
|
21
|
+
"test": "bun test",
|
|
22
|
+
"build": "bun ../../../scripts/build-package.ts ."
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@mcp-com-ai/core": "^1.0.2-beta.260914",
|
|
26
|
+
"@mcp-com-ai/plugin-sdk": "^1.0.2-beta.260914",
|
|
27
|
+
"@mcp-com-ai/shared-utils": "^1.0.2-beta.260914"
|
|
28
|
+
},
|
|
29
|
+
"keywords": ["hapi", "hapi-cli-plugin", "telemetry", "otel", "posthog"],
|
|
30
|
+
"engines": {
|
|
31
|
+
"bun": ">=1.3.0"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
}
|
|
36
|
+
}
|