fraim-framework 2.0.198 → 2.0.199
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.
|
@@ -58,6 +58,16 @@ function getApiKeyForLogging(req) {
|
|
|
58
58
|
}
|
|
59
59
|
return 'ANONYMOUS';
|
|
60
60
|
}
|
|
61
|
+
function getBodyForLogging(req) {
|
|
62
|
+
if (req.path === '/api/ai-hub/brand' && req.body && typeof req.body === 'object') {
|
|
63
|
+
const body = { ...req.body };
|
|
64
|
+
if (typeof body.logo === 'string' && body.logo.length > 0) {
|
|
65
|
+
body.logo = `[redacted logo payload, ${body.logo.length} chars]`;
|
|
66
|
+
}
|
|
67
|
+
return JSON.stringify(body);
|
|
68
|
+
}
|
|
69
|
+
return JSON.stringify(req.body);
|
|
70
|
+
}
|
|
61
71
|
/**
|
|
62
72
|
* Middleware to log all requests
|
|
63
73
|
*/
|
|
@@ -82,7 +92,7 @@ function requestLogger(req, res, next) {
|
|
|
82
92
|
let params = '';
|
|
83
93
|
if (method === 'POST') {
|
|
84
94
|
try {
|
|
85
|
-
params =
|
|
95
|
+
params = getBodyForLogging(req);
|
|
86
96
|
}
|
|
87
97
|
catch (e) {
|
|
88
98
|
params = '[Unserializable Body]';
|
|
@@ -61,7 +61,9 @@ class TelemetryMiddleware {
|
|
|
61
61
|
// `fraim sync` CLI, which runs outside any MCP session (same lifecycle
|
|
62
62
|
// position as /api/registry/sync). Auth still applies; only the
|
|
63
63
|
// session-active gate is exempted.
|
|
64
|
-
|
|
64
|
+
// Issue #701/#744 - hosted AI Hub HTTP APIs are browser/gateway routes,
|
|
65
|
+
// not MCP tool calls. They are still authenticated by API key/session.
|
|
66
|
+
const exemptPaths = ['/health', '/admin', '/api/registry/sync', '/api/registry/github-workflows', '/api/registry/topology/personalized', '/api/registry/topology/usage-heatmap', '/api/org/', '/api/manager/', '/api/ai-hub/', '/api/payment/', '/api/sales/', '/api/signup', '/api/providers', '/api/analytics', '/analytics', '/api/auth/', '/api/account/'];
|
|
65
67
|
if (exemptPaths.some(p => req.path.startsWith(p))) {
|
|
66
68
|
return next();
|
|
67
69
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fraim-framework",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.199",
|
|
4
4
|
"description": "FRAIM: AI Workforce Infrastructure — the organizational capability that turns AI agents into an accountable workforce, their operators into capable AI managers, and executives into leaders with clear optics on AI proficiency.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|