@camstack/addon-agent-ui 1.2.150 → 1.2.151

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 (2) hide show
  1. package/dist/addon.js +499 -27
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -9566,6 +9566,48 @@ var ModelProviderIdSchema = _enum([
9566
9566
  "scrypted",
9567
9567
  "custom"
9568
9568
  ]);
9569
+ /**
9570
+ * The licence of a model, as a record rather than a bare SPDX string: a
9571
+ * permissive CODE licence routinely sits on top of restrictive WEIGHTS or
9572
+ * DATA, and the obligations (attribution, modification notices, source offers)
9573
+ * are per upstream. A persisted custom-model row written when this field was a
9574
+ * string still parses — the string is lifted into `{ weights }`.
9575
+ *
9576
+ * Every licence surface (the admin "Models and licenses" page,
9577
+ * `THIRD_PARTY_MODELS.md`, the Hugging Face model table) is GENERATED from
9578
+ * these records by `scripts/gen-model-licenses.ts` (D661).
9579
+ */
9580
+ var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { weights: value } : value, object({
9581
+ /** SPDX id of the WEIGHTS' terms, a `LicenseRef-*` for non-SPDX terms, or `UNKNOWN`. */
9582
+ weights: string().min(1),
9583
+ /** SPDX id of the upstream code that defines / trained the network. */
9584
+ code: string().min(1).optional(),
9585
+ /** Training data whose terms add obligations (attribution, non-commercial). */
9586
+ data: object({
9587
+ name: string().min(1),
9588
+ terms: string().min(1),
9589
+ url: string().url().optional()
9590
+ }).optional(),
9591
+ /** The project the weights come from. Required on built-in entries (guard). */
9592
+ upstream: object({
9593
+ name: string().min(1),
9594
+ url: string().url()
9595
+ }).optional(),
9596
+ /** Where the licence text governing the weights is published. */
9597
+ url: string().url().optional(),
9598
+ /** Attribution the licence REQUIRES, verbatim. */
9599
+ attribution: string().min(1).optional(),
9600
+ /** What CamStack changed. Required when `hosting` is `camstack-hf` (guard). */
9601
+ modifications: string().min(1).optional(),
9602
+ /** Who serves the file a node downloads. */
9603
+ hosting: _enum([
9604
+ "camstack-hf",
9605
+ "third-party",
9606
+ "built-in"
9607
+ ]).optional(),
9608
+ /** True when the weights or their data forbid commercial use. */
9609
+ nonCommercial: boolean().optional()
9610
+ }));
9569
9611
  var ModelCatalogEntrySchema = object({
9570
9612
  id: string(),
9571
9613
  name: string(),
@@ -9654,11 +9696,11 @@ var ModelCatalogEntrySchema = object({
9654
9696
  p95LatencyMs: record(string(), number()).optional()
9655
9697
  }).optional(),
9656
9698
  /**
9657
- * SPDX-ish license id of the model weights (e.g. `AGPL-3.0` for Ultralytics
9658
- * YOLO26, `GPL-3.0` for YOLOv9, `Apache-2.0` for D-FINE/RF-DETR). Matters for
9659
- * the retraining addon and any future commercial distribution.
9699
+ * The model's licence record — see {@link ModelLicenseSchema}. Optional in
9700
+ * the schema (a custom model's author may state none); REQUIRED and complete
9701
+ * on every built-in catalog entry (`scripts/check-catalog-licence.ts`).
9660
9702
  */
9661
- license: string().optional(),
9703
+ license: ModelLicenseSchema.optional(),
9662
9704
  /**
9663
9705
  * Variant-selector grouping. The UI groups models by `family` + `tier` and
9664
9706
  * offers `precision` / `optimization` as variant axes WITHIN a tier — so all
@@ -9753,23 +9795,6 @@ var ExpressionEvalError = class extends Error {
9753
9795
  this.name = "ExpressionEvalError";
9754
9796
  }
9755
9797
  };
9756
- /**
9757
- * Frozen, null-prototype builtin function table for the expression engine
9758
- * (spec §4 rule 4). The table is the SOLE surface of callable functions: the
9759
- * parser rejects any callee not in it, and the evaluator gates each call on an
9760
- * own-property check against it.
9761
- *
9762
- * Because the object has a NULL prototype AND is `Object.freeze`d:
9763
- * - it cannot be polluted (no `__proto__` / `constructor` write reaches it);
9764
- * - a lookup for `toString` / `hasOwnProperty` / `constructor` finds NOTHING
9765
- * (there is no `Object.prototype` in the chain), so those names are not
9766
- * callable — they are simply "unknown function" at parse time.
9767
- *
9768
- * Every numeric argument is validated as a finite number and every numeric
9769
- * RESULT is re-checked finite, so `/0`, `sqrt(-1)` (→ NaN) and overflow
9770
- * (`pow(10,400)` → Infinity) all raise `ExpressionEvalError` and fail the link
9771
- * closed rather than emitting a garbage value.
9772
- */
9773
9798
  function asFiniteNumber(value, name, index) {
9774
9799
  if (typeof value !== "number" || !Number.isFinite(value)) throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a finite number`);
9775
9800
  return value;
@@ -9785,6 +9810,10 @@ function finiteResult(value, name) {
9785
9810
  function allFiniteNumbers(args, name) {
9786
9811
  return args.map((a, idx) => asFiniteNumber(a, name, idx));
9787
9812
  }
9813
+ function asBoolean$1(value, name, index) {
9814
+ if (typeof value !== "boolean") throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a boolean`);
9815
+ return value;
9816
+ }
9788
9817
  var INF = Number.POSITIVE_INFINITY;
9789
9818
  var table = {
9790
9819
  min: {
@@ -9885,6 +9914,40 @@ var table = {
9885
9914
  if (from === to) return x;
9886
9915
  throw new ExpressionEvalError("convert: unit conversion table not installed");
9887
9916
  }
9917
+ },
9918
+ any: {
9919
+ minArgs: 1,
9920
+ maxArgs: INF,
9921
+ apply: (args) => args.map((a, i) => asBoolean$1(a, "any", i)).some((b) => b)
9922
+ },
9923
+ all: {
9924
+ minArgs: 1,
9925
+ maxArgs: INF,
9926
+ apply: (args) => args.map((a, i) => asBoolean$1(a, "all", i)).every((b) => b)
9927
+ },
9928
+ within: {
9929
+ minArgs: 2,
9930
+ maxArgs: 2,
9931
+ apply: (args, hooks) => {
9932
+ const windowMs = asFiniteNumber(args[1], "within", 1);
9933
+ if (windowMs < 0) throw new ExpressionEvalError("within: the window must not be negative");
9934
+ const at = args[0];
9935
+ if (at === null) return false;
9936
+ const ts = asFiniteNumber(at, "within", 0);
9937
+ const now = hooks.now;
9938
+ if (now === void 0 || !Number.isFinite(now)) throw new ExpressionEvalError("within: no clock was supplied to this evaluation");
9939
+ const inside = now - ts <= windowMs;
9940
+ if (inside) hooks.noteDeadline?.(ts + windowMs + 1);
9941
+ return inside;
9942
+ }
9943
+ },
9944
+ latest: {
9945
+ minArgs: 1,
9946
+ maxArgs: INF,
9947
+ apply: (args) => {
9948
+ const present = args.flatMap((a, i) => a === null ? [] : [asFiniteNumber(a, "latest", i)]);
9949
+ return present.length === 0 ? null : finiteResult(Math.max(...present), "latest");
9950
+ }
9888
9951
  }
9889
9952
  };
9890
9953
  Object.freeze(Object.assign(Object.create(null), table));
@@ -10499,7 +10562,7 @@ var AutomationActionSchema = discriminatedUnion("kind", [
10499
10562
  code: string().min(1).max(2e4)
10500
10563
  })
10501
10564
  ]);
10502
- object({
10565
+ var AutomationRecipeSchema = object({
10503
10566
  triggers: array(AutomationTriggerSchema),
10504
10567
  conditions: AutomationConditionSchema.optional(),
10505
10568
  actions: array(AutomationActionSchema)
@@ -10967,12 +11030,32 @@ var AudioClassificationLabelSchema = object({
10967
11030
  originalClass: string().optional(),
10968
11031
  score: number()
10969
11032
  });
11033
+ /**
11034
+ * Did the classifier RUN on this window? (D660)
11035
+ *
11036
+ * `classified` with no labels means the model heard nothing above the
11037
+ * camera's floor. `not-classified` means nobody listened — and until D660 the
11038
+ * two were the same shape (`classification` absent), so a window the global
11039
+ * busy gate threw away read downstream exactly like a quiet one (D393).
11040
+ */
11041
+ var AudioClassifyOutcomeSchema = discriminatedUnion("state", [object({ state: literal("classified") }), object({
11042
+ state: literal("not-classified"),
11043
+ reason: _enum([
11044
+ "superseded",
11045
+ "error",
11046
+ "timeout",
11047
+ "disposed"
11048
+ ])
11049
+ })]);
10970
11050
  var AudioAnalysisResultSchema = object({
10971
11051
  level: AudioLevelSchema,
11052
+ /** Labels at or above the camera's floor. Absent = none — read `classifyOutcome` to know whether the model ran at all. */
10972
11053
  classification: object({
10973
11054
  labels: array(AudioClassificationLabelSchema).readonly(),
10974
11055
  inferenceMs: number()
10975
11056
  }).optional(),
11057
+ /** Whether the classifier ran on this window (D660). */
11058
+ classifyOutcome: AudioClassifyOutcomeSchema,
10976
11059
  timestamp: number()
10977
11060
  });
10978
11061
  var AudioAnalysisSettingsSchema = object({
@@ -12530,6 +12613,195 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
12530
12613
  }),
12531
12614
  lastChangedAt: number()
12532
12615
  });
12616
+ /** A composed device's stableId is this prefix plus the block id. */
12617
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
12618
+ /** Longest snippet a `code` source may carry (slice 4). */
12619
+ var MAX_COMPOSITION_CODE_LENGTH = 2e4;
12620
+ var CompositionSourceRefSchema = object({
12621
+ /** The owning addon; `stableId` is unique only within it. */
12622
+ addonId: string().min(1),
12623
+ stableId: string().min(1)
12624
+ });
12625
+ /** One field of one capability of one source device. */
12626
+ var CompositionFieldReadSchema = object({
12627
+ source: CompositionSourceRefSchema,
12628
+ cap: string().min(1),
12629
+ /** Dotted path into the source cap's runtime-state slice. */
12630
+ fieldPath: string().min(1)
12631
+ });
12632
+ /** `from`: copy one source field verbatim. It is also an expression's `from` binding. */
12633
+ var CompositionFromSourceSchema = CompositionFieldReadSchema.extend({ kind: literal("from") });
12634
+ var CompositionBindingSchema = discriminatedUnion("kind", [CompositionFromSourceSchema, object({
12635
+ kind: literal("literal"),
12636
+ value: union([
12637
+ string(),
12638
+ number(),
12639
+ boolean(),
12640
+ _null()
12641
+ ])
12642
+ })]);
12643
+ /**
12644
+ * `expression`: a formula over named bindings, in the salvaged expression
12645
+ * engine. Validated at parse by the SAME function every other consumer runs,
12646
+ * so the editor and the store cannot disagree.
12647
+ */
12648
+ var CompositionExpressionSourceSchema = object({
12649
+ kind: literal("expression"),
12650
+ expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
12651
+ bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), CompositionBindingSchema)
12652
+ }).superRefine((src, ctx) => {
12653
+ const err = validateExpressionSource(src);
12654
+ if (err !== null) ctx.addIssue({
12655
+ code: "custom",
12656
+ message: err,
12657
+ path: ["expr"]
12658
+ });
12659
+ });
12660
+ /** `code`: RESERVED for slice 4 (own runner, one-way eject). */
12661
+ var CompositionCodeSourceSchema = object({
12662
+ kind: literal("code"),
12663
+ code: string().min(1).max(MAX_COMPOSITION_CODE_LENGTH)
12664
+ });
12665
+ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12666
+ CompositionFromSourceSchema,
12667
+ CompositionExpressionSourceSchema,
12668
+ CompositionCodeSourceSchema
12669
+ ]);
12670
+ var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
12671
+ kind: literal("forward"),
12672
+ source: CompositionSourceRefSchema,
12673
+ cap: string().min(1),
12674
+ method: string().min(1)
12675
+ }), CompositionCodeSourceSchema]);
12676
+ var CompositionFeatureSchema = discriminatedUnion("kind", [object({
12677
+ kind: literal("fields"),
12678
+ cap: string().min(1),
12679
+ fields: record(string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
12680
+ /** RESERVED for slice 3; refused by the validator when non-empty. */
12681
+ commands: record(string().min(1), CompositionCommandTargetSchema).optional()
12682
+ }), object({
12683
+ kind: literal("passthrough"),
12684
+ cap: string().min(1),
12685
+ source: CompositionSourceRefSchema
12686
+ })]);
12687
+ var CompositionSchema = object({
12688
+ target: discriminatedUnion("kind", [object({
12689
+ kind: literal("new"),
12690
+ type: _enum(DeviceType),
12691
+ role: _enum(DeviceRole).optional()
12692
+ }), object({
12693
+ kind: literal("existing"),
12694
+ device: CompositionSourceRefSchema
12695
+ })]),
12696
+ features: array(CompositionFeatureSchema).min(1).max(16)
12697
+ }).superRefine((composition, ctx) => {
12698
+ const seen = /* @__PURE__ */ new Set();
12699
+ composition.features.forEach((feature, index) => {
12700
+ if (seen.has(feature.cap)) ctx.addIssue({
12701
+ code: "custom",
12702
+ message: `capability \`${feature.cap}\` is composed twice — one feature per capability`,
12703
+ path: [
12704
+ "features",
12705
+ index,
12706
+ "cap"
12707
+ ]
12708
+ });
12709
+ seen.add(feature.cap);
12710
+ });
12711
+ });
12712
+ /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
12713
+ var CompositionProblemSchema = object({
12714
+ code: _enum([
12715
+ "reserved-variant",
12716
+ "unknown-capability",
12717
+ "not-composable",
12718
+ "wrong-device-type",
12719
+ "has-commands",
12720
+ "unknown-field",
12721
+ "nested-field",
12722
+ "missing-field",
12723
+ "kind-mismatch",
12724
+ "may-be-null",
12725
+ "source-missing",
12726
+ "source-unreadable",
12727
+ "source-capability-missing",
12728
+ "source-field-unknown",
12729
+ "expression-invalid",
12730
+ "cycle",
12731
+ "duplicate-target"
12732
+ ]),
12733
+ path: string(),
12734
+ message: string()
12735
+ });
12736
+ var CompositionFieldKindSchema = _enum([
12737
+ "string",
12738
+ "number",
12739
+ "boolean",
12740
+ "enum"
12741
+ ]);
12742
+ /** How a field says "unavailable": `null` when its schema allows it, else the device goes offline (D393). */
12743
+ var CompositionUnavailableModeSchema = _enum(["null", "offline"]);
12744
+ /**
12745
+ * `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
12746
+ * field of its cap changes value · `constant` reads nothing, computed once.
12747
+ */
12748
+ var CompositionFieldRoleSchema = _enum([
12749
+ "derived",
12750
+ "clock",
12751
+ "constant"
12752
+ ]);
12753
+ var CompositionFieldPlanSchema = object({
12754
+ cap: string(),
12755
+ path: string(),
12756
+ /** Index into `composition.features` this field's capability came from —
12757
+ * lets a source/cycle problem name its path as `features[N].fields.<path>`
12758
+ * (the same convention `planComposition`'s own problems already use). */
12759
+ featureIndex: number().int().nonnegative(),
12760
+ kind: CompositionFieldKindSchema,
12761
+ nullable: boolean(),
12762
+ required: boolean(),
12763
+ unavailable: CompositionUnavailableModeSchema,
12764
+ role: CompositionFieldRoleSchema,
12765
+ source: CompositionFieldSourceSchema,
12766
+ reads: array(CompositionFieldReadSchema)
12767
+ });
12768
+ var CompositionValidationSchema = object({
12769
+ ok: boolean(),
12770
+ problems: array(CompositionProblemSchema),
12771
+ fields: array(CompositionFieldPlanSchema)
12772
+ });
12773
+ /** Mirrors `CoreBlockStatus`, pinned by `core-blocks-source.spec.ts` (Task 11). */
12774
+ var CompositionRunStatusSchema = _enum([
12775
+ "stopped",
12776
+ "starting",
12777
+ "running",
12778
+ "failed"
12779
+ ]);
12780
+ var CompositionFieldStateKindSchema = _enum([
12781
+ "fresh",
12782
+ "stale",
12783
+ "unavailable"
12784
+ ]);
12785
+ var CompositionFieldStateSchema = object({
12786
+ cap: string(),
12787
+ path: string(),
12788
+ state: CompositionFieldStateKindSchema,
12789
+ /** `null` whenever `state === 'unavailable'`; never a plausible stand-in (D393). */
12790
+ value: union([
12791
+ string(),
12792
+ number(),
12793
+ boolean(),
12794
+ _null()
12795
+ ]),
12796
+ reason: string().optional()
12797
+ });
12798
+ var CompositionBlockStateSchema = object({
12799
+ blockId: string(),
12800
+ deviceId: number().nullable(),
12801
+ status: CompositionRunStatusSchema,
12802
+ reason: string().optional(),
12803
+ fields: array(CompositionFieldStateSchema)
12804
+ });
12533
12805
  /** Where a block runs. The operator chooses — a block driving a device on an
12534
12806
  * agent is the reason placement is not fixed to the hub. */
12535
12807
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -12556,6 +12828,30 @@ var CoreBlockInputSchema = object({
12556
12828
  */
12557
12829
  integrationId: string().optional()
12558
12830
  });
12831
+ /**
12832
+ * What a block IS (D659). Absent means `code` — every row stored before this
12833
+ * union keeps working unchanged.
12834
+ * - `code`: the TypeScript in `code`, compiled and run in its own runner;
12835
+ * - `recipe`: RESERVED (automations), stored shape only; refused at run by name;
12836
+ * - `composition`: declarative, run by the shared `composer`; `code` is `''`.
12837
+ */
12838
+ var CoreBlockSourceSchema = discriminatedUnion("kind", [
12839
+ object({ kind: literal("code") }),
12840
+ object({
12841
+ kind: literal("recipe"),
12842
+ recipe: AutomationRecipeSchema
12843
+ }),
12844
+ object({
12845
+ kind: literal("composition"),
12846
+ composition: CompositionSchema
12847
+ })
12848
+ ]);
12849
+ /** The client-authored half of a composition block. No `code`, no placement (hub-only; Phase 7). */
12850
+ var CompositionBlockInputSchema = object({
12851
+ name: string().min(1).max(120),
12852
+ enabled: boolean(),
12853
+ composition: CompositionSchema
12854
+ });
12559
12855
  /** A stored block. */
12560
12856
  var CoreBlockSchema = CoreBlockInputSchema.extend({
12561
12857
  id: string(),
@@ -12571,8 +12867,38 @@ var CoreBlockSchema = CoreBlockInputSchema.extend({
12571
12867
  */
12572
12868
  lastError: string().optional(),
12573
12869
  /** Ms epoch of the last state change. */
12574
- lastChangedAt: number()
12870
+ lastChangedAt: number(),
12871
+ /** What the block is. Absent means `code` (D659). */
12872
+ source: CoreBlockSourceSchema.optional()
12873
+ });
12874
+ /** A stored composition block and what the composer says about it. */
12875
+ var CompositionViewSchema = object({
12876
+ block: CoreBlockSchema,
12877
+ state: discriminatedUnion("kind", [object({
12878
+ kind: literal("answered"),
12879
+ state: CompositionBlockStateSchema.nullable()
12880
+ }), object({
12881
+ kind: literal("unreachable"),
12882
+ error: string()
12883
+ })])
12575
12884
  });
12885
+ /**
12886
+ * A read of the stored compositions. `not-loaded` while the `core_blocks`
12887
+ * table has not been READ: an empty answer then would make "not yet known"
12888
+ * look like "none", and invite the operator to recreate what exists (D315).
12889
+ */
12890
+ var CompositionsNotLoadedSchema = object({
12891
+ state: literal("not-loaded"),
12892
+ reason: string()
12893
+ });
12894
+ var CompositionListReadSchema = discriminatedUnion("state", [object({
12895
+ state: literal("loaded"),
12896
+ views: array(CompositionViewSchema)
12897
+ }), CompositionsNotLoadedSchema]);
12898
+ var CompositionGetReadSchema = discriminatedUnion("state", [object({
12899
+ state: literal("loaded"),
12900
+ view: CompositionViewSchema.nullable()
12901
+ }), CompositionsNotLoadedSchema]);
12576
12902
  /** What a compile attempt produced. */
12577
12903
  var CoreBlockCompileResultSchema = object({
12578
12904
  ok: boolean(),
@@ -12610,7 +12936,72 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
12610
12936
  }), method(object({}), object({ libs: array(object({
12611
12937
  filePath: string(),
12612
12938
  content: string()
12613
- })) }), { auth: "admin" });
12939
+ })) }), { auth: "admin" }), method(object({ block: CompositionBlockInputSchema }), object({ block: CoreBlockSchema }), {
12940
+ kind: "mutation",
12941
+ auth: "admin",
12942
+ caller: "required"
12943
+ }), method(object({
12944
+ blockId: string(),
12945
+ expectedUpdatedAt: number(),
12946
+ block: CompositionBlockInputSchema.partial()
12947
+ }), object({ block: CoreBlockSchema }), {
12948
+ kind: "mutation",
12949
+ auth: "admin",
12950
+ caller: "required"
12951
+ }), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
12952
+ composition: CompositionSchema,
12953
+ blockId: string().optional()
12954
+ }), CompositionValidationSchema, {
12955
+ kind: "mutation",
12956
+ auth: "admin",
12957
+ access: "view"
12958
+ });
12959
+ var ComposerBlockSchema = object({
12960
+ id: string().min(1),
12961
+ name: string().min(1).max(120),
12962
+ enabled: boolean(),
12963
+ updatedAt: number(),
12964
+ composition: CompositionSchema
12965
+ });
12966
+ /**
12967
+ * A stored composition row that no longer PARSES — a schema a release
12968
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
12969
+ * its device as a placeholder and reports the block `failed` naming the parse
12970
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
12971
+ */
12972
+ var ComposerUnreadableBlockSchema = object({
12973
+ id: string().min(1),
12974
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
12975
+ name: string().nullable(),
12976
+ /** The parse error, in the operator's words. */
12977
+ error: string()
12978
+ });
12979
+ method(object({
12980
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
12981
+ integrationId: string().nullable(),
12982
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
12983
+ storeLoaded: boolean(),
12984
+ blocks: array(ComposerBlockSchema),
12985
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
12986
+ restartBlockIds: array(string()),
12987
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
12988
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
12989
+ }), object({
12990
+ blocks: array(object({
12991
+ blockId: string(),
12992
+ status: CompositionRunStatusSchema,
12993
+ reason: string().optional()
12994
+ })),
12995
+ /**
12996
+ * False when the composer declared and withdrew NOTHING (store not loaded,
12997
+ * integration unknown, its own rows unread or read empty once). An empty
12998
+ * apply the caller owes is paid off only by one the composer acted on (D49).
12999
+ */
13000
+ acted: boolean()
13001
+ }), {
13002
+ kind: "mutation",
13003
+ auth: "admin"
13004
+ }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
12614
13005
  /**
12615
13006
  * `custom-model-registry` — collection cap exposing operator-registered
12616
13007
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -18355,8 +18746,8 @@ var NcTestResultSchema = object({
18355
18746
  className: string().optional(),
18356
18747
  label: string().optional()
18357
18748
  });
18358
- /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is the
18359
- * same union; the template-vars spec pins the two together. `mixed` is DERIVED
18749
+ /** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
18750
+ * `z.infer` of this schema — one shape, no twin. `mixed` is DERIVED
18360
18751
  * (a stored system rule whose kinds span families, D637) and never authored. */
18361
18752
  var NcRuleKindSchema = _enum([
18362
18753
  "detection",
@@ -20255,6 +20646,13 @@ var AudioEventSchema = object({
20255
20646
  originalClass: string().optional(),
20256
20647
  score: number()
20257
20648
  }).optional(),
20649
+ /**
20650
+ * Whether the classifier RAN on the window behind this row (D660). Absent
20651
+ * on rows written before D660 — unknown, NOT classified: until then a
20652
+ * window the analyzer's busy gate threw away was stored exactly like one
20653
+ * that heard nothing above the floor.
20654
+ */
20655
+ classifyOutcome: AudioClassifyOutcomeSchema.optional(),
20258
20656
  /** Populated by B5 (recording playback URL for this event). */
20259
20657
  mediaUrl: string().optional()
20260
20658
  });
@@ -34419,6 +34817,38 @@ DeviceType.Camera, method(object({
34419
34817
  detection: array(ZoneRuleSchema).readonly(),
34420
34818
  package: array(ZoneRuleSchema).readonly()
34421
34819
  });
34820
+ var NUMBER = {
34821
+ kind: "fixed",
34822
+ result: ["number"]
34823
+ };
34824
+ var BOOLEAN = {
34825
+ kind: "fixed",
34826
+ result: ["boolean"]
34827
+ };
34828
+ Object.freeze({
34829
+ min: NUMBER,
34830
+ max: NUMBER,
34831
+ abs: NUMBER,
34832
+ floor: NUMBER,
34833
+ ceil: NUMBER,
34834
+ sqrt: NUMBER,
34835
+ round: NUMBER,
34836
+ pow: NUMBER,
34837
+ clamp: NUMBER,
34838
+ avg: NUMBER,
34839
+ sum: NUMBER,
34840
+ age: NUMBER,
34841
+ convert: NUMBER,
34842
+ coalesce: { kind: "coalesce" },
34843
+ any: BOOLEAN,
34844
+ all: BOOLEAN,
34845
+ within: BOOLEAN,
34846
+ latest: {
34847
+ kind: "fixed",
34848
+ result: ["number", "null"]
34849
+ }
34850
+ });
34851
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
34422
34852
  /**
34423
34853
  * Accessory device helpers — shared across drivers.
34424
34854
  *
@@ -36727,6 +37157,18 @@ Object.freeze({
36727
37157
  addonId: null,
36728
37158
  access: "create"
36729
37159
  },
37160
+ "composer.applyBlocks": {
37161
+ capName: "composer",
37162
+ capScope: "system",
37163
+ addonId: null,
37164
+ access: "create"
37165
+ },
37166
+ "composer.getStates": {
37167
+ capName: "composer",
37168
+ capScope: "system",
37169
+ addonId: null,
37170
+ access: "view"
37171
+ },
36730
37172
  "connectionTest.describeTest": {
36731
37173
  capName: "connection-test",
36732
37174
  capScope: "system",
@@ -36787,6 +37229,12 @@ Object.freeze({
36787
37229
  addonId: null,
36788
37230
  access: "create"
36789
37231
  },
37232
+ "coreBlocks.createComposition": {
37233
+ capName: "core-blocks",
37234
+ capScope: "system",
37235
+ addonId: null,
37236
+ access: "create"
37237
+ },
36790
37238
  "coreBlocks.delete": {
36791
37239
  capName: "core-blocks",
36792
37240
  capScope: "system",
@@ -36799,6 +37247,12 @@ Object.freeze({
36799
37247
  addonId: null,
36800
37248
  access: "view"
36801
37249
  },
37250
+ "coreBlocks.getComposition": {
37251
+ capName: "core-blocks",
37252
+ capScope: "system",
37253
+ addonId: null,
37254
+ access: "view"
37255
+ },
36802
37256
  "coreBlocks.getTypeDefs": {
36803
37257
  capName: "core-blocks",
36804
37258
  capScope: "system",
@@ -36811,6 +37265,12 @@ Object.freeze({
36811
37265
  addonId: null,
36812
37266
  access: "view"
36813
37267
  },
37268
+ "coreBlocks.listCompositions": {
37269
+ capName: "core-blocks",
37270
+ capScope: "system",
37271
+ addonId: null,
37272
+ access: "view"
37273
+ },
36814
37274
  "coreBlocks.restart": {
36815
37275
  capName: "core-blocks",
36816
37276
  capScope: "system",
@@ -36829,6 +37289,18 @@ Object.freeze({
36829
37289
  addonId: null,
36830
37290
  access: "create"
36831
37291
  },
37292
+ "coreBlocks.updateComposition": {
37293
+ capName: "core-blocks",
37294
+ capScope: "system",
37295
+ addonId: null,
37296
+ access: "create"
37297
+ },
37298
+ "coreBlocks.validateComposition": {
37299
+ capName: "core-blocks",
37300
+ capScope: "system",
37301
+ addonId: null,
37302
+ access: "view"
37303
+ },
36832
37304
  "cover.close": {
36833
37305
  capName: "cover",
36834
37306
  capScope: "device",
@@ -45810,7 +46282,7 @@ var AgentUIAddon = class extends BaseAddon {
45810
46282
  capability: adminUiCapability,
45811
46283
  provider: {
45812
46284
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
45813
- getVersion: async () => ({ version: "1.2.150" })
46285
+ getVersion: async () => ({ version: "1.2.151" })
45814
46286
  }
45815
46287
  }];
45816
46288
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.150",
3
+ "version": "1.2.151",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",