@barivia/barsom-mcp 0.15.3 → 0.17.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.
@@ -92,6 +92,25 @@ export function startVizServer(apiCall, apiRawCall, loadViewHtml) {
92
92
  }
93
93
  return;
94
94
  }
95
+ // GET /api/results/:jobId/training-log (for training-monitor completed-job fallback)
96
+ const trainingLogMatch = pathname.match(/^\/api\/results\/([^/]+)\/training-log$/);
97
+ if (req.method === "GET" && trainingLogMatch) {
98
+ const jobId = trainingLogMatch[1];
99
+ if (!ID_REGEX.test(jobId)) {
100
+ sendJson(400, { error: "Invalid job_id" });
101
+ return;
102
+ }
103
+ try {
104
+ const data = await apiCall("GET", `/v1/results/${jobId}/training-log`);
105
+ sendJson(200, data);
106
+ }
107
+ catch (err) {
108
+ const status = err?.httpStatus ?? 500;
109
+ const message = err instanceof Error ? err.message : "Request failed";
110
+ sendJson(status, { error: message });
111
+ }
112
+ return;
113
+ }
95
114
  // GET /api/jobs/:jobId (for training-monitor polling)
96
115
  const jobMatch = pathname.match(/^\/api\/jobs\/([^/]+)$/);
97
116
  if (req.method === "GET" && jobMatch) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barivia/barsom-mcp",
3
- "version": "0.15.3",
3
+ "version": "0.17.0",
4
4
  "description": "barSOM MCP proxy — connect any MCP client to the barSOM cloud API for Self-Organizing Map analytics",
5
5
  "keywords": [
6
6
  "mcp",