@camstack/server 1.1.12 → 1.1.13

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.
@@ -787,6 +787,19 @@ function buildIntegrationsProvider(ar, eb, loggingService, capabilityRegistry) {
787
787
  const supportsLocationImport = kind === 'device-adoption'
788
788
  ? (d?.supportsLocationImport ?? m.supportsLocationImport ?? false)
789
789
  : false;
790
+ // Integration wizard `mode` (LOCKED MODEL — supersedes `instanceMode`
791
+ // for wizard routing). Explicit manifest `mode` wins; otherwise derive:
792
+ // 1. broker cap AND a brokerKind → 'broker' (HA/MQTT shared session)
793
+ // 2. device-adoption (and NOT broker) → 'account'
794
+ // 3. device-provider only / old `instanceMode: unique` → 'standalone'
795
+ const explicitMode = d?.mode ?? m.mode;
796
+ const declaresBroker = capNames.includes('broker');
797
+ const mode = explicitMode ??
798
+ (declaresBroker && brokerKind
799
+ ? 'broker'
800
+ : kind === 'device-adoption'
801
+ ? 'account'
802
+ : 'standalone');
790
803
  return {
791
804
  addonId: m.id,
792
805
  name: m.name ?? m.id,
@@ -794,6 +807,7 @@ function buildIntegrationsProvider(ar, eb, loggingService, capabilityRegistry) {
794
807
  iconUrl: icon ? `/api/addon-assets/${m.id}/${icon}` : null,
795
808
  color,
796
809
  instanceMode,
810
+ mode,
797
811
  discoveryMode,
798
812
  kind,
799
813
  brokerKind,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",