@camstack/system 1.1.49 → 1.1.51

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 (53) hide show
  1. package/dist/addon-runner.js +2 -2
  2. package/dist/addon-runner.mjs +2 -2
  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/device-manager/device-manager.addon.js +1 -1
  14. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  15. package/dist/builtins/hub-forwarder/index.js +1 -1
  16. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  17. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  18. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  19. package/dist/builtins/local-network/local-network.addon.js +1 -1
  20. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  21. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  22. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  23. package/dist/builtins/platform-probe/coral-accelerators.d.ts +22 -0
  24. package/dist/builtins/platform-probe/index.js +67 -2
  25. package/dist/builtins/platform-probe/index.mjs +67 -2
  26. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  27. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  28. package/dist/builtins/snapshot/index.js +162 -12
  29. package/dist/builtins/snapshot/index.mjs +162 -12
  30. package/dist/builtins/snapshot/snapshot-media-handler.d.ts +38 -0
  31. package/dist/builtins/snapshot/snapshot.addon.d.ts +26 -0
  32. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  33. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  34. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  35. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  36. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  37. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  38. package/dist/builtins/system-config/system-config.addon.js +1 -1
  39. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  40. package/dist/builtins/winston-logging/index.js +1 -1
  41. package/dist/builtins/winston-logging/index.mjs +1 -1
  42. package/dist/{dist-8phgmJ6b.mjs → dist-BWQX9yUj.mjs} +162 -8
  43. package/dist/{dist-BDV1WKRg.js → dist-C3uHEBtP.js} +173 -7
  44. package/dist/index.d.ts +2 -0
  45. package/dist/index.js +37 -23
  46. package/dist/index.mjs +37 -24
  47. package/dist/kernel/addon-installer.d.ts +8 -0
  48. package/dist/kernel/deps/manifest-native-deps.d.ts +1 -1
  49. package/dist/kernel/deps/npm-command.d.ts +38 -0
  50. package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +2 -0
  51. package/dist/{manifest-python-deps-B09I9ems.mjs → manifest-python-deps-BA6KA9If.mjs} +298 -127
  52. package/dist/{manifest-python-deps-DAA0ULwT.js → manifest-python-deps-CVcJ9hDX.js} +309 -126
  53. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  let zod = require("zod");
2
- //#region ../types/dist/sleep-DkhOVOjW.mjs
2
+ //#region ../types/dist/event-category-CFZs3jI4.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -430,6 +430,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
430
430
  EventCategory["PipelineAnalyticsDetectionEvent"] = "pipeline-analytics.detection-event";
431
431
  EventCategory["PipelineAnalyticsFrameTracked"] = "pipeline-analytics.frame-tracked";
432
432
  /**
433
+ * Fired by `addon-post-analysis` when a parked (stationary) object appears
434
+ * (a track was promoted to a stationary-registry entry) or departs (the
435
+ * object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
436
+ * the dedicated "Stationary" section — never the live event feed. Payload:
437
+ * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
438
+ */
439
+ EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
440
+ /**
433
441
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
434
442
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
435
443
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -2980,6 +2988,15 @@ var ModelCatalogEntrySchema = zod.z.object({
2980
2988
  width: zod.z.number(),
2981
2989
  height: zod.z.number()
2982
2990
  }),
2991
+ /**
2992
+ * Channel count of the model input tensor. Omit ⇒ 3 (RGB), the default for
2993
+ * every detector / classifier / embedder. Set to 1 for a grayscale CTC text
2994
+ * recognizer (EasyOCR VGG plate-OCR: input `[N,1,H,W]`) so the preprocess
2995
+ * feeds a single-channel, EasyOCR-normalized tensor instead of the default
2996
+ * 3-channel RGB one. Threaded through `PoolModelConfig.inputChannels` to the
2997
+ * Python inference pool.
2998
+ */
2999
+ inputChannels: zod.z.number().int().positive().optional(),
2983
3000
  labels: zod.z.array(LabelDefinitionSchema).readonly(),
2984
3001
  inputLayout: zod.z.enum(["nchw", "nhwc"]).optional(),
2985
3002
  inputNormalization: zod.z.enum([
@@ -2989,6 +3006,16 @@ var ModelCatalogEntrySchema = zod.z.object({
2989
3006
  ]).optional(),
2990
3007
  preprocessMode: zod.z.enum(["letterbox", "resize"]).optional(),
2991
3008
  /**
3009
+ * Per-MODEL postprocessor override. Absent ⇒ the step's own
3010
+ * `StepDefinition.postprocessor` applies (the normal case — every model in a
3011
+ * step shares its decode). Set it when a step hosts models with DIFFERENT raw
3012
+ * output layouts under one slot: e.g. object-detection is `'yolo'` by default,
3013
+ * but a Coral SSD MobileNet build emits the `TFLite_Detection_PostProcess`
3014
+ * 4-tensor layout and needs `'ssd'`. Threaded into `PoolModelConfig.postprocessor`
3015
+ * by the engine factory (`modelEntry.postprocessor ?? def.postprocessor`).
3016
+ */
3017
+ postprocessor: zod.z.custom().optional(),
3018
+ /**
2992
3019
  * When true, the executor produces a landmark-aligned crop (similarity warp
2993
3020
  * onto the canonical template) before this step runs, instead of a plain
2994
3021
  * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
@@ -7980,7 +8007,8 @@ var EngineProvisioningSchema = zod.z.object({
7980
8007
  runtimeId: zod.z.enum([
7981
8008
  "onnx",
7982
8009
  "openvino",
7983
- "coreml"
8010
+ "coreml",
8011
+ "edgetpu"
7984
8012
  ]).nullable(),
7985
8013
  device: zod.z.string().nullable(),
7986
8014
  state: zod.z.enum([
@@ -10806,6 +10834,36 @@ var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
10806
10834
  * with the per-track detail panel and live overlay. */
10807
10835
  trackIds: zod.z.array(zod.z.string()).readonly()
10808
10836
  });
10837
+ /**
10838
+ * A parked ("stationary") object surfaced alongside occupancy — an object that
10839
+ * settled and stopped moving. It is NO LONGER a tracked object (the tracker was
10840
+ * told to forget it so it stops re-spawning tracks/events), but it IS still
10841
+ * physically present, so it keeps counting toward `frame` occupancy and is
10842
+ * listed here so the UI can show it in a dedicated "Stationary" section instead
10843
+ * of flooding the live event feed.
10844
+ */
10845
+ var StationaryObjectSchema = zod.z.object({
10846
+ id: zod.z.string(),
10847
+ className: zod.z.string(),
10848
+ bbox: zod.z.object({
10849
+ x: zod.z.number(),
10850
+ y: zod.z.number(),
10851
+ w: zod.z.number(),
10852
+ h: zod.z.number()
10853
+ }),
10854
+ frameWidth: zod.z.number().int().nonnegative(),
10855
+ frameHeight: zod.z.number().int().nonnegative(),
10856
+ /** When the source track was first seen. */
10857
+ firstSeenAt: zod.z.number().int(),
10858
+ /** When the object was recognised as parked (promotion time). */
10859
+ becameStationaryAt: zod.z.number().int(),
10860
+ /** Last frame a detection confirmed the object is still there. */
10861
+ lastConfirmedAt: zod.z.number().int(),
10862
+ /** Enrichment label carried from the source track (identity / plate). */
10863
+ label: zod.z.string().optional(),
10864
+ /** Native-resolution key-frame media key for the parked object's best image. */
10865
+ keyFrameMediaKey: zod.z.string().optional()
10866
+ });
10809
10867
  var CameraOccupancySnapshotSchema = zod.z.object({
10810
10868
  /** Frame timestamp of the inference result that produced this snapshot. */
10811
10869
  ts: zod.z.number().int(),
@@ -10814,10 +10872,15 @@ var CameraOccupancySnapshotSchema = zod.z.object({
10814
10872
  frameHeight: zod.z.number().int().nonnegative(),
10815
10873
  /** Per-zone breakdown — one entry per defined zone (user + onboard). */
10816
10874
  zones: zod.z.array(ZoneScopeBreakdownSchema).readonly(),
10817
- /** Frame-wide aggregate (everywhere, regardless of zone membership). */
10875
+ /** Frame-wide aggregate (everywhere, regardless of zone membership).
10876
+ * INCLUDES currently-confirmed stationary objects (they are still present). */
10818
10877
  frame: PerScopeBreakdownSchema,
10819
10878
  /** Detections that landed outside every zone. Empty when no zones defined. */
10820
- unzoned: PerScopeBreakdownSchema
10879
+ unzoned: PerScopeBreakdownSchema,
10880
+ /** Parked objects on this camera (additive — absent on legacy snapshots).
10881
+ * Surfaced separately so the UI shows them in a dedicated section rather
10882
+ * than as repeated tracks/events. */
10883
+ stationaryObjects: zod.z.array(StationaryObjectSchema).readonly().optional()
10821
10884
  });
10822
10885
  /**
10823
10886
  * Time-series resolution. The history methods return one bucket per
@@ -12801,6 +12864,64 @@ function looseSchema(schema) {
12801
12864
  const loose = schema.loose;
12802
12865
  return typeof loose === "function" ? loose.call(schema) : schema;
12803
12866
  }
12867
+ /**
12868
+ * Derive a COLLECTION-cap routing `addonId` from a NON-array mutation input
12869
+ * when the caller did NOT supply the top-level `{ addonId }` selector.
12870
+ *
12871
+ * Background: a `scope:'system', mode:'collection'` cap fans its ARRAY methods
12872
+ * (`listTargets`, `listTargetKinds`, …) across every provider, but routes each
12873
+ * single-object method (`send` / CRUD) to ONE provider. The runtime router
12874
+ * strips a TOP-LEVEL `addonId` selector and routes it via
12875
+ * `getProviderByAddonId`; absent that selector it falls through to the FIRST
12876
+ * registered provider — which misroutes (or hard-crashes on a partial provider)
12877
+ * when the target is owned by a DIFFERENT provider. See
12878
+ * `notification-output.cap.ts` (`Target.addonId` / `TargetKind.addonId` are
12879
+ * "stamped by each provider so the concat-fanned catalog stays routable").
12880
+ *
12881
+ * That routing `addonId` is ALREADY carried inside the mutation payload the
12882
+ * caller sends — e.g. `upsertTarget({ target: { …, addonId } })`. This helper
12883
+ * recovers it: it scans the input's DIRECT child object properties (bounded to
12884
+ * one level, first match wins) for a string `addonId`. Mirrors the child-side
12885
+ * `extractArgsAddonId` fallback in `child-cap-dispatch.ts`, which reads a
12886
+ * top-level `addonId` off the raw args; this covers the one-level-nested case
12887
+ * the top-level scan misses.
12888
+ *
12889
+ * Only used for non-array collection methods (array fan-out is never rerouted),
12890
+ * so it can never collapse a catalog aggregation onto a single provider. `null`
12891
+ * / non-object inputs yield `undefined` (fall back to the first provider,
12892
+ * preserving single-provider and id-only-payload back-compat).
12893
+ */
12894
+ function extractNestedAddonId(input) {
12895
+ if (input === null || typeof input !== "object") return void 0;
12896
+ for (const value of Object.values(input)) if (value !== null && typeof value === "object") {
12897
+ const nested = value.addonId;
12898
+ if (typeof nested === "string") return nested;
12899
+ }
12900
+ }
12901
+ /**
12902
+ * True when an OBJECT input schema declares a top-level `addonId` field.
12903
+ *
12904
+ * Such a cap method routes explicitly via the top-level `{ addonId }` selector
12905
+ * (the `llm.generate` / `deleteProfile` posture). The runtime router therefore
12906
+ * MUST NOT also fall back to {@link extractNestedAddonId} for it — that would
12907
+ * let an incidental nested `addonId` (e.g. a key inside a free-form `jsonSchema`
12908
+ * record) hijack routing. Nested recovery is reserved for methods whose input
12909
+ * carries NO top-level selector but embeds the owning `addonId` inside a domain
12910
+ * entity (`upsertTarget({ target: { addonId } })`, `upsertProfile({ profile })`).
12911
+ *
12912
+ * Accepts both Zod 4 (`.shape` / `_def.shape`) and legacy shapes; returns false
12913
+ * for non-object schemas.
12914
+ */
12915
+ function objectInputDeclaresAddonId(schema) {
12916
+ if (schema === null || typeof schema !== "object" && typeof schema !== "function") return false;
12917
+ const direct = schema.shape;
12918
+ const shape = direct !== void 0 && direct !== null ? direct : resolveDefShape(schema._def?.shape);
12919
+ return shape !== void 0 && shape !== null && typeof shape === "object" && Object.prototype.hasOwnProperty.call(shape, "addonId");
12920
+ }
12921
+ /** `_def.shape` may be a thunk (Zod defers object-shape evaluation) or a plain record. */
12922
+ function resolveDefShape(defShape) {
12923
+ return typeof defShape === "function" ? defShape() : defShape;
12924
+ }
12804
12925
  /** Auth level → base-procedure key. `superAdmin` collapses to `admin`. */
12805
12926
  function procedureAuthKey(auth) {
12806
12927
  if (auth === "public") return "public";
@@ -15531,6 +15652,22 @@ var TrackSnapshotSchema = zod.z.object({
15531
15652
  /** MediaStore key; resolve via `getTrackMedia({ trackId })`. */
15532
15653
  mediaKey: zod.z.string()
15533
15654
  });
15655
+ /**
15656
+ * One audio-classification label heard on the track's camera while the
15657
+ * track was alive, aggregated per label. An "episode" is one persisted
15658
+ * audio event (the confident-classification path: score ≥ the device's
15659
+ * `classificationMinScore`, class-change-or-heartbeat coalesced) — NOT
15660
+ * one 32 ms inference chunk, so counts stay human-scaled.
15661
+ */
15662
+ var TrackAudioLabelSchema = zod.z.object({
15663
+ label: zod.z.string(),
15664
+ /** Highest classification score observed across the label's episodes. */
15665
+ peakScore: zod.z.number(),
15666
+ /** Number of coalesced audio-event episodes carrying this label. */
15667
+ count: zod.z.number(),
15668
+ firstAt: zod.z.number(),
15669
+ lastAt: zod.z.number()
15670
+ });
15534
15671
  var TrackSchema = zod.z.object({
15535
15672
  trackId: zod.z.string(),
15536
15673
  deviceId: zod.z.number(),
@@ -15562,7 +15699,11 @@ var TrackSchema = zod.z.object({
15562
15699
  bestEventId: zod.z.string().optional(),
15563
15700
  /** Tag of the importance sub-signal that dominated the score
15564
15701
  * (identity|dwell|proximity|class|confidence|travel|zone). */
15565
- importanceReason: zod.z.string().optional()
15702
+ importanceReason: zod.z.string().optional(),
15703
+ /** Audio-classification labels heard on the camera during the track's
15704
+ * life (score ≥ device `classificationMinScore`), aggregated per label.
15705
+ * Absent on legacy rows / tracks with no confident audio. */
15706
+ audioLabels: zod.z.array(TrackAudioLabelSchema).readonly().optional()
15566
15707
  });
15567
15708
  var BaseEventFields = {
15568
15709
  id: zod.z.string(),
@@ -17811,7 +17952,15 @@ var webrtcSessionCapability = {
17811
17952
  */
17812
17953
  disableIpv6: zod.z.boolean().optional(),
17813
17954
  /** Subscriber attribution. See `createSession` for the contract. */
17814
- consumerAttribution: BrokerConsumerAttributionSchema.optional()
17955
+ consumerAttribution: BrokerConsumerAttributionSchema.optional(),
17956
+ /**
17957
+ * Client-side stream hints (viewport, downlink) — same contract as
17958
+ * `createSession.hints`. Client-offer viewers (the RN viewer's
17959
+ * `WebrtcLiveSession`) negotiate via `handleOffer`, so without this
17960
+ * field their hints were silently stripped by the schema and the
17961
+ * adaptive ladder started blind on the client's display size.
17962
+ */
17963
+ hints: webrtcClientHintsSchema.optional()
17815
17964
  }), zod.z.object({
17816
17965
  sessionId: zod.z.string(),
17817
17966
  sdpAnswer: zod.z.string()
@@ -20139,6 +20288,10 @@ var GpuInfoSchema = zod.z.object({
20139
20288
  memoryMB: zod.z.number().optional()
20140
20289
  });
20141
20290
  var NpuInfoSchema = zod.z.object({ type: zod.z.enum(["apple-ane", "intel-npu"]) });
20291
+ var CoralInfoSchema = zod.z.object({
20292
+ type: zod.z.literal("coral-edgetpu"),
20293
+ bus: zod.z.string().optional()
20294
+ });
20142
20295
  var HardwareInfoSchema = zod.z.object({
20143
20296
  platform: HardwarePlatformSchema,
20144
20297
  arch: HardwareArchSchema,
@@ -20147,7 +20300,8 @@ var HardwareInfoSchema = zod.z.object({
20147
20300
  totalRAM_MB: zod.z.number(),
20148
20301
  availableRAM_MB: zod.z.number(),
20149
20302
  gpu: GpuInfoSchema.nullable(),
20150
- npu: NpuInfoSchema.nullable()
20303
+ npu: NpuInfoSchema.nullable(),
20304
+ coral: CoralInfoSchema.nullable().optional()
20151
20305
  });
20152
20306
  var PlatformScoreSchema = zod.z.object({
20153
20307
  runtime: zod.z.enum(["node", "python"]),
@@ -26436,6 +26590,12 @@ Object.defineProperty(exports, "expandCapMethods", {
26436
26590
  return expandCapMethods;
26437
26591
  }
26438
26592
  });
26593
+ Object.defineProperty(exports, "extractNestedAddonId", {
26594
+ enumerable: true,
26595
+ get: function() {
26596
+ return extractNestedAddonId;
26597
+ }
26598
+ });
26439
26599
  Object.defineProperty(exports, "filesystemBrowseCapability", {
26440
26600
  enumerable: true,
26441
26601
  get: function() {
@@ -26532,6 +26692,12 @@ Object.defineProperty(exports, "normalizeUnit", {
26532
26692
  return normalizeUnit;
26533
26693
  }
26534
26694
  });
26695
+ Object.defineProperty(exports, "objectInputDeclaresAddonId", {
26696
+ enumerable: true,
26697
+ get: function() {
26698
+ return objectInputDeclaresAddonId;
26699
+ }
26700
+ });
26535
26701
  Object.defineProperty(exports, "parseJsonObject", {
26536
26702
  enumerable: true,
26537
26703
  get: function() {
package/dist/index.d.ts CHANGED
@@ -10,6 +10,8 @@ export { proxyToUpstream } from './http/reverse-proxy.js';
10
10
  export type { ReverseProxyOptions } from './http/reverse-proxy.js';
11
11
  export { createFileDataPlaneHandler } from './http/file-data-plane.js';
12
12
  export type { FileDataPlaneOptions } from './http/file-data-plane.js';
13
+ export { createAddonDataPlaneFacility } from './kernel/moleculer/addon-data-plane-facility.js';
14
+ export type { AddonDataPlaneFacility, DataPlaneSink, } from './kernel/moleculer/addon-data-plane-facility.js';
13
15
  export { downloadModel, downloadFile, fetchJson, ensureModel, getModelFilePath, isModelDownloaded, deleteModelFromDisk, collectModelFiles, } from './download/model-downloader.js';
14
16
  export type { DownloadProgressCallback } from './download/model-downloader.js';
15
17
  export { ModelDownloadService } from './download/model-download-service.js';
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-BDV1WKRg.js");
3
+ const require_dist = require("./dist-C3uHEBtP.js");
4
4
  const require_model_download_service = require("./model-download-service-D-Umz4-L.js");
5
+ const require_manifest_python_deps = require("./manifest-python-deps-CVcJ9hDX.js");
5
6
  const require_resource_monitor = require("./resource-monitor-DNNomR-i.js");
6
7
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
7
8
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
@@ -21,7 +22,6 @@ const require_builtins_local_auth_local_auth_addon = require("./builtins/local-a
21
22
  require("./builtins/local-auth/index.js");
22
23
  const require_builtins_device_manager_device_manager_addon = require("./builtins/device-manager/device-manager.addon.js");
23
24
  require("./builtins/device-manager/index.js");
24
- const require_manifest_python_deps = require("./manifest-python-deps-DAA0ULwT.js");
25
25
  const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
26
26
  let _camstack_types_node = require("@camstack/types/node");
27
27
  let zod = require("zod");
@@ -32,6 +32,7 @@ node_fs = require_chunk.__toESM(node_fs);
32
32
  let node_path = require("node:path");
33
33
  node_path = require_chunk.__toESM(node_path, 1);
34
34
  let node_crypto = require("node:crypto");
35
+ let _camstack_types_addon = require("@camstack/types/addon");
35
36
  let node_child_process = require("node:child_process");
36
37
  let node_util = require("node:util");
37
38
  node_util = require_chunk.__toESM(node_util);
@@ -40,7 +41,6 @@ node_vm = require_chunk.__toESM(node_vm);
40
41
  let node_os = require("node:os");
41
42
  node_os = require_chunk.__toESM(node_os);
42
43
  let node_fs_promises = require("node:fs/promises");
43
- let _camstack_types_addon = require("@camstack/types/addon");
44
44
  let node_events = require("node:events");
45
45
  let node_stream = require("node:stream");
46
46
  node_stream = require_chunk.__toESM(node_stream, 1);
@@ -3064,6 +3064,24 @@ var AddonInstaller = class AddonInstaller {
3064
3064
  else this.installSource = "npm";
3065
3065
  }
3066
3066
  /**
3067
+ * Where a bootstrapped npm lives when the host has none on PATH (packaged
3068
+ * Electron agents ship a bare node binary). Persistent — sibling of the
3069
+ * installed addons, survives restarts, downloaded at most once per host.
3070
+ */
3071
+ get npmCacheDir() {
3072
+ return node_path.join(this.addonsDir, ".npm-bootstrap");
3073
+ }
3074
+ /** Shared options for every npm invocation this installer performs. */
3075
+ npmRunOptions(cwd, timeout) {
3076
+ return {
3077
+ cacheDir: this.npmCacheDir,
3078
+ registry: this.registry,
3079
+ logger: this.logger,
3080
+ cwd,
3081
+ timeout
3082
+ };
3083
+ }
3084
+ /**
3067
3085
  * Derive the bootstrap addon list from a meta-package's runtime dependencies.
3068
3086
  * Single source of truth: the meta-package's `package.json` declares which
3069
3087
  * `@camstack/addon-*` packages the deployment needs. Replaces previously
@@ -3247,17 +3265,16 @@ var AddonInstaller = class AddonInstaller {
3247
3265
  });
3248
3266
  const strippedDeps = stripBundledDeps(pkgData);
3249
3267
  if (strippedDeps["dependencies"] && typeof strippedDeps["dependencies"] === "object" && Object.keys(strippedDeps["dependencies"]).length > 0) try {
3250
- await execFileAsync("npm", [
3268
+ await require_manifest_python_deps.runNpm([
3251
3269
  "install",
3252
3270
  "--omit=dev",
3253
3271
  "--ignore-scripts=false"
3254
- ], {
3255
- cwd: targetDir,
3256
- timeout: 12e4
3257
- });
3258
- } catch {}
3272
+ ], this.npmRunOptions(targetDir, 12e4));
3273
+ } catch (err) {
3274
+ this.logger.warn(`${packageName} — npm install failed (continuing)`, { meta: { error: require_dist.errMsg(err) } });
3275
+ }
3259
3276
  try {
3260
- await require_manifest_python_deps.installManifestNativeDeps(targetDir, pkgData, this.logger, this.registry);
3277
+ await require_manifest_python_deps.installManifestNativeDeps(targetDir, pkgData, this.logger, this.registry, this.npmCacheDir);
3261
3278
  } catch (err) {
3262
3279
  this.logger.warn(`${packageName} — native deps install failed (continuing)`, { meta: { error: require_dist.errMsg(err) } });
3263
3280
  }
@@ -3288,7 +3305,7 @@ var AddonInstaller = class AddonInstaller {
3288
3305
  tmpDir
3289
3306
  ];
3290
3307
  if (this.registry) args.push("--registry", this.registry);
3291
- const { stdout } = await execFileAsync("npm", args, { timeout: 12e4 });
3308
+ const { stdout } = await require_manifest_python_deps.runNpm(args, this.npmRunOptions(tmpDir, 12e4));
3292
3309
  const tgzFiles = node_fs.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
3293
3310
  if (tgzFiles.length === 0) throw new Error(`npm pack produced no tgz. stdout: ${stdout.trim()}`);
3294
3311
  return node_path.join(tmpDir, tgzFiles[0]);
@@ -3429,7 +3446,7 @@ var AddonInstaller = class AddonInstaller {
3429
3446
  if (strippedRuntimeDeps != null && typeof strippedRuntimeDeps === "object" && Object.keys(strippedRuntimeDeps).length > 0) {
3430
3447
  this.logger.info(`${pkgView.name} — installing runtime dependencies`, { meta: { stagingDir: pkgDir } });
3431
3448
  try {
3432
- await execFileAsync("npm", [
3449
+ await require_manifest_python_deps.runNpm([
3433
3450
  "install",
3434
3451
  "--omit=dev",
3435
3452
  "--omit=peer",
@@ -3437,16 +3454,13 @@ var AddonInstaller = class AddonInstaller {
3437
3454
  "--no-fund",
3438
3455
  "--no-package-lock",
3439
3456
  ...this.registry ? ["--registry", this.registry] : []
3440
- ], {
3441
- cwd: pkgDir,
3442
- timeout: 24e4
3443
- });
3457
+ ], this.npmRunOptions(pkgDir, 24e4));
3444
3458
  } catch (err) {
3445
- this.logger.warn(`${pkgView.name} — npm install failed (continuing)`, { meta: { error: err instanceof Error ? err.message : String(err) } });
3459
+ throw new Error(`${pkgView.name} — runtime dependency install failed: ${require_dist.errMsg(err)}`, { cause: err });
3446
3460
  }
3447
3461
  }
3448
3462
  try {
3449
- await require_manifest_python_deps.installManifestNativeDeps(pkgDir, pkgView.raw, this.logger, this.registry);
3463
+ await require_manifest_python_deps.installManifestNativeDeps(pkgDir, pkgView.raw, this.logger, this.registry, this.npmCacheDir);
3450
3464
  } catch (nativeErr) {
3451
3465
  throw new Error(`${pkgView.name} — native deps install failed: ${require_dist.errMsg(nativeErr)}`, { cause: nativeErr });
3452
3466
  }
@@ -3748,10 +3762,7 @@ var AddonInstaller = class AddonInstaller {
3748
3762
  if (!(!node_fs.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
3749
3763
  this.logger.info(`${packageName} — building (dist/ missing or incomplete)`);
3750
3764
  try {
3751
- await execFileAsync("npm", ["run", "build"], {
3752
- cwd: sourceDir,
3753
- timeout: 18e4
3754
- });
3765
+ await require_manifest_python_deps.runNpm(["run", "build"], this.npmRunOptions(sourceDir, 18e4));
3755
3766
  } catch (err) {
3756
3767
  const msg = require_dist.errMsg(err);
3757
3768
  this.logger.warn(`${packageName} auto-build failed`, { meta: { error: msg } });
@@ -5121,7 +5132,9 @@ function buildOneCapRouter(def, primitives, services) {
5121
5132
  if (isCollection) {
5122
5133
  const { rest, picked } = stripKeys(input, ["nodeId", "addonId"]);
5123
5134
  const nodeId = typeof picked.nodeId === "string" ? picked.nodeId : void 0;
5124
- const addonId = typeof picked.addonId === "string" ? picked.addonId : void 0;
5135
+ const topLevelAddonId = typeof picked.addonId === "string" ? picked.addonId : void 0;
5136
+ const canRecoverNestedAddonId = !require_dist.isArrayOutputSchema(method.schema.output) && !require_dist.objectInputDeclaresAddonId(method.schema.input);
5137
+ const addonId = topLevelAddonId ?? (canRecoverNestedAddonId ? require_dist.extractNestedAddonId(rest) : void 0);
5125
5138
  return resolveProviderForCall(capName, nodeId, () => getLocal(ctx, addonId), services)[method.name]?.(rest);
5126
5139
  }
5127
5140
  const { rest, picked } = stripKeys(input, ["nodeId"]);
@@ -93513,6 +93526,7 @@ exports.contentTypeFor = require_model_download_service.contentTypeFor;
93513
93526
  exports.copyDirRecursive = copyDirRecursive;
93514
93527
  exports.copyExtraFileDirs = copyExtraFileDirs;
93515
93528
  exports.createAddonContext = require_manifest_python_deps.createAddonContext;
93529
+ exports.createAddonDataPlaneFacility = require_manifest_python_deps.createAddonDataPlaneFacility;
93516
93530
  exports.createAddonService = require_manifest_python_deps.createAddonService;
93517
93531
  exports.createAuthenticatedFileServer = require_model_download_service.createAuthenticatedFileServer;
93518
93532
  exports.createBroker = createBroker;
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
- import { A as isObjectInput, Ct as readinessKey, H as procedureAuthKey, I as looseSchema, M as kebabToCamel, N as lifecycleJobSchema, O as isArrayOutputSchema, St as parseJsonUnknown$1, Tt as scopeKey, ct as EventCategory$1, et as errMsg$1, ft as asJsonObject$1, gt as emitDownForOwnedCaps, ht as createEvent, it as DEVICE_STATUS_METHOD, j as isVoidInput, k as isCollectionArrayMethod, lt as ReadinessRegistry, mt as asString$1, nt as DATAPLANE_SECRET_HEADER$1, o as METHOD_ACCESS_MAP, p as addonSettingsCapability, pt as asNumber, rt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, s as RUNTIME_DEFAULTS, t as ALL_CAPABILITY_DEFINITIONS, ut as ReadinessTimeoutError, vt as expandCapMethods, wt as resolveCapMount, xt as parseJsonObject } from "./dist-8phgmJ6b.mjs";
1
+ import { A as isCollectionArrayMethod, Ct as parseJsonUnknown$1, E as extractNestedAddonId, Et as scopeKey, L as looseSchema, M as isVoidInput, N as kebabToCamel, Ot as EventCategory$1, P as lifecycleJobSchema, St as parseJsonObject, Tt as resolveCapMount, V as objectInputDeclaresAddonId, W as procedureAuthKey, _t as emitDownForOwnedCaps, at as DEVICE_SETTINGS_CONTRIBUTION_METHODS, dt as ReadinessTimeoutError, gt as createEvent, ht as asString$1, it as DATAPLANE_SECRET_HEADER$1, j as isObjectInput, k as isArrayOutputSchema, mt as asNumber, nt as errMsg$1, o as METHOD_ACCESS_MAP, ot as DEVICE_STATUS_METHOD, p as addonSettingsCapability, pt as asJsonObject$1, s as RUNTIME_DEFAULTS, t as ALL_CAPABILITY_DEFINITIONS, ut as ReadinessRegistry, wt as readinessKey, yt as expandCapMethods } from "./dist-BWQX9yUj.mjs";
2
2
  import { a as downloadModel, c as getModelFilePath, d as contentTypeFor, f as createAuthenticatedFileServer, h as resolveFilePath, i as downloadFile, l as isModelDownloaded, m as parseTokenizedUrl, n as collectModelFiles, o as ensureModel, p as parseRangeHeader, r as deleteModelFromDisk, s as fetchJson, t as ModelDownloadService, u as createFileDataPlaneHandler } from "./model-download-service-C-IHWnXx.mjs";
3
+ import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, bt as resolveAddonClass, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, xt as createAddonDataPlaneFacility, y as __resetCapUsageRegistryForTests, yt as runNpm, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-BA6KA9If.mjs";
3
4
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Le3l0qS2.mjs";
4
5
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
5
6
  import { SqliteSettingsAddon, t as SqliteSettingsBackend } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
@@ -19,7 +20,6 @@ import { LocalAuthAddon, a as require_ms, c as __esmMin, d as __toCommonJS, f as
19
20
  import "./builtins/local-auth/index.mjs";
20
21
  import { DeviceManagerAddon } from "./builtins/device-manager/device-manager.addon.mjs";
21
22
  import "./builtins/device-manager/index.mjs";
22
- import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, y as __resetCapUsageRegistryForTests, yt as resolveAddonClass, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-B09I9ems.mjs";
23
23
  import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
24
24
  import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
25
25
  import { z } from "zod";
@@ -29,13 +29,13 @@ import { accessSync, constants, existsSync, mkdirSync, readFileSync } from "node
29
29
  import * as path$39 from "node:path";
30
30
  import { dirname, isAbsolute, join, posix, resolve, win32 } from "node:path";
31
31
  import { X509Certificate, createHash, randomUUID, timingSafeEqual } from "node:crypto";
32
+ import { asJsonObject, parseJsonUnknown } from "@camstack/types/addon";
32
33
  import { execFile, spawn } from "node:child_process";
33
34
  import * as util$10 from "node:util";
34
35
  import { promisify } from "node:util";
35
36
  import * as vm from "node:vm";
36
37
  import * as os$18 from "node:os";
37
38
  import { lstat, readdir, readlink, realpath } from "node:fs/promises";
38
- import { asJsonObject, parseJsonUnknown } from "@camstack/types/addon";
39
39
  import { EventEmitter } from "node:events";
40
40
  import As from "node:stream";
41
41
  import { StringDecoder } from "node:string_decoder";
@@ -3056,6 +3056,24 @@ var AddonInstaller = class AddonInstaller {
3056
3056
  else this.installSource = "npm";
3057
3057
  }
3058
3058
  /**
3059
+ * Where a bootstrapped npm lives when the host has none on PATH (packaged
3060
+ * Electron agents ship a bare node binary). Persistent — sibling of the
3061
+ * installed addons, survives restarts, downloaded at most once per host.
3062
+ */
3063
+ get npmCacheDir() {
3064
+ return path$39.join(this.addonsDir, ".npm-bootstrap");
3065
+ }
3066
+ /** Shared options for every npm invocation this installer performs. */
3067
+ npmRunOptions(cwd, timeout) {
3068
+ return {
3069
+ cacheDir: this.npmCacheDir,
3070
+ registry: this.registry,
3071
+ logger: this.logger,
3072
+ cwd,
3073
+ timeout
3074
+ };
3075
+ }
3076
+ /**
3059
3077
  * Derive the bootstrap addon list from a meta-package's runtime dependencies.
3060
3078
  * Single source of truth: the meta-package's `package.json` declares which
3061
3079
  * `@camstack/addon-*` packages the deployment needs. Replaces previously
@@ -3239,17 +3257,16 @@ var AddonInstaller = class AddonInstaller {
3239
3257
  });
3240
3258
  const strippedDeps = stripBundledDeps(pkgData);
3241
3259
  if (strippedDeps["dependencies"] && typeof strippedDeps["dependencies"] === "object" && Object.keys(strippedDeps["dependencies"]).length > 0) try {
3242
- await execFileAsync("npm", [
3260
+ await runNpm([
3243
3261
  "install",
3244
3262
  "--omit=dev",
3245
3263
  "--ignore-scripts=false"
3246
- ], {
3247
- cwd: targetDir,
3248
- timeout: 12e4
3249
- });
3250
- } catch {}
3264
+ ], this.npmRunOptions(targetDir, 12e4));
3265
+ } catch (err) {
3266
+ this.logger.warn(`${packageName} — npm install failed (continuing)`, { meta: { error: errMsg$1(err) } });
3267
+ }
3251
3268
  try {
3252
- await installManifestNativeDeps(targetDir, pkgData, this.logger, this.registry);
3269
+ await installManifestNativeDeps(targetDir, pkgData, this.logger, this.registry, this.npmCacheDir);
3253
3270
  } catch (err) {
3254
3271
  this.logger.warn(`${packageName} — native deps install failed (continuing)`, { meta: { error: errMsg$1(err) } });
3255
3272
  }
@@ -3280,7 +3297,7 @@ var AddonInstaller = class AddonInstaller {
3280
3297
  tmpDir
3281
3298
  ];
3282
3299
  if (this.registry) args.push("--registry", this.registry);
3283
- const { stdout } = await execFileAsync("npm", args, { timeout: 12e4 });
3300
+ const { stdout } = await runNpm(args, this.npmRunOptions(tmpDir, 12e4));
3284
3301
  const tgzFiles = fs$17.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
3285
3302
  if (tgzFiles.length === 0) throw new Error(`npm pack produced no tgz. stdout: ${stdout.trim()}`);
3286
3303
  return path$39.join(tmpDir, tgzFiles[0]);
@@ -3421,7 +3438,7 @@ var AddonInstaller = class AddonInstaller {
3421
3438
  if (strippedRuntimeDeps != null && typeof strippedRuntimeDeps === "object" && Object.keys(strippedRuntimeDeps).length > 0) {
3422
3439
  this.logger.info(`${pkgView.name} — installing runtime dependencies`, { meta: { stagingDir: pkgDir } });
3423
3440
  try {
3424
- await execFileAsync("npm", [
3441
+ await runNpm([
3425
3442
  "install",
3426
3443
  "--omit=dev",
3427
3444
  "--omit=peer",
@@ -3429,16 +3446,13 @@ var AddonInstaller = class AddonInstaller {
3429
3446
  "--no-fund",
3430
3447
  "--no-package-lock",
3431
3448
  ...this.registry ? ["--registry", this.registry] : []
3432
- ], {
3433
- cwd: pkgDir,
3434
- timeout: 24e4
3435
- });
3449
+ ], this.npmRunOptions(pkgDir, 24e4));
3436
3450
  } catch (err) {
3437
- this.logger.warn(`${pkgView.name} — npm install failed (continuing)`, { meta: { error: err instanceof Error ? err.message : String(err) } });
3451
+ throw new Error(`${pkgView.name} — runtime dependency install failed: ${errMsg$1(err)}`, { cause: err });
3438
3452
  }
3439
3453
  }
3440
3454
  try {
3441
- await installManifestNativeDeps(pkgDir, pkgView.raw, this.logger, this.registry);
3455
+ await installManifestNativeDeps(pkgDir, pkgView.raw, this.logger, this.registry, this.npmCacheDir);
3442
3456
  } catch (nativeErr) {
3443
3457
  throw new Error(`${pkgView.name} — native deps install failed: ${errMsg$1(nativeErr)}`, { cause: nativeErr });
3444
3458
  }
@@ -3740,10 +3754,7 @@ var AddonInstaller = class AddonInstaller {
3740
3754
  if (!(!fs$17.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
3741
3755
  this.logger.info(`${packageName} — building (dist/ missing or incomplete)`);
3742
3756
  try {
3743
- await execFileAsync("npm", ["run", "build"], {
3744
- cwd: sourceDir,
3745
- timeout: 18e4
3746
- });
3757
+ await runNpm(["run", "build"], this.npmRunOptions(sourceDir, 18e4));
3747
3758
  } catch (err) {
3748
3759
  const msg = errMsg$1(err);
3749
3760
  this.logger.warn(`${packageName} auto-build failed`, { meta: { error: msg } });
@@ -5113,7 +5124,9 @@ function buildOneCapRouter(def, primitives, services) {
5113
5124
  if (isCollection) {
5114
5125
  const { rest, picked } = stripKeys(input, ["nodeId", "addonId"]);
5115
5126
  const nodeId = typeof picked.nodeId === "string" ? picked.nodeId : void 0;
5116
- const addonId = typeof picked.addonId === "string" ? picked.addonId : void 0;
5127
+ const topLevelAddonId = typeof picked.addonId === "string" ? picked.addonId : void 0;
5128
+ const canRecoverNestedAddonId = !isArrayOutputSchema(method.schema.output) && !objectInputDeclaresAddonId(method.schema.input);
5129
+ const addonId = topLevelAddonId ?? (canRecoverNestedAddonId ? extractNestedAddonId(rest) : void 0);
5117
5130
  return resolveProviderForCall(capName, nodeId, () => getLocal(ctx, addonId), services)[method.name]?.(rest);
5118
5131
  }
5119
5132
  const { rest, picked } = stripKeys(input, ["nodeId"]);
@@ -93368,4 +93381,4 @@ async function stageFrameworkLockstep(input) {
93368
93381
  return results;
93369
93382
  }
93370
93383
  //#endregion
93371
- export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, ALL_CAPABILITY_DEFINITIONS, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CustomActionRegistry, DEFAULT_DATA_PATH, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FRAMEWORK_LOCKSTEP, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LifecycleJobEngine, LifecycleStateMachine, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, RESTART_MARKER_FILE, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, __resetCapUsageRegistryForTests, adaptBrokerToCluster, addonSettingsCapability, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyCapRoute, clearPendingRestart, clusterSecretMatches, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonService, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createKernelHwAccel, createLocalTransport, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensurePython, ensureTlsCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hashClusterSecret, installManifestNativeDeps, installManifestPythonDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcChildLink, ipcParentLink, isAddonDeploySource, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, proxyToUpstream, readPendingRestart, readinessKey, registerEventBusService, resolveFilePath, resolveHwAccel, scheduleSelfRestart, scopeKey, scopesAllowDeviceCap, serializeTypedArrays, setHubConnected, setNodeEventInterest, stageFrameworkLockstep, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, writePendingRestart };
93384
+ export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, ALL_CAPABILITY_DEFINITIONS, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CustomActionRegistry, DEFAULT_DATA_PATH, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FRAMEWORK_LOCKSTEP, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LifecycleJobEngine, LifecycleStateMachine, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, RESTART_MARKER_FILE, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, __resetCapUsageRegistryForTests, adaptBrokerToCluster, addonSettingsCapability, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyCapRoute, clearPendingRestart, clusterSecretMatches, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createKernelHwAccel, createLocalTransport, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensurePython, ensureTlsCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hashClusterSecret, installManifestNativeDeps, installManifestPythonDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcChildLink, ipcParentLink, isAddonDeploySource, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, proxyToUpstream, readPendingRestart, readinessKey, registerEventBusService, resolveFilePath, resolveHwAccel, scheduleSelfRestart, scopeKey, scopesAllowDeviceCap, serializeTypedArrays, setHubConnected, setNodeEventInterest, stageFrameworkLockstep, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, writePendingRestart };
@@ -49,6 +49,14 @@ export declare class AddonInstaller {
49
49
  */
50
50
  readonly manifest: AddonManifest;
51
51
  constructor(config: AddonInstallerConfig, logger?: IScopedLogger);
52
+ /**
53
+ * Where a bootstrapped npm lives when the host has none on PATH (packaged
54
+ * Electron agents ship a bare node binary). Persistent — sibling of the
55
+ * installed addons, survives restarts, downloaded at most once per host.
56
+ */
57
+ private get npmCacheDir();
58
+ /** Shared options for every npm invocation this installer performs. */
59
+ private npmRunOptions;
52
60
  /**
53
61
  * Derive the bootstrap addon list from a meta-package's runtime dependencies.
54
62
  * Single source of truth: the meta-package's `package.json` declares which
@@ -22,4 +22,4 @@ import { IScopedLogger } from '@camstack/types';
22
22
  * ABI; surface a clear error at first `import` of the native module
23
23
  * otherwise).
24
24
  */
25
- export declare function installManifestNativeDeps(addonDir: string, pkgRaw: Record<string, unknown>, logger: IScopedLogger, registry?: string): Promise<void>;
25
+ export declare function installManifestNativeDeps(addonDir: string, pkgRaw: Record<string, unknown>, logger: IScopedLogger, registry?: string, npmCacheDir?: string): Promise<void>;