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