@camstack/server 1.2.320 → 1.2.322

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.
@@ -252,6 +252,18 @@ function isShareViewKind(value) {
252
252
  function shouldEmitProviderRegisteredReady(capability) {
253
253
  return capability !== 'platform-probe';
254
254
  }
255
+ /**
256
+ * Is this capability device-scoped?
257
+ *
258
+ * Read from the cap DEFINITIONS, never a list: the set changes with every cap
259
+ * that lands, and a hand-written copy is the shape of bug that keeps a widget
260
+ * invisible for a week. Built once — `ALL_CAPABILITY_DEFINITIONS` is a frozen
261
+ * generated array.
262
+ */
263
+ const DEVICE_SCOPED_CAP_NAMES = new Set(types_1.ALL_CAPABILITY_DEFINITIONS.filter((def) => def.scope === 'device').map((def) => def.name));
264
+ function isDeviceScopedCapName(capName) {
265
+ return DEVICE_SCOPED_CAP_NAMES.has(capName);
266
+ }
255
267
  class AddonRegistryService {
256
268
  loggingService;
257
269
  eventBusService;
@@ -322,7 +334,19 @@ class AddonRegistryService {
322
334
  getByName: (capName) => reg.getSingleton(capName) ?? reg.getAllProviders(capName)[0] ?? null,
323
335
  };
324
336
  const client = (0, client_1.createTRPCClient)({
325
- links: [(0, system_1.localProviderLink)(resolver), (0, system_1.brokerTransportLink)(this.moleculer.broker)],
337
+ links: [
338
+ (0, system_1.localProviderLink)(resolver),
339
+ // Device-scoped caps go through the hub's CapRouteResolver, which is
340
+ // the only authority that can route `(cap, deviceId)` into a FORKED
341
+ // child — and forked children are broker-less, so the Moleculer
342
+ // lookup below cannot see them at all. Without this an in-process
343
+ // addon asking `ptz.getOptions({deviceId})` got
344
+ // `Service 'ptz.ptz.getOptions' is not found`, which is how the
345
+ // autotrack builtin came up switched on and unable to move a camera
346
+ // (2026-09-18).
347
+ (0, system_1.deviceCapResolverLink)((capName, method, input) => this.moleculer.callCapabilityOnNode(this.moleculer.broker.nodeID, capName, method, input), isDeviceScopedCapName),
348
+ (0, system_1.brokerTransportLink)(this.moleculer.broker),
349
+ ],
326
350
  });
327
351
  this.brokerApi = client;
328
352
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.320",
3
+ "version": "1.2.322",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -40,11 +40,11 @@
40
40
  "@camstack/addon-auth": "1.2.123",
41
41
  "@camstack/addon-decoder-nodeav": "1.2.115",
42
42
  "@camstack/addon-notifiers": "1.2.119",
43
- "@camstack/addon-pipeline": "1.2.262",
43
+ "@camstack/addon-pipeline": "1.2.264",
44
44
  "@camstack/addon-pipeline-orchestrator": "1.2.222",
45
45
  "@camstack/addon-post-analysis": "1.2.264",
46
46
  "@camstack/sdk": "1.2.118",
47
- "@camstack/system": "1.2.255",
47
+ "@camstack/system": "1.2.256",
48
48
  "@camstack/types": "1.2.216",
49
49
  "@camstack/ui-library": "1.2.179",
50
50
  "@fastify/compress": "^9.0.0",