@posiwise/user-module 0.0.160 → 0.0.162

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posiwise/user-module",
3
- "version": "0.0.160",
3
+ "version": "0.0.162",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^21.2.0",
6
6
  "@angular/common": "^21.2.19",
@@ -129,11 +129,26 @@ declare class AccountDetailsComponent extends AppBaseComponent implements OnInit
129
129
  private performTokenRefresh;
130
130
  get currentApiTokenScope(): string;
131
131
  /**
132
- * Tenant-dynamic MCP endpoint URL. Swaps the frontend subdomain for the
133
- * brain-api-mcp host while keeping the company domain, so it follows the URL
134
- * the user is on (www.dev.posiwise.com -> brain-api-mcp.dev.posiwise.com).
132
+ * Tenant-dynamic MCP endpoint URL, resolved from the host the user is on.
133
+ * The MCP host is always `brain-api-mcp.{env}.{company-domain}`, so the
134
+ * environment segment has to survive the swap:
135
+ * www.dev.posiwise.com -> brain-api-mcp.dev.posiwise.com
136
+ * www.go.posiwise.com -> brain-api-mcp.go.posiwise.com
137
+ * www.posiwise.com -> brain-api-mcp.go.posiwise.com (apex = PROD)
138
+ * Stripping the first label unconditionally (the previous behaviour) broke
139
+ * PROD, where the app is also served from the apex: it produced
140
+ * `brain-api-mcp.posiwise.com`, which does not exist in DNS.
135
141
  */
136
142
  get mcpEndpointUrl(): string;
143
+ /**
144
+ * Company domain prefixed by its environment segment. Resolves the company
145
+ * domain with the same `getDomain` the AppConfigService uses to identify the
146
+ * tenant, so multi-label TLDs (acme.co.uk) and arbitrary subdomains both
147
+ * reduce correctly. Only a recognised environment segment is carried over —
148
+ * anything else (`www`, a custom subdomain) falls back to PROD rather than
149
+ * being prefixed onto the host, which would misroute.
150
+ */
151
+ private mcpHostBase;
137
152
  /** Tenant company name (domain-metadata driven), falling back to PosiWise. */
138
153
  get mcpCompanyName(): string;
139
154
  changeApiTokenScope(scope: string): void;