@camstack/addon-pipeline-orchestrator 1.2.259 → 1.2.261
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/_stub.js +2 -2
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-xAz8Z-XV.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-Cyq-KC8w.mjs} +2 -2
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DAPKENRp.mjs +26 -0
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CzPdruOe.mjs +26 -0
- package/dist/{hostInit-C63g9p7W.mjs → hostInit-DSh3QF79.mjs} +2 -2
- package/dist/index.js +511 -26
- package/dist/index.mjs +511 -26
- package/dist/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Bf-RORoA.mjs +0 -26
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-D_u-oOmQ.mjs +0 -26
package/dist/index.mjs
CHANGED
|
@@ -10451,6 +10451,48 @@ var ModelProviderIdSchema = _enum([
|
|
|
10451
10451
|
"scrypted",
|
|
10452
10452
|
"custom"
|
|
10453
10453
|
]);
|
|
10454
|
+
/**
|
|
10455
|
+
* The licence of a model, as a record rather than a bare SPDX string: a
|
|
10456
|
+
* permissive CODE licence routinely sits on top of restrictive WEIGHTS or
|
|
10457
|
+
* DATA, and the obligations (attribution, modification notices, source offers)
|
|
10458
|
+
* are per upstream. A persisted custom-model row written when this field was a
|
|
10459
|
+
* string still parses — the string is lifted into `{ weights }`.
|
|
10460
|
+
*
|
|
10461
|
+
* Every licence surface (the admin "Models and licenses" page,
|
|
10462
|
+
* `THIRD_PARTY_MODELS.md`, the Hugging Face model table) is GENERATED from
|
|
10463
|
+
* these records by `scripts/gen-model-licenses.ts` (D661).
|
|
10464
|
+
*/
|
|
10465
|
+
var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { weights: value } : value, object({
|
|
10466
|
+
/** SPDX id of the WEIGHTS' terms, a `LicenseRef-*` for non-SPDX terms, or `UNKNOWN`. */
|
|
10467
|
+
weights: string().min(1),
|
|
10468
|
+
/** SPDX id of the upstream code that defines / trained the network. */
|
|
10469
|
+
code: string().min(1).optional(),
|
|
10470
|
+
/** Training data whose terms add obligations (attribution, non-commercial). */
|
|
10471
|
+
data: object({
|
|
10472
|
+
name: string().min(1),
|
|
10473
|
+
terms: string().min(1),
|
|
10474
|
+
url: string().url().optional()
|
|
10475
|
+
}).optional(),
|
|
10476
|
+
/** The project the weights come from. Required on built-in entries (guard). */
|
|
10477
|
+
upstream: object({
|
|
10478
|
+
name: string().min(1),
|
|
10479
|
+
url: string().url()
|
|
10480
|
+
}).optional(),
|
|
10481
|
+
/** Where the licence text governing the weights is published. */
|
|
10482
|
+
url: string().url().optional(),
|
|
10483
|
+
/** Attribution the licence REQUIRES, verbatim. */
|
|
10484
|
+
attribution: string().min(1).optional(),
|
|
10485
|
+
/** What CamStack changed. Required when `hosting` is `camstack-hf` (guard). */
|
|
10486
|
+
modifications: string().min(1).optional(),
|
|
10487
|
+
/** Who serves the file a node downloads. */
|
|
10488
|
+
hosting: _enum([
|
|
10489
|
+
"camstack-hf",
|
|
10490
|
+
"third-party",
|
|
10491
|
+
"built-in"
|
|
10492
|
+
]).optional(),
|
|
10493
|
+
/** True when the weights or their data forbid commercial use. */
|
|
10494
|
+
nonCommercial: boolean().optional()
|
|
10495
|
+
}));
|
|
10454
10496
|
var ModelCatalogEntrySchema = object({
|
|
10455
10497
|
id: string(),
|
|
10456
10498
|
name: string(),
|
|
@@ -10539,11 +10581,11 @@ var ModelCatalogEntrySchema = object({
|
|
|
10539
10581
|
p95LatencyMs: record(string(), number()).optional()
|
|
10540
10582
|
}).optional(),
|
|
10541
10583
|
/**
|
|
10542
|
-
*
|
|
10543
|
-
*
|
|
10544
|
-
*
|
|
10584
|
+
* The model's licence record — see {@link ModelLicenseSchema}. Optional in
|
|
10585
|
+
* the schema (a custom model's author may state none); REQUIRED and complete
|
|
10586
|
+
* on every built-in catalog entry (`scripts/check-catalog-licence.ts`).
|
|
10545
10587
|
*/
|
|
10546
|
-
license:
|
|
10588
|
+
license: ModelLicenseSchema.optional(),
|
|
10547
10589
|
/**
|
|
10548
10590
|
* Variant-selector grouping. The UI groups models by `family` + `tier` and
|
|
10549
10591
|
* offers `precision` / `optimization` as variant axes WITHIN a tier — so all
|
|
@@ -10638,23 +10680,6 @@ var ExpressionEvalError = class extends Error {
|
|
|
10638
10680
|
this.name = "ExpressionEvalError";
|
|
10639
10681
|
}
|
|
10640
10682
|
};
|
|
10641
|
-
/**
|
|
10642
|
-
* Frozen, null-prototype builtin function table for the expression engine
|
|
10643
|
-
* (spec §4 rule 4). The table is the SOLE surface of callable functions: the
|
|
10644
|
-
* parser rejects any callee not in it, and the evaluator gates each call on an
|
|
10645
|
-
* own-property check against it.
|
|
10646
|
-
*
|
|
10647
|
-
* Because the object has a NULL prototype AND is `Object.freeze`d:
|
|
10648
|
-
* - it cannot be polluted (no `__proto__` / `constructor` write reaches it);
|
|
10649
|
-
* - a lookup for `toString` / `hasOwnProperty` / `constructor` finds NOTHING
|
|
10650
|
-
* (there is no `Object.prototype` in the chain), so those names are not
|
|
10651
|
-
* callable — they are simply "unknown function" at parse time.
|
|
10652
|
-
*
|
|
10653
|
-
* Every numeric argument is validated as a finite number and every numeric
|
|
10654
|
-
* RESULT is re-checked finite, so `/0`, `sqrt(-1)` (→ NaN) and overflow
|
|
10655
|
-
* (`pow(10,400)` → Infinity) all raise `ExpressionEvalError` and fail the link
|
|
10656
|
-
* closed rather than emitting a garbage value.
|
|
10657
|
-
*/
|
|
10658
10683
|
function asFiniteNumber(value, name, index) {
|
|
10659
10684
|
if (typeof value !== "number" || !Number.isFinite(value)) throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a finite number`);
|
|
10660
10685
|
return value;
|
|
@@ -10670,6 +10695,10 @@ function finiteResult(value, name) {
|
|
|
10670
10695
|
function allFiniteNumbers(args, name) {
|
|
10671
10696
|
return args.map((a, idx) => asFiniteNumber(a, name, idx));
|
|
10672
10697
|
}
|
|
10698
|
+
function asBoolean$1(value, name, index) {
|
|
10699
|
+
if (typeof value !== "boolean") throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a boolean`);
|
|
10700
|
+
return value;
|
|
10701
|
+
}
|
|
10673
10702
|
var INF = Number.POSITIVE_INFINITY;
|
|
10674
10703
|
var table = {
|
|
10675
10704
|
min: {
|
|
@@ -10770,6 +10799,40 @@ var table = {
|
|
|
10770
10799
|
if (from === to) return x;
|
|
10771
10800
|
throw new ExpressionEvalError("convert: unit conversion table not installed");
|
|
10772
10801
|
}
|
|
10802
|
+
},
|
|
10803
|
+
any: {
|
|
10804
|
+
minArgs: 1,
|
|
10805
|
+
maxArgs: INF,
|
|
10806
|
+
apply: (args) => args.map((a, i) => asBoolean$1(a, "any", i)).some((b) => b)
|
|
10807
|
+
},
|
|
10808
|
+
all: {
|
|
10809
|
+
minArgs: 1,
|
|
10810
|
+
maxArgs: INF,
|
|
10811
|
+
apply: (args) => args.map((a, i) => asBoolean$1(a, "all", i)).every((b) => b)
|
|
10812
|
+
},
|
|
10813
|
+
within: {
|
|
10814
|
+
minArgs: 2,
|
|
10815
|
+
maxArgs: 2,
|
|
10816
|
+
apply: (args, hooks) => {
|
|
10817
|
+
const windowMs = asFiniteNumber(args[1], "within", 1);
|
|
10818
|
+
if (windowMs < 0) throw new ExpressionEvalError("within: the window must not be negative");
|
|
10819
|
+
const at = args[0];
|
|
10820
|
+
if (at === null) return false;
|
|
10821
|
+
const ts = asFiniteNumber(at, "within", 0);
|
|
10822
|
+
const now = hooks.now;
|
|
10823
|
+
if (now === void 0 || !Number.isFinite(now)) throw new ExpressionEvalError("within: no clock was supplied to this evaluation");
|
|
10824
|
+
const inside = now - ts <= windowMs;
|
|
10825
|
+
if (inside) hooks.noteDeadline?.(ts + windowMs + 1);
|
|
10826
|
+
return inside;
|
|
10827
|
+
}
|
|
10828
|
+
},
|
|
10829
|
+
latest: {
|
|
10830
|
+
minArgs: 1,
|
|
10831
|
+
maxArgs: INF,
|
|
10832
|
+
apply: (args) => {
|
|
10833
|
+
const present = args.flatMap((a, i) => a === null ? [] : [asFiniteNumber(a, "latest", i)]);
|
|
10834
|
+
return present.length === 0 ? null : finiteResult(Math.max(...present), "latest");
|
|
10835
|
+
}
|
|
10773
10836
|
}
|
|
10774
10837
|
};
|
|
10775
10838
|
Object.freeze(Object.assign(Object.create(null), table));
|
|
@@ -11384,7 +11447,7 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
11384
11447
|
code: string().min(1).max(2e4)
|
|
11385
11448
|
})
|
|
11386
11449
|
]);
|
|
11387
|
-
object({
|
|
11450
|
+
var AutomationRecipeSchema = object({
|
|
11388
11451
|
triggers: array(AutomationTriggerSchema),
|
|
11389
11452
|
conditions: AutomationConditionSchema.optional(),
|
|
11390
11453
|
actions: array(AutomationActionSchema)
|
|
@@ -11871,12 +11934,32 @@ var AudioClassificationLabelSchema = object({
|
|
|
11871
11934
|
originalClass: string().optional(),
|
|
11872
11935
|
score: number()
|
|
11873
11936
|
});
|
|
11937
|
+
/**
|
|
11938
|
+
* Did the classifier RUN on this window? (D660)
|
|
11939
|
+
*
|
|
11940
|
+
* `classified` with no labels means the model heard nothing above the
|
|
11941
|
+
* camera's floor. `not-classified` means nobody listened — and until D660 the
|
|
11942
|
+
* two were the same shape (`classification` absent), so a window the global
|
|
11943
|
+
* busy gate threw away read downstream exactly like a quiet one (D393).
|
|
11944
|
+
*/
|
|
11945
|
+
var AudioClassifyOutcomeSchema = discriminatedUnion("state", [object({ state: literal("classified") }), object({
|
|
11946
|
+
state: literal("not-classified"),
|
|
11947
|
+
reason: _enum([
|
|
11948
|
+
"superseded",
|
|
11949
|
+
"error",
|
|
11950
|
+
"timeout",
|
|
11951
|
+
"disposed"
|
|
11952
|
+
])
|
|
11953
|
+
})]);
|
|
11874
11954
|
var AudioAnalysisResultSchema = object({
|
|
11875
11955
|
level: AudioLevelSchema,
|
|
11956
|
+
/** Labels at or above the camera's floor. Absent = none — read `classifyOutcome` to know whether the model ran at all. */
|
|
11876
11957
|
classification: object({
|
|
11877
11958
|
labels: array(AudioClassificationLabelSchema).readonly(),
|
|
11878
11959
|
inferenceMs: number()
|
|
11879
11960
|
}).optional(),
|
|
11961
|
+
/** Whether the classifier ran on this window (D660). */
|
|
11962
|
+
classifyOutcome: AudioClassifyOutcomeSchema,
|
|
11880
11963
|
timestamp: number()
|
|
11881
11964
|
});
|
|
11882
11965
|
var AudioAnalysisSettingsSchema = object({
|
|
@@ -13472,6 +13555,195 @@ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), ar
|
|
|
13472
13555
|
}),
|
|
13473
13556
|
lastChangedAt: number()
|
|
13474
13557
|
});
|
|
13558
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
13559
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
13560
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
13561
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
13562
|
+
var CompositionSourceRefSchema = object({
|
|
13563
|
+
/** The owning addon; `stableId` is unique only within it. */
|
|
13564
|
+
addonId: string().min(1),
|
|
13565
|
+
stableId: string().min(1)
|
|
13566
|
+
});
|
|
13567
|
+
/** One field of one capability of one source device. */
|
|
13568
|
+
var CompositionFieldReadSchema = object({
|
|
13569
|
+
source: CompositionSourceRefSchema,
|
|
13570
|
+
cap: string().min(1),
|
|
13571
|
+
/** Dotted path into the source cap's runtime-state slice. */
|
|
13572
|
+
fieldPath: string().min(1)
|
|
13573
|
+
});
|
|
13574
|
+
/** `from`: copy one source field verbatim. It is also an expression's `from` binding. */
|
|
13575
|
+
var CompositionFromSourceSchema = CompositionFieldReadSchema.extend({ kind: literal("from") });
|
|
13576
|
+
var CompositionBindingSchema = discriminatedUnion("kind", [CompositionFromSourceSchema, object({
|
|
13577
|
+
kind: literal("literal"),
|
|
13578
|
+
value: union([
|
|
13579
|
+
string(),
|
|
13580
|
+
number(),
|
|
13581
|
+
boolean(),
|
|
13582
|
+
_null()
|
|
13583
|
+
])
|
|
13584
|
+
})]);
|
|
13585
|
+
/**
|
|
13586
|
+
* `expression`: a formula over named bindings, in the salvaged expression
|
|
13587
|
+
* engine. Validated at parse by the SAME function every other consumer runs,
|
|
13588
|
+
* so the editor and the store cannot disagree.
|
|
13589
|
+
*/
|
|
13590
|
+
var CompositionExpressionSourceSchema = object({
|
|
13591
|
+
kind: literal("expression"),
|
|
13592
|
+
expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
|
|
13593
|
+
bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), CompositionBindingSchema)
|
|
13594
|
+
}).superRefine((src, ctx) => {
|
|
13595
|
+
const err = validateExpressionSource(src);
|
|
13596
|
+
if (err !== null) ctx.addIssue({
|
|
13597
|
+
code: "custom",
|
|
13598
|
+
message: err,
|
|
13599
|
+
path: ["expr"]
|
|
13600
|
+
});
|
|
13601
|
+
});
|
|
13602
|
+
/** `code`: RESERVED for slice 4 (own runner, one-way eject). */
|
|
13603
|
+
var CompositionCodeSourceSchema = object({
|
|
13604
|
+
kind: literal("code"),
|
|
13605
|
+
code: string().min(1).max(MAX_COMPOSITION_CODE_LENGTH)
|
|
13606
|
+
});
|
|
13607
|
+
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
13608
|
+
CompositionFromSourceSchema,
|
|
13609
|
+
CompositionExpressionSourceSchema,
|
|
13610
|
+
CompositionCodeSourceSchema
|
|
13611
|
+
]);
|
|
13612
|
+
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
13613
|
+
kind: literal("forward"),
|
|
13614
|
+
source: CompositionSourceRefSchema,
|
|
13615
|
+
cap: string().min(1),
|
|
13616
|
+
method: string().min(1)
|
|
13617
|
+
}), CompositionCodeSourceSchema]);
|
|
13618
|
+
var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
13619
|
+
kind: literal("fields"),
|
|
13620
|
+
cap: string().min(1),
|
|
13621
|
+
fields: record(string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
|
|
13622
|
+
/** RESERVED for slice 3; refused by the validator when non-empty. */
|
|
13623
|
+
commands: record(string().min(1), CompositionCommandTargetSchema).optional()
|
|
13624
|
+
}), object({
|
|
13625
|
+
kind: literal("passthrough"),
|
|
13626
|
+
cap: string().min(1),
|
|
13627
|
+
source: CompositionSourceRefSchema
|
|
13628
|
+
})]);
|
|
13629
|
+
var CompositionSchema = object({
|
|
13630
|
+
target: discriminatedUnion("kind", [object({
|
|
13631
|
+
kind: literal("new"),
|
|
13632
|
+
type: _enum(DeviceType),
|
|
13633
|
+
role: _enum(DeviceRole).optional()
|
|
13634
|
+
}), object({
|
|
13635
|
+
kind: literal("existing"),
|
|
13636
|
+
device: CompositionSourceRefSchema
|
|
13637
|
+
})]),
|
|
13638
|
+
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
13639
|
+
}).superRefine((composition, ctx) => {
|
|
13640
|
+
const seen = /* @__PURE__ */ new Set();
|
|
13641
|
+
composition.features.forEach((feature, index) => {
|
|
13642
|
+
if (seen.has(feature.cap)) ctx.addIssue({
|
|
13643
|
+
code: "custom",
|
|
13644
|
+
message: `capability \`${feature.cap}\` is composed twice — one feature per capability`,
|
|
13645
|
+
path: [
|
|
13646
|
+
"features",
|
|
13647
|
+
index,
|
|
13648
|
+
"cap"
|
|
13649
|
+
]
|
|
13650
|
+
});
|
|
13651
|
+
seen.add(feature.cap);
|
|
13652
|
+
});
|
|
13653
|
+
});
|
|
13654
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
|
|
13655
|
+
var CompositionProblemSchema = object({
|
|
13656
|
+
code: _enum([
|
|
13657
|
+
"reserved-variant",
|
|
13658
|
+
"unknown-capability",
|
|
13659
|
+
"not-composable",
|
|
13660
|
+
"wrong-device-type",
|
|
13661
|
+
"has-commands",
|
|
13662
|
+
"unknown-field",
|
|
13663
|
+
"nested-field",
|
|
13664
|
+
"missing-field",
|
|
13665
|
+
"kind-mismatch",
|
|
13666
|
+
"may-be-null",
|
|
13667
|
+
"source-missing",
|
|
13668
|
+
"source-unreadable",
|
|
13669
|
+
"source-capability-missing",
|
|
13670
|
+
"source-field-unknown",
|
|
13671
|
+
"expression-invalid",
|
|
13672
|
+
"cycle",
|
|
13673
|
+
"duplicate-target"
|
|
13674
|
+
]),
|
|
13675
|
+
path: string(),
|
|
13676
|
+
message: string()
|
|
13677
|
+
});
|
|
13678
|
+
var CompositionFieldKindSchema = _enum([
|
|
13679
|
+
"string",
|
|
13680
|
+
"number",
|
|
13681
|
+
"boolean",
|
|
13682
|
+
"enum"
|
|
13683
|
+
]);
|
|
13684
|
+
/** How a field says "unavailable": `null` when its schema allows it, else the device goes offline (D393). */
|
|
13685
|
+
var CompositionUnavailableModeSchema = _enum(["null", "offline"]);
|
|
13686
|
+
/**
|
|
13687
|
+
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
13688
|
+
* field of its cap changes value · `constant` reads nothing, computed once.
|
|
13689
|
+
*/
|
|
13690
|
+
var CompositionFieldRoleSchema = _enum([
|
|
13691
|
+
"derived",
|
|
13692
|
+
"clock",
|
|
13693
|
+
"constant"
|
|
13694
|
+
]);
|
|
13695
|
+
var CompositionFieldPlanSchema = object({
|
|
13696
|
+
cap: string(),
|
|
13697
|
+
path: string(),
|
|
13698
|
+
/** Index into `composition.features` this field's capability came from —
|
|
13699
|
+
* lets a source/cycle problem name its path as `features[N].fields.<path>`
|
|
13700
|
+
* (the same convention `planComposition`'s own problems already use). */
|
|
13701
|
+
featureIndex: number().int().nonnegative(),
|
|
13702
|
+
kind: CompositionFieldKindSchema,
|
|
13703
|
+
nullable: boolean(),
|
|
13704
|
+
required: boolean(),
|
|
13705
|
+
unavailable: CompositionUnavailableModeSchema,
|
|
13706
|
+
role: CompositionFieldRoleSchema,
|
|
13707
|
+
source: CompositionFieldSourceSchema,
|
|
13708
|
+
reads: array(CompositionFieldReadSchema)
|
|
13709
|
+
});
|
|
13710
|
+
var CompositionValidationSchema = object({
|
|
13711
|
+
ok: boolean(),
|
|
13712
|
+
problems: array(CompositionProblemSchema),
|
|
13713
|
+
fields: array(CompositionFieldPlanSchema)
|
|
13714
|
+
});
|
|
13715
|
+
/** Mirrors `CoreBlockStatus`, pinned by `core-blocks-source.spec.ts` (Task 11). */
|
|
13716
|
+
var CompositionRunStatusSchema = _enum([
|
|
13717
|
+
"stopped",
|
|
13718
|
+
"starting",
|
|
13719
|
+
"running",
|
|
13720
|
+
"failed"
|
|
13721
|
+
]);
|
|
13722
|
+
var CompositionFieldStateKindSchema = _enum([
|
|
13723
|
+
"fresh",
|
|
13724
|
+
"stale",
|
|
13725
|
+
"unavailable"
|
|
13726
|
+
]);
|
|
13727
|
+
var CompositionFieldStateSchema = object({
|
|
13728
|
+
cap: string(),
|
|
13729
|
+
path: string(),
|
|
13730
|
+
state: CompositionFieldStateKindSchema,
|
|
13731
|
+
/** `null` whenever `state === 'unavailable'`; never a plausible stand-in (D393). */
|
|
13732
|
+
value: union([
|
|
13733
|
+
string(),
|
|
13734
|
+
number(),
|
|
13735
|
+
boolean(),
|
|
13736
|
+
_null()
|
|
13737
|
+
]),
|
|
13738
|
+
reason: string().optional()
|
|
13739
|
+
});
|
|
13740
|
+
var CompositionBlockStateSchema = object({
|
|
13741
|
+
blockId: string(),
|
|
13742
|
+
deviceId: number().nullable(),
|
|
13743
|
+
status: CompositionRunStatusSchema,
|
|
13744
|
+
reason: string().optional(),
|
|
13745
|
+
fields: array(CompositionFieldStateSchema)
|
|
13746
|
+
});
|
|
13475
13747
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
13476
13748
|
* agent is the reason placement is not fixed to the hub. */
|
|
13477
13749
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -13498,6 +13770,30 @@ var CoreBlockInputSchema = object({
|
|
|
13498
13770
|
*/
|
|
13499
13771
|
integrationId: string().optional()
|
|
13500
13772
|
});
|
|
13773
|
+
/**
|
|
13774
|
+
* What a block IS (D659). Absent means `code` — every row stored before this
|
|
13775
|
+
* union keeps working unchanged.
|
|
13776
|
+
* - `code`: the TypeScript in `code`, compiled and run in its own runner;
|
|
13777
|
+
* - `recipe`: RESERVED (automations), stored shape only; refused at run by name;
|
|
13778
|
+
* - `composition`: declarative, run by the shared `composer`; `code` is `''`.
|
|
13779
|
+
*/
|
|
13780
|
+
var CoreBlockSourceSchema = discriminatedUnion("kind", [
|
|
13781
|
+
object({ kind: literal("code") }),
|
|
13782
|
+
object({
|
|
13783
|
+
kind: literal("recipe"),
|
|
13784
|
+
recipe: AutomationRecipeSchema
|
|
13785
|
+
}),
|
|
13786
|
+
object({
|
|
13787
|
+
kind: literal("composition"),
|
|
13788
|
+
composition: CompositionSchema
|
|
13789
|
+
})
|
|
13790
|
+
]);
|
|
13791
|
+
/** The client-authored half of a composition block. No `code`, no placement (hub-only; Phase 7). */
|
|
13792
|
+
var CompositionBlockInputSchema = object({
|
|
13793
|
+
name: string().min(1).max(120),
|
|
13794
|
+
enabled: boolean(),
|
|
13795
|
+
composition: CompositionSchema
|
|
13796
|
+
});
|
|
13501
13797
|
/** A stored block. */
|
|
13502
13798
|
var CoreBlockSchema = CoreBlockInputSchema.extend({
|
|
13503
13799
|
id: string(),
|
|
@@ -13513,8 +13809,38 @@ var CoreBlockSchema = CoreBlockInputSchema.extend({
|
|
|
13513
13809
|
*/
|
|
13514
13810
|
lastError: string().optional(),
|
|
13515
13811
|
/** Ms epoch of the last state change. */
|
|
13516
|
-
lastChangedAt: number()
|
|
13812
|
+
lastChangedAt: number(),
|
|
13813
|
+
/** What the block is. Absent means `code` (D659). */
|
|
13814
|
+
source: CoreBlockSourceSchema.optional()
|
|
13815
|
+
});
|
|
13816
|
+
/** A stored composition block and what the composer says about it. */
|
|
13817
|
+
var CompositionViewSchema = object({
|
|
13818
|
+
block: CoreBlockSchema,
|
|
13819
|
+
state: discriminatedUnion("kind", [object({
|
|
13820
|
+
kind: literal("answered"),
|
|
13821
|
+
state: CompositionBlockStateSchema.nullable()
|
|
13822
|
+
}), object({
|
|
13823
|
+
kind: literal("unreachable"),
|
|
13824
|
+
error: string()
|
|
13825
|
+
})])
|
|
13517
13826
|
});
|
|
13827
|
+
/**
|
|
13828
|
+
* A read of the stored compositions. `not-loaded` while the `core_blocks`
|
|
13829
|
+
* table has not been READ: an empty answer then would make "not yet known"
|
|
13830
|
+
* look like "none", and invite the operator to recreate what exists (D315).
|
|
13831
|
+
*/
|
|
13832
|
+
var CompositionsNotLoadedSchema = object({
|
|
13833
|
+
state: literal("not-loaded"),
|
|
13834
|
+
reason: string()
|
|
13835
|
+
});
|
|
13836
|
+
var CompositionListReadSchema = discriminatedUnion("state", [object({
|
|
13837
|
+
state: literal("loaded"),
|
|
13838
|
+
views: array(CompositionViewSchema)
|
|
13839
|
+
}), CompositionsNotLoadedSchema]);
|
|
13840
|
+
var CompositionGetReadSchema = discriminatedUnion("state", [object({
|
|
13841
|
+
state: literal("loaded"),
|
|
13842
|
+
view: CompositionViewSchema.nullable()
|
|
13843
|
+
}), CompositionsNotLoadedSchema]);
|
|
13518
13844
|
/** What a compile attempt produced. */
|
|
13519
13845
|
var CoreBlockCompileResultSchema = object({
|
|
13520
13846
|
ok: boolean(),
|
|
@@ -13552,7 +13878,72 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
13552
13878
|
}), method(object({}), object({ libs: array(object({
|
|
13553
13879
|
filePath: string(),
|
|
13554
13880
|
content: string()
|
|
13555
|
-
})) }), { auth: "admin" })
|
|
13881
|
+
})) }), { auth: "admin" }), method(object({ block: CompositionBlockInputSchema }), object({ block: CoreBlockSchema }), {
|
|
13882
|
+
kind: "mutation",
|
|
13883
|
+
auth: "admin",
|
|
13884
|
+
caller: "required"
|
|
13885
|
+
}), method(object({
|
|
13886
|
+
blockId: string(),
|
|
13887
|
+
expectedUpdatedAt: number(),
|
|
13888
|
+
block: CompositionBlockInputSchema.partial()
|
|
13889
|
+
}), object({ block: CoreBlockSchema }), {
|
|
13890
|
+
kind: "mutation",
|
|
13891
|
+
auth: "admin",
|
|
13892
|
+
caller: "required"
|
|
13893
|
+
}), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
|
|
13894
|
+
composition: CompositionSchema,
|
|
13895
|
+
blockId: string().optional()
|
|
13896
|
+
}), CompositionValidationSchema, {
|
|
13897
|
+
kind: "mutation",
|
|
13898
|
+
auth: "admin",
|
|
13899
|
+
access: "view"
|
|
13900
|
+
});
|
|
13901
|
+
var ComposerBlockSchema = object({
|
|
13902
|
+
id: string().min(1),
|
|
13903
|
+
name: string().min(1).max(120),
|
|
13904
|
+
enabled: boolean(),
|
|
13905
|
+
updatedAt: number(),
|
|
13906
|
+
composition: CompositionSchema
|
|
13907
|
+
});
|
|
13908
|
+
/**
|
|
13909
|
+
* A stored composition row that no longer PARSES — a schema a release
|
|
13910
|
+
* tightened, a row written by a newer build. Sent by id so the composer keeps
|
|
13911
|
+
* its device as a placeholder and reports the block `failed` naming the parse
|
|
13912
|
+
* error. Leaving it out would read, twice, exactly like a delete (D49).
|
|
13913
|
+
*/
|
|
13914
|
+
var ComposerUnreadableBlockSchema = object({
|
|
13915
|
+
id: string().min(1),
|
|
13916
|
+
/** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
|
|
13917
|
+
name: string().nullable(),
|
|
13918
|
+
/** The parse error, in the operator's words. */
|
|
13919
|
+
error: string()
|
|
13920
|
+
});
|
|
13921
|
+
method(object({
|
|
13922
|
+
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
13923
|
+
integrationId: string().nullable(),
|
|
13924
|
+
/** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
|
|
13925
|
+
storeLoaded: boolean(),
|
|
13926
|
+
blocks: array(ComposerBlockSchema),
|
|
13927
|
+
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
13928
|
+
restartBlockIds: array(string()),
|
|
13929
|
+
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
13930
|
+
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
13931
|
+
}), object({
|
|
13932
|
+
blocks: array(object({
|
|
13933
|
+
blockId: string(),
|
|
13934
|
+
status: CompositionRunStatusSchema,
|
|
13935
|
+
reason: string().optional()
|
|
13936
|
+
})),
|
|
13937
|
+
/**
|
|
13938
|
+
* False when the composer declared and withdrew NOTHING (store not loaded,
|
|
13939
|
+
* integration unknown, its own rows unread or read empty once). An empty
|
|
13940
|
+
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
13941
|
+
*/
|
|
13942
|
+
acted: boolean()
|
|
13943
|
+
}), {
|
|
13944
|
+
kind: "mutation",
|
|
13945
|
+
auth: "admin"
|
|
13946
|
+
}), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
|
|
13556
13947
|
/**
|
|
13557
13948
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
13558
13949
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -19297,8 +19688,8 @@ var NcTestResultSchema = object({
|
|
|
19297
19688
|
className: string().optional(),
|
|
19298
19689
|
label: string().optional()
|
|
19299
19690
|
});
|
|
19300
|
-
/** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
|
|
19301
|
-
*
|
|
19691
|
+
/** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
|
|
19692
|
+
* `z.infer` of this schema — one shape, no twin. `mixed` is DERIVED
|
|
19302
19693
|
* (a stored system rule whose kinds span families, D637) and never authored. */
|
|
19303
19694
|
var NcRuleKindSchema = _enum([
|
|
19304
19695
|
"detection",
|
|
@@ -21230,6 +21621,13 @@ var AudioEventSchema = object({
|
|
|
21230
21621
|
originalClass: string().optional(),
|
|
21231
21622
|
score: number()
|
|
21232
21623
|
}).optional(),
|
|
21624
|
+
/**
|
|
21625
|
+
* Whether the classifier RAN on the window behind this row (D660). Absent
|
|
21626
|
+
* on rows written before D660 — unknown, NOT classified: until then a
|
|
21627
|
+
* window the analyzer's busy gate threw away was stored exactly like one
|
|
21628
|
+
* that heard nothing above the floor.
|
|
21629
|
+
*/
|
|
21630
|
+
classifyOutcome: AudioClassifyOutcomeSchema.optional(),
|
|
21233
21631
|
/** Populated by B5 (recording playback URL for this event). */
|
|
21234
21632
|
mediaUrl: string().optional()
|
|
21235
21633
|
});
|
|
@@ -36257,6 +36655,38 @@ var zoneRulesCapability = {
|
|
|
36257
36655
|
*/
|
|
36258
36656
|
durability: "restored"
|
|
36259
36657
|
};
|
|
36658
|
+
var NUMBER = {
|
|
36659
|
+
kind: "fixed",
|
|
36660
|
+
result: ["number"]
|
|
36661
|
+
};
|
|
36662
|
+
var BOOLEAN = {
|
|
36663
|
+
kind: "fixed",
|
|
36664
|
+
result: ["boolean"]
|
|
36665
|
+
};
|
|
36666
|
+
Object.freeze({
|
|
36667
|
+
min: NUMBER,
|
|
36668
|
+
max: NUMBER,
|
|
36669
|
+
abs: NUMBER,
|
|
36670
|
+
floor: NUMBER,
|
|
36671
|
+
ceil: NUMBER,
|
|
36672
|
+
sqrt: NUMBER,
|
|
36673
|
+
round: NUMBER,
|
|
36674
|
+
pow: NUMBER,
|
|
36675
|
+
clamp: NUMBER,
|
|
36676
|
+
avg: NUMBER,
|
|
36677
|
+
sum: NUMBER,
|
|
36678
|
+
age: NUMBER,
|
|
36679
|
+
convert: NUMBER,
|
|
36680
|
+
coalesce: { kind: "coalesce" },
|
|
36681
|
+
any: BOOLEAN,
|
|
36682
|
+
all: BOOLEAN,
|
|
36683
|
+
within: BOOLEAN,
|
|
36684
|
+
latest: {
|
|
36685
|
+
kind: "fixed",
|
|
36686
|
+
result: ["number", "null"]
|
|
36687
|
+
}
|
|
36688
|
+
});
|
|
36689
|
+
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
36260
36690
|
/**
|
|
36261
36691
|
* Accessory device helpers — shared across drivers.
|
|
36262
36692
|
*
|
|
@@ -38593,6 +39023,18 @@ Object.freeze({
|
|
|
38593
39023
|
addonId: null,
|
|
38594
39024
|
access: "create"
|
|
38595
39025
|
},
|
|
39026
|
+
"composer.applyBlocks": {
|
|
39027
|
+
capName: "composer",
|
|
39028
|
+
capScope: "system",
|
|
39029
|
+
addonId: null,
|
|
39030
|
+
access: "create"
|
|
39031
|
+
},
|
|
39032
|
+
"composer.getStates": {
|
|
39033
|
+
capName: "composer",
|
|
39034
|
+
capScope: "system",
|
|
39035
|
+
addonId: null,
|
|
39036
|
+
access: "view"
|
|
39037
|
+
},
|
|
38596
39038
|
"connectionTest.describeTest": {
|
|
38597
39039
|
capName: "connection-test",
|
|
38598
39040
|
capScope: "system",
|
|
@@ -38653,6 +39095,12 @@ Object.freeze({
|
|
|
38653
39095
|
addonId: null,
|
|
38654
39096
|
access: "create"
|
|
38655
39097
|
},
|
|
39098
|
+
"coreBlocks.createComposition": {
|
|
39099
|
+
capName: "core-blocks",
|
|
39100
|
+
capScope: "system",
|
|
39101
|
+
addonId: null,
|
|
39102
|
+
access: "create"
|
|
39103
|
+
},
|
|
38656
39104
|
"coreBlocks.delete": {
|
|
38657
39105
|
capName: "core-blocks",
|
|
38658
39106
|
capScope: "system",
|
|
@@ -38665,6 +39113,12 @@ Object.freeze({
|
|
|
38665
39113
|
addonId: null,
|
|
38666
39114
|
access: "view"
|
|
38667
39115
|
},
|
|
39116
|
+
"coreBlocks.getComposition": {
|
|
39117
|
+
capName: "core-blocks",
|
|
39118
|
+
capScope: "system",
|
|
39119
|
+
addonId: null,
|
|
39120
|
+
access: "view"
|
|
39121
|
+
},
|
|
38668
39122
|
"coreBlocks.getTypeDefs": {
|
|
38669
39123
|
capName: "core-blocks",
|
|
38670
39124
|
capScope: "system",
|
|
@@ -38677,6 +39131,12 @@ Object.freeze({
|
|
|
38677
39131
|
addonId: null,
|
|
38678
39132
|
access: "view"
|
|
38679
39133
|
},
|
|
39134
|
+
"coreBlocks.listCompositions": {
|
|
39135
|
+
capName: "core-blocks",
|
|
39136
|
+
capScope: "system",
|
|
39137
|
+
addonId: null,
|
|
39138
|
+
access: "view"
|
|
39139
|
+
},
|
|
38680
39140
|
"coreBlocks.restart": {
|
|
38681
39141
|
capName: "core-blocks",
|
|
38682
39142
|
capScope: "system",
|
|
@@ -38695,6 +39155,18 @@ Object.freeze({
|
|
|
38695
39155
|
addonId: null,
|
|
38696
39156
|
access: "create"
|
|
38697
39157
|
},
|
|
39158
|
+
"coreBlocks.updateComposition": {
|
|
39159
|
+
capName: "core-blocks",
|
|
39160
|
+
capScope: "system",
|
|
39161
|
+
addonId: null,
|
|
39162
|
+
access: "create"
|
|
39163
|
+
},
|
|
39164
|
+
"coreBlocks.validateComposition": {
|
|
39165
|
+
capName: "core-blocks",
|
|
39166
|
+
capScope: "system",
|
|
39167
|
+
addonId: null,
|
|
39168
|
+
access: "view"
|
|
39169
|
+
},
|
|
38698
39170
|
"cover.close": {
|
|
38699
39171
|
capName: "cover",
|
|
38700
39172
|
capScope: "device",
|
|
@@ -52059,6 +52531,8 @@ function buildRunnerConfig(base, overrides) {
|
|
|
52059
52531
|
var DEFAULT_LOAD_LIMIT = 1e5;
|
|
52060
52532
|
var DurableLedger = class DurableLedger {
|
|
52061
52533
|
mirror = /* @__PURE__ */ new Map();
|
|
52534
|
+
/** Whether ANY load has read the store successfully — see {@link hasAnswered}. */
|
|
52535
|
+
answered = false;
|
|
52062
52536
|
spec;
|
|
52063
52537
|
store;
|
|
52064
52538
|
logger;
|
|
@@ -52114,6 +52588,7 @@ var DurableLedger = class DurableLedger {
|
|
|
52114
52588
|
}
|
|
52115
52589
|
this.mirror.clear();
|
|
52116
52590
|
for (const [key, row] of next) this.mirror.set(key, row);
|
|
52591
|
+
this.answered = true;
|
|
52117
52592
|
if (skipped > 0) this.logger.warn("durable rows skipped as malformed — they gate NOTHING", { meta: {
|
|
52118
52593
|
collection: this.spec.collection,
|
|
52119
52594
|
skipped
|
|
@@ -52128,6 +52603,16 @@ var DurableLedger = class DurableLedger {
|
|
|
52128
52603
|
return [...this.mirror.values()];
|
|
52129
52604
|
}
|
|
52130
52605
|
}
|
|
52606
|
+
/**
|
|
52607
|
+
* Whether the mirror is an ANSWER from the store: true once any load has
|
|
52608
|
+
* succeeded, and never false again (a later failed load keeps that answer).
|
|
52609
|
+
* Before it, an empty mirror is "not read yet", never "the store is empty" —
|
|
52610
|
+
* {@link load} swallows its failure, so a caller that must tell the two apart
|
|
52611
|
+
* asks here (D642 review I1).
|
|
52612
|
+
*/
|
|
52613
|
+
hasAnswered() {
|
|
52614
|
+
return this.answered;
|
|
52615
|
+
}
|
|
52131
52616
|
/** Every mirrored row, insertion-ordered. */
|
|
52132
52617
|
snapshot() {
|
|
52133
52618
|
return [...this.mirror.values()];
|
package/dist/remoteEntry.js
CHANGED
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-Cyq-KC8w.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|