@camstack/system 1.2.357 → 1.2.358

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 (69) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -1
  3. package/dist/auth/user-manager.d.ts +43 -2
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  8. package/dist/builtins/alerts/alerts.addon.js +1 -1
  9. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  10. package/dist/builtins/autotrack/index.js +2 -2
  11. package/dist/builtins/autotrack/index.mjs +2 -2
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  13. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  14. package/dist/builtins/calendars/calendars.addon.js +1 -1
  15. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  16. package/dist/builtins/camera-grid/index.js +1 -1
  17. package/dist/builtins/camera-grid/index.mjs +1 -1
  18. package/dist/builtins/composer/composer.addon.js +8 -8
  19. package/dist/builtins/composer/composer.addon.mjs +8 -8
  20. package/dist/builtins/console-logging/index.js +1 -1
  21. package/dist/builtins/console-logging/index.mjs +1 -1
  22. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  23. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  24. package/dist/builtins/device-manager/device-manager.addon.js +9 -9
  25. package/dist/builtins/device-manager/device-manager.addon.mjs +9 -9
  26. package/dist/builtins/hub-forwarder/index.js +1 -1
  27. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  28. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  29. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  30. package/dist/builtins/local-auth/admin-account-boot.d.ts +27 -0
  31. package/dist/builtins/local-auth/auth-schema.d.ts +3 -2
  32. package/dist/builtins/local-auth/local-auth.addon.js +281 -8
  33. package/dist/builtins/local-auth/local-auth.addon.mjs +291 -22
  34. package/dist/builtins/local-network/local-network.addon.d.ts +19 -0
  35. package/dist/builtins/local-network/local-network.addon.js +32 -2
  36. package/dist/builtins/local-network/local-network.addon.mjs +32 -2
  37. package/dist/builtins/loki-logging/index.js +1 -1
  38. package/dist/builtins/loki-logging/index.mjs +1 -1
  39. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  40. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  41. package/dist/builtins/platform-probe/index.js +1 -1
  42. package/dist/builtins/platform-probe/index.mjs +1 -1
  43. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  44. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  45. package/dist/builtins/snapshot/index.js +1 -1
  46. package/dist/builtins/snapshot/index.mjs +1 -1
  47. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  48. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  49. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  50. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  51. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  52. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  53. package/dist/builtins/system-config/system-config.addon.js +1 -1
  54. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  55. package/dist/builtins/winston-logging/index.js +1 -1
  56. package/dist/builtins/winston-logging/index.mjs +1 -1
  57. package/dist/{child-cap-dispatch-wbIQJctP.js → child-cap-dispatch-BWk99kmA.js} +2 -2
  58. package/dist/{child-cap-dispatch-BcRHQBKW.mjs → child-cap-dispatch-C2dFiu87.mjs} +2 -2
  59. package/dist/{composition-sources-CeO0K2cl.js → composition-sources-BaHPH661.js} +1 -1
  60. package/dist/{composition-sources-BBfqepyT.mjs → composition-sources-D8Hapyav.mjs} +1 -1
  61. package/dist/{dist-B7WRgEZY.mjs → dist-D3bhbMY3.mjs} +321 -65
  62. package/dist/{dist-CFVOy8VT.js → dist-DzAHit0a.js} +332 -64
  63. package/dist/index.js +6 -141
  64. package/dist/index.mjs +4 -139
  65. package/dist/kernel/config-manager.d.ts +1 -1
  66. package/dist/kernel/config-schema.d.ts +6 -1
  67. package/dist/{retired-settings-keys-DKRjfz0U.mjs → retired-settings-keys-B6AFmtlO.mjs} +1 -1
  68. package/dist/{retired-settings-keys-CRlTzxaS.js → retired-settings-keys-CkXoPjKy.js} +1 -1
  69. package/package.json +3 -3
@@ -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-CFVOy8VT.js");
6
+ const require_dist = require("../../dist-DzAHit0a.js");
7
7
  const require_hub_cap_forward = require("../../hub-cap-forward-DmHNjbB0.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { B as StorageLocationTypeSchema, Cr as EventCategory, E as LegacyStorageLocationDefaultSchema, Et as evictionPolicyOfLocation, Fn as withLocationMode, It as isLocationEnabled, Jt as mayReadLocation, M as REDACTED_SECRET, Nt as gbToBytes, Qn as BaseAddon, Qt as modeMayWrite, R as StorageCleanupJobSchema, Tn as storageMigrationCapability, V as StorageMigrationJobSchema, Vt as legacyModeOf, Yt as mayWriteToLocation, gr as parseJsonObject, hn as resolveLocationMode, tt as collectSecretConfigKeys, wn as storageCapability, xn as settingsStoreCapability, z as StorageLocationModeSchema } from "../../dist-B7WRgEZY.mjs";
1
+ import { B as StorageLocationTypeSchema, E as LegacyStorageLocationDefaultSchema, En as storageMigrationCapability, Et as evictionPolicyOfLocation, It as isLocationEnabled, Jt as mayReadLocation, Ln as withLocationMode, M as REDACTED_SECRET, Nt as gbToBytes, Qt as modeMayWrite, R as StorageCleanupJobSchema, Sn as settingsStoreCapability, Tn as storageCapability, Tr as EventCategory, V as StorageMigrationJobSchema, Vt as legacyModeOf, Yt as mayWriteToLocation, er as BaseAddon, gn as resolveLocationMode, tt as collectSecretConfigKeys, vr as parseJsonObject, z as StorageLocationModeSchema } from "../../dist-D3bhbMY3.mjs";
2
2
  import { t as HUB_CAP_FWD_ACTION } from "../../hub-cap-forward-BdT320dq.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -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-CFVOy8VT.js");
6
+ const require_dist = require("../../dist-DzAHit0a.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 { Qn as BaseAddon, Zn as errMsg, fr as hydrateSchema } from "../../dist-B7WRgEZY.mjs";
1
+ import { $n as errMsg, er as BaseAddon, mr as hydrateSchema } from "../../dist-D3bhbMY3.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-CFVOy8VT.js");
6
+ const require_dist = require("../../dist-DzAHit0a.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 { Gt as logDestinationCapability, Qn as BaseAddon } from "../../dist-B7WRgEZY.mjs";
1
+ import { Gt as logDestinationCapability, er as BaseAddon } from "../../dist-D3bhbMY3.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
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-CFVOy8VT.js");
2
+ const require_dist = require("./dist-DzAHit0a.js");
3
3
  const require_proc_stat = require("./proc-stat-DL-WUOhl.js");
4
4
  require("./hub-cap-forward-DmHNjbB0.js");
5
5
  let node_crypto = require("node:crypto");
@@ -4418,7 +4418,7 @@ function createChildrenBatchLoader(opts) {
4418
4418
  var RuntimeStateLoadError = class extends Error {
4419
4419
  deviceId;
4420
4420
  constructor(deviceId, reason, options) {
4421
- super(`runtime state of device ${deviceId} could not be loaded (${reason}) — the device is not built from an empty state (D677)`, options);
4421
+ super(`runtime state of device ${deviceId} could not be loaded (${reason}) — the device is not built from an empty state`, options);
4422
4422
  this.deviceId = deviceId;
4423
4423
  this.name = "RuntimeStateLoadError";
4424
4424
  }
@@ -1,4 +1,4 @@
1
- import { Cr as EventCategory$1, cr as createEvent } from "./dist-B7WRgEZY.mjs";
1
+ import { Tr as EventCategory$1, ur as createEvent } from "./dist-D3bhbMY3.mjs";
2
2
  import { a as parseProcStat, i as nodeProcReader } from "./proc-stat-CbC55Kqi.mjs";
3
3
  import "./hub-cap-forward-BdT320dq.mjs";
4
4
  import * as crypto$1 from "node:crypto";
@@ -4415,7 +4415,7 @@ function createChildrenBatchLoader(opts) {
4415
4415
  var RuntimeStateLoadError = class extends Error {
4416
4416
  deviceId;
4417
4417
  constructor(deviceId, reason, options) {
4418
- super(`runtime state of device ${deviceId} could not be loaded (${reason}) — the device is not built from an empty state (D677)`, options);
4418
+ super(`runtime state of device ${deviceId} could not be loaded (${reason}) — the device is not built from an empty state`, options);
4419
4419
  this.deviceId = deviceId;
4420
4420
  this.name = "RuntimeStateLoadError";
4421
4421
  }
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CFVOy8VT.js");
1
+ const require_dist = require("./dist-DzAHit0a.js");
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -1,4 +1,4 @@
1
- import { Wn as compositionSourceKey, Zn as errMsg } from "./dist-B7WRgEZY.mjs";
1
+ import { $n as errMsg, Kn as compositionSourceKey } from "./dist-D3bhbMY3.mjs";
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -7867,57 +7867,15 @@ var ClipSearchStrictnessSchema = z.enum([
7867
7867
  "balanced",
7868
7868
  "strict"
7869
7869
  ]);
7870
- new Set([
7871
- {
7872
- id: "person",
7873
- name: "Person"
7874
- },
7875
- {
7876
- id: "vehicle",
7877
- name: "Vehicle"
7878
- },
7879
- {
7880
- id: "animal",
7881
- name: "Animal"
7882
- },
7883
- {
7884
- id: "package",
7885
- name: "Package"
7886
- }
7887
- ].map((l) => l.id));
7888
- var COCO_TO_MACRO = {
7889
- mapping: {
7890
- person: "person",
7891
- bicycle: "vehicle",
7892
- car: "vehicle",
7893
- motorcycle: "vehicle",
7894
- airplane: "vehicle",
7895
- bus: "vehicle",
7896
- train: "vehicle",
7897
- truck: "vehicle",
7898
- boat: "vehicle",
7899
- bird: "animal",
7900
- cat: "animal",
7901
- dog: "animal",
7902
- horse: "animal",
7903
- sheep: "animal",
7904
- cow: "animal",
7905
- elephant: "animal",
7906
- bear: "animal",
7907
- zebra: "animal",
7908
- giraffe: "animal",
7909
- suitcase: "package",
7910
- backpack: "package",
7911
- handbag: "package"
7912
- },
7913
- preserveOriginal: false
7914
- };
7915
- /** Steps a root detector may declare it fills. */
7916
- var FILLABLE_STEP_IDS = [
7870
+ /** Steps whose effect a root label can BE. */
7871
+ var LABEL_SUPPLY_STEP_IDS = [
7917
7872
  "animal-classifier",
7918
7873
  "vehicle-classifier",
7919
7874
  "package-detection"
7920
7875
  ];
7876
+ /** Steps whose box a root detection can BE. */
7877
+ var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
7878
+ [...LABEL_SUPPLY_STEP_IDS, ...CROP_SUPPLY_STEP_IDS];
7921
7879
  var MODEL_FORMATS = [
7922
7880
  "onnx",
7923
7881
  "coreml",
@@ -8051,12 +8009,35 @@ var ModelLicenseRecordSchema = z.object({
8051
8009
  * `camstack/docs` → `/docs/detection/models`.
8052
8010
  */
8053
8011
  var ModelLicenseSchema = z.preprocess((value) => typeof value === "string" ? { weights: value } : value, ModelLicenseRecordSchema);
8054
- /** One `fillsClassifierEffects` entry — see `ModelCatalogEntry.fillsClassifierEffects`. */
8055
- var FillsClassifierEffectSchema = z.object({
8056
- stepId: z.enum(FILLABLE_STEP_IDS),
8012
+ /**
8013
+ * One step a ROOT detector can supply from its own output (D730) — see
8014
+ * `ModelCatalogEntry.suppliesSteps`.
8015
+ *
8016
+ * - `label`: the root's raw class IS the step's answer. `labelToEffect` maps
8017
+ * the root's label to the step's vocabulary; `uncovered` is the vocabulary
8018
+ * the root cannot produce (shown as unavailable, never a blocker).
8019
+ * - `crop`: the root draws the box the step would have found (`license_plate`
8020
+ * for plate-detection, `face` for face-detection). The box becomes a detail
8021
+ * child of the `parentMacro` detection that contains it — never a track.
8022
+ */
8023
+ var RootStepSupplySchema = z.discriminatedUnion("kind", [z.object({
8024
+ kind: z.literal("label"),
8025
+ stepId: z.enum(LABEL_SUPPLY_STEP_IDS),
8057
8026
  labelToEffect: z.record(z.string(), z.string()),
8058
8027
  uncovered: z.array(z.string()).readonly()
8059
- });
8028
+ }), z.object({
8029
+ kind: z.literal("crop"),
8030
+ stepId: z.enum(CROP_SUPPLY_STEP_IDS),
8031
+ rootLabels: z.array(z.string()).readonly(),
8032
+ parentMacro: z.enum(["vehicle", "person"]),
8033
+ childClass: z.enum(["plate", "face"]),
8034
+ /**
8035
+ * The root's smaller input side, stamped on read by `rootSuppliesOf` from
8036
+ * the model entry — what a step's `minRootInputPx` gate judges. Never
8037
+ * stored by an import.
8038
+ */
8039
+ rootInputPx: z.number().int().positive().optional()
8040
+ })]);
8060
8041
  var ModelCatalogEntrySchema = z.object({
8061
8042
  id: z.string(),
8062
8043
  name: z.string(),
@@ -8183,15 +8164,15 @@ var ModelCatalogEntrySchema = z.object({
8183
8164
  */
8184
8165
  classMap: DetectionCatalogClassMapSchema.optional(),
8185
8166
  /**
8186
- * The pipeline steps this ROOT detector already does the work of (D715):
8187
- * its labels name the effect the step exists to produce (`deer` for
8188
- * `animal-classifier`, `package` for `package-detection`). Derived from the
8189
- * labelmap by `deriveClassifierFills`, never hand-written; a COCO model
8190
- * declares none. Whether a declaration is honoured is the step's own
8191
- * `labelLink` policy (`resolveLabelLink`). `labelToEffect` values are in
8192
- * `FILLABLE_STEP_VOCABULARIES` (guard `check-label-link-vocabulary`).
8167
+ * The pipeline steps this ROOT detector can supply from its own output
8168
+ * (D730): its labels name a step's effect (`deer` for `animal-classifier`)
8169
+ * or draw a step's box (`license_plate` for `plate-detection`). Computed at
8170
+ * import from THIS model's labelmap by `deriveRootSupplies`, never written
8171
+ * by hand and never assumed per family; a row without it is derived on read
8172
+ * (`rootSuppliesOf`). Whether a camera uses it is the step's own
8173
+ * `useRootModel` flag (`resolveRootSupply`).
8193
8174
  */
8194
- fillsClassifierEffects: z.array(FillsClassifierEffectSchema).readonly().optional(),
8175
+ suppliesSteps: z.array(RootStepSupplySchema).readonly().optional(),
8195
8176
  /**
8196
8177
  * The model's CLIP feature-space contract (text encoder, dimension, vector
8197
8178
  * index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
@@ -12298,7 +12279,7 @@ function unavailableFor(tf, role, mode, cap, at) {
12298
12279
  };
12299
12280
  return {
12300
12281
  ok: false,
12301
- problem: problem("not-replaceable", at, `\`${cap}.${tf.path}\` reads a source but can say neither null nor 'unknown', and an ADDED capability has no native reading to fall back to (D393, D663)`)
12282
+ problem: problem("not-replaceable", at, `\`${cap}.${tf.path}\` reads a source but can say neither null nor 'unknown', and an ADDED capability has no native reading to fall back to`)
12302
12283
  };
12303
12284
  }
12304
12285
  /** Item fields the composer writes itself, with the value it writes. */
@@ -17197,6 +17178,131 @@ var filesystemBrowseCapability = {
17197
17178
  })
17198
17179
  }
17199
17180
  };
17181
+ var IPV4_LITERAL = /^\d{1,3}(?:\.\d{1,3}){3}$/;
17182
+ function hostnameOf(baseUrl) {
17183
+ try {
17184
+ const host = new URL(baseUrl).hostname;
17185
+ return host.length > 0 ? host : null;
17186
+ } catch {
17187
+ return null;
17188
+ }
17189
+ }
17190
+ function isMesh(endpoint) {
17191
+ return endpoint.kind === "public" && endpoint.interfaceKind === "vpn";
17192
+ }
17193
+ function isTunnel(endpoint) {
17194
+ return endpoint.kind === "public" && endpoint.interfaceKind === "public";
17195
+ }
17196
+ function isPlausibleLan(endpoint) {
17197
+ return (endpoint.kind === "lan-ipv4" || endpoint.kind === "lan-ipv6") && endpoint.plausible;
17198
+ }
17199
+ function isLanIpv4Literal(endpoint) {
17200
+ if (endpoint.kind !== "lan-ipv4" || !endpoint.plausible) return false;
17201
+ const host = hostnameOf(endpoint.baseUrl);
17202
+ return host !== null && IPV4_LITERAL.test(host);
17203
+ }
17204
+ /** Lower = better; `null` = never this audience's answer. */
17205
+ function rankFor(audience, endpoint) {
17206
+ if (endpoint.kind === "loopback" || endpoint.kind === "app-link") return null;
17207
+ if (hostnameOf(endpoint.baseUrl) === null) return null;
17208
+ if (audience === "cluster") {
17209
+ if (isLanIpv4Literal(endpoint)) return 0;
17210
+ if (isPlausibleLan(endpoint)) return 1;
17211
+ if (isMesh(endpoint)) return 2;
17212
+ return null;
17213
+ }
17214
+ if (isTunnel(endpoint)) return 0;
17215
+ if (isMesh(endpoint)) return 1;
17216
+ if (isLanIpv4Literal(endpoint)) return 2;
17217
+ if (isPlausibleLan(endpoint)) return 3;
17218
+ return null;
17219
+ }
17220
+ var LOOPBACK_HOSTS = new Set([
17221
+ "localhost",
17222
+ "0.0.0.0",
17223
+ "::1",
17224
+ "[::1]",
17225
+ "::",
17226
+ "[::]"
17227
+ ]);
17228
+ function isLoopbackHost(hostname) {
17229
+ const h = hostname.toLowerCase();
17230
+ if (LOOPBACK_HOSTS.has(h) || h.endsWith(".localhost")) return true;
17231
+ return /^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(h);
17232
+ }
17233
+ /**
17234
+ * Validate an operator-typed override: an http(s) URL with a host, no
17235
+ * credentials, no path, and never loopback (it would name whoever dials it).
17236
+ * Answers the normalised origin (`scheme://host[:port]`).
17237
+ */
17238
+ function validateHubAddressOverride(raw) {
17239
+ const trimmed = raw.trim();
17240
+ if (trimmed === "") return {
17241
+ ok: false,
17242
+ reason: "Enter an address, e.g. https://192.168.1.50:4443."
17243
+ };
17244
+ let parsed;
17245
+ try {
17246
+ parsed = new URL(trimmed);
17247
+ } catch {
17248
+ return {
17249
+ ok: false,
17250
+ reason: "Not a URL — include http:// or https://."
17251
+ };
17252
+ }
17253
+ if (parsed.protocol !== "https:" && parsed.protocol !== "http:") return {
17254
+ ok: false,
17255
+ reason: "Use an http:// or https:// address."
17256
+ };
17257
+ if (parsed.username !== "" || parsed.password !== "") return {
17258
+ ok: false,
17259
+ reason: "The address must not carry a user name or password."
17260
+ };
17261
+ if (parsed.hostname === "") return {
17262
+ ok: false,
17263
+ reason: "The address has no host."
17264
+ };
17265
+ if (isLoopbackHost(parsed.hostname)) return {
17266
+ ok: false,
17267
+ reason: "A loopback address names whoever dials it, never this hub — use an address other machines reach."
17268
+ };
17269
+ if (parsed.pathname !== "/" || parsed.search !== "" || parsed.hash !== "") return {
17270
+ ok: false,
17271
+ reason: "Enter only the address (scheme, host and port), without a path."
17272
+ };
17273
+ return {
17274
+ ok: true,
17275
+ baseUrl: parsed.origin
17276
+ };
17277
+ }
17278
+ /** {@link pickHubBaseUrl}, saying where the answer came from. */
17279
+ function resolveHubAddress(endpoints, audience, override) {
17280
+ if (override !== null && override !== "") {
17281
+ const check = validateHubAddressOverride(override);
17282
+ if (check.ok) return {
17283
+ override,
17284
+ resolved: check.baseUrl,
17285
+ source: "override"
17286
+ };
17287
+ }
17288
+ const auto = pickFromPalette(endpoints, audience);
17289
+ return {
17290
+ override: override === null || override === "" ? null : override,
17291
+ resolved: auto,
17292
+ source: auto === null ? "none" : "auto"
17293
+ };
17294
+ }
17295
+ function pickFromPalette(endpoints, audience) {
17296
+ const best = endpoints.flatMap((endpoint) => {
17297
+ const rank = rankFor(audience, endpoint);
17298
+ return rank === null ? [] : [{
17299
+ rank,
17300
+ priority: endpoint.priority,
17301
+ endpoint
17302
+ }];
17303
+ }).toSorted((a, b) => a.rank - b.rank || a.priority - b.priority)[0];
17304
+ return best === void 0 ? null : best.endpoint.baseUrl.replace(/\/+$/, "");
17305
+ }
17200
17306
  /**
17201
17307
  * Transport bounds for AI capability methods.
17202
17308
  *
@@ -19280,6 +19386,51 @@ var notificationOutputCapability = {
19280
19386
  })
19281
19387
  }
19282
19388
  };
19389
+ new Set([
19390
+ {
19391
+ id: "person",
19392
+ name: "Person"
19393
+ },
19394
+ {
19395
+ id: "vehicle",
19396
+ name: "Vehicle"
19397
+ },
19398
+ {
19399
+ id: "animal",
19400
+ name: "Animal"
19401
+ },
19402
+ {
19403
+ id: "package",
19404
+ name: "Package"
19405
+ }
19406
+ ].map((l) => l.id));
19407
+ var COCO_TO_MACRO = {
19408
+ mapping: {
19409
+ person: "person",
19410
+ bicycle: "vehicle",
19411
+ car: "vehicle",
19412
+ motorcycle: "vehicle",
19413
+ airplane: "vehicle",
19414
+ bus: "vehicle",
19415
+ train: "vehicle",
19416
+ truck: "vehicle",
19417
+ boat: "vehicle",
19418
+ bird: "animal",
19419
+ cat: "animal",
19420
+ dog: "animal",
19421
+ horse: "animal",
19422
+ sheep: "animal",
19423
+ cow: "animal",
19424
+ elephant: "animal",
19425
+ bear: "animal",
19426
+ zebra: "animal",
19427
+ giraffe: "animal",
19428
+ suitcase: "package",
19429
+ backpack: "package",
19430
+ handbag: "package"
19431
+ },
19432
+ preserveOriginal: false
19433
+ };
19283
19434
  var AUDIO_MACRO_LABELS = [
19284
19435
  {
19285
19436
  id: "speech",
@@ -25513,6 +25664,34 @@ var pipelineAnalyticsCapability = {
25513
25664
  }
25514
25665
  };
25515
25666
  /**
25667
+ * A root model's boxes standing in for one crop-kind step's own inference
25668
+ * (D730) — see `runPipeline.suppliedRoot`.
25669
+ */
25670
+ var SuppliedRootOutputSchema = z.object({
25671
+ stepId: z.string(),
25672
+ /** The root model that drew the boxes — stamped on the result. */
25673
+ modelId: z.string(),
25674
+ detections: z.array(z.object({
25675
+ /** `[x1, y1, x2, y2]` in the pixels of the call's image. */
25676
+ bbox: z.tuple([
25677
+ z.number(),
25678
+ z.number(),
25679
+ z.number(),
25680
+ z.number()
25681
+ ]),
25682
+ score: z.number(),
25683
+ /**
25684
+ * Five facial landmarks in the same pixels — a face the step's own
25685
+ * detector already re-found inside a root face box (D730), so its
25686
+ * embedder child aligns it exactly as it aligns any detected face.
25687
+ */
25688
+ landmarks: z.array(z.object({
25689
+ x: z.number(),
25690
+ y: z.number()
25691
+ })).optional()
25692
+ })).min(1)
25693
+ });
25694
+ /**
25516
25695
  * Reference to the frame's retained NATIVE surface + the parent crop's placement
25517
25696
  * within the frame, so the executor can re-cut a leaf child ROI at native
25518
25697
  * resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
@@ -25644,7 +25823,7 @@ var PipelineModelOptionSchema = z.object({
25644
25823
  legacy: z.boolean().optional(),
25645
25824
  provider: ModelProviderIdSchema.optional(),
25646
25825
  defaultConfidence: z.number().optional(),
25647
- fillsClassifierEffects: z.array(FillsClassifierEffectSchema).readonly().optional()
25826
+ suppliesSteps: z.array(RootStepSupplySchema).readonly().optional()
25648
25827
  });
25649
25828
  var ConfigFieldBridge = z.custom();
25650
25829
  var PipelineAddonSchemaSchema = z.object({
@@ -26048,7 +26227,16 @@ var pipelineExecutorCapability = {
26048
26227
  * `device-not-servable`), and nothing reaches the camera's live
26049
26228
  * trace stream. Absent ⇒ unchanged behaviour.
26050
26229
  */
26051
- replay: z.literal(true).optional()
26230
+ replay: z.literal(true).optional(),
26231
+ /**
26232
+ * Root-supplied detections for the tree's ROOT step (D730). Set by
26233
+ * `runDetailSubtree` when the camera's root model supplies a crop-kind
26234
+ * step (a Frigate+ `license_plate` for `plate-detection`): the step is
26235
+ * NOT inferred, these boxes are its output, and its children (the plate
26236
+ * reader) run on them through their own crop policy. Boxes are in the
26237
+ * PIXELS of the image this call carries. Absent ⇒ the root step runs.
26238
+ */
26239
+ suppliedRoot: SuppliedRootOutputSchema.optional()
26052
26240
  }), PipelineRunResultBridge, { kind: "mutation" }),
26053
26241
  /**
26054
26242
  * Batched run — N raw frames packed into one cap call. The provider
@@ -27361,7 +27549,22 @@ var pipelineRunnerCapability = {
27361
27549
  */
27362
27550
  cropJpeg: z.string().optional(),
27363
27551
  parent: DetailParentSchema,
27364
- steps: z.array(z.string()).optional()
27552
+ steps: z.array(z.string()).optional(),
27553
+ /**
27554
+ * The camera's root model already drew this step's boxes (D730): a
27555
+ * `license_plate` inside the parent vehicle. The named step is NOT
27556
+ * inferred — these FRAME-space boxes are its output — and its
27557
+ * requested children (the plate reader) run on them. Absent ⇒ every
27558
+ * requested step infers as before.
27559
+ */
27560
+ supplied: z.object({
27561
+ stepId: z.string(),
27562
+ modelId: z.string(),
27563
+ boxes: z.array(z.object({
27564
+ bbox: NativeCropBboxSchema,
27565
+ score: z.number()
27566
+ })).min(1)
27567
+ }).optional()
27365
27568
  }), z.object({ details: z.array(DetailResultSchema) }).nullable(), { kind: "mutation" }),
27366
27569
  /**
27367
27570
  * Run ONE enrichment step against caller-supplied pixels, with NO camera
@@ -36416,6 +36619,27 @@ var ViewerEndpointsSchema = z.object({
36416
36619
  /** What the ranking currently resolves to (may be empty if nothing is up). */
36417
36620
  resolved: z.array(z.string()).readonly()
36418
36621
  });
36622
+ /**
36623
+ * One audience's hub address (see `hub-address.ts`): the operator's stored
36624
+ * override, the address in use, and where it came from.
36625
+ */
36626
+ var HubAddressSnapshotSchema = z.object({
36627
+ /** The operator's override, or null for automatic. */
36628
+ override: z.string().nullable(),
36629
+ /** The address in use, or null when nothing qualifies (never loopback). */
36630
+ resolved: z.string().nullable(),
36631
+ source: z.enum([
36632
+ "override",
36633
+ "auto",
36634
+ "none"
36635
+ ])
36636
+ });
36637
+ var HubAddressesSchema = z.object({
36638
+ /** "Hub address for agents" — agents' bundle/model pulls, LAN devices. */
36639
+ cluster: HubAddressSnapshotSchema,
36640
+ /** "Public address for sign-in links" — e-mail links, OIDC, WebAuthn, OAuth2. */
36641
+ browser: HubAddressSnapshotSchema
36642
+ });
36419
36643
  var AllowedAddressesSchema = z.object({
36420
36644
  /**
36421
36645
  * Allowlist of interface addresses operators have explicitly opted
@@ -36548,6 +36772,26 @@ var localNetworkCapability = {
36548
36772
  */
36549
36773
  setViewerEndpoints: method(z.object({ baseUrls: z.array(z.string()).readonly() }), ViewerEndpointsSchema, { kind: "mutation" }),
36550
36774
  /**
36775
+ * The hub's address for each audience — agents (`cluster`) and sign-in
36776
+ * links (`browser`) — as every consumer must read it: the operator's
36777
+ * override when set, else the automatic pick from this cap's palette,
36778
+ * never loopback. The ONE answer to "at which address is this hub
36779
+ * reached?"; there is no environment variable for it.
36780
+ */
36781
+ getHubAddresses: method(z.void(), HubAddressesSchema),
36782
+ /**
36783
+ * Set or clear (`baseUrl: null`) one audience's override. Validated: an
36784
+ * http(s) origin with a host, no credentials, no path, never loopback —
36785
+ * an invalid value is refused with the reason, nothing is stored.
36786
+ */
36787
+ setHubAddress: method(z.object({
36788
+ audience: z.enum(["cluster", "browser"]),
36789
+ baseUrl: z.string().nullable()
36790
+ }), HubAddressesSchema, {
36791
+ kind: "mutation",
36792
+ auth: "admin"
36793
+ }),
36794
+ /**
36551
36795
  * Read the operator's allowlist. Empty = "auto" (no filter). Used
36552
36796
  * by the admin UI's address selector to seed its checkbox state.
36553
36797
  */
@@ -49660,6 +49904,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
49660
49904
  addonId: null,
49661
49905
  access: "view"
49662
49906
  },
49907
+ "localNetwork.getHubAddresses": {
49908
+ capName: "local-network",
49909
+ capScope: "system",
49910
+ addonId: null,
49911
+ access: "view"
49912
+ },
49663
49913
  "localNetwork.getNotificationEndpoint": {
49664
49914
  capName: "local-network",
49665
49915
  capScope: "system",
@@ -49714,6 +49964,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
49714
49964
  addonId: null,
49715
49965
  access: "create"
49716
49966
  },
49967
+ "localNetwork.setHubAddress": {
49968
+ capName: "local-network",
49969
+ capScope: "system",
49970
+ addonId: null,
49971
+ access: "create"
49972
+ },
49717
49973
  "localNetwork.setNotificationEndpoint": {
49718
49974
  capName: "local-network",
49719
49975
  capScope: "system",
@@ -58972,7 +59228,7 @@ var STATE_SUMMARY_VARS = [
58972
59228
  {
58973
59229
  name: "summarySection",
58974
59230
  label: "Summary: this section",
58975
- description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
59231
+ description: "The section a per-section summary row is about; on a summary sent as one message, every section it reports, comma-separated.",
58976
59232
  example: "Batterie scariche",
58977
59233
  group: "system",
58978
59234
  families: ["rule"],
@@ -59742,4 +59998,4 @@ function enumerateInferenceDevices(hw) {
59742
59998
  return out;
59743
59999
  }
59744
60000
  //#endregion
59745
- export { calendarsCapability as $, DATAPLANE_SECRET_HEADER as $n, motionCapability as $t, MOTION_CLOSE_AFTER_MS as A, userManagementCapability as An, filesystemBrowseCapability as At, StorageLocationTypeSchema as B, composedDeviceStableId as Bn, legacyAutoLinkIds as Bt, FieldClaimModeSchema as C, snapshotCapability as Cn, EventCategory as Cr, enumerateItemArrayFields as Ct, LocationIconIdSchema as D, storageProviderCapability as Dn, expandContainer as Dt, LegacyStorageLocationDefaultSchema as E, storageOccupancyCapability as En, evictionPolicyOfLocation as Et, STORAGE_ACCESS_FALLBACK as F, withLocationMode as Fn, isCollectionArrayMethod as Ft, addonWidgetsCapability as G, createStatefulExpressionMemory as Gn, logDestinationCapability as Gt, UserRecordSchema as H, compositionItemFieldPath as Hn, lifecycleJobSchema as Ht, STREAM_PROFILE_META as I, COMPOSER_ADDON_ID as In, isLocationEnabled as It, backupCapability as J, DeviceFeature as Jn, mayReadLocation as Jt, alertsCapability as K, disarmRoseMemory as Kn, logLevelAtMost as Kt, ScopedTokenSchema as L, buildFfmpegArgs as Ln, isObjectInput as Lt, REDACTED_SECRET as M, vectorDimFromBase64 as Mn, formatMinutes as Mt, RUNTIME_DEFAULTS as N, vectorIndexDimConflictError as Nn, gbToBytes as Nt, METHOD_ACCESS_MAP as O, streamCatalogCapability as On, expressionContainsBuiltinCall as Ot, RecordingStatusSchema as P, vectorStoreCapability as Pn, isArrayOutputSchema as Pt, buildStreamParamsConfigSchema as Q, BaseAddon as Qn, modeMayWrite as Qt, StorageCleanupJobSchema as R, cloneStatefulExpressionMemory as Rn, isVoidInput as Rt, FIRST_LEVEL_MACRO_CLASSES as S, siteZoneKey as Sn, toNodeId as Sr, enumerateInferenceDevices as St, LOG_LEVEL_RANK as T, storageMigrationCapability as Tn, evaluateCompositionField as Tt, addonPagesCapability as U, compositionSliceKey as Un, localNetworkCapability as Ut, StorageMigrationJobSchema as V, compositionFeatureEnabled as Vn, legacyModeOf as Vt, addonSettingsCapability as W, compositionSourceKey as Wn, locationIconKey as Wt, batteryCapability as X, DeviceType as Xn, memoizePinnedFfmpeg as Xt, bareAddonId as Y, DeviceRole as Yn, mayWriteToLocation as Yt, buildCapabilityLookup as Z, errMsg as Zn, metricsProviderCapability as Zt, DATABASE_SNAPSHOT_TIMEOUT_MS as _, runtimeStatePolicyFor as _n, parseJsonUnknown as _r, describeComposableCaps as _t, BatteryStatusSchema as a, pickAppLinkHub as an, asJsonObject as ar, coreBlockAddonId as at, DeclaredDevices as b, scoreRuntimes as bn, scopeKey as br, deviceStateCapability as bt, CAP_NAMES_WITH_STATUS as c, procedureAuthKey as cn, createEvent as cr, coreBlockSourceKind as ct, CORE_BLOCKS_ADDON_ID as d, replacedFieldKeys as dn, expandCapMethods as dr, dataStoreProviderCapability as dt, normalizeCoreBlockWrite as en, DEVICE_SETTINGS_CONTRIBUTION_METHODS as er, cameraGridLayoutCapability as et, CORE_BLOCK_ADDON_PREFIX as f, resolveBucketMs as fn, hydrateSchema as fr, databaseSnapshotCapability as ft, DATABASE_SNAPSHOT_SUFFIX as g, resolveMethodAuth as gn, parseJsonObject as gr, deriveBatteryPresence as gt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as h, resolveLocationMode as hn, nodePin as hr, defineExtensionSlotProvider as ht, BaseDevice as i, parseStreamParamsFormPatch as in, WELL_KNOWN_TAB_MAP as ir, compositionSourceRefs as it, RECORDING_SOURCE_CAMSTACK_ADDON as j, validateComposition as jn, foldSnapshotByFunction as jt, MINUTES_PER_DAY as k, streamQualityLabel as kn, extractNestedAddonId as kt, COMPOSED_ITEM_FIXED_FIELDS as l, ptzAutotrackCapability as ln, emitDownForOwnedCaps as lr, coreBlocksCapability as lt, CoreBlockSchema as m, resolveCoreBlockFiles as mn, isEvent as mr, decodeVectorBase64 as mt, AlertSchema as n, objectInputDeclaresAddonId as nn, ReadinessRegistry as nr, composerCapability as nt, CAMERA_SWITCH_ORDER as o, planComposition as on, asNumber as or, coreBlockComposition as ot, CalendarPreferencesSchema as p, resolveCoreBlockEntry as pn, isDeviceConfigCap as pr, declarationOwnerNodeId as pt, authProviderCapability as q, toExpressionValue as qn, looseSchema as qt, ApiKeyRecordSchema as r, objectInputDeclaresRequiredDeviceId as rn, ReadinessTimeoutError as rr, compositionFieldKey as rt, CAMSTACK_APP_LINK_ORIGIN as s, platformProbeCapability as sn, asString$1 as sr, coreBlockIdFromAddonId as st, ALL_CAPABILITY_DEFINITIONS as t, normalizeUnit as tn, DEVICE_STATUS_METHOD as tr, collectSecretConfigKeys as tt, COMPOSER_RUNNER_ID as u, reducePoints as un, emitReadiness as ur, createDeviceExtensionProvider as ut, DAY_NAMES as v, scopesAllowAddon as vn, readinessKey as vr, deviceExtensionCapability as vt, FieldClaimSchema as w, storageCapability as wn, enumerateSchemaFields as wt, DeviceStatusSchema as x, settingsStoreCapability as xn, sleep as xr, deviceStatusCapability as xt, DERIVED_CAMERA_SILENCED_CAP_NAMES as y, scopesAllowDeviceCap as yn, resolveCapMount as yr, deviceManagerCapability as yt, StorageLocationModeSchema as z, composedDeviceRef as zn, kebabToCamel as zt };
60001
+ export { calendarsCapability as $, errMsg as $n, motionCapability as $t, MOTION_CLOSE_AFTER_MS as A, streamQualityLabel as An, filesystemBrowseCapability as At, StorageLocationTypeSchema as B, cloneStatefulExpressionMemory as Bn, legacyAutoLinkIds as Bt, FieldClaimModeSchema as C, siteZoneKey as Cn, sleep as Cr, enumerateItemArrayFields as Ct, LocationIconIdSchema as D, storageOccupancyCapability as Dn, expandContainer as Dt, LegacyStorageLocationDefaultSchema as E, storageMigrationCapability as En, evictionPolicyOfLocation as Et, STORAGE_ACCESS_FALLBACK as F, vectorIndexDimConflictError as Fn, isCollectionArrayMethod as Ft, addonWidgetsCapability as G, compositionSliceKey as Gn, logDestinationCapability as Gt, UserRecordSchema as H, composedDeviceStableId as Hn, lifecycleJobSchema as Ht, STREAM_PROFILE_META as I, vectorStoreCapability as In, isLocationEnabled as It, backupCapability as J, disarmRoseMemory as Jn, mayReadLocation as Jt, alertsCapability as K, compositionSourceKey as Kn, logLevelAtMost as Kt, ScopedTokenSchema as L, withLocationMode as Ln, isObjectInput as Lt, REDACTED_SECRET as M, validateComposition as Mn, formatMinutes as Mt, RUNTIME_DEFAULTS as N, validateHubAddressOverride as Nn, gbToBytes as Nt, METHOD_ACCESS_MAP as O, storageProviderCapability as On, expressionContainsBuiltinCall as Ot, RecordingStatusSchema as P, vectorDimFromBase64 as Pn, isArrayOutputSchema as Pt, buildStreamParamsConfigSchema as Q, DeviceType as Qn, modeMayWrite as Qt, StorageCleanupJobSchema as R, COMPOSER_ADDON_ID as Rn, isVoidInput as Rt, FIRST_LEVEL_MACRO_CLASSES as S, settingsStoreCapability as Sn, scopeKey as Sr, enumerateInferenceDevices as St, LOG_LEVEL_RANK as T, storageCapability as Tn, EventCategory as Tr, evaluateCompositionField as Tt, addonPagesCapability as U, compositionFeatureEnabled as Un, localNetworkCapability as Ut, StorageMigrationJobSchema as V, composedDeviceRef as Vn, legacyModeOf as Vt, addonSettingsCapability as W, compositionItemFieldPath as Wn, locationIconKey as Wt, batteryCapability as X, DeviceFeature as Xn, memoizePinnedFfmpeg as Xt, bareAddonId as Y, toExpressionValue as Yn, mayWriteToLocation as Yt, buildCapabilityLookup as Z, DeviceRole as Zn, metricsProviderCapability as Zt, DATABASE_SNAPSHOT_TIMEOUT_MS as _, resolveMethodAuth as _n, nodePin as _r, describeComposableCaps as _t, BatteryStatusSchema as a, pickAppLinkHub as an, ReadinessTimeoutError as ar, coreBlockAddonId as at, DeclaredDevices as b, scopesAllowDeviceCap as bn, readinessKey as br, deviceStateCapability as bt, CAP_NAMES_WITH_STATUS as c, procedureAuthKey as cn, asNumber as cr, coreBlockSourceKind as ct, CORE_BLOCKS_ADDON_ID as d, replacedFieldKeys as dn, emitDownForOwnedCaps as dr, dataStoreProviderCapability as dt, normalizeCoreBlockWrite as en, BaseAddon as er, cameraGridLayoutCapability as et, CORE_BLOCK_ADDON_PREFIX as f, resolveBucketMs as fn, emitReadiness as fr, databaseSnapshotCapability as ft, DATABASE_SNAPSHOT_SUFFIX as g, resolveLocationMode as gn, isEvent as gr, deriveBatteryPresence as gt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as h, resolveHubAddress as hn, isDeviceConfigCap as hr, defineExtensionSlotProvider as ht, BaseDevice as i, parseStreamParamsFormPatch as in, ReadinessRegistry as ir, compositionSourceRefs as it, RECORDING_SOURCE_CAMSTACK_ADDON as j, userManagementCapability as jn, foldSnapshotByFunction as jt, MINUTES_PER_DAY as k, streamCatalogCapability as kn, extractNestedAddonId as kt, COMPOSED_ITEM_FIXED_FIELDS as l, ptzAutotrackCapability as ln, asString$1 as lr, coreBlocksCapability as lt, CoreBlockSchema as m, resolveCoreBlockFiles as mn, hydrateSchema as mr, decodeVectorBase64 as mt, AlertSchema as n, objectInputDeclaresAddonId as nn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as nr, composerCapability as nt, CAMERA_SWITCH_ORDER as o, planComposition as on, WELL_KNOWN_TAB_MAP as or, coreBlockComposition as ot, CalendarPreferencesSchema as p, resolveCoreBlockEntry as pn, expandCapMethods as pr, declarationOwnerNodeId as pt, authProviderCapability as q, createStatefulExpressionMemory as qn, looseSchema as qt, ApiKeyRecordSchema as r, objectInputDeclaresRequiredDeviceId as rn, DEVICE_STATUS_METHOD as rr, compositionFieldKey as rt, CAMSTACK_APP_LINK_ORIGIN as s, platformProbeCapability as sn, asJsonObject as sr, coreBlockIdFromAddonId as st, ALL_CAPABILITY_DEFINITIONS as t, normalizeUnit as tn, DATAPLANE_SECRET_HEADER as tr, collectSecretConfigKeys as tt, COMPOSER_RUNNER_ID as u, reducePoints as un, createEvent as ur, createDeviceExtensionProvider as ut, DAY_NAMES as v, runtimeStatePolicyFor as vn, parseJsonObject as vr, deviceExtensionCapability as vt, FieldClaimSchema as w, snapshotCapability as wn, toNodeId as wr, enumerateSchemaFields as wt, DeviceStatusSchema as x, scoreRuntimes as xn, resolveCapMount as xr, deviceStatusCapability as xt, DERIVED_CAMERA_SILENCED_CAP_NAMES as y, scopesAllowAddon as yn, parseJsonUnknown as yr, deviceManagerCapability as yt, StorageLocationModeSchema as z, buildFfmpegArgs as zn, kebabToCamel as zt };