@camstack/system 1.0.6 → 1.0.8

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.
Files changed (33) hide show
  1. package/dist/addon-runner.js +40 -23
  2. package/dist/addon-runner.mjs +20 -4
  3. package/dist/addon-utils.d.ts +20 -0
  4. package/dist/addon-utils.js +11 -0
  5. package/dist/addon-utils.mjs +3 -0
  6. package/dist/builtins/device-manager/device-manager.addon.js +8 -8
  7. package/dist/builtins/device-manager/device-manager.addon.mjs +8 -8
  8. package/dist/builtins/native-metrics/native-metrics.addon.d.ts +8 -0
  9. package/dist/builtins/native-metrics/native-metrics.addon.js +50 -3
  10. package/dist/builtins/native-metrics/native-metrics.addon.mjs +50 -3
  11. package/dist/builtins/platform-probe/index.js +27 -139
  12. package/dist/builtins/platform-probe/index.mjs +28 -140
  13. package/dist/builtins/platform-probe/platform-scorer.d.ts +17 -10
  14. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +2 -2
  15. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +2 -2
  16. package/dist/custom-action-registry-BEXwC-oo.mjs +38 -0
  17. package/dist/custom-action-registry-vLYEFTtv.js +43 -0
  18. package/dist/index.js +129 -779
  19. package/dist/index.mjs +100 -750
  20. package/dist/kernel/config-manager.d.ts +4 -4
  21. package/dist/kernel/fs-utils.d.ts +16 -6
  22. package/dist/kernel/index.d.ts +1 -1
  23. package/dist/kernel/moleculer/device-cap-proxy.d.ts +2 -1
  24. package/dist/kernel/moleculer/readiness-context.d.ts +2 -1
  25. package/dist/kernel/transport/child-cap-protocol.d.ts +10 -0
  26. package/dist/{manifest-python-deps-B4BmMoGT.js → manifest-python-deps-BWURo7dc.js} +62 -88
  27. package/dist/{manifest-python-deps-CXbKrOdk.mjs → manifest-python-deps-BcrTzHH_.mjs} +55 -75
  28. package/dist/model-download-service-C7AjBsX9.mjs +668 -0
  29. package/dist/model-download-service-JtVQtbb6.js +752 -0
  30. package/dist/process/resource-monitor.d.ts +9 -0
  31. package/dist/{resource-monitor-ClDGFyf6.mjs → resource-monitor-BkP504Vq.mjs} +20 -1
  32. package/dist/{resource-monitor-IIEanuJt.js → resource-monitor-DNNomR-i.js} +21 -1
  33. package/package.json +6 -1
@@ -4,7 +4,7 @@ import { createServer } from "node:http";
4
4
  import * as fs from "node:fs";
5
5
  import * as path$1 from "node:path";
6
6
  import { isAbsolute, join } from "node:path";
7
- import { DATAPLANE_SECRET_HEADER, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, asJsonObject, asString, createDeviceProxy, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, scopeKey, sleep } from "@camstack/types";
7
+ import { readNodePin } from "@camstack/types";
8
8
  import * as crypto$1 from "node:crypto";
9
9
  import { randomBytes, randomUUID } from "node:crypto";
10
10
  import { execFile } from "node:child_process";
@@ -12,6 +12,7 @@ import { promisify } from "node:util";
12
12
  import * as os from "node:os";
13
13
  import { tmpdir } from "node:os";
14
14
  import { unlink } from "node:fs/promises";
15
+ import { DATAPLANE_SECRET_HEADER as DATAPLANE_SECRET_HEADER$1, DeviceType as DeviceType$1, DisposerChain, EventCategory as EventCategory$1, ReadinessRegistry, asJsonObject as asJsonObject$1, asString as asString$1, createDeviceProxy, deviceOpsCapability, emitReadiness, errMsg as errMsg$1, expandCapMethods, scopeKey, sleep as sleep$1 } from "@camstack/types/addon";
15
16
  import { TRPCClientError, createTRPCClient } from "@trpc/client";
16
17
  import { connect, createServer as createServer$1 } from "node:net";
17
18
  //#region src/kernel/addon-class-resolver.ts
@@ -102,7 +103,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry) {
102
103
  } catch (err) {
103
104
  logger.warn("Failed to write native deps marker", { meta: {
104
105
  markerFile,
105
- error: errMsg(err)
106
+ error: errMsg$1(err)
106
107
  } });
107
108
  }
108
109
  return;
@@ -129,7 +130,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry) {
129
130
  timeout: 3e5
130
131
  });
131
132
  } catch (err) {
132
- throw new Error(`npm install of native deps failed for ${addonDir}: ${errMsg(err)}`, { cause: err });
133
+ throw new Error(`npm install of native deps failed for ${addonDir}: ${errMsg$1(err)}`, { cause: err });
133
134
  }
134
135
  await rebuildNativeDeps(addonDir, pending.map(([name]) => name), logger);
135
136
  try {
@@ -137,7 +138,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry) {
137
138
  } catch (err) {
138
139
  logger.warn("Failed to write native deps marker", { meta: {
139
140
  markerFile,
140
- error: errMsg(err)
141
+ error: errMsg$1(err)
141
142
  } });
142
143
  }
143
144
  }
@@ -174,7 +175,7 @@ function copyPrebuiltNativeDep(name, addonDir, logger) {
174
175
  logger.warn("Prebuilt native dep copy failed — will try npm install", { meta: {
175
176
  name,
176
177
  source,
177
- error: errMsg(err)
178
+ error: errMsg$1(err)
178
179
  } });
179
180
  }
180
181
  }
@@ -207,13 +208,13 @@ function candidateHoistedDirs(name, addonDir) {
207
208
  }
208
209
  /** Read & validate `camstack.nativeDependencies`. Returns null when absent. */
209
210
  function readNativeDeps(pkgRaw) {
210
- const camstack = asJsonObject(pkgRaw["camstack"]);
211
+ const camstack = asJsonObject$1(pkgRaw["camstack"]);
211
212
  if (!camstack) return null;
212
- const native = asJsonObject(camstack["nativeDependencies"]);
213
+ const native = asJsonObject$1(camstack["nativeDependencies"]);
213
214
  if (!native) return null;
214
215
  const out = {};
215
216
  for (const [k, v] of Object.entries(native)) {
216
- const range = asString(v);
217
+ const range = asString$1(v);
217
218
  if (range) out[k] = range;
218
219
  }
219
220
  return Object.keys(out).length > 0 ? out : null;
@@ -280,7 +281,7 @@ async function rebuildNativeDeps(addonDir, packageNames, logger) {
280
281
  } catch (err) {
281
282
  logger.warn("Electron rebuild failed (continuing — prebuilt binary may be present)", { meta: {
282
283
  addonDir,
283
- error: errMsg(err)
284
+ error: errMsg$1(err)
284
285
  } });
285
286
  }
286
287
  return;
@@ -298,7 +299,7 @@ async function rebuildNativeDeps(addonDir, packageNames, logger) {
298
299
  } catch (err) {
299
300
  logger.warn("npm rebuild failed (continuing — prebuilt binary may be present)", { meta: {
300
301
  addonDir,
301
- error: errMsg(err)
302
+ error: errMsg$1(err)
302
303
  } });
303
304
  }
304
305
  }
@@ -381,43 +382,6 @@ var CapabilityHandle = class {
381
382
  }
382
383
  };
383
384
  //#endregion
384
- //#region src/kernel/custom-action-registry.ts
385
- /**
386
- * CustomActionRegistry — per-process registry of addon custom actions.
387
- *
388
- * Populated at boot from each addon's `AddonInitResult.customActions` +
389
- * `handleCustomAction` handler. Rejects actions declared with scope other
390
- * than 'system' (today only 'system' is runtime-supported; the descriptor
391
- * allows future scopes for forward compat).
392
- */
393
- var CustomActionRegistry = class {
394
- byAddon = /* @__PURE__ */ new Map();
395
- registerAddon(addonId, catalog, handler) {
396
- const actions = /* @__PURE__ */ new Map();
397
- for (const [name, spec] of Object.entries(catalog)) {
398
- const scope = spec.scope ?? { kind: "system" };
399
- if (scope.kind !== "system") throw new Error(`custom action '${addonId}.${name}' declared scope '${scope.kind}' — not yet implemented`);
400
- actions.set(name, {
401
- spec,
402
- handler: (input) => handler(name, input)
403
- });
404
- }
405
- this.byAddon.set(addonId, actions);
406
- }
407
- unregisterAddon(addonId) {
408
- this.byAddon.delete(addonId);
409
- }
410
- resolve(addonId, action) {
411
- return this.byAddon.get(addonId)?.get(action) ?? null;
412
- }
413
- listActions(addonId) {
414
- return [...this.byAddon.get(addonId)?.keys() ?? []];
415
- }
416
- listAddons() {
417
- return [...this.byAddon.keys()];
418
- }
419
- };
420
- //#endregion
421
385
  //#region src/kernel/device-registry.ts
422
386
  var DeviceRegistry = class {
423
387
  /** Primary map: every registered device keyed by its progressive
@@ -1068,7 +1032,7 @@ async function callWithServiceDiscoveryRetry(broker, actionName, input) {
1068
1032
  if (!(err instanceof Error ? err.message : String(err)).includes("is not found")) throw err;
1069
1033
  attempt++;
1070
1034
  if (attempt === 1) broker.logger.warn(`native-cap-bridge: service not found for "${actionName}", retrying with exponential backoff…`);
1071
- await sleep(delay);
1035
+ await sleep$1(delay);
1072
1036
  delay = Math.min(delay * 2, BACKOFF_MAX_MS);
1073
1037
  }
1074
1038
  }
@@ -1173,7 +1137,7 @@ function createBrokerDeviceManagerApi(opts) {
1173
1137
  parentDeviceId,
1174
1138
  logger: (() => {
1175
1139
  const base = opts.logger.child(stableId);
1176
- const containerDeviceId = parentDeviceId ?? (deviceMeta?.type === DeviceType.Container ? id : null);
1140
+ const containerDeviceId = parentDeviceId ?? (deviceMeta?.type === DeviceType$1.Container ? id : null);
1177
1141
  return base.withTags(containerDeviceId !== null ? {
1178
1142
  deviceId: id,
1179
1143
  containerDeviceId
@@ -1199,7 +1163,7 @@ function createBrokerDeviceManagerApi(opts) {
1199
1163
  id,
1200
1164
  stableId,
1201
1165
  addonId,
1202
- type: DeviceType.Camera,
1166
+ type: DeviceType$1.Camera,
1203
1167
  name: stableId,
1204
1168
  location: null,
1205
1169
  disabled: false,
@@ -1265,7 +1229,7 @@ function createBrokerDeviceManagerApi(opts) {
1265
1229
  type: "device",
1266
1230
  id
1267
1231
  },
1268
- category: EventCategory.DeviceBindingsChanged,
1232
+ category: EventCategory$1.DeviceBindingsChanged,
1269
1233
  data: {
1270
1234
  deviceId: id,
1271
1235
  capName: cap.name,
@@ -1649,7 +1613,7 @@ function createBrokerDeviceManagerApi(opts) {
1649
1613
  type: "device",
1650
1614
  id: device.id
1651
1615
  },
1652
- category: EventCategory.DeviceReady,
1616
+ category: EventCategory$1.DeviceReady,
1653
1617
  data: { deviceId: device.id }
1654
1618
  });
1655
1619
  };
@@ -1788,7 +1752,7 @@ function createBrokerDeviceManagerApi(opts) {
1788
1752
  type: "device",
1789
1753
  id: deviceId
1790
1754
  },
1791
- category: EventCategory.DeviceBindingsChanged,
1755
+ category: EventCategory$1.DeviceBindingsChanged,
1792
1756
  data: {
1793
1757
  deviceId,
1794
1758
  capName,
@@ -3683,7 +3647,8 @@ var LocalChildRegistry = class {
3683
3647
  capName: out.capName,
3684
3648
  method: out.method,
3685
3649
  args: out.args,
3686
- ...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {}
3650
+ ...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {},
3651
+ ...out.nodeId !== void 0 ? { nodeId: out.nodeId } : {}
3687
3652
  };
3688
3653
  if (this.resolveChildId(out.capName, out.deviceId) !== null) {
3689
3654
  if (!this.egressRoutedCaps.has(out.capName)) {
@@ -3928,7 +3893,8 @@ var LocalChildClient = class {
3928
3893
  capName: input.capName,
3929
3894
  method: input.method,
3930
3895
  args: input.args,
3931
- ...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {}
3896
+ ...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {},
3897
+ ...input.nodeId !== void 0 ? { nodeId: input.nodeId } : {}
3932
3898
  };
3933
3899
  return this.channel.request(msg);
3934
3900
  }
@@ -4622,7 +4588,10 @@ function createParentUnownedCallHandler(deps) {
4622
4588
  const deviceId = input.deviceId ?? extractDeviceId(input.args);
4623
4589
  const resolver = deps.getResolver();
4624
4590
  if (resolver !== null) try {
4625
- const route = resolver.resolveCapRoute(input.capName, deviceId !== void 0 ? { deviceId } : {});
4591
+ const route = resolver.resolveCapRoute(input.capName, {
4592
+ ...input.nodeId !== void 0 ? { nodeId: input.nodeId } : {},
4593
+ ...deviceId !== void 0 ? { deviceId } : {}
4594
+ });
4626
4595
  return await resolver.dispatch(route, input.method, input.args);
4627
4596
  } catch (err) {
4628
4597
  if (!(err instanceof CapRouteError) || err.reason !== "no-provider") throw err;
@@ -4659,7 +4628,7 @@ function createParentUnownedCallHandler(deps) {
4659
4628
  return await brokerCallForCap(deps.broker, input.capName, input.method, input.args);
4660
4629
  } catch (cause) {
4661
4630
  const reason = cause instanceof Error ? cause.message : String(cause);
4662
- throw new Error(`parent could not route child unowned cap call "${input.capName}.${input.method}": ${reason}`, cause instanceof Error ? { cause } : void 0);
4631
+ throw new Error(`parent could not route child unowned cap call "${input.capName}.${input.method}": ${reason}`, { cause });
4663
4632
  }
4664
4633
  };
4665
4634
  }
@@ -5067,11 +5036,13 @@ function ipcParentLink(getCallOut) {
5067
5036
  const input = op.input;
5068
5037
  const inputObj = input && typeof input === "object" && !Array.isArray(input) ? input : null;
5069
5038
  const deviceId = inputObj && typeof Reflect.get(inputObj, "deviceId") === "number" ? Reflect.get(inputObj, "deviceId") : void 0;
5039
+ const pinnedNodeId = readNodePin(op.context);
5070
5040
  const capCallInput = {
5071
5041
  capName: parsed.capName,
5072
5042
  method: parsed.method,
5073
5043
  args: op.input,
5074
- ...deviceId !== void 0 ? { deviceId } : {}
5044
+ ...deviceId !== void 0 ? { deviceId } : {},
5045
+ ...pinnedNodeId !== void 0 ? { nodeId: pinnedNodeId } : {}
5075
5046
  };
5076
5047
  return observable((observer) => {
5077
5048
  callOut(capCallInput).then((data) => {
@@ -5136,7 +5107,7 @@ var CapUsageRegistry = class {
5136
5107
  let window = byCap.get(rec.capName);
5137
5108
  if (!window) {
5138
5109
  window = {
5139
- buckets: new Array(this.retentionSeconds).fill(0),
5110
+ buckets: Array.from({ length: this.retentionSeconds }, () => 0),
5140
5111
  lastCallAtMs: 0
5141
5112
  };
5142
5113
  byCap.set(rec.capName, window);
@@ -5356,7 +5327,7 @@ function createAddonDataPlaneFacility(args) {
5356
5327
  let server = null;
5357
5328
  let baseUrl = "";
5358
5329
  const route = (req, res) => {
5359
- if (req.headers[DATAPLANE_SECRET_HEADER] !== secret) {
5330
+ if (req.headers[DATAPLANE_SECRET_HEADER$1] !== secret) {
5360
5331
  res.writeHead(403).end();
5361
5332
  return;
5362
5333
  }
@@ -5475,7 +5446,7 @@ function resolveNodeRoot() {
5475
5446
  var inFlight = /* @__PURE__ */ new Map();
5476
5447
  var LOCK_STALE_MS = 10 * 6e4;
5477
5448
  var LOCK_POLL_MS = 500;
5478
- function sleep$1(ms) {
5449
+ function sleep$2(ms) {
5479
5450
  return new Promise((resolve) => setTimeout(resolve, ms));
5480
5451
  }
5481
5452
  /**
@@ -5494,7 +5465,7 @@ async function withFileLock(lockPath, fn) {
5494
5465
  } catch {
5495
5466
  try {
5496
5467
  if (Date.now() - fs.statSync(lockPath).mtimeMs > LOCK_STALE_MS) fs.rmSync(lockPath, { force: true });
5497
- else await sleep$1(LOCK_POLL_MS);
5468
+ else await sleep$2(LOCK_POLL_MS);
5498
5469
  } catch {}
5499
5470
  }
5500
5471
  try {
@@ -6286,7 +6257,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
6286
6257
  } });
6287
6258
  registerWorkerDisposerChain(nodeId, addonId, workerDisposerChain);
6288
6259
  const bindingCache = /* @__PURE__ */ new Map();
6289
- scopedEventBus.subscribe({ category: EventCategory.DeviceBindingsChanged }, (e) => {
6260
+ scopedEventBus.subscribe({ category: EventCategory$1.DeviceBindingsChanged }, (e) => {
6290
6261
  const data = e.data ?? {};
6291
6262
  if (typeof data.deviceId === "number") {
6292
6263
  bindingCache.delete(data.deviceId);
@@ -6313,16 +6284,25 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
6313
6284
  };
6314
6285
  const writeBlob = async (coll, key, value, namespace) => {
6315
6286
  if (!settingsApi) return;
6316
- await settingsApi.set.mutate(namespace !== void 0 ? {
6317
- namespace,
6318
- collection: coll,
6319
- key,
6320
- value
6321
- } : {
6322
- collection: coll,
6323
- key,
6324
- value
6325
- });
6287
+ try {
6288
+ await settingsApi.set.mutate(namespace !== void 0 ? {
6289
+ namespace,
6290
+ collection: coll,
6291
+ key,
6292
+ value
6293
+ } : {
6294
+ collection: coll,
6295
+ key,
6296
+ value
6297
+ });
6298
+ } catch (err) {
6299
+ const isTrpcError = err instanceof TRPCClientError;
6300
+ scopedLogger.warn(`settings write failed (${coll}/${key}) — ${isTrpcError ? "transport error" : "store error"}`, { meta: {
6301
+ collection: coll,
6302
+ key,
6303
+ error: errMsg$1(err)
6304
+ } });
6305
+ }
6326
6306
  };
6327
6307
  const rmwChains = /* @__PURE__ */ new Map();
6328
6308
  const serializeRmw = (coll, key, op) => {
@@ -6331,7 +6311,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
6331
6311
  rmwChains.set(chainKey, next);
6332
6312
  next.finally(() => {
6333
6313
  if (rmwChains.get(chainKey) === next) rmwChains.delete(chainKey);
6334
- });
6314
+ }).catch(() => void 0);
6335
6315
  return next;
6336
6316
  };
6337
6317
  const settingsView = {
@@ -6566,4 +6546,4 @@ async function installManifestPythonDeps(declaration, addonDir, deps, logger) {
6566
6546
  await deps.installPythonRequirements(reqAbs);
6567
6547
  }
6568
6548
  //#endregion
6569
- export { setWorkerNativeCapsChangeListener as $, createUdsLoggerWithControl as A, createLocalTransport as B, ipcParentLink as C, createUdsEventBus as D, createUdsEventBridge as E, CapRouteError as F, FrameDecoder as G, UdsLocalTransportServer as H, classifyCapRoute as I, buildUdsNativeCapProxy as J, encodeFrame as K, LocalChildClient as L, AGENT_CAP_FWD_SERVICE as M, CapRouteResolver as N, udsChildLogToWorkerEntry as O, callWithServiceDiscovery as P, mountNativeCapService as Q, LocalChildRegistry as R, ipcChildLink as S, createParentUnownedCallHandler as T, SocketChannel as U, UdsLocalTransportClient as V, localEndpointPath as W, getWorkerNativeCapProvider as X, createBrokerDeviceManagerApi as Y, getWorkerNativeCapSnapshot as Z, __resetCapUsageRegistryForTests as _, getWorkerDeviceRegistry as a, capBareAction as at, brokerTransportLink as b, setHubConnected as c, deserializeTypedArrays as ct, registerEventBusService as d, CustomActionRegistry as dt, createAddonService as et, AddonDepsManager as f, CapabilityHandle as ft, CapUsageRegistry as g, createHwAccelService as h, resolveAddonClass as ht, createUdsAddonContext as i, capActionSuffix as it, AGENT_CAP_FWD_ACTION as j, createUdsLogger as k, EVENT_TOPIC_PREFIX as l, serializeTypedArrays as lt, resolveHwAccel as m, installManifestNativeDeps as mt, adaptBrokerToCluster as n, NATIVE_PROVIDER_SERVICE_INFIX as nt, getOrInitReadinessRegistry as o, capServiceName as ot, createKernelHwAccel as p, CapabilityUnavailableError as pt, buildNativeCapProxy as q, createAddonContext as r, capActionName as rt, getOrInitReadinessRegistryForClient as s, parseCapAction as st, installManifestPythonDeps as t, validateProviderRegistrations as tt, getBrokerEventBus as u, DeviceRegistry as ut, getCapUsageRegistry as v, localProviderLink as w, buildLinkChain as x, brokerCallForCap as y, UDS_NO_ROUTE_PREFIX as z };
6549
+ export { setWorkerNativeCapsChangeListener as $, createUdsLoggerWithControl as A, createLocalTransport as B, ipcParentLink as C, createUdsEventBus as D, createUdsEventBridge as E, CapRouteError as F, FrameDecoder as G, UdsLocalTransportServer as H, classifyCapRoute as I, buildUdsNativeCapProxy as J, encodeFrame as K, LocalChildClient as L, AGENT_CAP_FWD_SERVICE as M, CapRouteResolver as N, udsChildLogToWorkerEntry as O, callWithServiceDiscovery as P, mountNativeCapService as Q, LocalChildRegistry as R, ipcChildLink as S, createParentUnownedCallHandler as T, SocketChannel as U, UdsLocalTransportClient as V, localEndpointPath as W, getWorkerNativeCapProvider as X, createBrokerDeviceManagerApi as Y, getWorkerNativeCapSnapshot as Z, __resetCapUsageRegistryForTests as _, getWorkerDeviceRegistry as a, capBareAction as at, brokerTransportLink as b, setHubConnected as c, deserializeTypedArrays as ct, registerEventBusService as d, CapabilityHandle as dt, createAddonService as et, AddonDepsManager as f, CapabilityUnavailableError as ft, CapUsageRegistry as g, createHwAccelService as h, createUdsAddonContext as i, capActionSuffix as it, AGENT_CAP_FWD_ACTION as j, createUdsLogger as k, EVENT_TOPIC_PREFIX as l, serializeTypedArrays as lt, resolveHwAccel as m, resolveAddonClass as mt, adaptBrokerToCluster as n, NATIVE_PROVIDER_SERVICE_INFIX as nt, getOrInitReadinessRegistry as o, capServiceName as ot, createKernelHwAccel as p, installManifestNativeDeps as pt, buildNativeCapProxy as q, createAddonContext as r, capActionName as rt, getOrInitReadinessRegistryForClient as s, parseCapAction as st, installManifestPythonDeps as t, validateProviderRegistrations as tt, getBrokerEventBus as u, DeviceRegistry as ut, getCapUsageRegistry as v, localProviderLink as w, buildLinkChain as x, brokerCallForCap as y, UDS_NO_ROUTE_PREFIX as z };