opedd-mcp 0.6.7 → 0.6.8
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 +4 -1
- package/dist/telemetry.js +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -640,7 +640,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
640
640
|
// dispatchTool) keeps unit tests, which call dispatchTool directly, silent.
|
|
641
641
|
const start = Date.now();
|
|
642
642
|
const result = await dispatchTool(request.params.name, (request.params.arguments ?? {}));
|
|
643
|
-
|
|
643
|
+
// channel:"stdio" lets the channel report separate local (npx) usage from
|
|
644
|
+
// hosted-gateway usage (channel:"gateway"); the Phase-2 hosted trigger
|
|
645
|
+
// counts only the latter.
|
|
646
|
+
captureToolCall(request.params.name, Date.now() - start, result.isError !== true, { channel: "stdio" });
|
|
644
647
|
return result;
|
|
645
648
|
});
|
|
646
649
|
// ─── Tool dispatcher (exported for unit tests) ────────────────────────────────
|
package/dist/telemetry.js
CHANGED
|
@@ -37,12 +37,17 @@ export function isTelemetryEnabled() {
|
|
|
37
37
|
* the privacy invariant directly.
|
|
38
38
|
*/
|
|
39
39
|
export function toolCallProperties(tool, durationMs, ok, extra) {
|
|
40
|
+
// Spread `extra` FIRST so it can never overwrite the privacy-critical /
|
|
41
|
+
// integrity fields below. Otherwise a future caller passing e.g.
|
|
42
|
+
// { tool: ... } or { ok: ... } could silently forge metrics or shadow the
|
|
43
|
+
// canonical fields — the "nothing sensitive by construction" guarantee
|
|
44
|
+
// must hold even against a coding mistake in a caller.
|
|
40
45
|
return {
|
|
46
|
+
...extra,
|
|
41
47
|
tool,
|
|
42
48
|
duration_ms: Math.round(durationMs),
|
|
43
49
|
ok,
|
|
44
50
|
server_version: SERVER_VERSION,
|
|
45
|
-
...extra,
|
|
46
51
|
};
|
|
47
52
|
}
|
|
48
53
|
let client = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opedd-mcp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.8",
|
|
4
4
|
"description": "Licensed, rights-cleared content for AI agents \u2014 verifiable license keys, on-chain proof, and EU AI Act attestation. The MCP alternative to unlicensed scraping for RAG and AI search.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|