@camstack/system 1.2.168 → 1.2.170

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 (60) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -1
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/console-logging/index.js +1 -1
  12. package/dist/builtins/console-logging/index.mjs +1 -1
  13. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  14. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  15. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  16. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  17. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  18. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  19. package/dist/builtins/hub-forwarder/index.js +1 -1
  20. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  21. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  22. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  23. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  24. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  25. package/dist/builtins/local-network/local-network.addon.js +1 -1
  26. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  27. package/dist/builtins/loki-logging/index.js +1 -1
  28. package/dist/builtins/loki-logging/index.mjs +1 -1
  29. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  30. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  31. package/dist/builtins/platform-probe/index.js +1 -1
  32. package/dist/builtins/platform-probe/index.mjs +1 -1
  33. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  34. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  35. package/dist/builtins/snapshot/index.js +1 -1
  36. package/dist/builtins/snapshot/index.mjs +1 -1
  37. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  38. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  39. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  40. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  41. package/dist/builtins/storage-orchestrator/data-store-dispatch.d.ts +18 -6
  42. package/dist/builtins/storage-orchestrator/hub-settings-forward.d.ts +68 -0
  43. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +27 -4
  44. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +236 -60
  45. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +236 -60
  46. package/dist/builtins/system-config/system-config.addon.js +1 -1
  47. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  48. package/dist/builtins/winston-logging/index.js +1 -1
  49. package/dist/builtins/winston-logging/index.mjs +1 -1
  50. package/dist/{dist-DwaeuknI.mjs → dist-1DEQFmTq.mjs} +167 -6
  51. package/dist/{dist-DCdtLXgx.js → dist-DsoVfJSR.js} +167 -6
  52. package/dist/hub-cap-forward-BdT320dq.mjs +53 -0
  53. package/dist/hub-cap-forward-DmHNjbB0.js +70 -0
  54. package/dist/index.js +6 -5
  55. package/dist/index.mjs +3 -2
  56. package/dist/{manifest-system-deps-D52_8SN1.mjs → manifest-system-deps-Da6sme9C.mjs} +3 -54
  57. package/dist/{manifest-system-deps-Bi7oyXcN.js → manifest-system-deps-ir_XTNpe.js} +2 -71
  58. package/dist/{retired-settings-keys-CB3wWpuC.mjs → retired-settings-keys-ChS1Q2Kv.mjs} +1 -1
  59. package/dist/{retired-settings-keys-DobfRRgq.js → retired-settings-keys-DTE5k4lU.js} +1 -1
  60. package/package.json +1 -1
@@ -14344,6 +14344,8 @@ var NcSystemEventKindSchema = zod.z.enum([
14344
14344
  "device-offline",
14345
14345
  "device-disabled",
14346
14346
  "device-enabled",
14347
+ "device-battery-low",
14348
+ "device-battery-normal",
14347
14349
  "stream-online",
14348
14350
  "stream-offline",
14349
14351
  "node-online",
@@ -17985,6 +17987,34 @@ var KeyEventsForDeviceSchema = zod.z.object({
17985
17987
  deviceId: zod.z.number(),
17986
17988
  events: zod.z.array(KeyEventSchema).readonly()
17987
17989
  });
17990
+ /** One non-empty bucket of the timeline histogram. */
17991
+ var EventDensityBucketSchema = zod.z.object({
17992
+ bucketStart: zod.z.number(),
17993
+ motion: zod.z.number().int(),
17994
+ object: zod.z.number().int(),
17995
+ audio: zod.z.number().int()
17996
+ });
17997
+ /**
17998
+ * One camera's row in a `getEventDensityBatch` answer.
17999
+ *
18000
+ * TWO facts, and the timeline draws them differently:
18001
+ *
18002
+ * - `read: 'read'` — the histogram for this camera. `buckets: []` is a real
18003
+ * claim: read, and nothing happened in the window.
18004
+ * - `read: 'unreadable'` — nobody could answer for this camera. `buckets` is
18005
+ * empty and that emptiness means NOTHING; the timeline must render unknown,
18006
+ * not quiet.
18007
+ *
18008
+ * Fanned out per camera the difference was free — one query rejected while the
18009
+ * others resolved — and collapsing to a batch is the exact moment it is lost
18010
+ * silently. Every requested id gets a row: a caller that asked for twelve and
18011
+ * got eleven cannot tell which one is missing, or that any is.
18012
+ */
18013
+ var EventDensityForDeviceSchema = zod.z.object({
18014
+ deviceId: zod.z.number(),
18015
+ read: zod.z.enum(["read", "unreadable"]),
18016
+ buckets: zod.z.array(EventDensityBucketSchema).readonly()
18017
+ });
17988
18018
  zod.z.object({
17989
18019
  trackId: zod.z.string(),
17990
18020
  className: zod.z.string(),
@@ -18385,12 +18415,31 @@ var pipelineAnalyticsCapability = {
18385
18415
  since: zod.z.number(),
18386
18416
  until: zod.z.number(),
18387
18417
  bucketMs: zod.z.number().int().positive()
18388
- }), zod.z.array(zod.z.object({
18389
- bucketStart: zod.z.number(),
18390
- motion: zod.z.number().int(),
18391
- object: zod.z.number().int(),
18392
- audio: zod.z.number().int()
18393
- })).readonly()),
18418
+ }), zod.z.array(EventDensityBucketSchema).readonly()),
18419
+ /**
18420
+ * The same histogram, for a SET of cameras, in one round trip.
18421
+ *
18422
+ * A multi-camera timeline (the tablet grid) re-asks this of every camera in
18423
+ * the grid on every day change — N browser → hub → post-analysis round
18424
+ * trips for N independent, already-indexed store queries. The queries are
18425
+ * unchanged and still run per camera (`densityByKind`, one per deviceId,
18426
+ * concurrently INSIDE the owner); only the transport collapses.
18427
+ *
18428
+ * Deliberately per-device rather than pre-merged: a timeline lane belongs
18429
+ * to a camera, and a caller that merged would have to un-merge.
18430
+ * `getEventDensity` stays for single-camera callers.
18431
+ *
18432
+ * Every requested id gets a row, marked — see
18433
+ * {@link EventDensityForDeviceSchema}. `deviceIds` is capped at
18434
+ * {@link EVENT_DENSITY_BATCH_MAX}, and an over-cap ask is refused rather
18435
+ * than truncated.
18436
+ */
18437
+ getEventDensityBatch: method(zod.z.object({
18438
+ deviceIds: zod.z.array(zod.z.number()).min(1).max(200),
18439
+ since: zod.z.number(),
18440
+ until: zod.z.number(),
18441
+ bucketMs: zod.z.number().int().positive()
18442
+ }), zod.z.array(EventDensityForDeviceSchema).readonly()),
18394
18443
  /**
18395
18444
  * @deprecated Prefer `pruneTracksBefore` — the track is the ROOT of the
18396
18445
  * analytics model and retention must cascade from it (design §5.1). This
@@ -29825,6 +29874,39 @@ var RecordingDaysSchema = zod.z.object({
29825
29874
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
29826
29875
  days: zod.z.array(zod.z.number())
29827
29876
  });
29877
+ /**
29878
+ * One camera's row in a `getAvailabilityBatch` answer.
29879
+ *
29880
+ * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
29881
+ * batch collapses the transport, not the work — plus the one thing the singular
29882
+ * method never had to say:
29883
+ *
29884
+ * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
29885
+ * no footage in the window", which is a real claim.
29886
+ * - `read: 'unreadable'` — the recorder could not answer for this camera (its
29887
+ * calendar rung threw, its location is unmounted). `ranges` is empty and
29888
+ * that emptiness means NOTHING.
29889
+ *
29890
+ * A timeline that renders the second as the first tells an operator there is no
29891
+ * footage when the truth is that nobody looked.
29892
+ */
29893
+ var RecordingAvailabilityForDeviceSchema = zod.z.object({
29894
+ deviceId: zod.z.number(),
29895
+ read: zod.z.enum(["read", "unreadable"]),
29896
+ ranges: zod.z.array(RecordingRangeSchema).readonly()
29897
+ });
29898
+ /**
29899
+ * One camera's row in a `getDaysWithRecordingsBatch` answer. Same rule as
29900
+ * {@link RecordingAvailabilityForDeviceSchema}: `days: []` on a `'read'` row is
29901
+ * "no footage in this month", `read: 'unreadable'` is "nobody could look", and
29902
+ * the date-picker's day dots must not spell them the same.
29903
+ */
29904
+ var RecordingDaysForDeviceSchema = zod.z.object({
29905
+ deviceId: zod.z.number(),
29906
+ read: zod.z.enum(["read", "unreadable"]),
29907
+ /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
29908
+ days: zod.z.array(zod.z.number()).readonly()
29909
+ });
29828
29910
  var RecordingManifestSchema = zod.z.object({
29829
29911
  deviceId: zod.z.number(),
29830
29912
  /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
@@ -30070,6 +30152,32 @@ var recordingCapability = {
30070
30152
  kind: "query",
30071
30153
  auth: "protected"
30072
30154
  }),
30155
+ /**
30156
+ * `getAvailability` for a SET of cameras, in one round trip.
30157
+ *
30158
+ * A multi-camera timeline re-asks availability for every camera in the grid
30159
+ * on every day change; fanned out that is one request per camera for N
30160
+ * independent calendar walks. The per-camera work is IDENTICAL (the same
30161
+ * `availabilityProfileFor` + `rangesIn`, run concurrently inside the
30162
+ * recorder) — only the transport collapses.
30163
+ *
30164
+ * `protected` for the same reason the singular method is: every id in
30165
+ * `deviceIds` is a device reference, so the F1 #3 gate refuses any camera
30166
+ * outside the caller's scope — one id out of scope refuses the CALL, it
30167
+ * does not quietly drop a row.
30168
+ *
30169
+ * Every requested id gets a row, marked — see
30170
+ * {@link RecordingAvailabilityForDeviceSchema}. `deviceIds` is capped at
30171
+ * {@link RECORDING_TIMELINE_BATCH_MAX} and an over-cap ask is refused.
30172
+ */
30173
+ getAvailabilityBatch: method(zod.z.object({
30174
+ deviceIds: zod.z.array(zod.z.number()).min(1).max(200),
30175
+ fromMs: zod.z.number(),
30176
+ toMs: zod.z.number()
30177
+ }), zod.z.array(RecordingAvailabilityForDeviceSchema).readonly(), {
30178
+ kind: "query",
30179
+ auth: "protected"
30180
+ }),
30073
30181
  /** Which calendar days in [fromMs,toMs) have ≥1 recorded segment, bucketed by
30074
30182
  * the client's local day (`tzOffsetMinutes` = minutes to add to UTC). Drives
30075
30183
  * the theater date-picker's day dots. */
@@ -30082,6 +30190,26 @@ var recordingCapability = {
30082
30190
  kind: "query",
30083
30191
  auth: "protected"
30084
30192
  }),
30193
+ /**
30194
+ * `getDaysWithRecordings` for a SET of cameras, in one round trip.
30195
+ *
30196
+ * The cheapest question in the product, asked once per camera per month
30197
+ * change. One directory read per day per camera at the owner, unchanged;
30198
+ * what collapses is the N requests it took to ask.
30199
+ *
30200
+ * Every requested id gets a row, marked — see
30201
+ * {@link RecordingDaysForDeviceSchema}. `deviceIds` is capped at
30202
+ * {@link RECORDING_TIMELINE_BATCH_MAX} and an over-cap ask is refused.
30203
+ */
30204
+ getDaysWithRecordingsBatch: method(zod.z.object({
30205
+ deviceIds: zod.z.array(zod.z.number()).min(1).max(200),
30206
+ fromMs: zod.z.number(),
30207
+ toMs: zod.z.number(),
30208
+ tzOffsetMinutes: zod.z.number()
30209
+ }), zod.z.array(RecordingDaysForDeviceSchema).readonly(), {
30210
+ kind: "query",
30211
+ auth: "protected"
30212
+ }),
30085
30213
  getPlaybackManifest: method(zod.z.object({
30086
30214
  deviceId: zod.z.number(),
30087
30215
  fromMs: zod.z.number(),
@@ -37285,6 +37413,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
37285
37413
  addonId: null,
37286
37414
  access: "view"
37287
37415
  },
37416
+ "pipelineAnalytics.getEventDensityBatch": {
37417
+ capName: "pipeline-analytics",
37418
+ capScope: "device",
37419
+ addonId: null,
37420
+ access: "view"
37421
+ },
37288
37422
  "pipelineAnalytics.getEventMedia": {
37289
37423
  capName: "pipeline-analytics",
37290
37424
  capScope: "device",
@@ -38407,12 +38541,24 @@ var METHOD_ACCESS_MAP = Object.freeze({
38407
38541
  addonId: null,
38408
38542
  access: "view"
38409
38543
  },
38544
+ "recording.getAvailabilityBatch": {
38545
+ capName: "recording",
38546
+ capScope: "system",
38547
+ addonId: null,
38548
+ access: "view"
38549
+ },
38410
38550
  "recording.getDaysWithRecordings": {
38411
38551
  capName: "recording",
38412
38552
  capScope: "system",
38413
38553
  addonId: null,
38414
38554
  access: "view"
38415
38555
  },
38556
+ "recording.getDaysWithRecordingsBatch": {
38557
+ capName: "recording",
38558
+ capScope: "system",
38559
+ addonId: null,
38560
+ access: "view"
38561
+ },
38416
38562
  "recording.getDeviceConfig": {
38417
38563
  capName: "recording",
38418
38564
  capScope: "system",
@@ -41017,6 +41163,11 @@ Object.freeze({
41017
41163
  form: "single",
41018
41164
  optional: false
41019
41165
  }],
41166
+ "pipelineAnalytics.getEventDensityBatch": [{
41167
+ name: "deviceIds",
41168
+ form: "array",
41169
+ optional: false
41170
+ }],
41020
41171
  "pipelineAnalytics.getEventMedia": [{
41021
41172
  name: "deviceId",
41022
41173
  form: "single",
@@ -41432,11 +41583,21 @@ Object.freeze({
41432
41583
  form: "single",
41433
41584
  optional: false
41434
41585
  }],
41586
+ "recording.getAvailabilityBatch": [{
41587
+ name: "deviceIds",
41588
+ form: "array",
41589
+ optional: false
41590
+ }],
41435
41591
  "recording.getDaysWithRecordings": [{
41436
41592
  name: "deviceId",
41437
41593
  form: "single",
41438
41594
  optional: false
41439
41595
  }],
41596
+ "recording.getDaysWithRecordingsBatch": [{
41597
+ name: "deviceIds",
41598
+ form: "array",
41599
+ optional: false
41600
+ }],
41440
41601
  "recording.getDeviceConfig": [{
41441
41602
  name: "deviceId",
41442
41603
  form: "single",
@@ -0,0 +1,53 @@
1
+ //#region src/kernel/transport/hub-cap-forward.ts
2
+ /** The Moleculer service name the hub registers for agent→hub cap forwarding. */
3
+ var HUB_CAP_FWD_SERVICE = "$hub-cap-fwd";
4
+ /** The Moleculer action (service.action) for hub cap forwarding. */
5
+ var HUB_CAP_FWD_ACTION = `${HUB_CAP_FWD_SERVICE}.forward`;
6
+ /**
7
+ * Narrow Moleculer's loosely-typed `ctx.params` to {@link HubCapForwardParams}
8
+ * without unsafe casts — mirrors `agent-cap-dispatch-service.ts:narrowParams`.
9
+ */
10
+ function narrowParams(raw) {
11
+ if (raw === null || typeof raw !== "object") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
12
+ const capName = Reflect.get(raw, "capName");
13
+ const method = Reflect.get(raw, "method");
14
+ if (typeof capName !== "string" || typeof method !== "string") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
15
+ const deviceId = Reflect.get(raw, "deviceId");
16
+ const nodeId = Reflect.get(raw, "nodeId");
17
+ const native = Reflect.get(raw, "native");
18
+ return {
19
+ capName,
20
+ method,
21
+ args: Reflect.get(raw, "args"),
22
+ deviceId: typeof deviceId === "number" ? deviceId : void 0,
23
+ nodeId: typeof nodeId === "string" && nodeId.length > 0 ? nodeId : void 0,
24
+ native: native === true ? true : void 0
25
+ };
26
+ }
27
+ /**
28
+ * Build the `$hub-cap-fwd` Moleculer `ServiceSchema`. The hub registers this on
29
+ * its broker (only the hub registers it → an agent's `broker.call` for
30
+ * `$hub-cap-fwd.forward` discovers it on the hub with no explicit nodeID pin).
31
+ *
32
+ * @param onUnownedCall The hub's cap routing handler (from
33
+ * `createParentUnownedCallHandler`). Reused verbatim so
34
+ * forwarded calls route exactly like a hub-local child's.
35
+ */
36
+ function createHubCapForwardService(onUnownedCall) {
37
+ return {
38
+ name: HUB_CAP_FWD_SERVICE,
39
+ actions: { forward: { handler: async (ctx) => {
40
+ const { capName, method, args, deviceId, nodeId, native } = narrowParams(ctx.params);
41
+ return onUnownedCall({
42
+ capName,
43
+ method,
44
+ args,
45
+ ...deviceId !== void 0 ? { deviceId } : {},
46
+ ...nodeId !== void 0 ? { nodeId } : {},
47
+ ...native === true ? { native: true } : {}
48
+ });
49
+ } } }
50
+ };
51
+ }
52
+ //#endregion
53
+ export { HUB_CAP_FWD_SERVICE as n, createHubCapForwardService as r, HUB_CAP_FWD_ACTION as t };
@@ -0,0 +1,70 @@
1
+ //#region src/kernel/transport/hub-cap-forward.ts
2
+ /** The Moleculer service name the hub registers for agent→hub cap forwarding. */
3
+ var HUB_CAP_FWD_SERVICE = "$hub-cap-fwd";
4
+ /** The Moleculer action (service.action) for hub cap forwarding. */
5
+ var HUB_CAP_FWD_ACTION = `${HUB_CAP_FWD_SERVICE}.forward`;
6
+ /**
7
+ * Narrow Moleculer's loosely-typed `ctx.params` to {@link HubCapForwardParams}
8
+ * without unsafe casts — mirrors `agent-cap-dispatch-service.ts:narrowParams`.
9
+ */
10
+ function narrowParams(raw) {
11
+ if (raw === null || typeof raw !== "object") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
12
+ const capName = Reflect.get(raw, "capName");
13
+ const method = Reflect.get(raw, "method");
14
+ if (typeof capName !== "string" || typeof method !== "string") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
15
+ const deviceId = Reflect.get(raw, "deviceId");
16
+ const nodeId = Reflect.get(raw, "nodeId");
17
+ const native = Reflect.get(raw, "native");
18
+ return {
19
+ capName,
20
+ method,
21
+ args: Reflect.get(raw, "args"),
22
+ deviceId: typeof deviceId === "number" ? deviceId : void 0,
23
+ nodeId: typeof nodeId === "string" && nodeId.length > 0 ? nodeId : void 0,
24
+ native: native === true ? true : void 0
25
+ };
26
+ }
27
+ /**
28
+ * Build the `$hub-cap-fwd` Moleculer `ServiceSchema`. The hub registers this on
29
+ * its broker (only the hub registers it → an agent's `broker.call` for
30
+ * `$hub-cap-fwd.forward` discovers it on the hub with no explicit nodeID pin).
31
+ *
32
+ * @param onUnownedCall The hub's cap routing handler (from
33
+ * `createParentUnownedCallHandler`). Reused verbatim so
34
+ * forwarded calls route exactly like a hub-local child's.
35
+ */
36
+ function createHubCapForwardService(onUnownedCall) {
37
+ return {
38
+ name: HUB_CAP_FWD_SERVICE,
39
+ actions: { forward: { handler: async (ctx) => {
40
+ const { capName, method, args, deviceId, nodeId, native } = narrowParams(ctx.params);
41
+ return onUnownedCall({
42
+ capName,
43
+ method,
44
+ args,
45
+ ...deviceId !== void 0 ? { deviceId } : {},
46
+ ...nodeId !== void 0 ? { nodeId } : {},
47
+ ...native === true ? { native: true } : {}
48
+ });
49
+ } } }
50
+ };
51
+ }
52
+ //#endregion
53
+ Object.defineProperty(exports, "HUB_CAP_FWD_ACTION", {
54
+ enumerable: true,
55
+ get: function() {
56
+ return HUB_CAP_FWD_ACTION;
57
+ }
58
+ });
59
+ Object.defineProperty(exports, "HUB_CAP_FWD_SERVICE", {
60
+ enumerable: true,
61
+ get: function() {
62
+ return HUB_CAP_FWD_SERVICE;
63
+ }
64
+ });
65
+ Object.defineProperty(exports, "createHubCapForwardService", {
66
+ enumerable: true,
67
+ get: function() {
68
+ return createHubCapForwardService;
69
+ }
70
+ });
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-DCdtLXgx.js");
3
+ const require_dist = require("./dist-DsoVfJSR.js");
4
4
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
5
5
  require("./builtins/alerts/index.js");
6
6
  const require_formatter = require("./formatter-DqAKDlvN.js");
@@ -19,6 +19,7 @@ const require_builtins_native_metrics_native_metrics_addon = require("./builtins
19
19
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
20
20
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
21
21
  const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
22
+ const require_hub_cap_forward = require("./hub-cap-forward-DmHNjbB0.js");
22
23
  const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
23
24
  require("./builtins/storage-orchestrator/index.js");
24
25
  const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
@@ -26,7 +27,7 @@ require("./builtins/system-config/index.js");
26
27
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
27
28
  const require_file_data_plane = require("./file-data-plane-DO8KbxCe.js");
28
29
  const require_tls$1 = require("./tls-BxQlomxd.js");
29
- const require_manifest_system_deps = require("./manifest-system-deps-Bi7oyXcN.js");
30
+ const require_manifest_system_deps = require("./manifest-system-deps-ir_XTNpe.js");
30
31
  const require_resource_monitor = require("./resource-monitor-CdnzxBLP.js");
31
32
  const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
32
33
  let zod = require("zod");
@@ -95488,8 +95489,8 @@ exports.HEAP_RECLAIM_TRIGGER_MB = require_manifest_system_deps.HEAP_RECLAIM_TRIG
95488
95489
  exports.HEAP_SPACE_REPORT_MIN_MB = require_manifest_system_deps.HEAP_SPACE_REPORT_MIN_MB;
95489
95490
  exports.HEAP_WATCH_INTERVAL_MS = require_manifest_system_deps.HEAP_WATCH_INTERVAL_MS;
95490
95491
  exports.HEAP_WATCH_WARN_RATIO = require_manifest_system_deps.HEAP_WATCH_WARN_RATIO;
95491
- exports.HUB_CAP_FWD_ACTION = require_manifest_system_deps.HUB_CAP_FWD_ACTION;
95492
- exports.HUB_CAP_FWD_SERVICE = require_manifest_system_deps.HUB_CAP_FWD_SERVICE;
95492
+ exports.HUB_CAP_FWD_ACTION = require_hub_cap_forward.HUB_CAP_FWD_ACTION;
95493
+ exports.HUB_CAP_FWD_SERVICE = require_hub_cap_forward.HUB_CAP_FWD_SERVICE;
95493
95494
  exports.HUB_MAIN_HEAP_WATCH_LABEL = require_manifest_system_deps.HUB_MAIN_HEAP_WATCH_LABEL;
95494
95495
  exports.HUB_MAIN_RSS_BUDGET_MB = require_manifest_system_deps.HUB_MAIN_RSS_BUDGET_MB;
95495
95496
  exports.HUB_RSS_BUDGET_ENV = require_manifest_system_deps.HUB_RSS_BUDGET_ENV;
@@ -95620,7 +95621,7 @@ exports.createDoorSettingsView = createDoorSettingsView;
95620
95621
  exports.createEventPlaneMeter = require_manifest_system_deps.createEventPlaneMeter;
95621
95622
  exports.createEventPlaneReader = require_manifest_system_deps.createEventPlaneReader;
95622
95623
  exports.createFileDataPlaneHandler = require_file_data_plane.createFileDataPlaneHandler;
95623
- exports.createHubCapForwardService = require_manifest_system_deps.createHubCapForwardService;
95624
+ exports.createHubCapForwardService = require_hub_cap_forward.createHubCapForwardService;
95624
95625
  exports.createHubService = createHubService;
95625
95626
  exports.createKernelHwAccel = require_manifest_system_deps.createKernelHwAccel;
95626
95627
  exports.createLocalTransport = require_manifest_system_deps.createLocalTransport;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
2
- import { $ as isCollectionArrayMethod, $t as parseJsonObject, Bt as ReadinessRegistry, E as addonSettingsCapability, Ft as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Gt as asString$1, It as DEVICE_STATUS_METHOD, Kt as createEvent, Mt as errMsg$1, Pt as DATAPLANE_SECRET_HEADER$1, Q as isArrayOutputSchema, Ut as asJsonObject$1, Vt as ReadinessTimeoutError, Wt as asNumber, Y as extractNestedAddonId, Yt as expandCapMethods, an as EventCategory$1, at as lifecycleJobSchema, bt as scopesAllowAddon, ct as logLevelAtMost, en as parseJsonUnknown$1, et as isObjectInput, f as LOG_LEVEL_RANK, ft as objectInputDeclaresAddonId, h as RUNTIME_DEFAULTS, ht as procedureAuthKey, it as kebabToCamel, lt as looseSchema, nn as resolveCapMount, p as METHOD_ACCESS_MAP, qt as emitDownForOwnedCaps, rn as scopeKey, rt as isVoidInput, t as ALL_CAPABILITY_DEFINITIONS, tn as readinessKey, vt as resolveMethodAuth, xt as scopesAllowDeviceCap } from "./dist-DwaeuknI.mjs";
2
+ import { $ as isCollectionArrayMethod, $t as parseJsonObject, Bt as ReadinessRegistry, E as addonSettingsCapability, Ft as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Gt as asString$1, It as DEVICE_STATUS_METHOD, Kt as createEvent, Mt as errMsg$1, Pt as DATAPLANE_SECRET_HEADER$1, Q as isArrayOutputSchema, Ut as asJsonObject$1, Vt as ReadinessTimeoutError, Wt as asNumber, Y as extractNestedAddonId, Yt as expandCapMethods, an as EventCategory$1, at as lifecycleJobSchema, bt as scopesAllowAddon, ct as logLevelAtMost, en as parseJsonUnknown$1, et as isObjectInput, f as LOG_LEVEL_RANK, ft as objectInputDeclaresAddonId, h as RUNTIME_DEFAULTS, ht as procedureAuthKey, it as kebabToCamel, lt as looseSchema, nn as resolveCapMount, p as METHOD_ACCESS_MAP, qt as emitDownForOwnedCaps, rn as scopeKey, rt as isVoidInput, t as ALL_CAPABILITY_DEFINITIONS, tn as readinessKey, vt as resolveMethodAuth, xt as scopesAllowDeviceCap } from "./dist-1DEQFmTq.mjs";
3
3
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
4
4
  import "./builtins/alerts/index.mjs";
5
5
  import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
@@ -18,6 +18,7 @@ import NativeMetricsAddon, { t as NativeMetricsProvider } from "./builtins/nativ
18
18
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
19
19
  import { SqliteSettingsAddon, o as SqliteSettingsBackend, s as prefixRange } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
20
20
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
21
+ import { n as HUB_CAP_FWD_SERVICE, r as createHubCapForwardService, t as HUB_CAP_FWD_ACTION } from "./hub-cap-forward-BdT320dq.mjs";
21
22
  import { StorageOrchestratorAddon, n as buildStorageLocationRegistry, t as StorageOrchestratorService } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
22
23
  import "./builtins/storage-orchestrator/index.mjs";
23
24
  import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.mjs";
@@ -25,7 +26,7 @@ import "./builtins/system-config/index.mjs";
25
26
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
26
27
  import { a as parseTokenizedUrl, c as collectModelFiles, d as downloadModel, f as ensureModel, h as isModelDownloaded, i as parseRangeHeader, l as deleteModelFromDisk, m as getModelFilePath, n as contentTypeFor, o as resolveFilePath, p as fetchJson, r as createAuthenticatedFileServer, s as ModelDownloadService, t as createFileDataPlaneHandler, u as downloadFile } from "./file-data-plane-BhKdxJgf.mjs";
27
28
  import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-DOTmtLCW.mjs";
28
- import { $ as FrameDecoder, $t as DECISIVE_HEAP_SPACES, A as createUdsEventBus, At as HEAP_WATCH_INTERVAL_MS, B as CapRouteError, Bt as buildHeapSample, C as ipcParentLink, Cn as diffEventPlane, Ct as resolveAddonClass, D as createHubCapForwardService, Dt as HEAP_RECLAIM_MIN_INTERVAL_MS, E as HUB_CAP_FWD_SERVICE, Et as createAddonDataPlaneFacility, F as LocalChildRegistry, Ft as RSS_BUDGET_REANNOUNCE_MIN_MS, G as PARENT_ROUTED_PROVIDER_ADDON_ID, Gt as hubMainRssBudget, H as callWithServiceDiscovery, Ht as createLoopDelayMeter, I as UDS_NO_ROUTE_PREFIX, It as RSS_BUDGET_RELEASE_RATIO, J as createLocalTransport, Jt as reclaimIntervalMs, K as __resetCapUsageRegistryForTests, Kt as nextRssBudgetState, L as AGENT_CAP_FWD_ACTION, Lt as RUNNER_HEAP_WATCH_INTERVAL_MS, M as createUdsLogger, Mt as HUB_MAIN_HEAP_WATCH_LABEL, N as createUdsLoggerWithControl, Nt as HUB_MAIN_RSS_BUDGET_MB, O as createParentUnownedCallHandler, Ot as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, P as LocalChildClient, Pt as HUB_RSS_BUDGET_ENV, Q as localEndpointPath, Qt as strandedMb, R as AGENT_CAP_FWD_SERVICE, Rt as RUNNER_RSS_BUDGET_ENV, S as buildLinkChain, Sn as createEventPlaneReader, St as installManifestNativeDeps, T as HUB_CAP_FWD_ACTION, Tt as runNpm, U as readMoleculerFanoutMode, Ut as createV8Reclaimer, V as classifyCapRoute, Vt as createDeferredHeapWatchSink, W as CapUsageRegistry, Wt as describeRss, X as UdsLocalTransportServer, Xt as startHeapWatch, Y as UdsLocalTransportClient, Yt as shouldReclaim, Z as SocketChannel, Zt as startRunnerHeapWatch, _ as AddonDepsManager, _n as sampleSocketDirection, _t as serializeTypedArrays, a as createUdsAddonContext, an as heapSpaceField, b as brokerCallForCap, bn as EVENT_PLANE_TOP_N, bt as CapabilityUnavailableError, c as getOrInitReadinessRegistryForClient, cn as EMPTY_SOCKET_PLANE_BASELINE, ct as createAddonService, d as clusterEventTopic, dn as createSocketPlaneReader, dt as capActionName, en as HEAP_SPACE_REPORT_MIN_MB, et as encodeFrame, f as getBrokerEventBus, fn as diffSocketPlane, ft as capActionSuffix, g as subscribePassthrough, gn as recordSocketFrame, gt as deserializeTypedArrays, h as setNodeEventInterest, hn as createSocketDirectionCounters, ht as parseCapAction, i as createAddonContext, in as heapSnapshotAuthorised, j as udsChildLogToWorkerEntry, jt as HEAP_WATCH_WARN_RATIO, k as createUdsEventBridge, kt as HEAP_RECLAIM_TRIGGER_MB, l as setHubConnected, ln as SOCKET_PLANE_TOP_N, lt as validateProviderRegistrations, m as registerEventBusService, mn as EMPTY_SOCKET_DIRECTION, mt as capServiceName, n as installManifestPythonDeps, nn as emitHeapDiagnosticReport, nt as buildUdsNativeCapProxy, o as getWorkerDeviceRegistry, on as readHeapSpaces, ot as mountNativeCapService, p as getMoleculerEventStats, pn as formatSocketPlane, pt as capBareAction, q as getCapUsageRegistry, qt as parseRssBudgetMb, r as adaptBrokerToCluster, rn as formatHeapSpaces, rt as createBrokerDeviceManagerApi, s as getOrInitReadinessRegistry, sn as selectReportedSpaces, t as installManifestSystemDeps, tn as RUNNER_HEAP_SNAPSHOT_ENV, tt as buildNativeCapProxy, u as EVENT_TOPIC_PREFIX, un as createSocketPlaneMeter, ut as NATIVE_PROVIDER_SERVICE_INFIX, v as createKernelHwAccel, vn as socketDirectionBytes, vt as DeviceRegistry, w as localProviderLink, wn as formatEventPlane, wt as resolveNpmInvocation, x as brokerTransportLink, xn as createEventPlaneMeter, xt as copyBundledNativeModules, y as resolveHwAccel, yn as socketDirectionMessages, yt as CapabilityHandle, z as CapRouteResolver, zt as ZERO_LOOP_DELAY } from "./manifest-system-deps-D52_8SN1.mjs";
29
+ import { $ as buildUdsNativeCapProxy, $t as emitHeapDiagnosticReport, A as createUdsLoggerWithControl, At as HUB_MAIN_RSS_BUDGET_MB, B as readMoleculerFanoutMode, Bt as createV8Reclaimer, C as ipcParentLink, Ct as createAddonDataPlaneFacility, D as createUdsEventBus, Dt as HEAP_WATCH_INTERVAL_MS, E as createUdsEventBridge, Et as HEAP_RECLAIM_TRIGGER_MB, F as AGENT_CAP_FWD_SERVICE, Ft as RUNNER_RSS_BUDGET_ENV, G as createLocalTransport, Gt as reclaimIntervalMs, H as PARENT_ROUTED_PROVIDER_ADDON_ID, Ht as hubMainRssBudget, I as CapRouteResolver, It as ZERO_LOOP_DELAY, J as SocketChannel, Jt as startRunnerHeapWatch, K as UdsLocalTransportClient, Kt as shouldReclaim, L as CapRouteError, Lt as buildHeapSample, M as LocalChildRegistry, Mt as RSS_BUDGET_REANNOUNCE_MIN_MS, N as UDS_NO_ROUTE_PREFIX, Nt as RSS_BUDGET_RELEASE_RATIO, O as udsChildLogToWorkerEntry, Ot as HEAP_WATCH_WARN_RATIO, P as AGENT_CAP_FWD_ACTION, Pt as RUNNER_HEAP_WATCH_INTERVAL_MS, Q as buildNativeCapProxy, Qt as RUNNER_HEAP_SNAPSHOT_ENV, R as classifyCapRoute, Rt as createDeferredHeapWatchSink, S as buildLinkChain, St as runNpm, T as createParentUnownedCallHandler, Tt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, U as __resetCapUsageRegistryForTests, Ut as nextRssBudgetState, V as CapUsageRegistry, Vt as describeRss, W as getCapUsageRegistry, Wt as parseRssBudgetMb, X as FrameDecoder, Xt as DECISIVE_HEAP_SPACES, Y as localEndpointPath, Yt as strandedMb, Z as encodeFrame, Zt as HEAP_SPACE_REPORT_MIN_MB, _ as AddonDepsManager, _n as EVENT_PLANE_TOP_N, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as EMPTY_SOCKET_PLANE_BASELINE, at as createAddonService, b as brokerCallForCap, bn as diffEventPlane, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as createSocketPlaneReader, ct as capActionName, d as clusterEventTopic, dn as EMPTY_SOCKET_DIRECTION, dt as capServiceName, en as formatHeapSpaces, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as createSocketDirectionCounters, ft as parseCapAction, g as subscribePassthrough, gn as socketDirectionMessages, gt as CapabilityHandle, h as setNodeEventInterest, hn as socketDirectionBytes, ht as DeviceRegistry, i as createAddonContext, in as selectReportedSpaces, j as LocalChildClient, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as diffSocketPlane, lt as capActionSuffix, m as registerEventBusService, mn as sampleSocketDirection, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as heapSpaceField, o as getWorkerDeviceRegistry, on as SOCKET_PLANE_TOP_N, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as recordSocketFrame, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as readHeapSpaces, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as createSocketPlaneMeter, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as heapSnapshotAuthorised, u as EVENT_TOPIC_PREFIX, un as formatSocketPlane, ut as capBareAction, v as createKernelHwAccel, vn as createEventPlaneMeter, vt as copyBundledNativeModules, w as localProviderLink, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xn as formatEventPlane, xt as resolveNpmInvocation, y as resolveHwAccel, yn as createEventPlaneReader, yt as installManifestNativeDeps, z as callWithServiceDiscovery, zt as createLoopDelayMeter } from "./manifest-system-deps-Da6sme9C.mjs";
29
30
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
30
31
  import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
31
32
  import { z } from "zod";
@@ -1,4 +1,5 @@
1
- import "./dist-DwaeuknI.mjs";
1
+ import "./dist-1DEQFmTq.mjs";
2
+ import "./hub-cap-forward-BdT320dq.mjs";
2
3
  import * as crypto$1 from "node:crypto";
3
4
  import { randomBytes, randomUUID } from "node:crypto";
4
5
  import { ensureBinary, ensureFfmpeg, ensurePython, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
@@ -7647,58 +7648,6 @@ function createParentUnownedCallHandler(deps) {
7647
7648
  }
7648
7649
  };
7649
7650
  }
7650
- //#endregion
7651
- //#region src/kernel/transport/hub-cap-forward.ts
7652
- /** The Moleculer service name the hub registers for agent→hub cap forwarding. */
7653
- var HUB_CAP_FWD_SERVICE = "$hub-cap-fwd";
7654
- /** The Moleculer action (service.action) for hub cap forwarding. */
7655
- var HUB_CAP_FWD_ACTION = `${HUB_CAP_FWD_SERVICE}.forward`;
7656
- /**
7657
- * Narrow Moleculer's loosely-typed `ctx.params` to {@link HubCapForwardParams}
7658
- * without unsafe casts — mirrors `agent-cap-dispatch-service.ts:narrowParams`.
7659
- */
7660
- function narrowParams(raw) {
7661
- if (raw === null || typeof raw !== "object") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
7662
- const capName = Reflect.get(raw, "capName");
7663
- const method = Reflect.get(raw, "method");
7664
- if (typeof capName !== "string" || typeof method !== "string") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
7665
- const deviceId = Reflect.get(raw, "deviceId");
7666
- const nodeId = Reflect.get(raw, "nodeId");
7667
- const native = Reflect.get(raw, "native");
7668
- return {
7669
- capName,
7670
- method,
7671
- args: Reflect.get(raw, "args"),
7672
- deviceId: typeof deviceId === "number" ? deviceId : void 0,
7673
- nodeId: typeof nodeId === "string" && nodeId.length > 0 ? nodeId : void 0,
7674
- native: native === true ? true : void 0
7675
- };
7676
- }
7677
- /**
7678
- * Build the `$hub-cap-fwd` Moleculer `ServiceSchema`. The hub registers this on
7679
- * its broker (only the hub registers it → an agent's `broker.call` for
7680
- * `$hub-cap-fwd.forward` discovers it on the hub with no explicit nodeID pin).
7681
- *
7682
- * @param onUnownedCall The hub's cap routing handler (from
7683
- * `createParentUnownedCallHandler`). Reused verbatim so
7684
- * forwarded calls route exactly like a hub-local child's.
7685
- */
7686
- function createHubCapForwardService(onUnownedCall) {
7687
- return {
7688
- name: HUB_CAP_FWD_SERVICE,
7689
- actions: { forward: { handler: async (ctx) => {
7690
- const { capName, method, args, deviceId, nodeId, native } = narrowParams(ctx.params);
7691
- return onUnownedCall({
7692
- capName,
7693
- method,
7694
- args,
7695
- ...deviceId !== void 0 ? { deviceId } : {},
7696
- ...nodeId !== void 0 ? { nodeId } : {},
7697
- ...native === true ? { native: true } : {}
7698
- });
7699
- } } }
7700
- };
7701
- }
7702
7651
  /**
7703
7652
  * Record one cap call, if an observer is configured. Extracted so the rule —
7704
7653
  * an unresolved provider never erases the caller — has ONE place and a test.
@@ -10019,4 +9968,4 @@ async function defaultRun(command, args) {
10019
9968
  await execFileAsync(command, [...args], { timeout: INSTALL_TIMEOUT_MS });
10020
9969
  }
10021
9970
  //#endregion
10022
- export { FrameDecoder as $, DECISIVE_HEAP_SPACES as $t, createUdsEventBus as A, HEAP_WATCH_INTERVAL_MS as At, CapRouteError as B, buildHeapSample as Bt, ipcParentLink as C, diffEventPlane as Cn, resolveAddonClass as Ct, createHubCapForwardService as D, HEAP_RECLAIM_MIN_INTERVAL_MS as Dt, HUB_CAP_FWD_SERVICE as E, createAddonDataPlaneFacility as Et, LocalChildRegistry as F, RSS_BUDGET_REANNOUNCE_MIN_MS as Ft, PARENT_ROUTED_PROVIDER_ADDON_ID as G, hubMainRssBudget as Gt, callWithServiceDiscovery as H, createLoopDelayMeter as Ht, UDS_NO_ROUTE_PREFIX as I, RSS_BUDGET_RELEASE_RATIO as It, createLocalTransport as J, reclaimIntervalMs as Jt, __resetCapUsageRegistryForTests as K, nextRssBudgetState as Kt, AGENT_CAP_FWD_ACTION as L, RUNNER_HEAP_WATCH_INTERVAL_MS as Lt, createUdsLogger as M, HUB_MAIN_HEAP_WATCH_LABEL as Mt, createUdsLoggerWithControl as N, HUB_MAIN_RSS_BUDGET_MB as Nt, createParentUnownedCallHandler as O, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS as Ot, LocalChildClient as P, HUB_RSS_BUDGET_ENV as Pt, localEndpointPath as Q, strandedMb as Qt, AGENT_CAP_FWD_SERVICE as R, RUNNER_RSS_BUDGET_ENV as Rt, buildLinkChain as S, createEventPlaneReader as Sn, installManifestNativeDeps as St, HUB_CAP_FWD_ACTION as T, runNpm as Tt, readMoleculerFanoutMode as U, createV8Reclaimer as Ut, classifyCapRoute as V, createDeferredHeapWatchSink as Vt, CapUsageRegistry as W, describeRss as Wt, UdsLocalTransportServer as X, startHeapWatch as Xt, UdsLocalTransportClient as Y, shouldReclaim as Yt, SocketChannel as Z, startRunnerHeapWatch as Zt, AddonDepsManager as _, sampleSocketDirection as _n, serializeTypedArrays as _t, createUdsAddonContext as a, heapSpaceField as an, getWorkerNativeCapSnapshot as at, brokerCallForCap as b, EVENT_PLANE_TOP_N as bn, CapabilityUnavailableError as bt, getOrInitReadinessRegistryForClient as c, EMPTY_SOCKET_PLANE_BASELINE as cn, createAddonService as ct, clusterEventTopic as d, createSocketPlaneReader as dn, capActionName as dt, HEAP_SPACE_REPORT_MIN_MB as en, encodeFrame as et, getBrokerEventBus as f, diffSocketPlane as fn, capActionSuffix as ft, subscribePassthrough as g, recordSocketFrame as gn, deserializeTypedArrays as gt, setNodeEventInterest as h, createSocketDirectionCounters as hn, parseCapAction as ht, createAddonContext as i, heapSnapshotAuthorised as in, getWorkerNativeCapProvider as it, udsChildLogToWorkerEntry as j, HEAP_WATCH_WARN_RATIO as jt, createUdsEventBridge as k, HEAP_RECLAIM_TRIGGER_MB as kt, setHubConnected as l, SOCKET_PLANE_TOP_N as ln, validateProviderRegistrations as lt, registerEventBusService as m, EMPTY_SOCKET_DIRECTION as mn, capServiceName as mt, installManifestPythonDeps as n, emitHeapDiagnosticReport as nn, buildUdsNativeCapProxy as nt, getWorkerDeviceRegistry as o, readHeapSpaces as on, mountNativeCapService as ot, getMoleculerEventStats as p, formatSocketPlane as pn, capBareAction as pt, getCapUsageRegistry as q, parseRssBudgetMb as qt, adaptBrokerToCluster as r, formatHeapSpaces as rn, createBrokerDeviceManagerApi as rt, getOrInitReadinessRegistry as s, selectReportedSpaces as sn, setWorkerNativeCapsChangeListener as st, installManifestSystemDeps as t, RUNNER_HEAP_SNAPSHOT_ENV as tn, buildNativeCapProxy as tt, EVENT_TOPIC_PREFIX as u, createSocketPlaneMeter as un, NATIVE_PROVIDER_SERVICE_INFIX as ut, createKernelHwAccel as v, socketDirectionBytes as vn, DeviceRegistry as vt, localProviderLink as w, formatEventPlane as wn, resolveNpmInvocation as wt, brokerTransportLink as x, createEventPlaneMeter as xn, copyBundledNativeModules as xt, resolveHwAccel as y, socketDirectionMessages as yn, CapabilityHandle as yt, CapRouteResolver as z, ZERO_LOOP_DELAY as zt };
9971
+ export { buildUdsNativeCapProxy as $, emitHeapDiagnosticReport as $t, createUdsLoggerWithControl as A, HUB_MAIN_RSS_BUDGET_MB as At, readMoleculerFanoutMode as B, createV8Reclaimer as Bt, ipcParentLink as C, createAddonDataPlaneFacility as Ct, createUdsEventBus as D, HEAP_WATCH_INTERVAL_MS as Dt, createUdsEventBridge as E, HEAP_RECLAIM_TRIGGER_MB as Et, AGENT_CAP_FWD_SERVICE as F, RUNNER_RSS_BUDGET_ENV as Ft, createLocalTransport as G, reclaimIntervalMs as Gt, PARENT_ROUTED_PROVIDER_ADDON_ID as H, hubMainRssBudget as Ht, CapRouteResolver as I, ZERO_LOOP_DELAY as It, SocketChannel as J, startRunnerHeapWatch as Jt, UdsLocalTransportClient as K, shouldReclaim as Kt, CapRouteError as L, buildHeapSample as Lt, LocalChildRegistry as M, RSS_BUDGET_REANNOUNCE_MIN_MS as Mt, UDS_NO_ROUTE_PREFIX as N, RSS_BUDGET_RELEASE_RATIO as Nt, udsChildLogToWorkerEntry as O, HEAP_WATCH_WARN_RATIO as Ot, AGENT_CAP_FWD_ACTION as P, RUNNER_HEAP_WATCH_INTERVAL_MS as Pt, buildNativeCapProxy as Q, RUNNER_HEAP_SNAPSHOT_ENV as Qt, classifyCapRoute as R, createDeferredHeapWatchSink as Rt, buildLinkChain as S, runNpm as St, createParentUnownedCallHandler as T, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS as Tt, __resetCapUsageRegistryForTests as U, nextRssBudgetState as Ut, CapUsageRegistry as V, describeRss as Vt, getCapUsageRegistry as W, parseRssBudgetMb as Wt, FrameDecoder as X, DECISIVE_HEAP_SPACES as Xt, localEndpointPath as Y, strandedMb as Yt, encodeFrame as Z, HEAP_SPACE_REPORT_MIN_MB as Zt, AddonDepsManager as _, EVENT_PLANE_TOP_N as _n, CapabilityUnavailableError as _t, createUdsAddonContext as a, EMPTY_SOCKET_PLANE_BASELINE as an, createAddonService as at, brokerCallForCap as b, diffEventPlane as bn, resolveAddonClass as bt, getOrInitReadinessRegistryForClient as c, createSocketPlaneReader as cn, capActionName as ct, clusterEventTopic as d, EMPTY_SOCKET_DIRECTION as dn, capServiceName as dt, formatHeapSpaces as en, createBrokerDeviceManagerApi as et, getBrokerEventBus as f, createSocketDirectionCounters as fn, parseCapAction as ft, subscribePassthrough as g, socketDirectionMessages as gn, CapabilityHandle as gt, setNodeEventInterest as h, socketDirectionBytes as hn, DeviceRegistry as ht, createAddonContext as i, selectReportedSpaces as in, setWorkerNativeCapsChangeListener as it, LocalChildClient as j, HUB_RSS_BUDGET_ENV as jt, createUdsLogger as k, HUB_MAIN_HEAP_WATCH_LABEL as kt, setHubConnected as l, diffSocketPlane as ln, capActionSuffix as lt, registerEventBusService as m, sampleSocketDirection as mn, serializeTypedArrays as mt, installManifestPythonDeps as n, heapSpaceField as nn, getWorkerNativeCapSnapshot as nt, getWorkerDeviceRegistry as o, SOCKET_PLANE_TOP_N as on, validateProviderRegistrations as ot, getMoleculerEventStats as p, recordSocketFrame as pn, deserializeTypedArrays as pt, UdsLocalTransportServer as q, startHeapWatch as qt, adaptBrokerToCluster as r, readHeapSpaces as rn, mountNativeCapService as rt, getOrInitReadinessRegistry as s, createSocketPlaneMeter as sn, NATIVE_PROVIDER_SERVICE_INFIX as st, installManifestSystemDeps as t, heapSnapshotAuthorised as tn, getWorkerNativeCapProvider as tt, EVENT_TOPIC_PREFIX as u, formatSocketPlane as un, capBareAction as ut, createKernelHwAccel as v, createEventPlaneMeter as vn, copyBundledNativeModules as vt, localProviderLink as w, HEAP_RECLAIM_MIN_INTERVAL_MS as wt, brokerTransportLink as x, formatEventPlane as xn, resolveNpmInvocation as xt, resolveHwAccel as y, createEventPlaneReader as yn, installManifestNativeDeps as yt, callWithServiceDiscovery as z, createLoopDelayMeter as zt };
@@ -1,5 +1,6 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- require("./dist-DCdtLXgx.js");
2
+ require("./dist-DsoVfJSR.js");
3
+ require("./hub-cap-forward-DmHNjbB0.js");
3
4
  let node_crypto = require("node:crypto");
4
5
  node_crypto = require_chunk.__toESM(node_crypto);
5
6
  let _camstack_types_node = require("@camstack/types/node");
@@ -7650,58 +7651,6 @@ function createParentUnownedCallHandler(deps) {
7650
7651
  }
7651
7652
  };
7652
7653
  }
7653
- //#endregion
7654
- //#region src/kernel/transport/hub-cap-forward.ts
7655
- /** The Moleculer service name the hub registers for agent→hub cap forwarding. */
7656
- var HUB_CAP_FWD_SERVICE = "$hub-cap-fwd";
7657
- /** The Moleculer action (service.action) for hub cap forwarding. */
7658
- var HUB_CAP_FWD_ACTION = `${HUB_CAP_FWD_SERVICE}.forward`;
7659
- /**
7660
- * Narrow Moleculer's loosely-typed `ctx.params` to {@link HubCapForwardParams}
7661
- * without unsafe casts — mirrors `agent-cap-dispatch-service.ts:narrowParams`.
7662
- */
7663
- function narrowParams(raw) {
7664
- if (raw === null || typeof raw !== "object") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
7665
- const capName = Reflect.get(raw, "capName");
7666
- const method = Reflect.get(raw, "method");
7667
- if (typeof capName !== "string" || typeof method !== "string") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
7668
- const deviceId = Reflect.get(raw, "deviceId");
7669
- const nodeId = Reflect.get(raw, "nodeId");
7670
- const native = Reflect.get(raw, "native");
7671
- return {
7672
- capName,
7673
- method,
7674
- args: Reflect.get(raw, "args"),
7675
- deviceId: typeof deviceId === "number" ? deviceId : void 0,
7676
- nodeId: typeof nodeId === "string" && nodeId.length > 0 ? nodeId : void 0,
7677
- native: native === true ? true : void 0
7678
- };
7679
- }
7680
- /**
7681
- * Build the `$hub-cap-fwd` Moleculer `ServiceSchema`. The hub registers this on
7682
- * its broker (only the hub registers it → an agent's `broker.call` for
7683
- * `$hub-cap-fwd.forward` discovers it on the hub with no explicit nodeID pin).
7684
- *
7685
- * @param onUnownedCall The hub's cap routing handler (from
7686
- * `createParentUnownedCallHandler`). Reused verbatim so
7687
- * forwarded calls route exactly like a hub-local child's.
7688
- */
7689
- function createHubCapForwardService(onUnownedCall) {
7690
- return {
7691
- name: HUB_CAP_FWD_SERVICE,
7692
- actions: { forward: { handler: async (ctx) => {
7693
- const { capName, method, args, deviceId, nodeId, native } = narrowParams(ctx.params);
7694
- return onUnownedCall({
7695
- capName,
7696
- method,
7697
- args,
7698
- ...deviceId !== void 0 ? { deviceId } : {},
7699
- ...nodeId !== void 0 ? { nodeId } : {},
7700
- ...native === true ? { native: true } : {}
7701
- });
7702
- } } }
7703
- };
7704
- }
7705
7654
  /**
7706
7655
  * Record one cap call, if an observer is configured. Extracted so the rule —
7707
7656
  * an unresolved provider never erases the caller — has ONE place and a test.
@@ -10148,18 +10097,6 @@ Object.defineProperty(exports, "HEAP_WATCH_WARN_RATIO", {
10148
10097
  return HEAP_WATCH_WARN_RATIO;
10149
10098
  }
10150
10099
  });
10151
- Object.defineProperty(exports, "HUB_CAP_FWD_ACTION", {
10152
- enumerable: true,
10153
- get: function() {
10154
- return HUB_CAP_FWD_ACTION;
10155
- }
10156
- });
10157
- Object.defineProperty(exports, "HUB_CAP_FWD_SERVICE", {
10158
- enumerable: true,
10159
- get: function() {
10160
- return HUB_CAP_FWD_SERVICE;
10161
- }
10162
- });
10163
10100
  Object.defineProperty(exports, "HUB_MAIN_HEAP_WATCH_LABEL", {
10164
10101
  enumerable: true,
10165
10102
  get: function() {
@@ -10406,12 +10343,6 @@ Object.defineProperty(exports, "createEventPlaneReader", {
10406
10343
  return createEventPlaneReader;
10407
10344
  }
10408
10345
  });
10409
- Object.defineProperty(exports, "createHubCapForwardService", {
10410
- enumerable: true,
10411
- get: function() {
10412
- return createHubCapForwardService;
10413
- }
10414
- });
10415
10346
  Object.defineProperty(exports, "createKernelHwAccel", {
10416
10347
  enumerable: true,
10417
10348
  get: function() {
@@ -1,4 +1,4 @@
1
- import { Ut as asJsonObject } from "./dist-DwaeuknI.mjs";
1
+ import { Ut as asJsonObject } from "./dist-1DEQFmTq.mjs";
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?