@virtue-ai/gateway-connect 0.3.7 → 0.3.9

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.
@@ -59,10 +59,13 @@ function loadConfig() {
59
59
  process.env.VIRTUEAI_GUARD_UUID ||
60
60
  DEFAULT_GUARD_UUID;
61
61
 
62
- // If explicit apiUrl is set, use old path; otherwise derive from gatewayUrl
63
- const trajectoryEndpoint = apiUrl
64
- ? apiUrl + "/api/prompt-guard/topic_guard"
65
- : gatewayUrl + "/prompt-guard/topic_guard";
62
+ const trajectoryBase = apiUrl || gatewayUrl;
63
+ // Platform-hosted gateways have /api/gateways/ in the path → /prompt-guard/topic_guard
64
+ // Standalone gateways (e.g. agentgateway1.virtueai.io) → /api/prompt-guard/topic_guard
65
+ const guardPath = trajectoryBase.includes("/api/gateways/")
66
+ ? "/prompt-guard/topic_guard"
67
+ : "/api/prompt-guard/topic_guard";
68
+ const trajectoryEndpoint = trajectoryBase + guardPath;
66
69
 
67
70
  if (!gatewayUrl || !token) return null;
68
71
  return { gatewayUrl, gatewayId, token, guardUuid, trajectoryEndpoint };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virtue-ai/gateway-connect",
3
- "version": "0.3.7",
3
+ "version": "0.3.9",
4
4
  "description": "One-command setup to connect OpenClaw to VirtueAI MCP gateway",
5
5
  "type": "module",
6
6
  "files": [