@barivia/barsom-mcp 0.18.0 → 0.18.1
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/shared.js
CHANGED
|
@@ -26,7 +26,7 @@ export const RETRYABLE_STATUS = new Set([502, 503, 504]);
|
|
|
26
26
|
* X-Barsom-Client-Version so the server can annotate tool guidance with the
|
|
27
27
|
* wrapper version each action requires. Keep in sync with package.json on bump.
|
|
28
28
|
*/
|
|
29
|
-
export const CLIENT_VERSION = "0.18.
|
|
29
|
+
export const CLIENT_VERSION = "0.18.1";
|
|
30
30
|
/** User-facing links; keep aligned with barivia.se / api.barivia.se. */
|
|
31
31
|
export const PUBLIC_SITE_ORIGIN = "https://barivia.se";
|
|
32
32
|
/** Self-serve account dashboard (manage plan, billing, and API keys). */
|
|
@@ -289,7 +289,8 @@ export async function resolveFilePathForUpload(filePath, mcpServer) {
|
|
|
289
289
|
if (err instanceof Error && (err.message.includes("escapes") || err.message.includes("regular file"))) {
|
|
290
290
|
throw err;
|
|
291
291
|
}
|
|
292
|
-
throw new Error(`File not accessible.
|
|
292
|
+
throw new Error(`File not accessible. Easiest fix: pass an ABSOLUTE path (e.g. "/home/you/project/data.csv" or ` +
|
|
293
|
+
`"C:\\\\Users\\\\you\\\\data.csv") or a file:// URI. For relative paths, set BARIVIA_WORKSPACE_ROOT in your MCP config.`);
|
|
293
294
|
}
|
|
294
295
|
}
|
|
295
296
|
/** User-visible API error line (includes request id for support). Exported for tests. */
|
package/dist/tools/datasets.js
CHANGED
|
@@ -278,8 +278,10 @@ ESCALATION: If upload fails with column errors, open the file locally and verify
|
|
|
278
278
|
stat = await fs.stat(resolved);
|
|
279
279
|
}
|
|
280
280
|
catch {
|
|
281
|
-
throw new Error(`File not accessible at resolved path.
|
|
282
|
-
`
|
|
281
|
+
throw new Error(`File not accessible at resolved path. Easiest fix: pass an ABSOLUTE path ` +
|
|
282
|
+
`(e.g. "/home/you/project/data.csv" or "C:\\\\Users\\\\you\\\\data.csv") or a file:// URI. ` +
|
|
283
|
+
`Relative paths resolve against the MCP workspace root (current: ${await getWorkspaceRootAsync(server)}); ` +
|
|
284
|
+
`set BARIVIA_WORKSPACE_ROOT in your MCP config env to your project directory to use them.`);
|
|
283
285
|
}
|
|
284
286
|
if (stat.size > HARD_MAX_BYTES) {
|
|
285
287
|
const gzipHint = isGzipInput ? "" : ` ${GZIP_UPLOAD_HINT}`;
|
|
@@ -152,8 +152,8 @@ async function handleResultsExplorer(job_id) {
|
|
|
152
152
|
if (!getClientSupportsMcpApps() && payload.standaloneUrl) {
|
|
153
153
|
content.push({
|
|
154
154
|
type: "text",
|
|
155
|
-
text: `Interactive
|
|
156
|
-
`
|
|
155
|
+
text: `Interactive results explorer: [Open results explorer](${payload.standaloneUrl})\n` +
|
|
156
|
+
`AGENT: surface this to the user as a clickable markdown link (e.g. "[Open results explorer](${payload.standaloneUrl})") in your reply — do not leave it buried in tool output. ` +
|
|
157
157
|
`This localhost port is assigned per MCP session and changes if the proxy restarts — if the page won't load, re-run results_explorer for a fresh URL, or set BARIVIA_VIZ_PORT in your MCP env for a persistent port.`,
|
|
158
158
|
});
|
|
159
159
|
}
|
|
@@ -96,7 +96,8 @@ export function registerTrainingMonitorTool(server) {
|
|
|
96
96
|
if (!getClientSupportsMcpApps() && standaloneUrl) {
|
|
97
97
|
content.push({
|
|
98
98
|
type: "text",
|
|
99
|
-
text: `
|
|
99
|
+
text: `Live training monitor: [Open training monitor](${standaloneUrl})\n` +
|
|
100
|
+
`AGENT: surface this to the user as a clickable markdown link (e.g. "[Open training monitor](${standaloneUrl})") in your reply — do not leave it buried in tool output. Re-post the link after the job completes so the user can return to the curves.\n` +
|
|
100
101
|
`This localhost port is assigned per MCP session and changes if the proxy restarts — if the page stays at "running 0%" or stops updating, the link is stale: re-run training_monitor for a fresh URL, or set BARIVIA_VIZ_PORT in your MCP env for a persistent port. Health check: http://localhost:${port}/api/health?job_id=${encodeURIComponent(job_id)}`,
|
|
101
102
|
});
|
|
102
103
|
}
|
|
@@ -481,7 +481,8 @@ function buildTrainingPrepContent(payload) {
|
|
|
481
481
|
if (!getClientSupportsMcpApps() && payload.standaloneUrl) {
|
|
482
482
|
content.push({
|
|
483
483
|
type: "text",
|
|
484
|
-
text: `Interactive review: ${payload.standaloneUrl}\
|
|
484
|
+
text: `Interactive training prep review: [Open training prep](${payload.standaloneUrl})\n` +
|
|
485
|
+
`AGENT: surface this to the user as a clickable markdown link (e.g. "[Open training prep](${payload.standaloneUrl})") in your reply — do not leave it buried in tool output. The user opens it to review and submit the prepared job.`,
|
|
485
486
|
});
|
|
486
487
|
}
|
|
487
488
|
return content;
|