@camstack/system 1.1.35 → 1.1.36

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 (48) hide show
  1. package/dist/addon-runner.js +87 -35
  2. package/dist/addon-runner.mjs +87 -35
  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/index.js +1 -1
  24. package/dist/builtins/platform-probe/index.mjs +1 -1
  25. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  26. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  27. package/dist/builtins/snapshot/index.js +1 -1
  28. package/dist/builtins/snapshot/index.mjs +1 -1
  29. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  30. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  31. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  32. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  33. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  34. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  35. package/dist/builtins/system-config/system-config.addon.js +1 -1
  36. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  37. package/dist/builtins/winston-logging/index.js +1 -1
  38. package/dist/builtins/winston-logging/index.mjs +1 -1
  39. package/dist/{dist-DlGZpWo8.mjs → dist-C7oOY4iL.mjs} +80 -118
  40. package/dist/{dist-DriXJoVg.js → dist-COIhbSao.js} +80 -118
  41. package/dist/index.js +2 -2
  42. package/dist/index.mjs +2 -2
  43. package/dist/kernel/moleculer/child-cap-descriptors.d.ts +34 -0
  44. package/dist/kernel/moleculer/child-cap-dispatch.d.ts +10 -2
  45. package/dist/kernel/transport/child-cap-protocol.d.ts +20 -0
  46. package/dist/{manifest-python-deps-MUu1e33G.mjs → manifest-python-deps-BYIV8-rc.mjs} +5 -3
  47. package/dist/{manifest-python-deps-jZA_Qorz.js → manifest-python-deps-CZFqI4wp.js} +5 -3
  48. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { bt as parseJsonObject, et as BaseAddon, q as storageCapability, u as StorageLocationTypeSchema } from "../../dist-DlGZpWo8.mjs";
1
+ import { bt as parseJsonObject, et as BaseAddon, q as storageCapability, u as StorageLocationTypeSchema } from "../../dist-C7oOY4iL.mjs";
2
2
  import * as path$1 from "node:path";
3
3
  import * as fs from "node:fs/promises";
4
4
  import { buildStorageLocationRegistry } from "@camstack/system";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DriXJoVg.js");
6
+ const require_dist = require("../../dist-COIhbSao.js");
7
7
  //#region src/builtins/system-config/system-config.addon.ts
8
8
  /**
9
9
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -1,4 +1,4 @@
1
- import { $ as errMsg, et as BaseAddon, vt as hydrateSchema } from "../../dist-DlGZpWo8.mjs";
1
+ import { $ as errMsg, et as BaseAddon, vt as hydrateSchema } from "../../dist-C7oOY4iL.mjs";
2
2
  //#region src/builtins/system-config/system-config.addon.ts
3
3
  /**
4
4
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DriXJoVg.js");
6
+ const require_dist = require("../../dist-COIhbSao.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { P as logDestinationCapability, et as BaseAddon } from "../../dist-DlGZpWo8.mjs";
1
+ import { P as logDestinationCapability, et as BaseAddon } from "../../dist-C7oOY4iL.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- //#region ../types/dist/sleep-Cc14_yxc.mjs
2
+ //#region ../types/dist/sleep-DiQ8xW1M.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -7707,7 +7707,7 @@ var BoundingBoxSchema = z.object({
7707
7707
  w: z.number(),
7708
7708
  h: z.number()
7709
7709
  });
7710
- var SpatialDetectionSchema = z.object({
7710
+ z.object({
7711
7711
  class: z.string(),
7712
7712
  originalClass: z.string(),
7713
7713
  score: z.number(),
@@ -7912,11 +7912,6 @@ var PipelineSchemaSchema = z.object({
7912
7912
  selectedEngine: PipelineEngineChoiceSchema,
7913
7913
  slots: z.array(PipelineSlotSchemaSchema).readonly()
7914
7914
  });
7915
- var DetectorOutputSchema = z.object({
7916
- detections: z.array(SpatialDetectionSchema).readonly(),
7917
- inferenceMs: z.number(),
7918
- modelId: z.string()
7919
- });
7920
7915
  var EngineProvisioningSchema = z.object({
7921
7916
  runtimeId: z.enum([
7922
7917
  "onnx",
@@ -8082,23 +8077,23 @@ var pipelineExecutorCapability = {
8082
8077
  auth: "admin"
8083
8078
  }),
8084
8079
  /**
8085
- * Reset ONE node's detection-pipeline to its factory defaults, forcing
8086
- * regeneration of the (now hardware-aware) default object-detection
8087
- * model. `nodeId` is the ROUTING key — the generated cap-router strips
8088
- * it (default `nodeIdMode: 'routing'`, same as `getSelectedEngine` /
8089
- * `getDefaultSteps`) and dispatches to that node, so the provider method
8090
- * runs ON the target node and receives no `nodeId`.
8080
+ * Clear THIS node's executor-side PER-DEVICE settings stores (the
8081
+ * per-camera step overrides the object-detection root reads via
8082
+ * `applyDeviceOverridesToTree`). `nodeId` is the ROUTING key — the
8083
+ * generated cap-router strips it (default `nodeIdMode: 'routing'`) and
8084
+ * dispatches to that node, so the provider method runs ON the target
8085
+ * node and receives no `nodeId`.
8091
8086
  *
8092
- * Clears the node's persisted global pipeline seed (`pipelineSteps`) +
8093
- * legacy engine blob (`pipelineEngine`) and every device's per-camera
8094
- * step overrides, then re-seeds the hardware-aware default tree. Returns
8095
- * the regenerated object-detection model id (null when the default tree
8096
- * has no detector for this node's engine format) so the caller can
8097
- * verify the reset without a second round-trip.
8087
+ * This is the slimmed executor leg of the orchestrator's
8088
+ * `resetNodePipelineDefaults` flow (which owns the real reset: node
8089
+ * addonDefaults pins + per-camera orchestrator overrides). The legacy
8090
+ * `resetToDefault` which reset a persisted global step-tree seed
8091
+ * nothing in the live per-camera path read was removed together with
8092
+ * that seed.
8098
8093
  */
8099
- resetToDefault: method(z.object({ nodeId: z.string() }), z.object({
8094
+ clearDeviceOverrides: method(z.object({ nodeId: z.string() }), z.object({
8100
8095
  success: z.literal(true),
8101
- regeneratedModelId: z.string().nullable()
8096
+ clearedDevices: z.number()
8102
8097
  }), {
8103
8098
  kind: "mutation",
8104
8099
  auth: "admin"
@@ -8144,11 +8139,6 @@ var pipelineExecutorCapability = {
8144
8139
  modelId: z.string(),
8145
8140
  format: ModelFormatSchema$1
8146
8141
  }), z.object({ success: z.literal(true) }), { kind: "mutation" }),
8147
- detect: method(z.object({
8148
- addonId: z.string(),
8149
- frame: FrameInputSchema,
8150
- config: z.record(z.string(), z.unknown()).optional()
8151
- }), DetectorOutputSchema),
8152
8142
  /**
8153
8143
  * Stateless single-frame execution. Callers (runner, benchmark) pass
8154
8144
  * the complete `engine` + `steps` tree; the executor holds no state
@@ -11041,7 +11031,9 @@ var AddonPageDeclarationSchema$1 = z.object({
11041
11031
  icon: z.string(),
11042
11032
  path: z.string(),
11043
11033
  remoteName: z.string(),
11044
- bundle: z.string()
11034
+ bundle: z.string(),
11035
+ section: z.string().optional(),
11036
+ sectionLabel: z.string().optional()
11045
11037
  });
11046
11038
  var AddonPageInfoSchema = z.object({
11047
11039
  addonId: z.string(),
@@ -11086,7 +11078,18 @@ var AddonPageDeclarationSchema = z.object({
11086
11078
  * the static-file route can compute an mtime-based cache-buster URL
11087
11079
  * without a separate filesystem stat.
11088
11080
  */
11089
- bundle: z.string()
11081
+ bundle: z.string(),
11082
+ /**
11083
+ * Sidebar section this page docks into. Well-known ids: `'detection'`,
11084
+ * `'cluster'`, `'administration'` — the page renders inside that group.
11085
+ * Any OTHER string creates (or joins) a custom section rendered after
11086
+ * the built-in groups; its label comes from `sectionLabel` (first
11087
+ * declaration wins), falling back to the id. Absent → the legacy
11088
+ * "Addon Pages" group.
11089
+ */
11090
+ section: z.string().optional(),
11091
+ /** Display label for a CUSTOM `section` id (ignored for well-known ids). */
11092
+ sectionLabel: z.string().optional()
11090
11093
  });
11091
11094
  var addonPagesSourceCapability = {
11092
11095
  name: "addon-pages-source",
@@ -15034,7 +15037,12 @@ var AgentPipelineSettingsSchema = z.object({
15034
15037
  detectWeight: z.number().positive().optional(),
15035
15038
  /** Node is eligible to run the detection pipeline (decode + inference). */
15036
15039
  detect: z.boolean().optional(),
15037
- /** Node is eligible to host decoder sessions. */
15040
+ /**
15041
+ * DEPRECATED AND IGNORED. Decode is always co-located with its frame
15042
+ * consumer, so decode eligibility IS detect eligibility. Kept optional in
15043
+ * the schema ONLY so persisted stores written before the removal still
15044
+ * parse — no code reads it and no write path emits it.
15045
+ */
15038
15046
  decode: z.boolean().optional(),
15039
15047
  /** Node is eligible to run audio-analyzer sessions. */
15040
15048
  audio: z.boolean().optional(),
@@ -15095,25 +15103,6 @@ var PipelineAssignmentSchema = z.object({
15095
15103
  assignedAt: z.number()
15096
15104
  });
15097
15105
  /**
15098
- * Decoder placement record. Symmetric to `PipelineAssignmentSchema` but for
15099
- * the decoder-node placement domain (`balanceDecoder` decision: manual pin
15100
- * → co-located with pipeline → capacity).
15101
- */
15102
- var DecoderAssignmentSchema = z.object({
15103
- deviceId: z.number(),
15104
- /** Moleculer node id of the decoder provider currently responsible for this camera. */
15105
- decoderNodeId: z.string(),
15106
- /** True when the assignment was set manually via `assignDecoder`, false when chosen by the balancer. */
15107
- pinned: z.boolean(),
15108
- /** Why this assignment was made — useful for debugging the decoder balancer. */
15109
- reason: z.enum([
15110
- "manual",
15111
- "co-located",
15112
- "capacity",
15113
- "hardware-affinity"
15114
- ])
15115
- });
15116
- /**
15117
15106
  * Per-agent load summary surfaced to the load balancer + dashboards.
15118
15107
  * Aggregated from each runner's `getLocalLoad` cap call.
15119
15108
  */
@@ -15400,21 +15389,6 @@ var pipelineOrchestratorCapability = {
15400
15389
  * present. Defaults to `{ ownerNodeId: 'hub' }`.
15401
15390
  */
15402
15391
  getIngestOwner: method(z.void(), IngestOwnerSchema),
15403
- /** Pin a device's decoder to a specific node. */
15404
- assignDecoder: method(z.object({
15405
- deviceId: z.number(),
15406
- nodeId: z.string()
15407
- }), z.void(), {
15408
- kind: "mutation",
15409
- auth: "admin"
15410
- }),
15411
- /** Clear a device's decoder pin (revert to auto). */
15412
- unassignDecoder: method(z.object({ deviceId: z.number() }), z.void(), {
15413
- kind: "mutation",
15414
- auth: "admin"
15415
- }),
15416
- /** Get every camera's decoder placement. */
15417
- getDecoderAssignments: method(z.void(), z.array(DecoderAssignmentSchema).readonly()),
15418
15392
  /** Pin a device's audio analysis to a specific cluster node. */
15419
15393
  assignAudio: method(z.object({
15420
15394
  deviceId: z.number(),
@@ -15446,23 +15420,6 @@ var pipelineOrchestratorCapability = {
15446
15420
  pinned: z.boolean(),
15447
15421
  assignedAt: z.number()
15448
15422
  }))),
15449
- /**
15450
- * Get one camera's decoder placement (computed if not yet pinned).
15451
- *
15452
- * ADVISORY today: reports the orchestrator's decoder preference only.
15453
- * Actual decode placement is broker-owned (local-node pin + frame-plane
15454
- * co-location guard). Reserved to become the binding source/decoder-owner
15455
- * control in the stream-LB epic (Phase 2).
15456
- *
15457
- * `pipelineNodeId` is the node already chosen to run inference for
15458
- * this camera. When provided, the balancer prefers co-location with
15459
- * it; omitted → falls back to the last known assignment in the
15460
- * `assignments` map and finally to 'hub'.
15461
- */
15462
- getDecoderAssignment: method(z.object({
15463
- deviceId: z.number(),
15464
- pipelineNodeId: z.string().optional()
15465
- }), DecoderAssignmentSchema),
15466
15423
  /** Read one agent's settings. Null when not yet seeded. */
15467
15424
  getAgentSettings: method(z.object({ agentNodeId: z.string() }), AgentPipelineSettingsSchema.nullable()),
15468
15425
  /** Enumerate every agent's settings (hub + remote runners). */
@@ -15532,14 +15489,15 @@ var pipelineOrchestratorCapability = {
15532
15489
  * `enabledDecoderNodes`, `enabledAudioNodes`, `remoteSourcingNodes`).
15533
15490
  * Each flag is optional in the patch: omit a flag to leave it unchanged,
15534
15491
  * pass `null` to reset it to the node default (`hub` → capable, every
15535
- * other node → not). Detection/decode/audio eligibility is derived from
15536
- * these flags across the cluster; changing them re-derives the enabled
15537
- * sets and reconciles dispatch immediately.
15492
+ * other node → not). Detection/audio eligibility is derived from these
15493
+ * flags across the cluster; changing them re-derives the enabled sets
15494
+ * and reconciles dispatch immediately. There is NO separate decode flag:
15495
+ * decode is always co-located with its frame consumer, so decode
15496
+ * eligibility IS detect eligibility.
15538
15497
  */
15539
15498
  setAgentCapabilities: method(z.object({
15540
15499
  agentNodeId: z.string(),
15541
15500
  detect: z.boolean().nullable().optional(),
15542
- decode: z.boolean().nullable().optional(),
15543
15501
  audio: z.boolean().nullable().optional(),
15544
15502
  ingest: z.boolean().nullable().optional()
15545
15503
  }), z.object({ success: z.literal(true) }), {
@@ -15562,6 +15520,34 @@ var pipelineOrchestratorCapability = {
15562
15520
  kind: "mutation",
15563
15521
  auth: "admin"
15564
15522
  }),
15523
+ /**
15524
+ * Reset one node's pipeline to its hardware-aware defaults — the HONEST
15525
+ * reset (replaces the executor's legacy `resetToDefault`, which cleared a
15526
+ * dead persisted step-tree seed nothing in the live path read):
15527
+ * (a) strips every `modelId` pin from that node's
15528
+ * `agentSettings.addonDefaults` (cells revert to Auto — the node
15529
+ * resolves its own hardware-aware format default at runtime);
15530
+ * (b) clears per-camera step overrides scoped to that node
15531
+ * (`stepOverridesByAgent[node]` + the wholesale
15532
+ * `pipelineByAgent[node]` escape hatch);
15533
+ * (c) clears the executor-side per-device settings stores on that node
15534
+ * (`pipelineExecutor.clearDeviceOverrides`);
15535
+ * (d) hot-reloads every camera assigned to the node.
15536
+ *
15537
+ * Returns the EFFECTIVE post-reset object-detection model for the node
15538
+ * (the executor's pure hardware-aware default) so the UI can report what
15539
+ * will actually run — not a value that never reaches the live path.
15540
+ */
15541
+ resetNodePipelineDefaults: method(z.object({ agentNodeId: z.string() }), z.object({
15542
+ success: z.literal(true),
15543
+ /** Hardware-aware default detection model now in effect on the node (null when unresolvable). */
15544
+ effectiveModelId: z.string().nullable(),
15545
+ /** Number of cameras whose node-scoped overrides were cleared. */
15546
+ clearedCameraOverrides: z.number()
15547
+ }), {
15548
+ kind: "mutation",
15549
+ auth: "admin"
15550
+ }),
15565
15551
  /** Read one camera's settings. Null when never touched (inherits agent defaults fully). */
15566
15552
  getCameraSettings: method(z.object({ deviceId: z.number() }), CameraPipelineSettingsSchema.nullable()),
15567
15553
  /** Set or clear the 3-state toggle for one (camera, addonId). Pass `enabled: null` to clear and revert to agent default. */
@@ -22750,23 +22736,23 @@ var METHOD_ACCESS_MAP = Object.freeze({
22750
22736
  addonId: null,
22751
22737
  access: "create"
22752
22738
  },
22753
- "pipelineExecutor.deleteModel": {
22739
+ "pipelineExecutor.clearDeviceOverrides": {
22754
22740
  capName: "pipeline-executor",
22755
22741
  capScope: "system",
22756
22742
  addonId: null,
22757
22743
  access: "delete"
22758
22744
  },
22759
- "pipelineExecutor.deleteTemplate": {
22745
+ "pipelineExecutor.deleteModel": {
22760
22746
  capName: "pipeline-executor",
22761
22747
  capScope: "system",
22762
22748
  addonId: null,
22763
22749
  access: "delete"
22764
22750
  },
22765
- "pipelineExecutor.detect": {
22751
+ "pipelineExecutor.deleteTemplate": {
22766
22752
  capName: "pipeline-executor",
22767
22753
  capScope: "system",
22768
22754
  addonId: null,
22769
- access: "view"
22755
+ access: "delete"
22770
22756
  },
22771
22757
  "pipelineExecutor.downloadModel": {
22772
22758
  capName: "pipeline-executor",
@@ -22912,12 +22898,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
22912
22898
  addonId: null,
22913
22899
  access: "create"
22914
22900
  },
22915
- "pipelineExecutor.resetToDefault": {
22916
- capName: "pipeline-executor",
22917
- capScope: "system",
22918
- addonId: null,
22919
- access: "delete"
22920
- },
22921
22901
  "pipelineExecutor.runAudioTest": {
22922
22902
  capName: "pipeline-executor",
22923
22903
  capScope: "system",
@@ -22978,12 +22958,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
22978
22958
  addonId: null,
22979
22959
  access: "create"
22980
22960
  },
22981
- "pipelineOrchestrator.assignDecoder": {
22982
- capName: "pipeline-orchestrator",
22983
- capScope: "system",
22984
- addonId: null,
22985
- access: "create"
22986
- },
22987
22961
  "pipelineOrchestrator.assignPipeline": {
22988
22962
  capName: "pipeline-orchestrator",
22989
22963
  capScope: "system",
@@ -23062,18 +23036,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
23062
23036
  addonId: null,
23063
23037
  access: "view"
23064
23038
  },
23065
- "pipelineOrchestrator.getDecoderAssignment": {
23066
- capName: "pipeline-orchestrator",
23067
- capScope: "system",
23068
- addonId: null,
23069
- access: "view"
23070
- },
23071
- "pipelineOrchestrator.getDecoderAssignments": {
23072
- capName: "pipeline-orchestrator",
23073
- capScope: "system",
23074
- addonId: null,
23075
- access: "view"
23076
- },
23077
23039
  "pipelineOrchestrator.getGlobalMetrics": {
23078
23040
  capName: "pipeline-orchestrator",
23079
23041
  capScope: "system",
@@ -23122,6 +23084,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
23122
23084
  addonId: null,
23123
23085
  access: "delete"
23124
23086
  },
23087
+ "pipelineOrchestrator.resetNodePipelineDefaults": {
23088
+ capName: "pipeline-orchestrator",
23089
+ capScope: "system",
23090
+ addonId: null,
23091
+ access: "delete"
23092
+ },
23125
23093
  "pipelineOrchestrator.resolvePipeline": {
23126
23094
  capName: "pipeline-orchestrator",
23127
23095
  capScope: "system",
@@ -23194,12 +23162,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
23194
23162
  addonId: null,
23195
23163
  access: "create"
23196
23164
  },
23197
- "pipelineOrchestrator.unassignDecoder": {
23198
- capName: "pipeline-orchestrator",
23199
- capScope: "system",
23200
- addonId: null,
23201
- access: "create"
23202
- },
23203
23165
  "pipelineOrchestrator.unassignPipeline": {
23204
23166
  capName: "pipeline-orchestrator",
23205
23167
  capScope: "system",