@camstack/addon-agent-ui 1.2.150 → 1.2.152
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.
- package/dist/addon.js +546 -32
- 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(),
|
|
@@ -9621,6 +9663,16 @@ var ModelCatalogEntrySchema = object({
|
|
|
9621
9663
|
*/
|
|
9622
9664
|
postprocessor: custom().optional(),
|
|
9623
9665
|
/**
|
|
9666
|
+
* Per-MODEL default confidence floor. Absent ⇒ the step's
|
|
9667
|
+
* `StepDefinition.defaultConfidence` applies. A score is a property of one
|
|
9668
|
+
* model's output scale, not of the step slot it sits in: YuNet's
|
|
9669
|
+
* `sqrt(cls·obj)` is not SCRFD's score, and inheriting SCRFD's 0.5 filled the
|
|
9670
|
+
* face gallery with wheels and hands (D662, amends D645). An operator's
|
|
9671
|
+
* explicit value still wins over it. Resolved in ONE place —
|
|
9672
|
+
* `addon-pipeline/.../registry/effective-confidence.ts`.
|
|
9673
|
+
*/
|
|
9674
|
+
defaultConfidence: number().min(0).max(1).optional(),
|
|
9675
|
+
/**
|
|
9624
9676
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
9625
9677
|
* onto the canonical template) before this step runs, instead of a plain
|
|
9626
9678
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -9654,11 +9706,11 @@ var ModelCatalogEntrySchema = object({
|
|
|
9654
9706
|
p95LatencyMs: record(string(), number()).optional()
|
|
9655
9707
|
}).optional(),
|
|
9656
9708
|
/**
|
|
9657
|
-
*
|
|
9658
|
-
*
|
|
9659
|
-
*
|
|
9709
|
+
* The model's licence record — see {@link ModelLicenseSchema}. Optional in
|
|
9710
|
+
* the schema (a custom model's author may state none); REQUIRED and complete
|
|
9711
|
+
* on every built-in catalog entry (`scripts/check-catalog-licence.ts`).
|
|
9660
9712
|
*/
|
|
9661
|
-
license:
|
|
9713
|
+
license: ModelLicenseSchema.optional(),
|
|
9662
9714
|
/**
|
|
9663
9715
|
* Variant-selector grouping. The UI groups models by `family` + `tier` and
|
|
9664
9716
|
* offers `precision` / `optimization` as variant axes WITHIN a tier — so all
|
|
@@ -9753,23 +9805,6 @@ var ExpressionEvalError = class extends Error {
|
|
|
9753
9805
|
this.name = "ExpressionEvalError";
|
|
9754
9806
|
}
|
|
9755
9807
|
};
|
|
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
9808
|
function asFiniteNumber(value, name, index) {
|
|
9774
9809
|
if (typeof value !== "number" || !Number.isFinite(value)) throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a finite number`);
|
|
9775
9810
|
return value;
|
|
@@ -9785,6 +9820,10 @@ function finiteResult(value, name) {
|
|
|
9785
9820
|
function allFiniteNumbers(args, name) {
|
|
9786
9821
|
return args.map((a, idx) => asFiniteNumber(a, name, idx));
|
|
9787
9822
|
}
|
|
9823
|
+
function asBoolean$1(value, name, index) {
|
|
9824
|
+
if (typeof value !== "boolean") throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a boolean`);
|
|
9825
|
+
return value;
|
|
9826
|
+
}
|
|
9788
9827
|
var INF = Number.POSITIVE_INFINITY;
|
|
9789
9828
|
var table = {
|
|
9790
9829
|
min: {
|
|
@@ -9885,6 +9924,40 @@ var table = {
|
|
|
9885
9924
|
if (from === to) return x;
|
|
9886
9925
|
throw new ExpressionEvalError("convert: unit conversion table not installed");
|
|
9887
9926
|
}
|
|
9927
|
+
},
|
|
9928
|
+
any: {
|
|
9929
|
+
minArgs: 1,
|
|
9930
|
+
maxArgs: INF,
|
|
9931
|
+
apply: (args) => args.map((a, i) => asBoolean$1(a, "any", i)).some((b) => b)
|
|
9932
|
+
},
|
|
9933
|
+
all: {
|
|
9934
|
+
minArgs: 1,
|
|
9935
|
+
maxArgs: INF,
|
|
9936
|
+
apply: (args) => args.map((a, i) => asBoolean$1(a, "all", i)).every((b) => b)
|
|
9937
|
+
},
|
|
9938
|
+
within: {
|
|
9939
|
+
minArgs: 2,
|
|
9940
|
+
maxArgs: 2,
|
|
9941
|
+
apply: (args, hooks) => {
|
|
9942
|
+
const windowMs = asFiniteNumber(args[1], "within", 1);
|
|
9943
|
+
if (windowMs < 0) throw new ExpressionEvalError("within: the window must not be negative");
|
|
9944
|
+
const at = args[0];
|
|
9945
|
+
if (at === null) return false;
|
|
9946
|
+
const ts = asFiniteNumber(at, "within", 0);
|
|
9947
|
+
const now = hooks.now;
|
|
9948
|
+
if (now === void 0 || !Number.isFinite(now)) throw new ExpressionEvalError("within: no clock was supplied to this evaluation");
|
|
9949
|
+
const inside = now - ts <= windowMs;
|
|
9950
|
+
if (inside) hooks.noteDeadline?.(ts + windowMs + 1);
|
|
9951
|
+
return inside;
|
|
9952
|
+
}
|
|
9953
|
+
},
|
|
9954
|
+
latest: {
|
|
9955
|
+
minArgs: 1,
|
|
9956
|
+
maxArgs: INF,
|
|
9957
|
+
apply: (args) => {
|
|
9958
|
+
const present = args.flatMap((a, i) => a === null ? [] : [asFiniteNumber(a, "latest", i)]);
|
|
9959
|
+
return present.length === 0 ? null : finiteResult(Math.max(...present), "latest");
|
|
9960
|
+
}
|
|
9888
9961
|
}
|
|
9889
9962
|
};
|
|
9890
9963
|
Object.freeze(Object.assign(Object.create(null), table));
|
|
@@ -10499,7 +10572,7 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
10499
10572
|
code: string().min(1).max(2e4)
|
|
10500
10573
|
})
|
|
10501
10574
|
]);
|
|
10502
|
-
object({
|
|
10575
|
+
var AutomationRecipeSchema = object({
|
|
10503
10576
|
triggers: array(AutomationTriggerSchema),
|
|
10504
10577
|
conditions: AutomationConditionSchema.optional(),
|
|
10505
10578
|
actions: array(AutomationActionSchema)
|
|
@@ -10967,12 +11040,32 @@ var AudioClassificationLabelSchema = object({
|
|
|
10967
11040
|
originalClass: string().optional(),
|
|
10968
11041
|
score: number()
|
|
10969
11042
|
});
|
|
11043
|
+
/**
|
|
11044
|
+
* Did the classifier RUN on this window? (D660)
|
|
11045
|
+
*
|
|
11046
|
+
* `classified` with no labels means the model heard nothing above the
|
|
11047
|
+
* camera's floor. `not-classified` means nobody listened — and until D660 the
|
|
11048
|
+
* two were the same shape (`classification` absent), so a window the global
|
|
11049
|
+
* busy gate threw away read downstream exactly like a quiet one (D393).
|
|
11050
|
+
*/
|
|
11051
|
+
var AudioClassifyOutcomeSchema = discriminatedUnion("state", [object({ state: literal("classified") }), object({
|
|
11052
|
+
state: literal("not-classified"),
|
|
11053
|
+
reason: _enum([
|
|
11054
|
+
"superseded",
|
|
11055
|
+
"error",
|
|
11056
|
+
"timeout",
|
|
11057
|
+
"disposed"
|
|
11058
|
+
])
|
|
11059
|
+
})]);
|
|
10970
11060
|
var AudioAnalysisResultSchema = object({
|
|
10971
11061
|
level: AudioLevelSchema,
|
|
11062
|
+
/** Labels at or above the camera's floor. Absent = none — read `classifyOutcome` to know whether the model ran at all. */
|
|
10972
11063
|
classification: object({
|
|
10973
11064
|
labels: array(AudioClassificationLabelSchema).readonly(),
|
|
10974
11065
|
inferenceMs: number()
|
|
10975
11066
|
}).optional(),
|
|
11067
|
+
/** Whether the classifier ran on this window (D660). */
|
|
11068
|
+
classifyOutcome: AudioClassifyOutcomeSchema,
|
|
10976
11069
|
timestamp: number()
|
|
10977
11070
|
});
|
|
10978
11071
|
var AudioAnalysisSettingsSchema = object({
|
|
@@ -12530,6 +12623,195 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
12530
12623
|
}),
|
|
12531
12624
|
lastChangedAt: number()
|
|
12532
12625
|
});
|
|
12626
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
12627
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
12628
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
12629
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
12630
|
+
var CompositionSourceRefSchema = object({
|
|
12631
|
+
/** The owning addon; `stableId` is unique only within it. */
|
|
12632
|
+
addonId: string().min(1),
|
|
12633
|
+
stableId: string().min(1)
|
|
12634
|
+
});
|
|
12635
|
+
/** One field of one capability of one source device. */
|
|
12636
|
+
var CompositionFieldReadSchema = object({
|
|
12637
|
+
source: CompositionSourceRefSchema,
|
|
12638
|
+
cap: string().min(1),
|
|
12639
|
+
/** Dotted path into the source cap's runtime-state slice. */
|
|
12640
|
+
fieldPath: string().min(1)
|
|
12641
|
+
});
|
|
12642
|
+
/** `from`: copy one source field verbatim. It is also an expression's `from` binding. */
|
|
12643
|
+
var CompositionFromSourceSchema = CompositionFieldReadSchema.extend({ kind: literal("from") });
|
|
12644
|
+
var CompositionBindingSchema = discriminatedUnion("kind", [CompositionFromSourceSchema, object({
|
|
12645
|
+
kind: literal("literal"),
|
|
12646
|
+
value: union([
|
|
12647
|
+
string(),
|
|
12648
|
+
number(),
|
|
12649
|
+
boolean(),
|
|
12650
|
+
_null()
|
|
12651
|
+
])
|
|
12652
|
+
})]);
|
|
12653
|
+
/**
|
|
12654
|
+
* `expression`: a formula over named bindings, in the salvaged expression
|
|
12655
|
+
* engine. Validated at parse by the SAME function every other consumer runs,
|
|
12656
|
+
* so the editor and the store cannot disagree.
|
|
12657
|
+
*/
|
|
12658
|
+
var CompositionExpressionSourceSchema = object({
|
|
12659
|
+
kind: literal("expression"),
|
|
12660
|
+
expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
|
|
12661
|
+
bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), CompositionBindingSchema)
|
|
12662
|
+
}).superRefine((src, ctx) => {
|
|
12663
|
+
const err = validateExpressionSource(src);
|
|
12664
|
+
if (err !== null) ctx.addIssue({
|
|
12665
|
+
code: "custom",
|
|
12666
|
+
message: err,
|
|
12667
|
+
path: ["expr"]
|
|
12668
|
+
});
|
|
12669
|
+
});
|
|
12670
|
+
/** `code`: RESERVED for slice 4 (own runner, one-way eject). */
|
|
12671
|
+
var CompositionCodeSourceSchema = object({
|
|
12672
|
+
kind: literal("code"),
|
|
12673
|
+
code: string().min(1).max(MAX_COMPOSITION_CODE_LENGTH)
|
|
12674
|
+
});
|
|
12675
|
+
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
12676
|
+
CompositionFromSourceSchema,
|
|
12677
|
+
CompositionExpressionSourceSchema,
|
|
12678
|
+
CompositionCodeSourceSchema
|
|
12679
|
+
]);
|
|
12680
|
+
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
12681
|
+
kind: literal("forward"),
|
|
12682
|
+
source: CompositionSourceRefSchema,
|
|
12683
|
+
cap: string().min(1),
|
|
12684
|
+
method: string().min(1)
|
|
12685
|
+
}), CompositionCodeSourceSchema]);
|
|
12686
|
+
var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
12687
|
+
kind: literal("fields"),
|
|
12688
|
+
cap: string().min(1),
|
|
12689
|
+
fields: record(string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
|
|
12690
|
+
/** RESERVED for slice 3; refused by the validator when non-empty. */
|
|
12691
|
+
commands: record(string().min(1), CompositionCommandTargetSchema).optional()
|
|
12692
|
+
}), object({
|
|
12693
|
+
kind: literal("passthrough"),
|
|
12694
|
+
cap: string().min(1),
|
|
12695
|
+
source: CompositionSourceRefSchema
|
|
12696
|
+
})]);
|
|
12697
|
+
var CompositionSchema = object({
|
|
12698
|
+
target: discriminatedUnion("kind", [object({
|
|
12699
|
+
kind: literal("new"),
|
|
12700
|
+
type: _enum(DeviceType),
|
|
12701
|
+
role: _enum(DeviceRole).optional()
|
|
12702
|
+
}), object({
|
|
12703
|
+
kind: literal("existing"),
|
|
12704
|
+
device: CompositionSourceRefSchema
|
|
12705
|
+
})]),
|
|
12706
|
+
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
12707
|
+
}).superRefine((composition, ctx) => {
|
|
12708
|
+
const seen = /* @__PURE__ */ new Set();
|
|
12709
|
+
composition.features.forEach((feature, index) => {
|
|
12710
|
+
if (seen.has(feature.cap)) ctx.addIssue({
|
|
12711
|
+
code: "custom",
|
|
12712
|
+
message: `capability \`${feature.cap}\` is composed twice — one feature per capability`,
|
|
12713
|
+
path: [
|
|
12714
|
+
"features",
|
|
12715
|
+
index,
|
|
12716
|
+
"cap"
|
|
12717
|
+
]
|
|
12718
|
+
});
|
|
12719
|
+
seen.add(feature.cap);
|
|
12720
|
+
});
|
|
12721
|
+
});
|
|
12722
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
|
|
12723
|
+
var CompositionProblemSchema = object({
|
|
12724
|
+
code: _enum([
|
|
12725
|
+
"reserved-variant",
|
|
12726
|
+
"unknown-capability",
|
|
12727
|
+
"not-composable",
|
|
12728
|
+
"wrong-device-type",
|
|
12729
|
+
"has-commands",
|
|
12730
|
+
"unknown-field",
|
|
12731
|
+
"nested-field",
|
|
12732
|
+
"missing-field",
|
|
12733
|
+
"kind-mismatch",
|
|
12734
|
+
"may-be-null",
|
|
12735
|
+
"source-missing",
|
|
12736
|
+
"source-unreadable",
|
|
12737
|
+
"source-capability-missing",
|
|
12738
|
+
"source-field-unknown",
|
|
12739
|
+
"expression-invalid",
|
|
12740
|
+
"cycle",
|
|
12741
|
+
"duplicate-target"
|
|
12742
|
+
]),
|
|
12743
|
+
path: string(),
|
|
12744
|
+
message: string()
|
|
12745
|
+
});
|
|
12746
|
+
var CompositionFieldKindSchema = _enum([
|
|
12747
|
+
"string",
|
|
12748
|
+
"number",
|
|
12749
|
+
"boolean",
|
|
12750
|
+
"enum"
|
|
12751
|
+
]);
|
|
12752
|
+
/** How a field says "unavailable": `null` when its schema allows it, else the device goes offline (D393). */
|
|
12753
|
+
var CompositionUnavailableModeSchema = _enum(["null", "offline"]);
|
|
12754
|
+
/**
|
|
12755
|
+
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
12756
|
+
* field of its cap changes value · `constant` reads nothing, computed once.
|
|
12757
|
+
*/
|
|
12758
|
+
var CompositionFieldRoleSchema = _enum([
|
|
12759
|
+
"derived",
|
|
12760
|
+
"clock",
|
|
12761
|
+
"constant"
|
|
12762
|
+
]);
|
|
12763
|
+
var CompositionFieldPlanSchema = object({
|
|
12764
|
+
cap: string(),
|
|
12765
|
+
path: string(),
|
|
12766
|
+
/** Index into `composition.features` this field's capability came from —
|
|
12767
|
+
* lets a source/cycle problem name its path as `features[N].fields.<path>`
|
|
12768
|
+
* (the same convention `planComposition`'s own problems already use). */
|
|
12769
|
+
featureIndex: number().int().nonnegative(),
|
|
12770
|
+
kind: CompositionFieldKindSchema,
|
|
12771
|
+
nullable: boolean(),
|
|
12772
|
+
required: boolean(),
|
|
12773
|
+
unavailable: CompositionUnavailableModeSchema,
|
|
12774
|
+
role: CompositionFieldRoleSchema,
|
|
12775
|
+
source: CompositionFieldSourceSchema,
|
|
12776
|
+
reads: array(CompositionFieldReadSchema)
|
|
12777
|
+
});
|
|
12778
|
+
var CompositionValidationSchema = object({
|
|
12779
|
+
ok: boolean(),
|
|
12780
|
+
problems: array(CompositionProblemSchema),
|
|
12781
|
+
fields: array(CompositionFieldPlanSchema)
|
|
12782
|
+
});
|
|
12783
|
+
/** Mirrors `CoreBlockStatus`, pinned by `core-blocks-source.spec.ts` (Task 11). */
|
|
12784
|
+
var CompositionRunStatusSchema = _enum([
|
|
12785
|
+
"stopped",
|
|
12786
|
+
"starting",
|
|
12787
|
+
"running",
|
|
12788
|
+
"failed"
|
|
12789
|
+
]);
|
|
12790
|
+
var CompositionFieldStateKindSchema = _enum([
|
|
12791
|
+
"fresh",
|
|
12792
|
+
"stale",
|
|
12793
|
+
"unavailable"
|
|
12794
|
+
]);
|
|
12795
|
+
var CompositionFieldStateSchema = object({
|
|
12796
|
+
cap: string(),
|
|
12797
|
+
path: string(),
|
|
12798
|
+
state: CompositionFieldStateKindSchema,
|
|
12799
|
+
/** `null` whenever `state === 'unavailable'`; never a plausible stand-in (D393). */
|
|
12800
|
+
value: union([
|
|
12801
|
+
string(),
|
|
12802
|
+
number(),
|
|
12803
|
+
boolean(),
|
|
12804
|
+
_null()
|
|
12805
|
+
]),
|
|
12806
|
+
reason: string().optional()
|
|
12807
|
+
});
|
|
12808
|
+
var CompositionBlockStateSchema = object({
|
|
12809
|
+
blockId: string(),
|
|
12810
|
+
deviceId: number().nullable(),
|
|
12811
|
+
status: CompositionRunStatusSchema,
|
|
12812
|
+
reason: string().optional(),
|
|
12813
|
+
fields: array(CompositionFieldStateSchema)
|
|
12814
|
+
});
|
|
12533
12815
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
12534
12816
|
* agent is the reason placement is not fixed to the hub. */
|
|
12535
12817
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -12556,6 +12838,30 @@ var CoreBlockInputSchema = object({
|
|
|
12556
12838
|
*/
|
|
12557
12839
|
integrationId: string().optional()
|
|
12558
12840
|
});
|
|
12841
|
+
/**
|
|
12842
|
+
* What a block IS (D659). Absent means `code` — every row stored before this
|
|
12843
|
+
* union keeps working unchanged.
|
|
12844
|
+
* - `code`: the TypeScript in `code`, compiled and run in its own runner;
|
|
12845
|
+
* - `recipe`: RESERVED (automations), stored shape only; refused at run by name;
|
|
12846
|
+
* - `composition`: declarative, run by the shared `composer`; `code` is `''`.
|
|
12847
|
+
*/
|
|
12848
|
+
var CoreBlockSourceSchema = discriminatedUnion("kind", [
|
|
12849
|
+
object({ kind: literal("code") }),
|
|
12850
|
+
object({
|
|
12851
|
+
kind: literal("recipe"),
|
|
12852
|
+
recipe: AutomationRecipeSchema
|
|
12853
|
+
}),
|
|
12854
|
+
object({
|
|
12855
|
+
kind: literal("composition"),
|
|
12856
|
+
composition: CompositionSchema
|
|
12857
|
+
})
|
|
12858
|
+
]);
|
|
12859
|
+
/** The client-authored half of a composition block. No `code`, no placement (hub-only; Phase 7). */
|
|
12860
|
+
var CompositionBlockInputSchema = object({
|
|
12861
|
+
name: string().min(1).max(120),
|
|
12862
|
+
enabled: boolean(),
|
|
12863
|
+
composition: CompositionSchema
|
|
12864
|
+
});
|
|
12559
12865
|
/** A stored block. */
|
|
12560
12866
|
var CoreBlockSchema = CoreBlockInputSchema.extend({
|
|
12561
12867
|
id: string(),
|
|
@@ -12571,8 +12877,38 @@ var CoreBlockSchema = CoreBlockInputSchema.extend({
|
|
|
12571
12877
|
*/
|
|
12572
12878
|
lastError: string().optional(),
|
|
12573
12879
|
/** Ms epoch of the last state change. */
|
|
12574
|
-
lastChangedAt: number()
|
|
12880
|
+
lastChangedAt: number(),
|
|
12881
|
+
/** What the block is. Absent means `code` (D659). */
|
|
12882
|
+
source: CoreBlockSourceSchema.optional()
|
|
12883
|
+
});
|
|
12884
|
+
/** A stored composition block and what the composer says about it. */
|
|
12885
|
+
var CompositionViewSchema = object({
|
|
12886
|
+
block: CoreBlockSchema,
|
|
12887
|
+
state: discriminatedUnion("kind", [object({
|
|
12888
|
+
kind: literal("answered"),
|
|
12889
|
+
state: CompositionBlockStateSchema.nullable()
|
|
12890
|
+
}), object({
|
|
12891
|
+
kind: literal("unreachable"),
|
|
12892
|
+
error: string()
|
|
12893
|
+
})])
|
|
12894
|
+
});
|
|
12895
|
+
/**
|
|
12896
|
+
* A read of the stored compositions. `not-loaded` while the `core_blocks`
|
|
12897
|
+
* table has not been READ: an empty answer then would make "not yet known"
|
|
12898
|
+
* look like "none", and invite the operator to recreate what exists (D315).
|
|
12899
|
+
*/
|
|
12900
|
+
var CompositionsNotLoadedSchema = object({
|
|
12901
|
+
state: literal("not-loaded"),
|
|
12902
|
+
reason: string()
|
|
12575
12903
|
});
|
|
12904
|
+
var CompositionListReadSchema = discriminatedUnion("state", [object({
|
|
12905
|
+
state: literal("loaded"),
|
|
12906
|
+
views: array(CompositionViewSchema)
|
|
12907
|
+
}), CompositionsNotLoadedSchema]);
|
|
12908
|
+
var CompositionGetReadSchema = discriminatedUnion("state", [object({
|
|
12909
|
+
state: literal("loaded"),
|
|
12910
|
+
view: CompositionViewSchema.nullable()
|
|
12911
|
+
}), CompositionsNotLoadedSchema]);
|
|
12576
12912
|
/** What a compile attempt produced. */
|
|
12577
12913
|
var CoreBlockCompileResultSchema = object({
|
|
12578
12914
|
ok: boolean(),
|
|
@@ -12610,7 +12946,72 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
12610
12946
|
}), method(object({}), object({ libs: array(object({
|
|
12611
12947
|
filePath: string(),
|
|
12612
12948
|
content: string()
|
|
12613
|
-
})) }), { auth: "admin" })
|
|
12949
|
+
})) }), { auth: "admin" }), method(object({ block: CompositionBlockInputSchema }), object({ block: CoreBlockSchema }), {
|
|
12950
|
+
kind: "mutation",
|
|
12951
|
+
auth: "admin",
|
|
12952
|
+
caller: "required"
|
|
12953
|
+
}), method(object({
|
|
12954
|
+
blockId: string(),
|
|
12955
|
+
expectedUpdatedAt: number(),
|
|
12956
|
+
block: CompositionBlockInputSchema.partial()
|
|
12957
|
+
}), object({ block: CoreBlockSchema }), {
|
|
12958
|
+
kind: "mutation",
|
|
12959
|
+
auth: "admin",
|
|
12960
|
+
caller: "required"
|
|
12961
|
+
}), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
|
|
12962
|
+
composition: CompositionSchema,
|
|
12963
|
+
blockId: string().optional()
|
|
12964
|
+
}), CompositionValidationSchema, {
|
|
12965
|
+
kind: "mutation",
|
|
12966
|
+
auth: "admin",
|
|
12967
|
+
access: "view"
|
|
12968
|
+
});
|
|
12969
|
+
var ComposerBlockSchema = object({
|
|
12970
|
+
id: string().min(1),
|
|
12971
|
+
name: string().min(1).max(120),
|
|
12972
|
+
enabled: boolean(),
|
|
12973
|
+
updatedAt: number(),
|
|
12974
|
+
composition: CompositionSchema
|
|
12975
|
+
});
|
|
12976
|
+
/**
|
|
12977
|
+
* A stored composition row that no longer PARSES — a schema a release
|
|
12978
|
+
* tightened, a row written by a newer build. Sent by id so the composer keeps
|
|
12979
|
+
* its device as a placeholder and reports the block `failed` naming the parse
|
|
12980
|
+
* error. Leaving it out would read, twice, exactly like a delete (D49).
|
|
12981
|
+
*/
|
|
12982
|
+
var ComposerUnreadableBlockSchema = object({
|
|
12983
|
+
id: string().min(1),
|
|
12984
|
+
/** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
|
|
12985
|
+
name: string().nullable(),
|
|
12986
|
+
/** The parse error, in the operator's words. */
|
|
12987
|
+
error: string()
|
|
12988
|
+
});
|
|
12989
|
+
method(object({
|
|
12990
|
+
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
12991
|
+
integrationId: string().nullable(),
|
|
12992
|
+
/** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
|
|
12993
|
+
storeLoaded: boolean(),
|
|
12994
|
+
blocks: array(ComposerBlockSchema),
|
|
12995
|
+
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
12996
|
+
restartBlockIds: array(string()),
|
|
12997
|
+
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
12998
|
+
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
12999
|
+
}), object({
|
|
13000
|
+
blocks: array(object({
|
|
13001
|
+
blockId: string(),
|
|
13002
|
+
status: CompositionRunStatusSchema,
|
|
13003
|
+
reason: string().optional()
|
|
13004
|
+
})),
|
|
13005
|
+
/**
|
|
13006
|
+
* False when the composer declared and withdrew NOTHING (store not loaded,
|
|
13007
|
+
* integration unknown, its own rows unread or read empty once). An empty
|
|
13008
|
+
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
13009
|
+
*/
|
|
13010
|
+
acted: boolean()
|
|
13011
|
+
}), {
|
|
13012
|
+
kind: "mutation",
|
|
13013
|
+
auth: "admin"
|
|
13014
|
+
}), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
|
|
12614
13015
|
/**
|
|
12615
13016
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
12616
13017
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -18355,8 +18756,8 @@ var NcTestResultSchema = object({
|
|
|
18355
18756
|
className: string().optional(),
|
|
18356
18757
|
label: string().optional()
|
|
18357
18758
|
});
|
|
18358
|
-
/** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
|
|
18359
|
-
*
|
|
18759
|
+
/** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
|
|
18760
|
+
* `z.infer` of this schema — one shape, no twin. `mixed` is DERIVED
|
|
18360
18761
|
* (a stored system rule whose kinds span families, D637) and never authored. */
|
|
18361
18762
|
var NcRuleKindSchema = _enum([
|
|
18362
18763
|
"detection",
|
|
@@ -20255,6 +20656,13 @@ var AudioEventSchema = object({
|
|
|
20255
20656
|
originalClass: string().optional(),
|
|
20256
20657
|
score: number()
|
|
20257
20658
|
}).optional(),
|
|
20659
|
+
/**
|
|
20660
|
+
* Whether the classifier RAN on the window behind this row (D660). Absent
|
|
20661
|
+
* on rows written before D660 — unknown, NOT classified: until then a
|
|
20662
|
+
* window the analyzer's busy gate threw away was stored exactly like one
|
|
20663
|
+
* that heard nothing above the floor.
|
|
20664
|
+
*/
|
|
20665
|
+
classifyOutcome: AudioClassifyOutcomeSchema.optional(),
|
|
20258
20666
|
/** Populated by B5 (recording playback URL for this event). */
|
|
20259
20667
|
mediaUrl: string().optional()
|
|
20260
20668
|
});
|
|
@@ -20967,7 +21375,15 @@ var RebuildObjectEmbeddingsInput = object({
|
|
|
20967
21375
|
* force is logged at start and finish so a deliberately slow pass reads
|
|
20968
21376
|
* differently from a stalled one.
|
|
20969
21377
|
*/
|
|
20970
|
-
pacingMs: number().int().nonnegative().optional()
|
|
21378
|
+
pacingMs: number().int().nonnegative().optional(),
|
|
21379
|
+
/**
|
|
21380
|
+
* Re-embed ONLY the tracks whose vector is ALREADY in the pinned model's
|
|
21381
|
+
* space (D664) — the in-space skip inverted. It exists to redo vectors
|
|
21382
|
+
* written from the wrong box, which a normal pass would skip as done
|
|
21383
|
+
* forever. Requires `maxTracks`: a forced pass without a bound is refused
|
|
21384
|
+
* (`force-requires-max-tracks`).
|
|
21385
|
+
*/
|
|
21386
|
+
force: boolean().optional()
|
|
20971
21387
|
});
|
|
20972
21388
|
/**
|
|
20973
21389
|
* Result of emptying the CLIP index.
|
|
@@ -21003,6 +21419,7 @@ var WipeObjectEmbeddingsResultSchema = object({
|
|
|
21003
21419
|
* - `reads-disagree` — the two reads named different choices.
|
|
21004
21420
|
* - `not-a-clip-model` — the CONFIRMED id has no CLIP metadata, so there is no
|
|
21005
21421
|
* index to fill and no dimension to check against (D649).
|
|
21422
|
+
* - `force-requires-max-tracks` — `force: true` with no `maxTracks` (D664).
|
|
21006
21423
|
*/
|
|
21007
21424
|
var RebuildObjectEmbeddingsRefusalSchema = _enum([
|
|
21008
21425
|
"stores-unavailable",
|
|
@@ -21010,7 +21427,8 @@ var RebuildObjectEmbeddingsRefusalSchema = _enum([
|
|
|
21010
21427
|
"method-unavailable",
|
|
21011
21428
|
"read-failed",
|
|
21012
21429
|
"reads-disagree",
|
|
21013
|
-
"not-a-clip-model"
|
|
21430
|
+
"not-a-clip-model",
|
|
21431
|
+
"force-requires-max-tracks"
|
|
21014
21432
|
]);
|
|
21015
21433
|
/**
|
|
21016
21434
|
* Acknowledgement that a rebuild STARTED.
|
|
@@ -21035,11 +21453,32 @@ var RebuildStatusSchema = object({
|
|
|
21035
21453
|
running: boolean(),
|
|
21036
21454
|
scanned: number(),
|
|
21037
21455
|
rebuilt: number(),
|
|
21038
|
-
/** Tracks whose key frame is gone — nothing to re-embed from.
|
|
21456
|
+
/** Tracks whose key frame is gone — nothing to re-embed from. Pixels ONLY:
|
|
21457
|
+
* `missingEvent` is its own field since D664, never summed in. */
|
|
21039
21458
|
missingKeyFrame: number(),
|
|
21040
|
-
/** Tracks with no
|
|
21459
|
+
/** Tracks with no object event at all (D664). */
|
|
21460
|
+
missingEvent: number(),
|
|
21461
|
+
/** Tracks with no box measured on the pixels to cut — see `boxSource.refused`. */
|
|
21041
21462
|
missingBbox: number(),
|
|
21042
21463
|
/**
|
|
21464
|
+
* Which rule placed each judged track's box (D664): the key frame row's own
|
|
21465
|
+
* `subjectBox`, `track.positions` at exactly its instant (older key frames),
|
|
21466
|
+
* the event box (a key frame recovered from the recording, at the event's
|
|
21467
|
+
* instant), or `refused` by name — the reasons are in the tagged log lines.
|
|
21468
|
+
*/
|
|
21469
|
+
boxSource: object({
|
|
21470
|
+
subjectBox: number(),
|
|
21471
|
+
positions: number(),
|
|
21472
|
+
event: number(),
|
|
21473
|
+
refused: number()
|
|
21474
|
+
}),
|
|
21475
|
+
/** Tracks skipped because their vector is already in the pinned space. */
|
|
21476
|
+
alreadyInSpace: number(),
|
|
21477
|
+
/** Whether the current / last pass was a `force` pass; `null` before any (D664). */
|
|
21478
|
+
force: boolean().nullable(),
|
|
21479
|
+
/** In-space tracks a `force` pass selected for re-embedding. */
|
|
21480
|
+
forcedInSpace: number(),
|
|
21481
|
+
/**
|
|
21043
21482
|
* Tracks an executing node REFUSED rather than broke on — an unreadable key
|
|
21044
21483
|
* frame, a step that threw. Separate from `failed` because the remedy is
|
|
21045
21484
|
* different, and because a whole camera silently contributing zero vectors
|
|
@@ -21544,7 +21983,8 @@ var PipelineModelOptionSchema = object({
|
|
|
21544
21983
|
})),
|
|
21545
21984
|
group: ModelVariantGroupSchema.optional(),
|
|
21546
21985
|
legacy: boolean().optional(),
|
|
21547
|
-
provider: ModelProviderIdSchema.optional()
|
|
21986
|
+
provider: ModelProviderIdSchema.optional(),
|
|
21987
|
+
defaultConfidence: number().optional()
|
|
21548
21988
|
});
|
|
21549
21989
|
var ConfigFieldBridge = custom();
|
|
21550
21990
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -34419,6 +34859,38 @@ DeviceType.Camera, method(object({
|
|
|
34419
34859
|
detection: array(ZoneRuleSchema).readonly(),
|
|
34420
34860
|
package: array(ZoneRuleSchema).readonly()
|
|
34421
34861
|
});
|
|
34862
|
+
var NUMBER = {
|
|
34863
|
+
kind: "fixed",
|
|
34864
|
+
result: ["number"]
|
|
34865
|
+
};
|
|
34866
|
+
var BOOLEAN = {
|
|
34867
|
+
kind: "fixed",
|
|
34868
|
+
result: ["boolean"]
|
|
34869
|
+
};
|
|
34870
|
+
Object.freeze({
|
|
34871
|
+
min: NUMBER,
|
|
34872
|
+
max: NUMBER,
|
|
34873
|
+
abs: NUMBER,
|
|
34874
|
+
floor: NUMBER,
|
|
34875
|
+
ceil: NUMBER,
|
|
34876
|
+
sqrt: NUMBER,
|
|
34877
|
+
round: NUMBER,
|
|
34878
|
+
pow: NUMBER,
|
|
34879
|
+
clamp: NUMBER,
|
|
34880
|
+
avg: NUMBER,
|
|
34881
|
+
sum: NUMBER,
|
|
34882
|
+
age: NUMBER,
|
|
34883
|
+
convert: NUMBER,
|
|
34884
|
+
coalesce: { kind: "coalesce" },
|
|
34885
|
+
any: BOOLEAN,
|
|
34886
|
+
all: BOOLEAN,
|
|
34887
|
+
within: BOOLEAN,
|
|
34888
|
+
latest: {
|
|
34889
|
+
kind: "fixed",
|
|
34890
|
+
result: ["number", "null"]
|
|
34891
|
+
}
|
|
34892
|
+
});
|
|
34893
|
+
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
34422
34894
|
/**
|
|
34423
34895
|
* Accessory device helpers — shared across drivers.
|
|
34424
34896
|
*
|
|
@@ -36727,6 +37199,18 @@ Object.freeze({
|
|
|
36727
37199
|
addonId: null,
|
|
36728
37200
|
access: "create"
|
|
36729
37201
|
},
|
|
37202
|
+
"composer.applyBlocks": {
|
|
37203
|
+
capName: "composer",
|
|
37204
|
+
capScope: "system",
|
|
37205
|
+
addonId: null,
|
|
37206
|
+
access: "create"
|
|
37207
|
+
},
|
|
37208
|
+
"composer.getStates": {
|
|
37209
|
+
capName: "composer",
|
|
37210
|
+
capScope: "system",
|
|
37211
|
+
addonId: null,
|
|
37212
|
+
access: "view"
|
|
37213
|
+
},
|
|
36730
37214
|
"connectionTest.describeTest": {
|
|
36731
37215
|
capName: "connection-test",
|
|
36732
37216
|
capScope: "system",
|
|
@@ -36787,6 +37271,12 @@ Object.freeze({
|
|
|
36787
37271
|
addonId: null,
|
|
36788
37272
|
access: "create"
|
|
36789
37273
|
},
|
|
37274
|
+
"coreBlocks.createComposition": {
|
|
37275
|
+
capName: "core-blocks",
|
|
37276
|
+
capScope: "system",
|
|
37277
|
+
addonId: null,
|
|
37278
|
+
access: "create"
|
|
37279
|
+
},
|
|
36790
37280
|
"coreBlocks.delete": {
|
|
36791
37281
|
capName: "core-blocks",
|
|
36792
37282
|
capScope: "system",
|
|
@@ -36799,6 +37289,12 @@ Object.freeze({
|
|
|
36799
37289
|
addonId: null,
|
|
36800
37290
|
access: "view"
|
|
36801
37291
|
},
|
|
37292
|
+
"coreBlocks.getComposition": {
|
|
37293
|
+
capName: "core-blocks",
|
|
37294
|
+
capScope: "system",
|
|
37295
|
+
addonId: null,
|
|
37296
|
+
access: "view"
|
|
37297
|
+
},
|
|
36802
37298
|
"coreBlocks.getTypeDefs": {
|
|
36803
37299
|
capName: "core-blocks",
|
|
36804
37300
|
capScope: "system",
|
|
@@ -36811,6 +37307,12 @@ Object.freeze({
|
|
|
36811
37307
|
addonId: null,
|
|
36812
37308
|
access: "view"
|
|
36813
37309
|
},
|
|
37310
|
+
"coreBlocks.listCompositions": {
|
|
37311
|
+
capName: "core-blocks",
|
|
37312
|
+
capScope: "system",
|
|
37313
|
+
addonId: null,
|
|
37314
|
+
access: "view"
|
|
37315
|
+
},
|
|
36814
37316
|
"coreBlocks.restart": {
|
|
36815
37317
|
capName: "core-blocks",
|
|
36816
37318
|
capScope: "system",
|
|
@@ -36829,6 +37331,18 @@ Object.freeze({
|
|
|
36829
37331
|
addonId: null,
|
|
36830
37332
|
access: "create"
|
|
36831
37333
|
},
|
|
37334
|
+
"coreBlocks.updateComposition": {
|
|
37335
|
+
capName: "core-blocks",
|
|
37336
|
+
capScope: "system",
|
|
37337
|
+
addonId: null,
|
|
37338
|
+
access: "create"
|
|
37339
|
+
},
|
|
37340
|
+
"coreBlocks.validateComposition": {
|
|
37341
|
+
capName: "core-blocks",
|
|
37342
|
+
capScope: "system",
|
|
37343
|
+
addonId: null,
|
|
37344
|
+
access: "view"
|
|
37345
|
+
},
|
|
36832
37346
|
"cover.close": {
|
|
36833
37347
|
capName: "cover",
|
|
36834
37348
|
capScope: "device",
|
|
@@ -45810,7 +46324,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
45810
46324
|
capability: adminUiCapability,
|
|
45811
46325
|
provider: {
|
|
45812
46326
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
45813
|
-
getVersion: async () => ({ version: "1.2.
|
|
46327
|
+
getVersion: async () => ({ version: "1.2.152" })
|
|
45814
46328
|
}
|
|
45815
46329
|
}];
|
|
45816
46330
|
}
|