@camstack/addon-osd-manager 0.1.142 → 0.1.144

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 (18) hide show
  1. package/dist/{MotionZonesSettings-CLoGx9rM.mjs → MotionZonesSettings-D_u2HAV8.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-BZiL6_bt.mjs → PrivacyMaskSettings-BWo2Poz3.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-C4XOkOxm.mjs → SceneMonitorEditor-lkaFmEgy.mjs} +3 -3
  4. package/dist/_stub.js +137 -137
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-BA2LcfhK.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-CvMBJs_Z.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Bj2dTNd0.mjs +26 -0
  7. package/dist/{hostInit-BXqW88VO.mjs → hostInit-CR1V6Tzv.mjs} +2 -2
  8. package/dist/index.js +579 -31
  9. package/dist/index.mjs +579 -31
  10. package/dist/{player-overlays-QdIhVJJ9.mjs → player-overlays-BLFv1a4b.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-BaAG2IvP.mjs → responsive-CRQJLpxM.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-DViLoo13.mjs → scene-monitor-copy-Uvp-WnB0.mjs} +1 -1
  14. package/dist/{square-DwPV8oay.mjs → square-UutiR2vl.mjs} +1 -1
  15. package/dist/{trash-2-C1AFBh3V.mjs → trash-2-CQR67Ytv.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-J30N4Tun.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-NNmdo1Fc.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CWTKCd56.mjs +0 -26
package/dist/index.js CHANGED
@@ -9662,6 +9662,48 @@ var ModelProviderIdSchema = _enum([
9662
9662
  "scrypted",
9663
9663
  "custom"
9664
9664
  ]);
9665
+ /**
9666
+ * The licence of a model, as a record rather than a bare SPDX string: a
9667
+ * permissive CODE licence routinely sits on top of restrictive WEIGHTS or
9668
+ * DATA, and the obligations (attribution, modification notices, source offers)
9669
+ * are per upstream. A persisted custom-model row written when this field was a
9670
+ * string still parses — the string is lifted into `{ weights }`.
9671
+ *
9672
+ * Every licence surface (the admin "Models and licenses" page,
9673
+ * `THIRD_PARTY_MODELS.md`, the Hugging Face model table) is GENERATED from
9674
+ * these records by `scripts/gen-model-licenses.ts` (D661).
9675
+ */
9676
+ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { weights: value } : value, object({
9677
+ /** SPDX id of the WEIGHTS' terms, a `LicenseRef-*` for non-SPDX terms, or `UNKNOWN`. */
9678
+ weights: string().min(1),
9679
+ /** SPDX id of the upstream code that defines / trained the network. */
9680
+ code: string().min(1).optional(),
9681
+ /** Training data whose terms add obligations (attribution, non-commercial). */
9682
+ data: object({
9683
+ name: string().min(1),
9684
+ terms: string().min(1),
9685
+ url: string().url().optional()
9686
+ }).optional(),
9687
+ /** The project the weights come from. Required on built-in entries (guard). */
9688
+ upstream: object({
9689
+ name: string().min(1),
9690
+ url: string().url()
9691
+ }).optional(),
9692
+ /** Where the licence text governing the weights is published. */
9693
+ url: string().url().optional(),
9694
+ /** Attribution the licence REQUIRES, verbatim. */
9695
+ attribution: string().min(1).optional(),
9696
+ /** What CamStack changed. Required when `hosting` is `camstack-hf` (guard). */
9697
+ modifications: string().min(1).optional(),
9698
+ /** Who serves the file a node downloads. */
9699
+ hosting: _enum([
9700
+ "camstack-hf",
9701
+ "third-party",
9702
+ "built-in"
9703
+ ]).optional(),
9704
+ /** True when the weights or their data forbid commercial use. */
9705
+ nonCommercial: boolean().optional()
9706
+ }));
9665
9707
  var ModelCatalogEntrySchema = object({
9666
9708
  id: string(),
9667
9709
  name: string(),
@@ -9717,6 +9759,16 @@ var ModelCatalogEntrySchema = object({
9717
9759
  */
9718
9760
  postprocessor: custom().optional(),
9719
9761
  /**
9762
+ * Per-MODEL default confidence floor. Absent ⇒ the step's
9763
+ * `StepDefinition.defaultConfidence` applies. A score is a property of one
9764
+ * model's output scale, not of the step slot it sits in: YuNet's
9765
+ * `sqrt(cls·obj)` is not SCRFD's score, and inheriting SCRFD's 0.5 filled the
9766
+ * face gallery with wheels and hands (D662, amends D645). An operator's
9767
+ * explicit value still wins over it. Resolved in ONE place —
9768
+ * `addon-pipeline/.../registry/effective-confidence.ts`.
9769
+ */
9770
+ defaultConfidence: number().min(0).max(1).optional(),
9771
+ /**
9720
9772
  * When true, the executor produces a landmark-aligned crop (similarity warp
9721
9773
  * onto the canonical template) before this step runs, instead of a plain
9722
9774
  * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
@@ -9750,11 +9802,11 @@ var ModelCatalogEntrySchema = object({
9750
9802
  p95LatencyMs: record(string(), number()).optional()
9751
9803
  }).optional(),
9752
9804
  /**
9753
- * SPDX-ish license id of the model weights (e.g. `AGPL-3.0` for Ultralytics
9754
- * YOLO26, `GPL-3.0` for YOLOv9, `Apache-2.0` for D-FINE/RF-DETR). Matters for
9755
- * the retraining addon and any future commercial distribution.
9805
+ * The model's licence record — see {@link ModelLicenseSchema}. Optional in
9806
+ * the schema (a custom model's author may state none); REQUIRED and complete
9807
+ * on every built-in catalog entry (`scripts/check-catalog-licence.ts`).
9756
9808
  */
9757
- license: string().optional(),
9809
+ license: ModelLicenseSchema.optional(),
9758
9810
  /**
9759
9811
  * Variant-selector grouping. The UI groups models by `family` + `tier` and
9760
9812
  * offers `precision` / `optimization` as variant axes WITHIN a tier — so all
@@ -9849,23 +9901,6 @@ var ExpressionEvalError = class extends Error {
9849
9901
  this.name = "ExpressionEvalError";
9850
9902
  }
9851
9903
  };
9852
- /**
9853
- * Frozen, null-prototype builtin function table for the expression engine
9854
- * (spec §4 rule 4). The table is the SOLE surface of callable functions: the
9855
- * parser rejects any callee not in it, and the evaluator gates each call on an
9856
- * own-property check against it.
9857
- *
9858
- * Because the object has a NULL prototype AND is `Object.freeze`d:
9859
- * - it cannot be polluted (no `__proto__` / `constructor` write reaches it);
9860
- * - a lookup for `toString` / `hasOwnProperty` / `constructor` finds NOTHING
9861
- * (there is no `Object.prototype` in the chain), so those names are not
9862
- * callable — they are simply "unknown function" at parse time.
9863
- *
9864
- * Every numeric argument is validated as a finite number and every numeric
9865
- * RESULT is re-checked finite, so `/0`, `sqrt(-1)` (→ NaN) and overflow
9866
- * (`pow(10,400)` → Infinity) all raise `ExpressionEvalError` and fail the link
9867
- * closed rather than emitting a garbage value.
9868
- */
9869
9904
  function asFiniteNumber(value, name, index) {
9870
9905
  if (typeof value !== "number" || !Number.isFinite(value)) throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a finite number`);
9871
9906
  return value;
@@ -9881,6 +9916,10 @@ function finiteResult(value, name) {
9881
9916
  function allFiniteNumbers(args, name) {
9882
9917
  return args.map((a, idx) => asFiniteNumber(a, name, idx));
9883
9918
  }
9919
+ function asBoolean$1(value, name, index) {
9920
+ if (typeof value !== "boolean") throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a boolean`);
9921
+ return value;
9922
+ }
9884
9923
  var INF = Number.POSITIVE_INFINITY;
9885
9924
  var table = {
9886
9925
  min: {
@@ -9981,6 +10020,40 @@ var table = {
9981
10020
  if (from === to) return x;
9982
10021
  throw new ExpressionEvalError("convert: unit conversion table not installed");
9983
10022
  }
10023
+ },
10024
+ any: {
10025
+ minArgs: 1,
10026
+ maxArgs: INF,
10027
+ apply: (args) => args.map((a, i) => asBoolean$1(a, "any", i)).some((b) => b)
10028
+ },
10029
+ all: {
10030
+ minArgs: 1,
10031
+ maxArgs: INF,
10032
+ apply: (args) => args.map((a, i) => asBoolean$1(a, "all", i)).every((b) => b)
10033
+ },
10034
+ within: {
10035
+ minArgs: 2,
10036
+ maxArgs: 2,
10037
+ apply: (args, hooks) => {
10038
+ const windowMs = asFiniteNumber(args[1], "within", 1);
10039
+ if (windowMs < 0) throw new ExpressionEvalError("within: the window must not be negative");
10040
+ const at = args[0];
10041
+ if (at === null) return false;
10042
+ const ts = asFiniteNumber(at, "within", 0);
10043
+ const now = hooks.now;
10044
+ if (now === void 0 || !Number.isFinite(now)) throw new ExpressionEvalError("within: no clock was supplied to this evaluation");
10045
+ const inside = now - ts <= windowMs;
10046
+ if (inside) hooks.noteDeadline?.(ts + windowMs + 1);
10047
+ return inside;
10048
+ }
10049
+ },
10050
+ latest: {
10051
+ minArgs: 1,
10052
+ maxArgs: INF,
10053
+ apply: (args) => {
10054
+ const present = args.flatMap((a, i) => a === null ? [] : [asFiniteNumber(a, "latest", i)]);
10055
+ return present.length === 0 ? null : finiteResult(Math.max(...present), "latest");
10056
+ }
9984
10057
  }
9985
10058
  };
9986
10059
  Object.freeze(Object.assign(Object.create(null), table));
@@ -10595,7 +10668,7 @@ var AutomationActionSchema = discriminatedUnion("kind", [
10595
10668
  code: string().min(1).max(2e4)
10596
10669
  })
10597
10670
  ]);
10598
- object({
10671
+ var AutomationRecipeSchema = object({
10599
10672
  triggers: array(AutomationTriggerSchema),
10600
10673
  conditions: AutomationConditionSchema.optional(),
10601
10674
  actions: array(AutomationActionSchema)
@@ -11212,12 +11285,32 @@ var AudioClassificationLabelSchema = object({
11212
11285
  originalClass: string().optional(),
11213
11286
  score: number()
11214
11287
  });
11288
+ /**
11289
+ * Did the classifier RUN on this window? (D660)
11290
+ *
11291
+ * `classified` with no labels means the model heard nothing above the
11292
+ * camera's floor. `not-classified` means nobody listened — and until D660 the
11293
+ * two were the same shape (`classification` absent), so a window the global
11294
+ * busy gate threw away read downstream exactly like a quiet one (D393).
11295
+ */
11296
+ var AudioClassifyOutcomeSchema = discriminatedUnion("state", [object({ state: literal("classified") }), object({
11297
+ state: literal("not-classified"),
11298
+ reason: _enum([
11299
+ "superseded",
11300
+ "error",
11301
+ "timeout",
11302
+ "disposed"
11303
+ ])
11304
+ })]);
11215
11305
  var AudioAnalysisResultSchema = object({
11216
11306
  level: AudioLevelSchema,
11307
+ /** Labels at or above the camera's floor. Absent = none — read `classifyOutcome` to know whether the model ran at all. */
11217
11308
  classification: object({
11218
11309
  labels: array(AudioClassificationLabelSchema).readonly(),
11219
11310
  inferenceMs: number()
11220
11311
  }).optional(),
11312
+ /** Whether the classifier ran on this window (D660). */
11313
+ classifyOutcome: AudioClassifyOutcomeSchema,
11221
11314
  timestamp: number()
11222
11315
  });
11223
11316
  var AudioAnalysisSettingsSchema = object({
@@ -13402,6 +13495,195 @@ var cameraStreamsCapability = {
13402
13495
  */
13403
13496
  durability: "session"
13404
13497
  };
13498
+ /** A composed device's stableId is this prefix plus the block id. */
13499
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
13500
+ /** Longest snippet a `code` source may carry (slice 4). */
13501
+ var MAX_COMPOSITION_CODE_LENGTH = 2e4;
13502
+ var CompositionSourceRefSchema = object({
13503
+ /** The owning addon; `stableId` is unique only within it. */
13504
+ addonId: string().min(1),
13505
+ stableId: string().min(1)
13506
+ });
13507
+ /** One field of one capability of one source device. */
13508
+ var CompositionFieldReadSchema = object({
13509
+ source: CompositionSourceRefSchema,
13510
+ cap: string().min(1),
13511
+ /** Dotted path into the source cap's runtime-state slice. */
13512
+ fieldPath: string().min(1)
13513
+ });
13514
+ /** `from`: copy one source field verbatim. It is also an expression's `from` binding. */
13515
+ var CompositionFromSourceSchema = CompositionFieldReadSchema.extend({ kind: literal("from") });
13516
+ var CompositionBindingSchema = discriminatedUnion("kind", [CompositionFromSourceSchema, object({
13517
+ kind: literal("literal"),
13518
+ value: union([
13519
+ string(),
13520
+ number(),
13521
+ boolean(),
13522
+ _null()
13523
+ ])
13524
+ })]);
13525
+ /**
13526
+ * `expression`: a formula over named bindings, in the salvaged expression
13527
+ * engine. Validated at parse by the SAME function every other consumer runs,
13528
+ * so the editor and the store cannot disagree.
13529
+ */
13530
+ var CompositionExpressionSourceSchema = object({
13531
+ kind: literal("expression"),
13532
+ expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
13533
+ bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), CompositionBindingSchema)
13534
+ }).superRefine((src, ctx) => {
13535
+ const err = validateExpressionSource(src);
13536
+ if (err !== null) ctx.addIssue({
13537
+ code: "custom",
13538
+ message: err,
13539
+ path: ["expr"]
13540
+ });
13541
+ });
13542
+ /** `code`: RESERVED for slice 4 (own runner, one-way eject). */
13543
+ var CompositionCodeSourceSchema = object({
13544
+ kind: literal("code"),
13545
+ code: string().min(1).max(MAX_COMPOSITION_CODE_LENGTH)
13546
+ });
13547
+ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
13548
+ CompositionFromSourceSchema,
13549
+ CompositionExpressionSourceSchema,
13550
+ CompositionCodeSourceSchema
13551
+ ]);
13552
+ var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
13553
+ kind: literal("forward"),
13554
+ source: CompositionSourceRefSchema,
13555
+ cap: string().min(1),
13556
+ method: string().min(1)
13557
+ }), CompositionCodeSourceSchema]);
13558
+ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
13559
+ kind: literal("fields"),
13560
+ cap: string().min(1),
13561
+ fields: record(string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
13562
+ /** RESERVED for slice 3; refused by the validator when non-empty. */
13563
+ commands: record(string().min(1), CompositionCommandTargetSchema).optional()
13564
+ }), object({
13565
+ kind: literal("passthrough"),
13566
+ cap: string().min(1),
13567
+ source: CompositionSourceRefSchema
13568
+ })]);
13569
+ var CompositionSchema = object({
13570
+ target: discriminatedUnion("kind", [object({
13571
+ kind: literal("new"),
13572
+ type: _enum(DeviceType),
13573
+ role: _enum(DeviceRole).optional()
13574
+ }), object({
13575
+ kind: literal("existing"),
13576
+ device: CompositionSourceRefSchema
13577
+ })]),
13578
+ features: array(CompositionFeatureSchema).min(1).max(16)
13579
+ }).superRefine((composition, ctx) => {
13580
+ const seen = /* @__PURE__ */ new Set();
13581
+ composition.features.forEach((feature, index) => {
13582
+ if (seen.has(feature.cap)) ctx.addIssue({
13583
+ code: "custom",
13584
+ message: `capability \`${feature.cap}\` is composed twice — one feature per capability`,
13585
+ path: [
13586
+ "features",
13587
+ index,
13588
+ "cap"
13589
+ ]
13590
+ });
13591
+ seen.add(feature.cap);
13592
+ });
13593
+ });
13594
+ /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
13595
+ var CompositionProblemSchema = object({
13596
+ code: _enum([
13597
+ "reserved-variant",
13598
+ "unknown-capability",
13599
+ "not-composable",
13600
+ "wrong-device-type",
13601
+ "has-commands",
13602
+ "unknown-field",
13603
+ "nested-field",
13604
+ "missing-field",
13605
+ "kind-mismatch",
13606
+ "may-be-null",
13607
+ "source-missing",
13608
+ "source-unreadable",
13609
+ "source-capability-missing",
13610
+ "source-field-unknown",
13611
+ "expression-invalid",
13612
+ "cycle",
13613
+ "duplicate-target"
13614
+ ]),
13615
+ path: string(),
13616
+ message: string()
13617
+ });
13618
+ var CompositionFieldKindSchema = _enum([
13619
+ "string",
13620
+ "number",
13621
+ "boolean",
13622
+ "enum"
13623
+ ]);
13624
+ /** How a field says "unavailable": `null` when its schema allows it, else the device goes offline (D393). */
13625
+ var CompositionUnavailableModeSchema = _enum(["null", "offline"]);
13626
+ /**
13627
+ * `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
13628
+ * field of its cap changes value · `constant` reads nothing, computed once.
13629
+ */
13630
+ var CompositionFieldRoleSchema = _enum([
13631
+ "derived",
13632
+ "clock",
13633
+ "constant"
13634
+ ]);
13635
+ var CompositionFieldPlanSchema = object({
13636
+ cap: string(),
13637
+ path: string(),
13638
+ /** Index into `composition.features` this field's capability came from —
13639
+ * lets a source/cycle problem name its path as `features[N].fields.<path>`
13640
+ * (the same convention `planComposition`'s own problems already use). */
13641
+ featureIndex: number().int().nonnegative(),
13642
+ kind: CompositionFieldKindSchema,
13643
+ nullable: boolean(),
13644
+ required: boolean(),
13645
+ unavailable: CompositionUnavailableModeSchema,
13646
+ role: CompositionFieldRoleSchema,
13647
+ source: CompositionFieldSourceSchema,
13648
+ reads: array(CompositionFieldReadSchema)
13649
+ });
13650
+ var CompositionValidationSchema = object({
13651
+ ok: boolean(),
13652
+ problems: array(CompositionProblemSchema),
13653
+ fields: array(CompositionFieldPlanSchema)
13654
+ });
13655
+ /** Mirrors `CoreBlockStatus`, pinned by `core-blocks-source.spec.ts` (Task 11). */
13656
+ var CompositionRunStatusSchema = _enum([
13657
+ "stopped",
13658
+ "starting",
13659
+ "running",
13660
+ "failed"
13661
+ ]);
13662
+ var CompositionFieldStateKindSchema = _enum([
13663
+ "fresh",
13664
+ "stale",
13665
+ "unavailable"
13666
+ ]);
13667
+ var CompositionFieldStateSchema = object({
13668
+ cap: string(),
13669
+ path: string(),
13670
+ state: CompositionFieldStateKindSchema,
13671
+ /** `null` whenever `state === 'unavailable'`; never a plausible stand-in (D393). */
13672
+ value: union([
13673
+ string(),
13674
+ number(),
13675
+ boolean(),
13676
+ _null()
13677
+ ]),
13678
+ reason: string().optional()
13679
+ });
13680
+ var CompositionBlockStateSchema = object({
13681
+ blockId: string(),
13682
+ deviceId: number().nullable(),
13683
+ status: CompositionRunStatusSchema,
13684
+ reason: string().optional(),
13685
+ fields: array(CompositionFieldStateSchema)
13686
+ });
13405
13687
  /** Where a block runs. The operator chooses — a block driving a device on an
13406
13688
  * agent is the reason placement is not fixed to the hub. */
13407
13689
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -13428,6 +13710,30 @@ var CoreBlockInputSchema = object({
13428
13710
  */
13429
13711
  integrationId: string().optional()
13430
13712
  });
13713
+ /**
13714
+ * What a block IS (D659). Absent means `code` — every row stored before this
13715
+ * union keeps working unchanged.
13716
+ * - `code`: the TypeScript in `code`, compiled and run in its own runner;
13717
+ * - `recipe`: RESERVED (automations), stored shape only; refused at run by name;
13718
+ * - `composition`: declarative, run by the shared `composer`; `code` is `''`.
13719
+ */
13720
+ var CoreBlockSourceSchema = discriminatedUnion("kind", [
13721
+ object({ kind: literal("code") }),
13722
+ object({
13723
+ kind: literal("recipe"),
13724
+ recipe: AutomationRecipeSchema
13725
+ }),
13726
+ object({
13727
+ kind: literal("composition"),
13728
+ composition: CompositionSchema
13729
+ })
13730
+ ]);
13731
+ /** The client-authored half of a composition block. No `code`, no placement (hub-only; Phase 7). */
13732
+ var CompositionBlockInputSchema = object({
13733
+ name: string().min(1).max(120),
13734
+ enabled: boolean(),
13735
+ composition: CompositionSchema
13736
+ });
13431
13737
  /** A stored block. */
13432
13738
  var CoreBlockSchema = CoreBlockInputSchema.extend({
13433
13739
  id: string(),
@@ -13443,8 +13749,38 @@ var CoreBlockSchema = CoreBlockInputSchema.extend({
13443
13749
  */
13444
13750
  lastError: string().optional(),
13445
13751
  /** Ms epoch of the last state change. */
13446
- lastChangedAt: number()
13752
+ lastChangedAt: number(),
13753
+ /** What the block is. Absent means `code` (D659). */
13754
+ source: CoreBlockSourceSchema.optional()
13755
+ });
13756
+ /** A stored composition block and what the composer says about it. */
13757
+ var CompositionViewSchema = object({
13758
+ block: CoreBlockSchema,
13759
+ state: discriminatedUnion("kind", [object({
13760
+ kind: literal("answered"),
13761
+ state: CompositionBlockStateSchema.nullable()
13762
+ }), object({
13763
+ kind: literal("unreachable"),
13764
+ error: string()
13765
+ })])
13766
+ });
13767
+ /**
13768
+ * A read of the stored compositions. `not-loaded` while the `core_blocks`
13769
+ * table has not been READ: an empty answer then would make "not yet known"
13770
+ * look like "none", and invite the operator to recreate what exists (D315).
13771
+ */
13772
+ var CompositionsNotLoadedSchema = object({
13773
+ state: literal("not-loaded"),
13774
+ reason: string()
13447
13775
  });
13776
+ var CompositionListReadSchema = discriminatedUnion("state", [object({
13777
+ state: literal("loaded"),
13778
+ views: array(CompositionViewSchema)
13779
+ }), CompositionsNotLoadedSchema]);
13780
+ var CompositionGetReadSchema = discriminatedUnion("state", [object({
13781
+ state: literal("loaded"),
13782
+ view: CompositionViewSchema.nullable()
13783
+ }), CompositionsNotLoadedSchema]);
13448
13784
  /** What a compile attempt produced. */
13449
13785
  var CoreBlockCompileResultSchema = object({
13450
13786
  ok: boolean(),
@@ -13526,7 +13862,105 @@ var coreBlocksCapability = {
13526
13862
  getTypeDefs: method(object({}), object({ libs: array(object({
13527
13863
  filePath: string(),
13528
13864
  content: string()
13529
- })) }), { auth: "admin" })
13865
+ })) }), { auth: "admin" }),
13866
+ /**
13867
+ * Create a composition block (D659). VALIDATED first against the live
13868
+ * sources and every stored composition; a refusal names every problem by
13869
+ * path and reason (D391) and stores nothing.
13870
+ */
13871
+ createComposition: method(object({ block: CompositionBlockInputSchema }), object({ block: CoreBlockSchema }), {
13872
+ kind: "mutation",
13873
+ auth: "admin",
13874
+ caller: "required"
13875
+ }),
13876
+ /**
13877
+ * Patch a composition block. A changed `composition` is validated exactly
13878
+ * as on create. `expectedUpdatedAt` is the `updatedAt` the caller READ: a
13879
+ * block changed since is refused by name, never silently overwritten.
13880
+ */
13881
+ updateComposition: method(object({
13882
+ blockId: string(),
13883
+ expectedUpdatedAt: number(),
13884
+ block: CompositionBlockInputSchema.partial()
13885
+ }), object({ block: CoreBlockSchema }), {
13886
+ kind: "mutation",
13887
+ auth: "admin",
13888
+ caller: "required"
13889
+ }),
13890
+ /** One composition and the composer's state for it, or `not-loaded` (D315). */
13891
+ getComposition: method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }),
13892
+ listCompositions: method(object({}), CompositionListReadSchema, { auth: "admin" }),
13893
+ /**
13894
+ * Validate without saving — the same verdict the save reaches. A mutation
13895
+ * for its body size; it writes nothing, so its access is `view`.
13896
+ */
13897
+ validateComposition: method(object({
13898
+ composition: CompositionSchema,
13899
+ blockId: string().optional()
13900
+ }), CompositionValidationSchema, {
13901
+ kind: "mutation",
13902
+ auth: "admin",
13903
+ access: "view"
13904
+ })
13905
+ }
13906
+ };
13907
+ var ComposerBlockSchema = object({
13908
+ id: string().min(1),
13909
+ name: string().min(1).max(120),
13910
+ enabled: boolean(),
13911
+ updatedAt: number(),
13912
+ composition: CompositionSchema
13913
+ });
13914
+ /**
13915
+ * A stored composition row that no longer PARSES — a schema a release
13916
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
13917
+ * its device as a placeholder and reports the block `failed` naming the parse
13918
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
13919
+ */
13920
+ var ComposerUnreadableBlockSchema = object({
13921
+ id: string().min(1),
13922
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13923
+ name: string().nullable(),
13924
+ /** The parse error, in the operator's words. */
13925
+ error: string()
13926
+ });
13927
+ var composerCapability = {
13928
+ name: "composer",
13929
+ scope: "system",
13930
+ mode: "singleton",
13931
+ internal: true,
13932
+ methods: {
13933
+ /**
13934
+ * Not `apply`: tRPC reserves `apply`, `call` and `then` as router keys, and
13935
+ * `router({})` throws on one — every cap router is built at boot.
13936
+ */
13937
+ applyBlocks: method(object({
13938
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13939
+ integrationId: string().nullable(),
13940
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13941
+ storeLoaded: boolean(),
13942
+ blocks: array(ComposerBlockSchema),
13943
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13944
+ restartBlockIds: array(string()),
13945
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13946
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
13947
+ }), object({
13948
+ blocks: array(object({
13949
+ blockId: string(),
13950
+ status: CompositionRunStatusSchema,
13951
+ reason: string().optional()
13952
+ })),
13953
+ /**
13954
+ * False when the composer declared and withdrew NOTHING (store not loaded,
13955
+ * integration unknown, its own rows unread or read empty once). An empty
13956
+ * apply the caller owes is paid off only by one the composer acted on (D49).
13957
+ */
13958
+ acted: boolean()
13959
+ }), {
13960
+ kind: "mutation",
13961
+ auth: "admin"
13962
+ }),
13963
+ getStates: method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" })
13530
13964
  }
13531
13965
  };
13532
13966
  /**
@@ -20928,8 +21362,8 @@ var NcTestResultSchema = object({
20928
21362
  className: string().optional(),
20929
21363
  label: string().optional()
20930
21364
  });
20931
- /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is the
20932
- * same union; the template-vars spec pins the two together. `mixed` is DERIVED
21365
+ /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
21366
+ * `z.infer` of this schema — one shape, no twin. `mixed` is DERIVED
20933
21367
  * (a stored system rule whose kinds span families, D637) and never authored. */
20934
21368
  var NcRuleKindSchema = _enum([
20935
21369
  "detection",
@@ -23548,6 +23982,13 @@ var AudioEventSchema = object({
23548
23982
  originalClass: string().optional(),
23549
23983
  score: number()
23550
23984
  }).optional(),
23985
+ /**
23986
+ * Whether the classifier RAN on the window behind this row (D660). Absent
23987
+ * on rows written before D660 — unknown, NOT classified: until then a
23988
+ * window the analyzer's busy gate threw away was stored exactly like one
23989
+ * that heard nothing above the floor.
23990
+ */
23991
+ classifyOutcome: AudioClassifyOutcomeSchema.optional(),
23551
23992
  /** Populated by B5 (recording playback URL for this event). */
23552
23993
  mediaUrl: string().optional()
23553
23994
  });
@@ -24260,7 +24701,15 @@ var RebuildObjectEmbeddingsInput = object({
24260
24701
  * force is logged at start and finish so a deliberately slow pass reads
24261
24702
  * differently from a stalled one.
24262
24703
  */
24263
- pacingMs: number().int().nonnegative().optional()
24704
+ pacingMs: number().int().nonnegative().optional(),
24705
+ /**
24706
+ * Re-embed ONLY the tracks whose vector is ALREADY in the pinned model's
24707
+ * space (D664) — the in-space skip inverted. It exists to redo vectors
24708
+ * written from the wrong box, which a normal pass would skip as done
24709
+ * forever. Requires `maxTracks`: a forced pass without a bound is refused
24710
+ * (`force-requires-max-tracks`).
24711
+ */
24712
+ force: boolean().optional()
24264
24713
  });
24265
24714
  /**
24266
24715
  * Result of emptying the CLIP index.
@@ -24296,6 +24745,7 @@ var WipeObjectEmbeddingsResultSchema = object({
24296
24745
  * - `reads-disagree` — the two reads named different choices.
24297
24746
  * - `not-a-clip-model` — the CONFIRMED id has no CLIP metadata, so there is no
24298
24747
  * index to fill and no dimension to check against (D649).
24748
+ * - `force-requires-max-tracks` — `force: true` with no `maxTracks` (D664).
24299
24749
  */
24300
24750
  var RebuildObjectEmbeddingsRefusalSchema = _enum([
24301
24751
  "stores-unavailable",
@@ -24303,7 +24753,8 @@ var RebuildObjectEmbeddingsRefusalSchema = _enum([
24303
24753
  "method-unavailable",
24304
24754
  "read-failed",
24305
24755
  "reads-disagree",
24306
- "not-a-clip-model"
24756
+ "not-a-clip-model",
24757
+ "force-requires-max-tracks"
24307
24758
  ]);
24308
24759
  /**
24309
24760
  * Acknowledgement that a rebuild STARTED.
@@ -24328,11 +24779,32 @@ var RebuildStatusSchema = object({
24328
24779
  running: boolean(),
24329
24780
  scanned: number(),
24330
24781
  rebuilt: number(),
24331
- /** Tracks whose key frame is gone — nothing to re-embed from. */
24782
+ /** Tracks whose key frame is gone — nothing to re-embed from. Pixels ONLY:
24783
+ * `missingEvent` is its own field since D664, never summed in. */
24332
24784
  missingKeyFrame: number(),
24333
- /** Tracks with no usable detection box. */
24785
+ /** Tracks with no object event at all (D664). */
24786
+ missingEvent: number(),
24787
+ /** Tracks with no box measured on the pixels to cut — see `boxSource.refused`. */
24334
24788
  missingBbox: number(),
24335
24789
  /**
24790
+ * Which rule placed each judged track's box (D664): the key frame row's own
24791
+ * `subjectBox`, `track.positions` at exactly its instant (older key frames),
24792
+ * the event box (a key frame recovered from the recording, at the event's
24793
+ * instant), or `refused` by name — the reasons are in the tagged log lines.
24794
+ */
24795
+ boxSource: object({
24796
+ subjectBox: number(),
24797
+ positions: number(),
24798
+ event: number(),
24799
+ refused: number()
24800
+ }),
24801
+ /** Tracks skipped because their vector is already in the pinned space. */
24802
+ alreadyInSpace: number(),
24803
+ /** Whether the current / last pass was a `force` pass; `null` before any (D664). */
24804
+ force: boolean().nullable(),
24805
+ /** In-space tracks a `force` pass selected for re-embedding. */
24806
+ forcedInSpace: number(),
24807
+ /**
24336
24808
  * Tracks an executing node REFUSED rather than broke on — an unreadable key
24337
24809
  * frame, a step that threw. Separate from `failed` because the remedy is
24338
24810
  * different, and because a whole camera silently contributing zero vectors
@@ -25482,7 +25954,8 @@ var PipelineModelOptionSchema = object({
25482
25954
  })),
25483
25955
  group: ModelVariantGroupSchema.optional(),
25484
25956
  legacy: boolean().optional(),
25485
- provider: ModelProviderIdSchema.optional()
25957
+ provider: ModelProviderIdSchema.optional(),
25958
+ defaultConfidence: number().optional()
25486
25959
  });
25487
25960
  var ConfigFieldBridge = custom();
25488
25961
  var PipelineAddonSchemaSchema = object({
@@ -43932,6 +44405,38 @@ var zoneRulesCapability = {
43932
44405
  */
43933
44406
  durability: "restored"
43934
44407
  };
44408
+ var NUMBER = {
44409
+ kind: "fixed",
44410
+ result: ["number"]
44411
+ };
44412
+ var BOOLEAN = {
44413
+ kind: "fixed",
44414
+ result: ["boolean"]
44415
+ };
44416
+ Object.freeze({
44417
+ min: NUMBER,
44418
+ max: NUMBER,
44419
+ abs: NUMBER,
44420
+ floor: NUMBER,
44421
+ ceil: NUMBER,
44422
+ sqrt: NUMBER,
44423
+ round: NUMBER,
44424
+ pow: NUMBER,
44425
+ clamp: NUMBER,
44426
+ avg: NUMBER,
44427
+ sum: NUMBER,
44428
+ age: NUMBER,
44429
+ convert: NUMBER,
44430
+ coalesce: { kind: "coalesce" },
44431
+ any: BOOLEAN,
44432
+ all: BOOLEAN,
44433
+ within: BOOLEAN,
44434
+ latest: {
44435
+ kind: "fixed",
44436
+ result: ["number", "null"]
44437
+ }
44438
+ });
44439
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
43935
44440
  /**
43936
44441
  * Most specific first. Extending this list is how a new device kind becomes
43937
44442
  * gateable; nothing else needs to change.
@@ -45392,6 +45897,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
45392
45897
  carbonMonoxideCapability,
45393
45898
  climateControlCapability,
45394
45899
  colorCapability,
45900
+ composerCapability,
45395
45901
  connectionTestCapability,
45396
45902
  connectivityCapability,
45397
45903
  consumablesCapability,
@@ -46465,6 +46971,18 @@ Object.freeze({
46465
46971
  addonId: null,
46466
46972
  access: "create"
46467
46973
  },
46974
+ "composer.applyBlocks": {
46975
+ capName: "composer",
46976
+ capScope: "system",
46977
+ addonId: null,
46978
+ access: "create"
46979
+ },
46980
+ "composer.getStates": {
46981
+ capName: "composer",
46982
+ capScope: "system",
46983
+ addonId: null,
46984
+ access: "view"
46985
+ },
46468
46986
  "connectionTest.describeTest": {
46469
46987
  capName: "connection-test",
46470
46988
  capScope: "system",
@@ -46525,6 +47043,12 @@ Object.freeze({
46525
47043
  addonId: null,
46526
47044
  access: "create"
46527
47045
  },
47046
+ "coreBlocks.createComposition": {
47047
+ capName: "core-blocks",
47048
+ capScope: "system",
47049
+ addonId: null,
47050
+ access: "create"
47051
+ },
46528
47052
  "coreBlocks.delete": {
46529
47053
  capName: "core-blocks",
46530
47054
  capScope: "system",
@@ -46537,6 +47061,12 @@ Object.freeze({
46537
47061
  addonId: null,
46538
47062
  access: "view"
46539
47063
  },
47064
+ "coreBlocks.getComposition": {
47065
+ capName: "core-blocks",
47066
+ capScope: "system",
47067
+ addonId: null,
47068
+ access: "view"
47069
+ },
46540
47070
  "coreBlocks.getTypeDefs": {
46541
47071
  capName: "core-blocks",
46542
47072
  capScope: "system",
@@ -46549,6 +47079,12 @@ Object.freeze({
46549
47079
  addonId: null,
46550
47080
  access: "view"
46551
47081
  },
47082
+ "coreBlocks.listCompositions": {
47083
+ capName: "core-blocks",
47084
+ capScope: "system",
47085
+ addonId: null,
47086
+ access: "view"
47087
+ },
46552
47088
  "coreBlocks.restart": {
46553
47089
  capName: "core-blocks",
46554
47090
  capScope: "system",
@@ -46567,6 +47103,18 @@ Object.freeze({
46567
47103
  addonId: null,
46568
47104
  access: "create"
46569
47105
  },
47106
+ "coreBlocks.updateComposition": {
47107
+ capName: "core-blocks",
47108
+ capScope: "system",
47109
+ addonId: null,
47110
+ access: "create"
47111
+ },
47112
+ "coreBlocks.validateComposition": {
47113
+ capName: "core-blocks",
47114
+ capScope: "system",
47115
+ addonId: null,
47116
+ access: "view"
47117
+ },
46570
47118
  "cover.close": {
46571
47119
  capName: "cover",
46572
47120
  capScope: "device",