@mcp-com-ai/plugin-otel 1.0.2-beta.260914 → 1.1.0
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/index.js +6 -6
- package/package.json +15 -4
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{definePlugin as
|
|
2
|
+
import{definePlugin as m,defineCommand as s,HAPI_CLI_API_VERSION as c}from"@mcp-com-ai/plugin-sdk";import{pkg as d,telemetry as y}from"@mcp-com-ai/core";import{loadGlobalConfig as o,saveGlobalConfig as u}from"@mcp-com-ai/shared-utils";var r="@mcp-com-ai/plugin-otel",a="1.1.0",p="Telemetry / OpenTelemetry surface for the HAPI CLI. Opt-in/out, status, and flush controls.";var g=s({name:"status",description:"Show current telemetry configuration and opt-out state",async run(i,t){let e=await o(),l=e.analyticsOptout===!0||process.env.HAPI_ANALYTICS_OPTOUT==="true"||process.env.HAPI_TELEMETRY_OPTOUT==="true";return t.stdout.write(`
|
|
3
3
|
HAPI telemetry status
|
|
4
4
|
`),t.stdout.write(` Opt-out (config): ${e.analyticsOptout===!0}
|
|
5
5
|
`),t.stdout.write(` Opt-out (env): ${process.env.HAPI_ANALYTICS_OPTOUT==="true"||process.env.HAPI_TELEMETRY_OPTOUT==="true"}
|
|
6
|
-
`),t.stdout.write(` Effective: ${
|
|
6
|
+
`),t.stdout.write(` Effective: ${l?"OFF":"ON (opt-in via PostHog API key)"}
|
|
7
7
|
`),t.stdout.write(` POSTHOG_API_KEY: ${process.env.POSTHOG_API_KEY?"set":"unset"}
|
|
8
8
|
|
|
9
|
-
`),0}}),
|
|
10
|
-
`),0}}),
|
|
11
|
-
`),0}}),
|
|
12
|
-
`),0}}),
|
|
9
|
+
`),0}}),f=s({name:"opt-out",description:"Persist a telemetry opt-out flag in $HAPI_HOME/config.json",async run(i,t){let e=await o();return e.analyticsOptout=!0,await u(e),t.stdout.write(`Telemetry opt-out saved. The CLI will not send analytics from this machine.
|
|
10
|
+
`),0}}),h=s({name:"opt-in",description:"Clear the persisted telemetry opt-out flag",async run(i,t){let e=await o();return e.analyticsOptout=!1,await u(e),t.stdout.write(`Telemetry opt-in saved. Analytics will be enabled when POSTHOG_API_KEY is present.
|
|
11
|
+
`),0}}),O=s({name:"flush",description:"Flush any pending telemetry events",async run(i,t){return y.shutdown?.(),t.stdout.write(`Telemetry buffer flushed.
|
|
12
|
+
`),0}}),C=m({name:r,displayName:"HAPI Telemetry",description:p,version:a,compatibility:{cliApiVersion:c,core:{version:d.version,range:"^1.0.1-beta.260912"}},commands:[{name:"otel",aliases:["telemetry"],description:"Telemetry / OpenTelemetry controls (status, opt-in, opt-out, flush)",subcommands:[g,h,f,O]}]}),w=C;export{w as default,C as plugin};
|
package/package.json
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-com-ai/plugin-otel",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Telemetry / OpenTelemetry surface for the HAPI CLI. Opt-in/out, status, and flush controls.",
|
|
5
5
|
"license": "LRL-CL",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/mcp-com-ai/hapimcp"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://hapi.mcp.com.ai",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/mcp-com-ai/hapimcp"
|
|
13
|
+
},
|
|
14
|
+
"sponsor": {
|
|
15
|
+
"url": "https://go.rebelion.la/sponsors"
|
|
16
|
+
},
|
|
6
17
|
"type": "module",
|
|
7
18
|
"module": "./dist/index.js",
|
|
8
19
|
"main": "./dist/index.js",
|
|
@@ -22,9 +33,9 @@
|
|
|
22
33
|
"build": "bun ../../../scripts/build-package.ts ."
|
|
23
34
|
},
|
|
24
35
|
"dependencies": {
|
|
25
|
-
"@mcp-com-ai/core": "^1.0
|
|
26
|
-
"@mcp-com-ai/plugin-sdk": "^1.0
|
|
27
|
-
"@mcp-com-ai/shared-utils": "^1.0
|
|
36
|
+
"@mcp-com-ai/core": "^1.1.0",
|
|
37
|
+
"@mcp-com-ai/plugin-sdk": "^1.1.0",
|
|
38
|
+
"@mcp-com-ai/shared-utils": "^1.1.0"
|
|
28
39
|
},
|
|
29
40
|
"keywords": ["hapi", "hapi-cli-plugin", "telemetry", "otel", "posthog"],
|
|
30
41
|
"engines": {
|