@camstack/server 1.2.822 → 1.2.824

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 (109) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/api/trpc/generated-cap-routers.js +0 -45
  3. package/package.json +11 -11
  4. package/system/dist/addon-runner.js +42 -15
  5. package/system/dist/addon-runner.mjs +43 -16
  6. package/system/dist/addon-utils.d.ts +1 -0
  7. package/system/dist/addon-utils.js +2 -0
  8. package/system/dist/addon-utils.mjs +2 -1
  9. package/system/dist/{agent-https-SGBI0xP8.js → agent-https-B2nqARmj.js} +1 -1
  10. package/system/dist/{agent-https-C4yxMErF.mjs → agent-https-BBO2OtNH.mjs} +1 -1
  11. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  12. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  13. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  14. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  15. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  16. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  17. package/system/dist/builtins/autotrack/index.js +1 -1
  18. package/system/dist/builtins/autotrack/index.mjs +1 -1
  19. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  20. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  21. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  22. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  23. package/system/dist/builtins/camera-grid/index.js +1 -1
  24. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  25. package/system/dist/builtins/composer/composed-device-set.d.ts +5 -1
  26. package/system/dist/builtins/composer/composed-device.d.ts +4 -0
  27. package/system/dist/builtins/composer/composed-name.d.ts +30 -0
  28. package/system/dist/builtins/composer/composer.addon.js +94 -6
  29. package/system/dist/builtins/composer/composer.addon.mjs +94 -6
  30. package/system/dist/builtins/composer/composer.d.ts +13 -0
  31. package/system/dist/builtins/console-logging/index.js +1 -1
  32. package/system/dist/builtins/console-logging/index.mjs +1 -1
  33. package/system/dist/builtins/core-blocks/actions-service.d.ts +8 -0
  34. package/system/dist/builtins/core-blocks/composition-api.d.ts +6 -0
  35. package/system/dist/builtins/core-blocks/core-blocks.addon.js +143 -23
  36. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +144 -24
  37. package/system/dist/builtins/core-blocks/record-kinds.d.ts +1 -0
  38. package/system/dist/builtins/core-blocks/rename-composition-block.d.ts +16 -0
  39. package/system/dist/builtins/core-blocks/sync-composed-device-name.d.ts +19 -0
  40. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  41. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  42. package/system/dist/builtins/device-manager/device-manager.addon.js +43 -4
  43. package/system/dist/builtins/device-manager/device-manager.addon.mjs +43 -4
  44. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  45. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  46. package/system/dist/builtins/keychain/index.js +4 -4
  47. package/system/dist/builtins/keychain/index.mjs +4 -4
  48. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  49. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  50. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  51. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  52. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  53. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  54. package/system/dist/builtins/loki-logging/index.js +1 -1
  55. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  56. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  57. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  58. package/system/dist/builtins/platform-probe/index.js +1 -1
  59. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  60. package/system/dist/builtins/record-entries/index.js +1 -1
  61. package/system/dist/builtins/record-entries/index.mjs +1 -1
  62. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  63. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  64. package/system/dist/builtins/snapshot/index.js +1 -1
  65. package/system/dist/builtins/snapshot/index.mjs +1 -1
  66. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  67. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  68. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  69. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  70. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  71. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  72. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  73. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  74. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  75. package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
  76. package/system/dist/builtins/winston-logging/index.js +1 -1
  77. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  78. package/system/dist/cap-call-scope-8eiugfLl.js +46 -0
  79. package/system/dist/cap-call-scope-Bic6Ekfw.mjs +30 -0
  80. package/system/dist/{capture-engine-BSjE-CQA.mjs → capture-engine-C-rHYVFq.mjs} +1 -1
  81. package/system/dist/{capture-engine-6MVUyUry.js → capture-engine-DP4HbT3W.js} +1 -1
  82. package/system/dist/{composition-sources-C8T9DRbZ.mjs → composition-sources-CL9JFN4y.mjs} +1 -1
  83. package/system/dist/{composition-sources-BBAOXZdC.js → composition-sources-CM9c_jAj.js} +1 -1
  84. package/system/dist/{constants-CReG6K4k.mjs → constants-DzGFnCKZ.mjs} +1 -1
  85. package/system/dist/{constants-v0g9--wN.js → constants-jk7JccZ0.js} +1 -1
  86. package/system/dist/{device-ca-BFcBTfff.js → device-ca-B7_R5WJh.js} +1 -1
  87. package/system/dist/{device-ca-cX8qUs2s.mjs → device-ca-DZ_OQiCc.mjs} +1 -1
  88. package/system/dist/{dist-DjBZ1HhF.mjs → dist-BgRMQHuL.mjs} +171 -184
  89. package/system/dist/{dist-C2czR9xK.js → dist-BpTL3uNe.js} +188 -183
  90. package/system/dist/file-host-worker.js +1 -1
  91. package/system/dist/file-host-worker.mjs +1 -1
  92. package/system/dist/{hub-mdns-ciao-Cnr8xiSd.mjs → hub-mdns-ciao-DIcBingB.mjs} +2 -2
  93. package/system/dist/{hub-mdns-ciao-CpCleue0.js → hub-mdns-ciao-DPUaYAD3.js} +2 -2
  94. package/system/dist/index.d.ts +1 -0
  95. package/system/dist/index.js +65 -42
  96. package/system/dist/index.mjs +64 -44
  97. package/system/dist/kernel/cap-call-scope.d.ts +10 -0
  98. package/system/dist/kernel/transport/cap-route-resolver.d.ts +27 -1
  99. package/system/dist/kernel/transport/child-cap-protocol.d.ts +1 -1
  100. package/system/dist/kernel/transport/parent-unowned-call.d.ts +0 -11
  101. package/system/dist/{legacy-integration-rows-door-CGajkVPh.mjs → legacy-integration-rows-door-1GnkpMgH.mjs} +1 -1
  102. package/system/dist/{legacy-integration-rows-door-DhW6mPZj.js → legacy-integration-rows-door-DYNePgj4.js} +1 -1
  103. package/system/dist/rename-composition-block-Cp0_nwAI.mjs +101 -0
  104. package/system/dist/rename-composition-block-Dn2z4fnA.js +112 -0
  105. package/system/dist/{restore-archive-eA7L58KT.mjs → restore-archive-B3FEpUfz.mjs} +1 -1
  106. package/system/dist/{restore-archive-BLab80kx.js → restore-archive-BGa5pdp9.js} +1 -1
  107. package/system/dist/{wal-maintenance-DeBxoOFh.mjs → wal-maintenance-BLWLlVfF.mjs} +0 -0
  108. package/system/dist/{wal-maintenance-DhnSF7K-.js → wal-maintenance-GWFxnSnE.js} +0 -0
  109. package/system/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-C2czR9xK.js");
4
- const require_device_ca = require("./device-ca-BFcBTfff.js");
3
+ const require_dist = require("./dist-BpTL3uNe.js");
4
+ const require_device_ca = require("./device-ca-B7_R5WJh.js");
5
5
  const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
6
6
  const require_log_redactor = require("./log-redactor-BhIEMaG9.js");
7
7
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
@@ -13,6 +13,7 @@ require("./builtins/composer/index.js");
13
13
  const require_formatter = require("./formatter-xbxeV4GD.js");
14
14
  const require_builtins_console_logging_index = require("./builtins/console-logging/index.js");
15
15
  const require_prefix_walk = require("./prefix-walk-Dv6MLZlM.js");
16
+ const require_cap_call_scope = require("./cap-call-scope-8eiugfLl.js");
16
17
  const require_builtins_core_blocks_core_blocks_addon = require("./builtins/core-blocks/core-blocks.addon.js");
17
18
  require("./builtins/core-blocks/index.js");
18
19
  const require_builtins_device_manager_device_manager_addon = require("./builtins/device-manager/device-manager.addon.js");
@@ -27,22 +28,22 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
27
28
  const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
28
29
  const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
29
30
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
30
- const require_wal_maintenance = require("./wal-maintenance-DhnSF7K-.js");
31
- const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-DhW6mPZj.js");
31
+ const require_wal_maintenance = require("./wal-maintenance-GWFxnSnE.js");
32
+ const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-DYNePgj4.js");
32
33
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
33
34
  const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
34
35
  const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
35
36
  require("./builtins/storage-orchestrator/index.js");
36
- const require_agent_https = require("./agent-https-SGBI0xP8.js");
37
- const require_constants = require("./constants-v0g9--wN.js");
37
+ const require_agent_https = require("./agent-https-B2nqARmj.js");
38
+ const require_constants = require("./constants-jk7JccZ0.js");
38
39
  const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
39
40
  require("./builtins/system-config/index.js");
40
41
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
41
42
  const require_custom_action_registry = require("./custom-action-registry-CmWpSeMS.js");
42
- const require_hub_mdns_ciao = require("./hub-mdns-ciao-CpCleue0.js");
43
+ const require_hub_mdns_ciao = require("./hub-mdns-ciao-DPUaYAD3.js");
43
44
  const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
44
45
  const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
45
- const require_restore_archive = require("./restore-archive-BLab80kx.js");
46
+ const require_restore_archive = require("./restore-archive-BGa5pdp9.js");
46
47
  const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
47
48
  let zod = require("zod");
48
49
  let node_crypto = require("node:crypto");
@@ -16942,18 +16943,22 @@ function createBrokerDeviceManagerApi(opts) {
16942
16943
  create: async (stableId, DeviceClass, config, parentDeviceId = null, initialMeta = void 0) => {
16943
16944
  const id = await deviceApi.allocateDeviceId(stableId);
16944
16945
  if (initialMeta) {
16945
- if (initialMeta.name !== void 0) await callDeviceManager(api, "setName", {
16946
- deviceId: id,
16947
- name: initialMeta.name
16948
- }).catch((err) => {
16949
- opts.logger.warn("create: setName pre-seed failed", {
16950
- tags: {
16951
- stableId,
16952
- deviceId: id
16953
- },
16954
- meta: { error: err instanceof Error ? err.message : String(err) }
16946
+ if (initialMeta.name !== void 0) {
16947
+ const systemName = stableId.startsWith(_camstack_types_addon.COMPOSED_DEVICE_STABLE_ID_PREFIX);
16948
+ await callDeviceManager(api, "setName", {
16949
+ deviceId: id,
16950
+ name: initialMeta.name,
16951
+ ...systemName ? { stampUserNamed: false } : {}
16952
+ }).catch((err) => {
16953
+ opts.logger.warn("create: setName pre-seed failed", {
16954
+ tags: {
16955
+ stableId,
16956
+ deviceId: id
16957
+ },
16958
+ meta: { error: err instanceof Error ? err.message : String(err) }
16959
+ });
16955
16960
  });
16956
- });
16961
+ }
16957
16962
  if (initialMeta.location !== void 0) await callDeviceManager(api, "setLocation", {
16958
16963
  deviceId: id,
16959
16964
  location: initialMeta.location
@@ -17071,10 +17076,11 @@ function createBrokerDeviceManagerApi(opts) {
17071
17076
  });
17072
17077
  return id;
17073
17078
  },
17074
- setName: async (deviceId, name) => {
17079
+ setName: async (deviceId, name, write) => {
17075
17080
  await callDeviceManager(api, "setName", {
17076
17081
  deviceId,
17077
- name
17082
+ name,
17083
+ ...write?.stampUserNamed === false ? { stampUserNamed: false } : {}
17078
17084
  });
17079
17085
  },
17080
17086
  setLocation: async (deviceId, location) => {
@@ -17865,9 +17871,9 @@ var CapRouteResolver = class {
17865
17871
  * {@link CapCallInput.callerAddonId} so the child can stamp before invoke
17866
17872
  * (without it, `stampCallerAddonId` strips an args-only claim).
17867
17873
  */
17868
- async dispatch(route, method, args, addonId, callerAddonId) {
17874
+ async dispatch(route, method, args, addonId, callerAddonId, origin) {
17869
17875
  try {
17870
- return await this.dispatchInner(route, method, args, addonId, callerAddonId);
17876
+ return await this.dispatchInner(route, method, args, addonId, callerAddonId, origin);
17871
17877
  } catch (err) {
17872
17878
  if (err instanceof CapRouteError) throw err;
17873
17879
  if (route.kind === "hub-in-process" || err instanceof PeerAnsweredError) throw err;
@@ -17887,9 +17893,13 @@ var CapRouteResolver = class {
17887
17893
  * Inner dispatch: may throw CapRouteError (validation failures) or arbitrary
17888
17894
  * transport errors. The outer `dispatch` wraps non-CapRouteErrors.
17889
17895
  */
17890
- async dispatchInner(route, method, args, addonId, callerAddonId) {
17896
+ async dispatchInner(route, method, args, addonId, callerAddonId, origin) {
17897
+ const carried = origin ?? require_cap_call_scope.readCurrentCommandOrigin();
17891
17898
  switch (route.kind) {
17892
- case "hub-in-process": return route.ref.invoke(method, stampCallerAddonId(args, callerAddonId));
17899
+ case "hub-in-process": {
17900
+ const invoke = () => route.ref.invoke(method, stampCallerAddonId(args, callerAddonId));
17901
+ return carried === void 0 ? invoke() : require_cap_call_scope.runWithCapCallContext((0, _camstack_types_addon.commandOrigin)(carried).context, invoke);
17902
+ }
17893
17903
  case "hub-local-uds": {
17894
17904
  const registry = this.hubLocalRegistry;
17895
17905
  if (registry === null) throw new CapRouteError(route.capName, method, {
@@ -17906,7 +17916,8 @@ var CapRouteResolver = class {
17906
17916
  method,
17907
17917
  args,
17908
17918
  ...deviceId !== void 0 ? { deviceId } : {},
17909
- ...wireCaller !== void 0 ? { callerAddonId: wireCaller } : {}
17919
+ ...wireCaller !== void 0 ? { callerAddonId: wireCaller } : {},
17920
+ ...carried !== void 0 ? { origin: carried } : {}
17910
17921
  };
17911
17922
  return registry.callCapOnChild(route.childId, input);
17912
17923
  }
@@ -21032,7 +21043,8 @@ var LocalChildRegistry = class {
21032
21043
  args: input.args,
21033
21044
  ...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {},
21034
21045
  ...input.addonId !== void 0 ? { addonId: input.addonId } : {},
21035
- ...input.callerAddonId !== void 0 ? { callerAddonId: input.callerAddonId } : {}
21046
+ ...input.callerAddonId !== void 0 ? { callerAddonId: input.callerAddonId } : {},
21047
+ ...input.origin !== void 0 ? { origin: input.origin } : {}
21036
21048
  };
21037
21049
  }
21038
21050
  listChildren() {
@@ -21290,6 +21302,7 @@ var LocalChildRegistry = class {
21290
21302
  args: materialise(),
21291
21303
  ...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {},
21292
21304
  ...out.nodeId !== void 0 ? { nodeId: out.nodeId } : {},
21305
+ ...out.origin !== void 0 ? { origin: out.origin } : {},
21293
21306
  ...out.native === true ? { native: true } : {},
21294
21307
  ...callerStamp !== null ? { callerAddonId: callerStamp } : {}
21295
21308
  });
@@ -21582,7 +21595,8 @@ var LocalChildClient = class {
21582
21595
  args,
21583
21596
  ...msg.deviceId !== void 0 ? { deviceId: msg.deviceId } : {},
21584
21597
  ...msg.addonId !== void 0 ? { addonId: msg.addonId } : {},
21585
- ...msg.callerAddonId !== void 0 ? { callerAddonId: msg.callerAddonId } : {}
21598
+ ...msg.callerAddonId !== void 0 ? { callerAddonId: msg.callerAddonId } : {},
21599
+ ...msg.origin !== void 0 ? { origin: msg.origin } : {}
21586
21600
  });
21587
21601
  if (payload !== void 0 && result !== void 0) return new PayloadReply(void 0, packPayload(result));
21588
21602
  return result;
@@ -22015,6 +22029,12 @@ var delay$1 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
22015
22029
  * - surfaces a clear error when the call is genuinely unroutable (so the
22016
22030
  * child's call rejects rather than hanging).
22017
22031
  */
22032
+ /** Resolver dispatch that keeps a 3-arg call when the frame carried nothing extra. */
22033
+ function dispatchInbound(resolver, route, input) {
22034
+ if (input.origin !== void 0) return resolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId, input.origin);
22035
+ if (input.callerAddonId !== void 0) return resolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId);
22036
+ return resolver.dispatch(route, input.method, input.args);
22037
+ }
22018
22038
  function createParentUnownedCallHandler(deps) {
22019
22039
  return async (input) => {
22020
22040
  const argDeviceId = input.deviceId ?? extractDeviceId(input.args);
@@ -22066,11 +22086,10 @@ function createParentUnownedCallHandler(deps) {
22066
22086
  }
22067
22087
  const resolver = deps.getResolver();
22068
22088
  if (resolver !== null) try {
22069
- const route = resolver.resolveCapRoute(input.capName, {
22089
+ return await dispatchInbound(resolver, resolver.resolveCapRoute(input.capName, {
22070
22090
  ...nodeId !== void 0 ? { nodeId } : {},
22071
22091
  ...deviceId !== void 0 ? { deviceId } : {}
22072
- });
22073
- return input.callerAddonId !== void 0 ? await resolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId) : await resolver.dispatch(route, input.method, input.args);
22092
+ }), input);
22074
22093
  } catch (err) {
22075
22094
  if (!(err instanceof CapRouteError) || err.reason !== "no-provider") throw err;
22076
22095
  }
@@ -22122,11 +22141,10 @@ function createParentUnownedCallHandler(deps) {
22122
22141
  await delay$1(ADDON_CAP_RETRY_DELAY_MS);
22123
22142
  const retryResolver = deps.getResolver();
22124
22143
  if (retryResolver !== null) try {
22125
- const route = retryResolver.resolveCapRoute(input.capName, {
22144
+ return await dispatchInbound(retryResolver, retryResolver.resolveCapRoute(input.capName, {
22126
22145
  ...nodeId !== void 0 ? { nodeId } : {},
22127
22146
  ...deviceId !== void 0 ? { deviceId } : {}
22128
- });
22129
- return input.callerAddonId !== void 0 ? await retryResolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId) : await retryResolver.dispatch(route, input.method, input.args);
22147
+ }), input);
22130
22148
  } catch (err) {
22131
22149
  if (!(err instanceof CapRouteError) || err.reason !== "no-provider") throw err;
22132
22150
  }
@@ -22528,14 +22546,16 @@ function deviceCapResolverLink(dispatch, isDeviceScoped) {
22528
22546
  const deviceId = input !== null && typeof input === "object" ? Reflect.get(input, "deviceId") : void 0;
22529
22547
  if (typeof deviceId !== "number" || !Number.isFinite(deviceId)) return next(op);
22530
22548
  return require_builtins_device_manager_device_manager_addon.observable((observer) => {
22531
- dispatch(parsed.capName, parsed.method, input).then((data) => {
22532
- observer.next({ result: {
22533
- type: "data",
22534
- data
22535
- } });
22536
- observer.complete();
22537
- }).catch((cause) => {
22538
- observer.error(_trpc_client.TRPCClientError.from(cause instanceof Error ? cause : new Error(String(cause))));
22549
+ require_cap_call_scope.runWithCapCallContext(op.context, () => {
22550
+ dispatch(parsed.capName, parsed.method, input).then((data) => {
22551
+ observer.next({ result: {
22552
+ type: "data",
22553
+ data
22554
+ } });
22555
+ observer.complete();
22556
+ }).catch((cause) => {
22557
+ observer.error(_trpc_client.TRPCClientError.from(cause instanceof Error ? cause : new Error(String(cause))));
22558
+ });
22539
22559
  });
22540
22560
  return () => {};
22541
22561
  });
@@ -28806,6 +28826,7 @@ exports.createUdsLogger = createUdsLogger;
28806
28826
  exports.createUdsLoggerWithControl = createUdsLoggerWithControl;
28807
28827
  exports.createV8Reclaimer = createV8Reclaimer;
28808
28828
  exports.currentBrokerTransporter = currentBrokerTransporter;
28829
+ exports.currentCapCallContext = require_cap_call_scope.currentCapCallContext;
28809
28830
  exports.decideAddonVersionMove = decideAddonVersionMove;
28810
28831
  exports.deleteModelFromDisk = require_custom_action_registry.deleteModelFromDisk;
28811
28832
  exports.deriveAgentListenPort = deriveAgentListenPort;
@@ -29030,6 +29051,7 @@ Object.defineProperty(exports, "readAllRows", {
29030
29051
  });
29031
29052
  exports.readBackupEncryptionHeader = require_restore_archive.readBackupEncryptionHeader;
29032
29053
  exports.readCidrSetting = require_builtins_system_config_system_config_addon.readCidrSetting;
29054
+ exports.readCurrentCommandOrigin = require_cap_call_scope.readCurrentCommandOrigin;
29033
29055
  exports.readExtraSans = require_hub_mdns_ciao.readExtraSans;
29034
29056
  exports.readHeapSpaces = readHeapSpaces;
29035
29057
  exports.readLanHttpState = require_hub_mdns_ciao.readLanHttpState;
@@ -29068,6 +29090,7 @@ exports.revokeMeshCertificate = require_builtins_system_config_system_config_add
29068
29090
  exports.runHubAddonBoot = runHubAddonBoot;
29069
29091
  exports.runNpm = runNpm;
29070
29092
  exports.runObservedCommand = require_builtins_device_manager_device_manager_addon.runObservedCommand;
29093
+ exports.runWithCapCallContext = require_cap_call_scope.runWithCapCallContext;
29071
29094
  exports.sampleSocketDirection = sampleSocketDirection;
29072
29095
  exports.scheduleSelfRestart = scheduleSelfRestart;
29073
29096
  exports.scopeKey = require_dist.scopeKey;
@@ -1,6 +1,6 @@
1
1
  import { i as __require } from "./chunk-CNf5ZN-e.mjs";
2
- import { Bc as resolveCapMount, Ci as looseSchema, Ct as LOG_LEVEL_RANK, D as CatalogFileSchema, Ds as RUNTIME_DEFAULTS, En as bareAddonId, Fc as parseJsonObject, Ft as PackageRequiresSchema, Gs as asString$1, Hc as scopeKey, Hi as objectInputDeclaresRequiredDeviceId, Ia as scopesAllowAddon, Ic as parseJsonUnknown, Ja as splitTranslationRef, La as scopesAllowDeviceCap, Os as ReadinessRegistry, Pr as extractNestedAddonId, Qc as withoutCallerStamp, Qs as collectSecretMarkerRefs, Rc as readinessKey, Si as logLevelAtMost, Us as asJsonObject$1, Vi as objectInputDeclaresAddonId, Ws as asNumber, Xc as userError, Zr as interpolate, _n as addonSettingsCapability, a as AGENT_MDNS_SERVICE_TYPE, b as CATALOG_LANGS, cc as emitDownForOwnedCaps, cs as CALLER_STAMPED_CAPABILITIES$1, dc as expandCapMethods, ds as DEVICE_STATUS_METHOD, hi as lifecycleJobSchema, hr as describeUnmet, il as EventCategory$1, ks as ReadinessTimeoutError, li as isVoidInput, ls as DATAPLANE_SECRET_HEADER$1, nc as createEvent$1, ni as isCollectionArrayMethod, nl as errMsg$1, o as AGENT_MDNS_TXT_KEYS, pc as getDebugInterest, po as unmetRequirements, qn as compareVersions, ra as procedureAuthKey, ro as supportedRuntimes, s as ALL_CAPABILITY_DEFINITIONS, sc as defineRecordKinds, si as isObjectInput, ti as isArrayOutputSchema, ui as kebabToCamel$1, us as DEVICE_SETTINGS_CONTRIBUTION_METHODS, vc as isDebugChannelName, wa as resolveMethodAuth, wt as METHOD_ACCESS_MAP } from "./dist-DjBZ1HhF.mjs";
3
- import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-cX8qUs2s.mjs";
2
+ import { $s as collectSecretMarkerRefs, As as ReadinessTimeoutError, Ci as logLevelAtMost, Dn as bareAddonId, Fr as extractNestedAddonId, Gs as asNumber, Hi as objectInputDeclaresAddonId, Ic as parseJsonObject, It as PackageRequiresSchema, Jn as compareVersions, Ks as asString$1, La as scopesAllowAddon, Lc as parseJsonUnknown, O as CatalogFileSchema, Os as RUNTIME_DEFAULTS, Qc as userError, Qr as interpolate, Ra as scopesAllowDeviceCap, Ta as resolveMethodAuth, Tt as METHOD_ACCESS_MAP, Ui as objectInputDeclaresRequiredDeviceId, Vc as resolveCapMount, Wc as scopeKey, Ws as asJsonObject$1, Ya as splitTranslationRef, a as AGENT_MDNS_SERVICE_TYPE, al as errMsg$1, cc as defineRecordKinds, ci as isObjectInput, di as kebabToCamel$1, ds as DEVICE_SETTINGS_CONTRIBUTION_METHODS, el as withoutCallerStamp, fc as expandCapMethods, fs as DEVICE_STATUS_METHOD, gi as lifecycleJobSchema, gr as describeUnmet, ia as procedureAuthKey, io as supportedRuntimes, ks as ReadinessRegistry, lc as emitDownForOwnedCaps, ls as CALLER_STAMPED_CAPABILITIES$1, mc as getDebugInterest, mo as unmetRequirements, ni as isArrayOutputSchema, o as AGENT_MDNS_TXT_KEYS, rc as createEvent$1, ri as isCollectionArrayMethod, s as ALL_CAPABILITY_DEFINITIONS, sl as EventCategory$1, ui as isVoidInput, us as DATAPLANE_SECRET_HEADER$1, vn as addonSettingsCapability, wi as looseSchema, wt as LOG_LEVEL_RANK, x as CATALOG_LANGS, yc as isDebugChannelName, zc as readinessKey } from "./dist-BgRMQHuL.mjs";
3
+ import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-DZ_OQiCc.mjs";
4
4
  import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
5
5
  import { a as redactLogText, i as redactLogMeta, r as redactLogEntry, t as isCredentialKeyName } from "./log-redactor-XLDrPzOi.mjs";
6
6
  import { AlertCenterAddon, n as lastCauseAfterChunk, r as readRunnerDisplayName, t as CRASH_BREAKER_ERROR_PREFIX } from "./builtins/alerts/alerts.addon.mjs";
@@ -12,6 +12,7 @@ import "./builtins/composer/index.mjs";
12
12
  import { t as formatLogLine } from "./formatter-DkYZ4LXp.mjs";
13
13
  import { ConsoleDestination, ConsoleLoggingAddon } from "./builtins/console-logging/index.mjs";
14
14
  import { t as loadPrefixed } from "./prefix-walk-DAOBSyH1.mjs";
15
+ import { n as readCurrentCommandOrigin, r as runWithCapCallContext, t as currentCapCallContext } from "./cap-call-scope-Bic6Ekfw.mjs";
15
16
  import { CoreBlocksAddon, c as readUnscopedAddonSettings, o as clearNodeSettings, s as createAddonSettingsStore } from "./builtins/core-blocks/core-blocks.addon.mjs";
16
17
  import "./builtins/core-blocks/index.mjs";
17
18
  import { DeviceManagerAddon, a as commandObserverLink, c as runObservedCommand, d as readDeviceOrThrow, f as setWrapperActive, i as commandActorFromContext, l as observable, n as __resetCommandObserverRegistryForTests, o as getCommandObserverRegistry, r as addonCommandActor, s as reportCommand, t as CommandObserverRegistry, u as createDeviceSettingsStore } from "./builtins/device-manager/device-manager.addon.mjs";
@@ -26,22 +27,22 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
26
27
  import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
27
28
  import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
28
29
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
29
- import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-DeBxoOFh.mjs";
30
- import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-CGajkVPh.mjs";
30
+ import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-BLWLlVfF.mjs";
31
+ import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-1GnkpMgH.mjs";
31
32
  import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
32
33
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
33
34
  import { StorageOrchestratorAddon, a as createHubCapForwardService, i as HUB_CAP_FWD_SERVICE, o as stripForwardedCaller, r as HUB_CAP_FWD_ACTION, s as buildStorageLocationRegistry, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
34
35
  import "./builtins/storage-orchestrator/index.mjs";
35
- import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-C4yxMErF.mjs";
36
- import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-CReG6K4k.mjs";
36
+ import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-BBO2OtNH.mjs";
37
+ import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-DzGFnCKZ.mjs";
37
38
  import { $ as caFingerprintCompact, A as getProcessNodeMeshTransport, B as MESH_NODE_CERTIFICATES_COLLECTION, C as MESH_TLS_PORT_HELLO_FIELD, Ct as readOriginSetting, D as setProcessMeshTlsEnabler, Dt as readCidrSetting, E as ServiceBroker, Et as parseCidrList, F as renewMeshCertificate, G as getProcessMeshCertificateRegistry, H as MeshCertificateRegistry, I as revokeMeshCertificate, J as processMeshCrl, K as setProcessMeshCertificateRegistry, L as getProcessMeshTlsListenerState, M as isProcessVerifiedMeshPeer, N as onProcessNodeRegistered, O as dropProcessPeer, P as setProcessMeshPeerTransportLookup, Q as caFingerprint, R as openMeshTlsWhenRevocationsLoaded, S as verifyMembershipAnswer, St as parseOriginList, SystemConfigAddon, T as Errors, Tt as normalizeIp, U as RENEWAL_ABANDONED, V as MESH_NODE_CERTIFICATES_COLUMNS, W as describeMeshLeaf, X as getProcessMeshCaState, Y as MeshCaKeeper, Z as requireProcessMeshCa, _ as signPairingProof, _t as verifyAgentUiUnlockTicket, a as hubHostFromMeshAddress, at as issueMeshLeafForNode, b as MembershipResponder, bt as isInsecureOrigin, c as PAIRING_MAX_SESSIONS, ct as AGENT_DASHBOARD_ORIGINS_FIELD, d as PAIRING_PROTOCOL, dt as AGENT_UI_UNLOCK_USE, et as createMeshCsrPem, f as PAIRING_TTL_MS, ft as AGENT_UI_UNLOCK_VERSION, g as keyFingerprintShort, gt as parseAgentDashboardOrigins, h as describeCsr, ht as mintAgentUiUnlockTicket, i as AgentPairing, it as isValidAgentNodeId, j as getProcessPeerLeaf, k as emitProcessNodeRegistered, l as PAIRING_PATHS, lt as AGENT_UI_UNLOCK_TTL_MS, m as computePairingSas, mt as isAllowedAgentDashboardReturnTo, n as HubPairing, nt as generateMeshCa, o as PAIRING_CODE_DIGITS, ot as issueMeshLeafFromCsr, p as computePairingCommitment, pt as UnlockTicketJtiStore, q as MeshCrl, r as PairingHttpError, rt as generateMeshKeyPair, s as PAIRING_MAX_CODE_ATTEMPTS, st as loadMeshCa, tt as exportMeshPrivateKeyPem, u as PAIRING_PIN_DIGITS, ut as AGENT_UI_UNLOCK_TYP, v as verifyPairingProof, vt as InvalidCorsOriginError, w as TlsTcpTransporter, wt as createCidrMatcher, x as signMembershipProof, xt as normalizeOrigin, y as MEMBERSHIP_PATHS, yt as OPAQUE_ORIGIN, z as setProcessMeshTlsListenerState } from "./builtins/system-config/system-config.addon.mjs";
38
39
  import "./builtins/system-config/index.mjs";
39
40
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
40
41
  import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-B9zFBNVa.mjs";
41
- import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-Cnr8xiSd.mjs";
42
+ import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-DIcBingB.mjs";
42
43
  import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
43
44
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
44
- import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-eA7L58KT.mjs";
45
+ import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-B3FEpUfz.mjs";
45
46
  import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
46
47
  import { z } from "zod";
47
48
  import * as crypto$1 from "node:crypto";
@@ -52,7 +53,7 @@ import * as fs$1 from "node:fs";
52
53
  import { accessSync, constants, createReadStream, createWriteStream, existsSync, readFileSync, readdirSync } from "node:fs";
53
54
  import * as path$1 from "node:path";
54
55
  import { basename, dirname, isAbsolute, join, resolve } from "node:path";
55
- import { BOOT_RECOVERY_BACKOFF_MS, CALLER_STAMPED_CAPABILITIES, CAP_METHOD_TIMEOUTS_MS, COLLECTION_ARRAY_METHODS, CommandOriginClaimSchema, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, ErrorI18nPayloadSchema, EventCategory, MIGRATION_API_VERSION, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, ReadinessRegistry as ReadinessRegistry$1, addonSliceHandleApi, asJsonObject, asString, collectZodSecretPaths, createDebugEmitter, createDeviceProxy, createEvent, createEventBusSliceSource, createRecordsAccess, createSecretsAccess, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods as expandCapMethods$1, isCommand, readCommandOrigin, readErrorI18n, readNodePin, resolveDeviceSettings, scopeKey as scopeKey$1, sleep, withCapInputDefaults } from "@camstack/types/addon";
56
+ import { BOOT_RECOVERY_BACKOFF_MS, CALLER_STAMPED_CAPABILITIES, CAP_METHOD_TIMEOUTS_MS, COLLECTION_ARRAY_METHODS, COMPOSED_DEVICE_STABLE_ID_PREFIX, CommandOriginClaimSchema, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, ErrorI18nPayloadSchema, EventCategory, MIGRATION_API_VERSION, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, ReadinessRegistry as ReadinessRegistry$1, addonSliceHandleApi, asJsonObject, asString, collectZodSecretPaths, commandOrigin, createDebugEmitter, createDeviceProxy, createEvent, createEventBusSliceSource, createRecordsAccess, createSecretsAccess, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods as expandCapMethods$1, isCommand, readCommandOrigin, readErrorI18n, readNodePin, resolveDeviceSettings, scopeKey as scopeKey$1, sleep, withCapInputDefaults } from "@camstack/types/addon";
56
57
  import { mkdir, rm, stat, unlink } from "node:fs/promises";
57
58
  import * as util from "node:util";
58
59
  import { promisify } from "node:util";
@@ -16938,18 +16939,22 @@ function createBrokerDeviceManagerApi(opts) {
16938
16939
  create: async (stableId, DeviceClass, config, parentDeviceId = null, initialMeta = void 0) => {
16939
16940
  const id = await deviceApi.allocateDeviceId(stableId);
16940
16941
  if (initialMeta) {
16941
- if (initialMeta.name !== void 0) await callDeviceManager(api, "setName", {
16942
- deviceId: id,
16943
- name: initialMeta.name
16944
- }).catch((err) => {
16945
- opts.logger.warn("create: setName pre-seed failed", {
16946
- tags: {
16947
- stableId,
16948
- deviceId: id
16949
- },
16950
- meta: { error: err instanceof Error ? err.message : String(err) }
16942
+ if (initialMeta.name !== void 0) {
16943
+ const systemName = stableId.startsWith(COMPOSED_DEVICE_STABLE_ID_PREFIX);
16944
+ await callDeviceManager(api, "setName", {
16945
+ deviceId: id,
16946
+ name: initialMeta.name,
16947
+ ...systemName ? { stampUserNamed: false } : {}
16948
+ }).catch((err) => {
16949
+ opts.logger.warn("create: setName pre-seed failed", {
16950
+ tags: {
16951
+ stableId,
16952
+ deviceId: id
16953
+ },
16954
+ meta: { error: err instanceof Error ? err.message : String(err) }
16955
+ });
16951
16956
  });
16952
- });
16957
+ }
16953
16958
  if (initialMeta.location !== void 0) await callDeviceManager(api, "setLocation", {
16954
16959
  deviceId: id,
16955
16960
  location: initialMeta.location
@@ -17067,10 +17072,11 @@ function createBrokerDeviceManagerApi(opts) {
17067
17072
  });
17068
17073
  return id;
17069
17074
  },
17070
- setName: async (deviceId, name) => {
17075
+ setName: async (deviceId, name, write) => {
17071
17076
  await callDeviceManager(api, "setName", {
17072
17077
  deviceId,
17073
- name
17078
+ name,
17079
+ ...write?.stampUserNamed === false ? { stampUserNamed: false } : {}
17074
17080
  });
17075
17081
  },
17076
17082
  setLocation: async (deviceId, location) => {
@@ -17861,9 +17867,9 @@ var CapRouteResolver = class {
17861
17867
  * {@link CapCallInput.callerAddonId} so the child can stamp before invoke
17862
17868
  * (without it, `stampCallerAddonId` strips an args-only claim).
17863
17869
  */
17864
- async dispatch(route, method, args, addonId, callerAddonId) {
17870
+ async dispatch(route, method, args, addonId, callerAddonId, origin) {
17865
17871
  try {
17866
- return await this.dispatchInner(route, method, args, addonId, callerAddonId);
17872
+ return await this.dispatchInner(route, method, args, addonId, callerAddonId, origin);
17867
17873
  } catch (err) {
17868
17874
  if (err instanceof CapRouteError) throw err;
17869
17875
  if (route.kind === "hub-in-process" || err instanceof PeerAnsweredError) throw err;
@@ -17883,9 +17889,13 @@ var CapRouteResolver = class {
17883
17889
  * Inner dispatch: may throw CapRouteError (validation failures) or arbitrary
17884
17890
  * transport errors. The outer `dispatch` wraps non-CapRouteErrors.
17885
17891
  */
17886
- async dispatchInner(route, method, args, addonId, callerAddonId) {
17892
+ async dispatchInner(route, method, args, addonId, callerAddonId, origin) {
17893
+ const carried = origin ?? readCurrentCommandOrigin();
17887
17894
  switch (route.kind) {
17888
- case "hub-in-process": return route.ref.invoke(method, stampCallerAddonId(args, callerAddonId));
17895
+ case "hub-in-process": {
17896
+ const invoke = () => route.ref.invoke(method, stampCallerAddonId(args, callerAddonId));
17897
+ return carried === void 0 ? invoke() : runWithCapCallContext(commandOrigin(carried).context, invoke);
17898
+ }
17889
17899
  case "hub-local-uds": {
17890
17900
  const registry = this.hubLocalRegistry;
17891
17901
  if (registry === null) throw new CapRouteError(route.capName, method, {
@@ -17902,7 +17912,8 @@ var CapRouteResolver = class {
17902
17912
  method,
17903
17913
  args,
17904
17914
  ...deviceId !== void 0 ? { deviceId } : {},
17905
- ...wireCaller !== void 0 ? { callerAddonId: wireCaller } : {}
17915
+ ...wireCaller !== void 0 ? { callerAddonId: wireCaller } : {},
17916
+ ...carried !== void 0 ? { origin: carried } : {}
17906
17917
  };
17907
17918
  return registry.callCapOnChild(route.childId, input);
17908
17919
  }
@@ -21028,7 +21039,8 @@ var LocalChildRegistry = class {
21028
21039
  args: input.args,
21029
21040
  ...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {},
21030
21041
  ...input.addonId !== void 0 ? { addonId: input.addonId } : {},
21031
- ...input.callerAddonId !== void 0 ? { callerAddonId: input.callerAddonId } : {}
21042
+ ...input.callerAddonId !== void 0 ? { callerAddonId: input.callerAddonId } : {},
21043
+ ...input.origin !== void 0 ? { origin: input.origin } : {}
21032
21044
  };
21033
21045
  }
21034
21046
  listChildren() {
@@ -21286,6 +21298,7 @@ var LocalChildRegistry = class {
21286
21298
  args: materialise(),
21287
21299
  ...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {},
21288
21300
  ...out.nodeId !== void 0 ? { nodeId: out.nodeId } : {},
21301
+ ...out.origin !== void 0 ? { origin: out.origin } : {},
21289
21302
  ...out.native === true ? { native: true } : {},
21290
21303
  ...callerStamp !== null ? { callerAddonId: callerStamp } : {}
21291
21304
  });
@@ -21578,7 +21591,8 @@ var LocalChildClient = class {
21578
21591
  args,
21579
21592
  ...msg.deviceId !== void 0 ? { deviceId: msg.deviceId } : {},
21580
21593
  ...msg.addonId !== void 0 ? { addonId: msg.addonId } : {},
21581
- ...msg.callerAddonId !== void 0 ? { callerAddonId: msg.callerAddonId } : {}
21594
+ ...msg.callerAddonId !== void 0 ? { callerAddonId: msg.callerAddonId } : {},
21595
+ ...msg.origin !== void 0 ? { origin: msg.origin } : {}
21582
21596
  });
21583
21597
  if (payload !== void 0 && result !== void 0) return new PayloadReply(void 0, packPayload(result));
21584
21598
  return result;
@@ -22011,6 +22025,12 @@ var delay$1 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
22011
22025
  * - surfaces a clear error when the call is genuinely unroutable (so the
22012
22026
  * child's call rejects rather than hanging).
22013
22027
  */
22028
+ /** Resolver dispatch that keeps a 3-arg call when the frame carried nothing extra. */
22029
+ function dispatchInbound(resolver, route, input) {
22030
+ if (input.origin !== void 0) return resolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId, input.origin);
22031
+ if (input.callerAddonId !== void 0) return resolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId);
22032
+ return resolver.dispatch(route, input.method, input.args);
22033
+ }
22014
22034
  function createParentUnownedCallHandler(deps) {
22015
22035
  return async (input) => {
22016
22036
  const argDeviceId = input.deviceId ?? extractDeviceId(input.args);
@@ -22062,11 +22082,10 @@ function createParentUnownedCallHandler(deps) {
22062
22082
  }
22063
22083
  const resolver = deps.getResolver();
22064
22084
  if (resolver !== null) try {
22065
- const route = resolver.resolveCapRoute(input.capName, {
22085
+ return await dispatchInbound(resolver, resolver.resolveCapRoute(input.capName, {
22066
22086
  ...nodeId !== void 0 ? { nodeId } : {},
22067
22087
  ...deviceId !== void 0 ? { deviceId } : {}
22068
- });
22069
- return input.callerAddonId !== void 0 ? await resolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId) : await resolver.dispatch(route, input.method, input.args);
22088
+ }), input);
22070
22089
  } catch (err) {
22071
22090
  if (!(err instanceof CapRouteError) || err.reason !== "no-provider") throw err;
22072
22091
  }
@@ -22118,11 +22137,10 @@ function createParentUnownedCallHandler(deps) {
22118
22137
  await delay$1(ADDON_CAP_RETRY_DELAY_MS);
22119
22138
  const retryResolver = deps.getResolver();
22120
22139
  if (retryResolver !== null) try {
22121
- const route = retryResolver.resolveCapRoute(input.capName, {
22140
+ return await dispatchInbound(retryResolver, retryResolver.resolveCapRoute(input.capName, {
22122
22141
  ...nodeId !== void 0 ? { nodeId } : {},
22123
22142
  ...deviceId !== void 0 ? { deviceId } : {}
22124
- });
22125
- return input.callerAddonId !== void 0 ? await retryResolver.dispatch(route, input.method, input.args, void 0, input.callerAddonId) : await retryResolver.dispatch(route, input.method, input.args);
22143
+ }), input);
22126
22144
  } catch (err) {
22127
22145
  if (!(err instanceof CapRouteError) || err.reason !== "no-provider") throw err;
22128
22146
  }
@@ -22524,14 +22542,16 @@ function deviceCapResolverLink(dispatch, isDeviceScoped) {
22524
22542
  const deviceId = input !== null && typeof input === "object" ? Reflect.get(input, "deviceId") : void 0;
22525
22543
  if (typeof deviceId !== "number" || !Number.isFinite(deviceId)) return next(op);
22526
22544
  return observable((observer) => {
22527
- dispatch(parsed.capName, parsed.method, input).then((data) => {
22528
- observer.next({ result: {
22529
- type: "data",
22530
- data
22531
- } });
22532
- observer.complete();
22533
- }).catch((cause) => {
22534
- observer.error(TRPCClientError.from(cause instanceof Error ? cause : new Error(String(cause))));
22545
+ runWithCapCallContext(op.context, () => {
22546
+ dispatch(parsed.capName, parsed.method, input).then((data) => {
22547
+ observer.next({ result: {
22548
+ type: "data",
22549
+ data
22550
+ } });
22551
+ observer.complete();
22552
+ }).catch((cause) => {
22553
+ observer.error(TRPCClientError.from(cause instanceof Error ? cause : new Error(String(cause))));
22554
+ });
22535
22555
  });
22536
22556
  return () => {};
22537
22557
  });
@@ -28434,4 +28454,4 @@ function resetCatalogRegistryForTests() {
28434
28454
  }
28435
28455
  //#endregion
28436
28456
  var readAllRows = import_read_all_rows.readAllRows;
28437
- export { ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_MAIN_HEAP_WATCH_LABEL, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRefusedError, AddonRouteRegistry, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, ClusterNodeTombstoneBodySchema, CommandObserverRegistry, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceHistoryAddon, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HUB_RSS_BUDGET_OVERRIDE_SOURCE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, IntegrationRegistry, InvalidCorsOriginError, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MEMBERSHIP_PATHS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MembershipResponder, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OPAQUE_ORIGIN, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, RecordsEngine, RegistryReadError, ReplEngine, RingBuffer, RunnerOfAddon, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UNSUPPORTED_ADDON_SETTLE_MS, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UnsupportedAddonTracker, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetCommandObserverRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonCommandActor, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, answerDeviceCallRedirect, applyCertificateToListener, applyLanHttp, asBrokerLike, attachUserManagementInternal, attributeStall, backupOrchestratorRecordKinds, backupRecordStoresOf, bareAddonOf, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHeldInstall, clearHttpsListener, clearIntegrationRows, clearNodeSettings, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, clusterNodeTombstoneRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, commandActorFromContext, commandObserverLink, compileLogFilter, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createMigrationApi, createMigrationApiOverContext, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createRequiresRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, decideAddonVersionMove, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, filterIsEmpty, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getCommandObserverRegistry, getFfmpegDownloadUrl, getLocalEventInterest, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, hubServerVersionOf, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInsecureOrigin, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, listHeldInstalls, loadAgentHttps, loadBootstrapConfig, loadDeviceCa, loadMeshCa, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, normalizeOrigin, onLocalEventInterestChange, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseOriginList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readOriginSetting, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsEnabled, readTlsMode, readinessKey, reclaimIntervalMs, recordHeldInstall, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, runObservedCommand, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setHuggingFaceReachabilityObserver, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signMembershipProof, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storageOrchestratorRecordKinds, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyMembershipAnswer, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsEnabled, writeTlsMode };
28457
+ export { ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_MAIN_HEAP_WATCH_LABEL, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRefusedError, AddonRouteRegistry, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, ClusterNodeTombstoneBodySchema, CommandObserverRegistry, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceHistoryAddon, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HUB_RSS_BUDGET_OVERRIDE_SOURCE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, IntegrationRegistry, InvalidCorsOriginError, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MEMBERSHIP_PATHS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MembershipResponder, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OPAQUE_ORIGIN, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, RecordsEngine, RegistryReadError, ReplEngine, RingBuffer, RunnerOfAddon, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UNSUPPORTED_ADDON_SETTLE_MS, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UnsupportedAddonTracker, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetCommandObserverRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonCommandActor, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, answerDeviceCallRedirect, applyCertificateToListener, applyLanHttp, asBrokerLike, attachUserManagementInternal, attributeStall, backupOrchestratorRecordKinds, backupRecordStoresOf, bareAddonOf, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHeldInstall, clearHttpsListener, clearIntegrationRows, clearNodeSettings, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, clusterNodeTombstoneRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, commandActorFromContext, commandObserverLink, compileLogFilter, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createMigrationApi, createMigrationApiOverContext, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createRequiresRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, currentCapCallContext, decideAddonVersionMove, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, filterIsEmpty, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getCommandObserverRegistry, getFfmpegDownloadUrl, getLocalEventInterest, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, hubServerVersionOf, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInsecureOrigin, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, listHeldInstalls, loadAgentHttps, loadBootstrapConfig, loadDeviceCa, loadMeshCa, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, normalizeOrigin, onLocalEventInterestChange, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseOriginList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readCurrentCommandOrigin, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readOriginSetting, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsEnabled, readTlsMode, readinessKey, reclaimIntervalMs, recordHeldInstall, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, runObservedCommand, runWithCapCallContext, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setHuggingFaceReachabilityObserver, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signMembershipProof, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storageOrchestratorRecordKinds, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyMembershipAnswer, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsEnabled, writeTlsMode };
@@ -0,0 +1,10 @@
1
+ import { type CommandOriginClaim } from "@camstack/types/addon";
2
+ /** The tRPC-shaped context of the cap call on this stack, or `undefined` outside one. */
3
+ export declare function currentCapCallContext(): unknown;
4
+ /** The command origin of the cap call on this stack, if the call carried a well-formed one. */
5
+ export declare function readCurrentCommandOrigin(): CommandOriginClaim | undefined;
6
+ /**
7
+ * Run `fn` as a cap call whose context is `context` (`commandOrigin(claim).context`,
8
+ * or the raw `op.context`). `undefined` is a call that carried no claim.
9
+ */
10
+ export declare function runWithCapCallContext<T>(context: unknown, fn: () => T): T;
@@ -1,3 +1,29 @@
1
+ /**
2
+ * CapRouteResolver — builds a live CapRouteSnapshot from injected deps and
3
+ * dispatches a resolved CapRoute to the appropriate transport.
4
+ *
5
+ * Layer boundary: this file lives in `@camstack/kernel` and MUST NOT import
6
+ * from `server/backend`. All server-side state is injected via narrow named
7
+ * interfaces (NodeCapAuthority, InProcessProviderLookup, BrokerHandle).
8
+ *
9
+ * Wire conventions (kept here as the single source of truth):
10
+ *
11
+ * remote-moleculer dispatch
12
+ * action : `${addonId}.${capName}.${method}`
13
+ * params : methodArgs (passed through)
14
+ * options : { nodeID: route.nodeId, timeout: 60_000 }
15
+ * note : addonId is resolved by NodeCapAuthority.getAddonId(nodeId, cap)
16
+ *
17
+ * agent-child-forward dispatch
18
+ * service : `$agent-cap-fwd`
19
+ * action : `$agent-cap-fwd.forward`
20
+ * params : { capName, method, args, childId, deviceId? }
21
+ * options : { nodeID: route.agentNodeId, timeout: 60_000 }
22
+ * note : Task 6's agent-side service MUST register the Moleculer service
23
+ * `$agent-cap-fwd` with action `forward` that accepts this shape
24
+ * and fans the call over UDS to route.childId.
25
+ */
26
+ import { type CommandOriginClaim } from "@camstack/types/addon";
1
27
  import type { ServiceDiscoveryBroker } from "../moleculer/resilient-cap-call.js";
2
28
  import type { CapRoute, CapRouteOpts, HubLocalUdsRoute, InProcessProviderRef } from "./cap-route.js";
3
29
  import type { CapCallInput } from "./child-cap-protocol.js";
@@ -219,7 +245,7 @@ export declare class CapRouteResolver {
219
245
  * {@link CapCallInput.callerAddonId} so the child can stamp before invoke
220
246
  * (without it, `stampCallerAddonId` strips an args-only claim).
221
247
  */
222
- dispatch(route: CapRoute, method: string, args: unknown, addonId?: string, callerAddonId?: string): Promise<unknown>;
248
+ dispatch(route: CapRoute, method: string, args: unknown, addonId?: string, callerAddonId?: string, origin?: CommandOriginClaim): Promise<unknown>;
223
249
  /**
224
250
  * Inner dispatch: may throw CapRouteError (validation failures) or arbitrary
225
251
  * transport errors. The outer `dispatch` wraps non-CapRouteErrors.
@@ -179,7 +179,7 @@ export interface CapCallMessage {
179
179
  readonly deviceId?: number;
180
180
  /** Optional per-call node pin (out-of-band routing hint; see {@link CapCallOutMessage.nodeId}). */
181
181
  readonly nodeId?: string;
182
- /** Optional command origin claim (see {@link CapCallOutMessage.origin}); child → parent leg only. */
182
+ /** Optional command origin claim (see {@link CapCallOutMessage.origin}). Both legs carry it. */
183
183
  readonly origin?: CommandOriginClaim;
184
184
  /**
185
185
  * Out-of-band PROVIDER-selection hint: the addonId of the provider the hub