@camstack/addon-post-analysis 1.2.288 → 1.2.290
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/THIRD_PARTY_MODELS.md +126 -123
- package/dist/{clip-model-registry-eFgKIlKE.js → clip-model-registry--sFeijO7.js} +526 -29
- package/dist/{clip-model-registry-hdhXFofg.mjs → clip-model-registry-CoYBCvtr.mjs} +526 -29
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/pipeline-analytics/_stub.js +2 -2
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CBo7IWoj.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-r3ZZOSzj.mjs} +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-2OwTV_D2.mjs +26 -0
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DAAKQ3sC.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-Fpmz4x_M.mjs → hostInit-PoeIZAFx.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +97 -21
- package/dist/pipeline-analytics/index.mjs +97 -21
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-XcjvUbbR.mjs +0 -26
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-r4OU_ahc.mjs +0 -26
|
@@ -10205,6 +10205,48 @@ var ModelProviderIdSchema = _enum([
|
|
|
10205
10205
|
"scrypted",
|
|
10206
10206
|
"custom"
|
|
10207
10207
|
]);
|
|
10208
|
+
/**
|
|
10209
|
+
* The licence of a model, as a record rather than a bare SPDX string: a
|
|
10210
|
+
* permissive CODE licence routinely sits on top of restrictive WEIGHTS or
|
|
10211
|
+
* DATA, and the obligations (attribution, modification notices, source offers)
|
|
10212
|
+
* are per upstream. A persisted custom-model row written when this field was a
|
|
10213
|
+
* string still parses — the string is lifted into `{ weights }`.
|
|
10214
|
+
*
|
|
10215
|
+
* Every licence surface (the admin "Models and licenses" page,
|
|
10216
|
+
* `THIRD_PARTY_MODELS.md`, the Hugging Face model table) is GENERATED from
|
|
10217
|
+
* these records by `scripts/gen-model-licenses.ts` (D661).
|
|
10218
|
+
*/
|
|
10219
|
+
var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { weights: value } : value, object({
|
|
10220
|
+
/** SPDX id of the WEIGHTS' terms, a `LicenseRef-*` for non-SPDX terms, or `UNKNOWN`. */
|
|
10221
|
+
weights: string().min(1),
|
|
10222
|
+
/** SPDX id of the upstream code that defines / trained the network. */
|
|
10223
|
+
code: string().min(1).optional(),
|
|
10224
|
+
/** Training data whose terms add obligations (attribution, non-commercial). */
|
|
10225
|
+
data: object({
|
|
10226
|
+
name: string().min(1),
|
|
10227
|
+
terms: string().min(1),
|
|
10228
|
+
url: string().url().optional()
|
|
10229
|
+
}).optional(),
|
|
10230
|
+
/** The project the weights come from. Required on built-in entries (guard). */
|
|
10231
|
+
upstream: object({
|
|
10232
|
+
name: string().min(1),
|
|
10233
|
+
url: string().url()
|
|
10234
|
+
}).optional(),
|
|
10235
|
+
/** Where the licence text governing the weights is published. */
|
|
10236
|
+
url: string().url().optional(),
|
|
10237
|
+
/** Attribution the licence REQUIRES, verbatim. */
|
|
10238
|
+
attribution: string().min(1).optional(),
|
|
10239
|
+
/** What CamStack changed. Required when `hosting` is `camstack-hf` (guard). */
|
|
10240
|
+
modifications: string().min(1).optional(),
|
|
10241
|
+
/** Who serves the file a node downloads. */
|
|
10242
|
+
hosting: _enum([
|
|
10243
|
+
"camstack-hf",
|
|
10244
|
+
"third-party",
|
|
10245
|
+
"built-in"
|
|
10246
|
+
]).optional(),
|
|
10247
|
+
/** True when the weights or their data forbid commercial use. */
|
|
10248
|
+
nonCommercial: boolean().optional()
|
|
10249
|
+
}));
|
|
10208
10250
|
var ModelCatalogEntrySchema = object({
|
|
10209
10251
|
id: string(),
|
|
10210
10252
|
name: string(),
|
|
@@ -10260,6 +10302,16 @@ var ModelCatalogEntrySchema = object({
|
|
|
10260
10302
|
*/
|
|
10261
10303
|
postprocessor: custom().optional(),
|
|
10262
10304
|
/**
|
|
10305
|
+
* Per-MODEL default confidence floor. Absent ⇒ the step's
|
|
10306
|
+
* `StepDefinition.defaultConfidence` applies. A score is a property of one
|
|
10307
|
+
* model's output scale, not of the step slot it sits in: YuNet's
|
|
10308
|
+
* `sqrt(cls·obj)` is not SCRFD's score, and inheriting SCRFD's 0.5 filled the
|
|
10309
|
+
* face gallery with wheels and hands (D662, amends D645). An operator's
|
|
10310
|
+
* explicit value still wins over it. Resolved in ONE place —
|
|
10311
|
+
* `addon-pipeline/.../registry/effective-confidence.ts`.
|
|
10312
|
+
*/
|
|
10313
|
+
defaultConfidence: number().min(0).max(1).optional(),
|
|
10314
|
+
/**
|
|
10263
10315
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
10264
10316
|
* onto the canonical template) before this step runs, instead of a plain
|
|
10265
10317
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -10293,11 +10345,11 @@ var ModelCatalogEntrySchema = object({
|
|
|
10293
10345
|
p95LatencyMs: record(string(), number()).optional()
|
|
10294
10346
|
}).optional(),
|
|
10295
10347
|
/**
|
|
10296
|
-
*
|
|
10297
|
-
*
|
|
10298
|
-
*
|
|
10348
|
+
* The model's licence record — see {@link ModelLicenseSchema}. Optional in
|
|
10349
|
+
* the schema (a custom model's author may state none); REQUIRED and complete
|
|
10350
|
+
* on every built-in catalog entry (`scripts/check-catalog-licence.ts`).
|
|
10299
10351
|
*/
|
|
10300
|
-
license:
|
|
10352
|
+
license: ModelLicenseSchema.optional(),
|
|
10301
10353
|
/**
|
|
10302
10354
|
* Variant-selector grouping. The UI groups models by `family` + `tier` and
|
|
10303
10355
|
* offers `precision` / `optimization` as variant axes WITHIN a tier — so all
|
|
@@ -10392,23 +10444,6 @@ var ExpressionEvalError = class extends Error {
|
|
|
10392
10444
|
this.name = "ExpressionEvalError";
|
|
10393
10445
|
}
|
|
10394
10446
|
};
|
|
10395
|
-
/**
|
|
10396
|
-
* Frozen, null-prototype builtin function table for the expression engine
|
|
10397
|
-
* (spec §4 rule 4). The table is the SOLE surface of callable functions: the
|
|
10398
|
-
* parser rejects any callee not in it, and the evaluator gates each call on an
|
|
10399
|
-
* own-property check against it.
|
|
10400
|
-
*
|
|
10401
|
-
* Because the object has a NULL prototype AND is `Object.freeze`d:
|
|
10402
|
-
* - it cannot be polluted (no `__proto__` / `constructor` write reaches it);
|
|
10403
|
-
* - a lookup for `toString` / `hasOwnProperty` / `constructor` finds NOTHING
|
|
10404
|
-
* (there is no `Object.prototype` in the chain), so those names are not
|
|
10405
|
-
* callable — they are simply "unknown function" at parse time.
|
|
10406
|
-
*
|
|
10407
|
-
* Every numeric argument is validated as a finite number and every numeric
|
|
10408
|
-
* RESULT is re-checked finite, so `/0`, `sqrt(-1)` (→ NaN) and overflow
|
|
10409
|
-
* (`pow(10,400)` → Infinity) all raise `ExpressionEvalError` and fail the link
|
|
10410
|
-
* closed rather than emitting a garbage value.
|
|
10411
|
-
*/
|
|
10412
10447
|
function asFiniteNumber(value, name, index) {
|
|
10413
10448
|
if (typeof value !== "number" || !Number.isFinite(value)) throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a finite number`);
|
|
10414
10449
|
return value;
|
|
@@ -10424,6 +10459,10 @@ function finiteResult(value, name) {
|
|
|
10424
10459
|
function allFiniteNumbers(args, name) {
|
|
10425
10460
|
return args.map((a, idx) => asFiniteNumber(a, name, idx));
|
|
10426
10461
|
}
|
|
10462
|
+
function asBoolean$1(value, name, index) {
|
|
10463
|
+
if (typeof value !== "boolean") throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a boolean`);
|
|
10464
|
+
return value;
|
|
10465
|
+
}
|
|
10427
10466
|
var INF = Number.POSITIVE_INFINITY;
|
|
10428
10467
|
var table = {
|
|
10429
10468
|
min: {
|
|
@@ -10524,6 +10563,40 @@ var table = {
|
|
|
10524
10563
|
if (from === to) return x;
|
|
10525
10564
|
throw new ExpressionEvalError("convert: unit conversion table not installed");
|
|
10526
10565
|
}
|
|
10566
|
+
},
|
|
10567
|
+
any: {
|
|
10568
|
+
minArgs: 1,
|
|
10569
|
+
maxArgs: INF,
|
|
10570
|
+
apply: (args) => args.map((a, i) => asBoolean$1(a, "any", i)).some((b) => b)
|
|
10571
|
+
},
|
|
10572
|
+
all: {
|
|
10573
|
+
minArgs: 1,
|
|
10574
|
+
maxArgs: INF,
|
|
10575
|
+
apply: (args) => args.map((a, i) => asBoolean$1(a, "all", i)).every((b) => b)
|
|
10576
|
+
},
|
|
10577
|
+
within: {
|
|
10578
|
+
minArgs: 2,
|
|
10579
|
+
maxArgs: 2,
|
|
10580
|
+
apply: (args, hooks) => {
|
|
10581
|
+
const windowMs = asFiniteNumber(args[1], "within", 1);
|
|
10582
|
+
if (windowMs < 0) throw new ExpressionEvalError("within: the window must not be negative");
|
|
10583
|
+
const at = args[0];
|
|
10584
|
+
if (at === null) return false;
|
|
10585
|
+
const ts = asFiniteNumber(at, "within", 0);
|
|
10586
|
+
const now = hooks.now;
|
|
10587
|
+
if (now === void 0 || !Number.isFinite(now)) throw new ExpressionEvalError("within: no clock was supplied to this evaluation");
|
|
10588
|
+
const inside = now - ts <= windowMs;
|
|
10589
|
+
if (inside) hooks.noteDeadline?.(ts + windowMs + 1);
|
|
10590
|
+
return inside;
|
|
10591
|
+
}
|
|
10592
|
+
},
|
|
10593
|
+
latest: {
|
|
10594
|
+
minArgs: 1,
|
|
10595
|
+
maxArgs: INF,
|
|
10596
|
+
apply: (args) => {
|
|
10597
|
+
const present = args.flatMap((a, i) => a === null ? [] : [asFiniteNumber(a, "latest", i)]);
|
|
10598
|
+
return present.length === 0 ? null : finiteResult(Math.max(...present), "latest");
|
|
10599
|
+
}
|
|
10527
10600
|
}
|
|
10528
10601
|
};
|
|
10529
10602
|
Object.freeze(Object.assign(Object.create(null), table));
|
|
@@ -11138,7 +11211,7 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
11138
11211
|
code: string().min(1).max(2e4)
|
|
11139
11212
|
})
|
|
11140
11213
|
]);
|
|
11141
|
-
object({
|
|
11214
|
+
var AutomationRecipeSchema = object({
|
|
11142
11215
|
triggers: array(AutomationTriggerSchema),
|
|
11143
11216
|
conditions: AutomationConditionSchema.optional(),
|
|
11144
11217
|
actions: array(AutomationActionSchema)
|
|
@@ -13314,6 +13387,195 @@ var cameraStreamsCapability = {
|
|
|
13314
13387
|
function kebabToCamel(s) {
|
|
13315
13388
|
return s.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
13316
13389
|
}
|
|
13390
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
13391
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
13392
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
13393
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
13394
|
+
var CompositionSourceRefSchema = object({
|
|
13395
|
+
/** The owning addon; `stableId` is unique only within it. */
|
|
13396
|
+
addonId: string().min(1),
|
|
13397
|
+
stableId: string().min(1)
|
|
13398
|
+
});
|
|
13399
|
+
/** One field of one capability of one source device. */
|
|
13400
|
+
var CompositionFieldReadSchema = object({
|
|
13401
|
+
source: CompositionSourceRefSchema,
|
|
13402
|
+
cap: string().min(1),
|
|
13403
|
+
/** Dotted path into the source cap's runtime-state slice. */
|
|
13404
|
+
fieldPath: string().min(1)
|
|
13405
|
+
});
|
|
13406
|
+
/** `from`: copy one source field verbatim. It is also an expression's `from` binding. */
|
|
13407
|
+
var CompositionFromSourceSchema = CompositionFieldReadSchema.extend({ kind: literal("from") });
|
|
13408
|
+
var CompositionBindingSchema = discriminatedUnion("kind", [CompositionFromSourceSchema, object({
|
|
13409
|
+
kind: literal("literal"),
|
|
13410
|
+
value: union([
|
|
13411
|
+
string(),
|
|
13412
|
+
number(),
|
|
13413
|
+
boolean(),
|
|
13414
|
+
_null()
|
|
13415
|
+
])
|
|
13416
|
+
})]);
|
|
13417
|
+
/**
|
|
13418
|
+
* `expression`: a formula over named bindings, in the salvaged expression
|
|
13419
|
+
* engine. Validated at parse by the SAME function every other consumer runs,
|
|
13420
|
+
* so the editor and the store cannot disagree.
|
|
13421
|
+
*/
|
|
13422
|
+
var CompositionExpressionSourceSchema = object({
|
|
13423
|
+
kind: literal("expression"),
|
|
13424
|
+
expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
|
|
13425
|
+
bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), CompositionBindingSchema)
|
|
13426
|
+
}).superRefine((src, ctx) => {
|
|
13427
|
+
const err = validateExpressionSource(src);
|
|
13428
|
+
if (err !== null) ctx.addIssue({
|
|
13429
|
+
code: "custom",
|
|
13430
|
+
message: err,
|
|
13431
|
+
path: ["expr"]
|
|
13432
|
+
});
|
|
13433
|
+
});
|
|
13434
|
+
/** `code`: RESERVED for slice 4 (own runner, one-way eject). */
|
|
13435
|
+
var CompositionCodeSourceSchema = object({
|
|
13436
|
+
kind: literal("code"),
|
|
13437
|
+
code: string().min(1).max(MAX_COMPOSITION_CODE_LENGTH)
|
|
13438
|
+
});
|
|
13439
|
+
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
13440
|
+
CompositionFromSourceSchema,
|
|
13441
|
+
CompositionExpressionSourceSchema,
|
|
13442
|
+
CompositionCodeSourceSchema
|
|
13443
|
+
]);
|
|
13444
|
+
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
13445
|
+
kind: literal("forward"),
|
|
13446
|
+
source: CompositionSourceRefSchema,
|
|
13447
|
+
cap: string().min(1),
|
|
13448
|
+
method: string().min(1)
|
|
13449
|
+
}), CompositionCodeSourceSchema]);
|
|
13450
|
+
var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
13451
|
+
kind: literal("fields"),
|
|
13452
|
+
cap: string().min(1),
|
|
13453
|
+
fields: record(string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
|
|
13454
|
+
/** RESERVED for slice 3; refused by the validator when non-empty. */
|
|
13455
|
+
commands: record(string().min(1), CompositionCommandTargetSchema).optional()
|
|
13456
|
+
}), object({
|
|
13457
|
+
kind: literal("passthrough"),
|
|
13458
|
+
cap: string().min(1),
|
|
13459
|
+
source: CompositionSourceRefSchema
|
|
13460
|
+
})]);
|
|
13461
|
+
var CompositionSchema = object({
|
|
13462
|
+
target: discriminatedUnion("kind", [object({
|
|
13463
|
+
kind: literal("new"),
|
|
13464
|
+
type: _enum(DeviceType),
|
|
13465
|
+
role: _enum(DeviceRole).optional()
|
|
13466
|
+
}), object({
|
|
13467
|
+
kind: literal("existing"),
|
|
13468
|
+
device: CompositionSourceRefSchema
|
|
13469
|
+
})]),
|
|
13470
|
+
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
13471
|
+
}).superRefine((composition, ctx) => {
|
|
13472
|
+
const seen = /* @__PURE__ */ new Set();
|
|
13473
|
+
composition.features.forEach((feature, index) => {
|
|
13474
|
+
if (seen.has(feature.cap)) ctx.addIssue({
|
|
13475
|
+
code: "custom",
|
|
13476
|
+
message: `capability \`${feature.cap}\` is composed twice — one feature per capability`,
|
|
13477
|
+
path: [
|
|
13478
|
+
"features",
|
|
13479
|
+
index,
|
|
13480
|
+
"cap"
|
|
13481
|
+
]
|
|
13482
|
+
});
|
|
13483
|
+
seen.add(feature.cap);
|
|
13484
|
+
});
|
|
13485
|
+
});
|
|
13486
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
|
|
13487
|
+
var CompositionProblemSchema = object({
|
|
13488
|
+
code: _enum([
|
|
13489
|
+
"reserved-variant",
|
|
13490
|
+
"unknown-capability",
|
|
13491
|
+
"not-composable",
|
|
13492
|
+
"wrong-device-type",
|
|
13493
|
+
"has-commands",
|
|
13494
|
+
"unknown-field",
|
|
13495
|
+
"nested-field",
|
|
13496
|
+
"missing-field",
|
|
13497
|
+
"kind-mismatch",
|
|
13498
|
+
"may-be-null",
|
|
13499
|
+
"source-missing",
|
|
13500
|
+
"source-unreadable",
|
|
13501
|
+
"source-capability-missing",
|
|
13502
|
+
"source-field-unknown",
|
|
13503
|
+
"expression-invalid",
|
|
13504
|
+
"cycle",
|
|
13505
|
+
"duplicate-target"
|
|
13506
|
+
]),
|
|
13507
|
+
path: string(),
|
|
13508
|
+
message: string()
|
|
13509
|
+
});
|
|
13510
|
+
var CompositionFieldKindSchema = _enum([
|
|
13511
|
+
"string",
|
|
13512
|
+
"number",
|
|
13513
|
+
"boolean",
|
|
13514
|
+
"enum"
|
|
13515
|
+
]);
|
|
13516
|
+
/** How a field says "unavailable": `null` when its schema allows it, else the device goes offline (D393). */
|
|
13517
|
+
var CompositionUnavailableModeSchema = _enum(["null", "offline"]);
|
|
13518
|
+
/**
|
|
13519
|
+
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
13520
|
+
* field of its cap changes value · `constant` reads nothing, computed once.
|
|
13521
|
+
*/
|
|
13522
|
+
var CompositionFieldRoleSchema = _enum([
|
|
13523
|
+
"derived",
|
|
13524
|
+
"clock",
|
|
13525
|
+
"constant"
|
|
13526
|
+
]);
|
|
13527
|
+
var CompositionFieldPlanSchema = object({
|
|
13528
|
+
cap: string(),
|
|
13529
|
+
path: string(),
|
|
13530
|
+
/** Index into `composition.features` this field's capability came from —
|
|
13531
|
+
* lets a source/cycle problem name its path as `features[N].fields.<path>`
|
|
13532
|
+
* (the same convention `planComposition`'s own problems already use). */
|
|
13533
|
+
featureIndex: number().int().nonnegative(),
|
|
13534
|
+
kind: CompositionFieldKindSchema,
|
|
13535
|
+
nullable: boolean(),
|
|
13536
|
+
required: boolean(),
|
|
13537
|
+
unavailable: CompositionUnavailableModeSchema,
|
|
13538
|
+
role: CompositionFieldRoleSchema,
|
|
13539
|
+
source: CompositionFieldSourceSchema,
|
|
13540
|
+
reads: array(CompositionFieldReadSchema)
|
|
13541
|
+
});
|
|
13542
|
+
var CompositionValidationSchema = object({
|
|
13543
|
+
ok: boolean(),
|
|
13544
|
+
problems: array(CompositionProblemSchema),
|
|
13545
|
+
fields: array(CompositionFieldPlanSchema)
|
|
13546
|
+
});
|
|
13547
|
+
/** Mirrors `CoreBlockStatus`, pinned by `core-blocks-source.spec.ts` (Task 11). */
|
|
13548
|
+
var CompositionRunStatusSchema = _enum([
|
|
13549
|
+
"stopped",
|
|
13550
|
+
"starting",
|
|
13551
|
+
"running",
|
|
13552
|
+
"failed"
|
|
13553
|
+
]);
|
|
13554
|
+
var CompositionFieldStateKindSchema = _enum([
|
|
13555
|
+
"fresh",
|
|
13556
|
+
"stale",
|
|
13557
|
+
"unavailable"
|
|
13558
|
+
]);
|
|
13559
|
+
var CompositionFieldStateSchema = object({
|
|
13560
|
+
cap: string(),
|
|
13561
|
+
path: string(),
|
|
13562
|
+
state: CompositionFieldStateKindSchema,
|
|
13563
|
+
/** `null` whenever `state === 'unavailable'`; never a plausible stand-in (D393). */
|
|
13564
|
+
value: union([
|
|
13565
|
+
string(),
|
|
13566
|
+
number(),
|
|
13567
|
+
boolean(),
|
|
13568
|
+
_null()
|
|
13569
|
+
]),
|
|
13570
|
+
reason: string().optional()
|
|
13571
|
+
});
|
|
13572
|
+
var CompositionBlockStateSchema = object({
|
|
13573
|
+
blockId: string(),
|
|
13574
|
+
deviceId: number().nullable(),
|
|
13575
|
+
status: CompositionRunStatusSchema,
|
|
13576
|
+
reason: string().optional(),
|
|
13577
|
+
fields: array(CompositionFieldStateSchema)
|
|
13578
|
+
});
|
|
13317
13579
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
13318
13580
|
* agent is the reason placement is not fixed to the hub. */
|
|
13319
13581
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -13340,6 +13602,30 @@ var CoreBlockInputSchema = object({
|
|
|
13340
13602
|
*/
|
|
13341
13603
|
integrationId: string().optional()
|
|
13342
13604
|
});
|
|
13605
|
+
/**
|
|
13606
|
+
* What a block IS (D659). Absent means `code` — every row stored before this
|
|
13607
|
+
* union keeps working unchanged.
|
|
13608
|
+
* - `code`: the TypeScript in `code`, compiled and run in its own runner;
|
|
13609
|
+
* - `recipe`: RESERVED (automations), stored shape only; refused at run by name;
|
|
13610
|
+
* - `composition`: declarative, run by the shared `composer`; `code` is `''`.
|
|
13611
|
+
*/
|
|
13612
|
+
var CoreBlockSourceSchema = discriminatedUnion("kind", [
|
|
13613
|
+
object({ kind: literal("code") }),
|
|
13614
|
+
object({
|
|
13615
|
+
kind: literal("recipe"),
|
|
13616
|
+
recipe: AutomationRecipeSchema
|
|
13617
|
+
}),
|
|
13618
|
+
object({
|
|
13619
|
+
kind: literal("composition"),
|
|
13620
|
+
composition: CompositionSchema
|
|
13621
|
+
})
|
|
13622
|
+
]);
|
|
13623
|
+
/** The client-authored half of a composition block. No `code`, no placement (hub-only; Phase 7). */
|
|
13624
|
+
var CompositionBlockInputSchema = object({
|
|
13625
|
+
name: string().min(1).max(120),
|
|
13626
|
+
enabled: boolean(),
|
|
13627
|
+
composition: CompositionSchema
|
|
13628
|
+
});
|
|
13343
13629
|
/** A stored block. */
|
|
13344
13630
|
var CoreBlockSchema = CoreBlockInputSchema.extend({
|
|
13345
13631
|
id: string(),
|
|
@@ -13355,8 +13641,38 @@ var CoreBlockSchema = CoreBlockInputSchema.extend({
|
|
|
13355
13641
|
*/
|
|
13356
13642
|
lastError: string().optional(),
|
|
13357
13643
|
/** Ms epoch of the last state change. */
|
|
13358
|
-
lastChangedAt: number()
|
|
13644
|
+
lastChangedAt: number(),
|
|
13645
|
+
/** What the block is. Absent means `code` (D659). */
|
|
13646
|
+
source: CoreBlockSourceSchema.optional()
|
|
13647
|
+
});
|
|
13648
|
+
/** A stored composition block and what the composer says about it. */
|
|
13649
|
+
var CompositionViewSchema = object({
|
|
13650
|
+
block: CoreBlockSchema,
|
|
13651
|
+
state: discriminatedUnion("kind", [object({
|
|
13652
|
+
kind: literal("answered"),
|
|
13653
|
+
state: CompositionBlockStateSchema.nullable()
|
|
13654
|
+
}), object({
|
|
13655
|
+
kind: literal("unreachable"),
|
|
13656
|
+
error: string()
|
|
13657
|
+
})])
|
|
13658
|
+
});
|
|
13659
|
+
/**
|
|
13660
|
+
* A read of the stored compositions. `not-loaded` while the `core_blocks`
|
|
13661
|
+
* table has not been READ: an empty answer then would make "not yet known"
|
|
13662
|
+
* look like "none", and invite the operator to recreate what exists (D315).
|
|
13663
|
+
*/
|
|
13664
|
+
var CompositionsNotLoadedSchema = object({
|
|
13665
|
+
state: literal("not-loaded"),
|
|
13666
|
+
reason: string()
|
|
13359
13667
|
});
|
|
13668
|
+
var CompositionListReadSchema = discriminatedUnion("state", [object({
|
|
13669
|
+
state: literal("loaded"),
|
|
13670
|
+
views: array(CompositionViewSchema)
|
|
13671
|
+
}), CompositionsNotLoadedSchema]);
|
|
13672
|
+
var CompositionGetReadSchema = discriminatedUnion("state", [object({
|
|
13673
|
+
state: literal("loaded"),
|
|
13674
|
+
view: CompositionViewSchema.nullable()
|
|
13675
|
+
}), CompositionsNotLoadedSchema]);
|
|
13360
13676
|
/** What a compile attempt produced. */
|
|
13361
13677
|
var CoreBlockCompileResultSchema = object({
|
|
13362
13678
|
ok: boolean(),
|
|
@@ -13394,7 +13710,72 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
13394
13710
|
}), method(object({}), object({ libs: array(object({
|
|
13395
13711
|
filePath: string(),
|
|
13396
13712
|
content: string()
|
|
13397
|
-
})) }), { auth: "admin" })
|
|
13713
|
+
})) }), { auth: "admin" }), method(object({ block: CompositionBlockInputSchema }), object({ block: CoreBlockSchema }), {
|
|
13714
|
+
kind: "mutation",
|
|
13715
|
+
auth: "admin",
|
|
13716
|
+
caller: "required"
|
|
13717
|
+
}), method(object({
|
|
13718
|
+
blockId: string(),
|
|
13719
|
+
expectedUpdatedAt: number(),
|
|
13720
|
+
block: CompositionBlockInputSchema.partial()
|
|
13721
|
+
}), object({ block: CoreBlockSchema }), {
|
|
13722
|
+
kind: "mutation",
|
|
13723
|
+
auth: "admin",
|
|
13724
|
+
caller: "required"
|
|
13725
|
+
}), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
|
|
13726
|
+
composition: CompositionSchema,
|
|
13727
|
+
blockId: string().optional()
|
|
13728
|
+
}), CompositionValidationSchema, {
|
|
13729
|
+
kind: "mutation",
|
|
13730
|
+
auth: "admin",
|
|
13731
|
+
access: "view"
|
|
13732
|
+
});
|
|
13733
|
+
var ComposerBlockSchema = object({
|
|
13734
|
+
id: string().min(1),
|
|
13735
|
+
name: string().min(1).max(120),
|
|
13736
|
+
enabled: boolean(),
|
|
13737
|
+
updatedAt: number(),
|
|
13738
|
+
composition: CompositionSchema
|
|
13739
|
+
});
|
|
13740
|
+
/**
|
|
13741
|
+
* A stored composition row that no longer PARSES — a schema a release
|
|
13742
|
+
* tightened, a row written by a newer build. Sent by id so the composer keeps
|
|
13743
|
+
* its device as a placeholder and reports the block `failed` naming the parse
|
|
13744
|
+
* error. Leaving it out would read, twice, exactly like a delete (D49).
|
|
13745
|
+
*/
|
|
13746
|
+
var ComposerUnreadableBlockSchema = object({
|
|
13747
|
+
id: string().min(1),
|
|
13748
|
+
/** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
|
|
13749
|
+
name: string().nullable(),
|
|
13750
|
+
/** The parse error, in the operator's words. */
|
|
13751
|
+
error: string()
|
|
13752
|
+
});
|
|
13753
|
+
method(object({
|
|
13754
|
+
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
13755
|
+
integrationId: string().nullable(),
|
|
13756
|
+
/** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
|
|
13757
|
+
storeLoaded: boolean(),
|
|
13758
|
+
blocks: array(ComposerBlockSchema),
|
|
13759
|
+
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
13760
|
+
restartBlockIds: array(string()),
|
|
13761
|
+
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
13762
|
+
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
13763
|
+
}), object({
|
|
13764
|
+
blocks: array(object({
|
|
13765
|
+
blockId: string(),
|
|
13766
|
+
status: CompositionRunStatusSchema,
|
|
13767
|
+
reason: string().optional()
|
|
13768
|
+
})),
|
|
13769
|
+
/**
|
|
13770
|
+
* False when the composer declared and withdrew NOTHING (store not loaded,
|
|
13771
|
+
* integration unknown, its own rows unread or read empty once). An empty
|
|
13772
|
+
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
13773
|
+
*/
|
|
13774
|
+
acted: boolean()
|
|
13775
|
+
}), {
|
|
13776
|
+
kind: "mutation",
|
|
13777
|
+
auth: "admin"
|
|
13778
|
+
}), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
|
|
13398
13779
|
/**
|
|
13399
13780
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
13400
13781
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -19438,8 +19819,8 @@ var NcTestResultSchema = object({
|
|
|
19438
19819
|
className: string().optional(),
|
|
19439
19820
|
label: string().optional()
|
|
19440
19821
|
});
|
|
19441
|
-
/** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
|
|
19442
|
-
*
|
|
19822
|
+
/** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
|
|
19823
|
+
* `z.infer` of this schema — one shape, no twin. `mixed` is DERIVED
|
|
19443
19824
|
* (a stored system rule whose kinds span families, D637) and never authored. */
|
|
19444
19825
|
var NcRuleKindSchema = _enum([
|
|
19445
19826
|
"detection",
|
|
@@ -24071,7 +24452,8 @@ var PipelineModelOptionSchema = object({
|
|
|
24071
24452
|
})),
|
|
24072
24453
|
group: ModelVariantGroupSchema.optional(),
|
|
24073
24454
|
legacy: boolean().optional(),
|
|
24074
|
-
provider: ModelProviderIdSchema.optional()
|
|
24455
|
+
provider: ModelProviderIdSchema.optional(),
|
|
24456
|
+
defaultConfidence: number().optional()
|
|
24075
24457
|
});
|
|
24076
24458
|
var ConfigFieldBridge = custom();
|
|
24077
24459
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -39985,6 +40367,38 @@ var zoneRulesCapability = {
|
|
|
39985
40367
|
*/
|
|
39986
40368
|
durability: "restored"
|
|
39987
40369
|
};
|
|
40370
|
+
var NUMBER = {
|
|
40371
|
+
kind: "fixed",
|
|
40372
|
+
result: ["number"]
|
|
40373
|
+
};
|
|
40374
|
+
var BOOLEAN = {
|
|
40375
|
+
kind: "fixed",
|
|
40376
|
+
result: ["boolean"]
|
|
40377
|
+
};
|
|
40378
|
+
Object.freeze({
|
|
40379
|
+
min: NUMBER,
|
|
40380
|
+
max: NUMBER,
|
|
40381
|
+
abs: NUMBER,
|
|
40382
|
+
floor: NUMBER,
|
|
40383
|
+
ceil: NUMBER,
|
|
40384
|
+
sqrt: NUMBER,
|
|
40385
|
+
round: NUMBER,
|
|
40386
|
+
pow: NUMBER,
|
|
40387
|
+
clamp: NUMBER,
|
|
40388
|
+
avg: NUMBER,
|
|
40389
|
+
sum: NUMBER,
|
|
40390
|
+
age: NUMBER,
|
|
40391
|
+
convert: NUMBER,
|
|
40392
|
+
coalesce: { kind: "coalesce" },
|
|
40393
|
+
any: BOOLEAN,
|
|
40394
|
+
all: BOOLEAN,
|
|
40395
|
+
within: BOOLEAN,
|
|
40396
|
+
latest: {
|
|
40397
|
+
kind: "fixed",
|
|
40398
|
+
result: ["number", "null"]
|
|
40399
|
+
}
|
|
40400
|
+
});
|
|
40401
|
+
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
39988
40402
|
/**
|
|
39989
40403
|
* Most specific first. Extending this list is how a new device kind becomes
|
|
39990
40404
|
* gateable; nothing else needs to change.
|
|
@@ -43386,6 +43800,18 @@ Object.freeze({
|
|
|
43386
43800
|
addonId: null,
|
|
43387
43801
|
access: "create"
|
|
43388
43802
|
},
|
|
43803
|
+
"composer.applyBlocks": {
|
|
43804
|
+
capName: "composer",
|
|
43805
|
+
capScope: "system",
|
|
43806
|
+
addonId: null,
|
|
43807
|
+
access: "create"
|
|
43808
|
+
},
|
|
43809
|
+
"composer.getStates": {
|
|
43810
|
+
capName: "composer",
|
|
43811
|
+
capScope: "system",
|
|
43812
|
+
addonId: null,
|
|
43813
|
+
access: "view"
|
|
43814
|
+
},
|
|
43389
43815
|
"connectionTest.describeTest": {
|
|
43390
43816
|
capName: "connection-test",
|
|
43391
43817
|
capScope: "system",
|
|
@@ -43446,6 +43872,12 @@ Object.freeze({
|
|
|
43446
43872
|
addonId: null,
|
|
43447
43873
|
access: "create"
|
|
43448
43874
|
},
|
|
43875
|
+
"coreBlocks.createComposition": {
|
|
43876
|
+
capName: "core-blocks",
|
|
43877
|
+
capScope: "system",
|
|
43878
|
+
addonId: null,
|
|
43879
|
+
access: "create"
|
|
43880
|
+
},
|
|
43449
43881
|
"coreBlocks.delete": {
|
|
43450
43882
|
capName: "core-blocks",
|
|
43451
43883
|
capScope: "system",
|
|
@@ -43458,6 +43890,12 @@ Object.freeze({
|
|
|
43458
43890
|
addonId: null,
|
|
43459
43891
|
access: "view"
|
|
43460
43892
|
},
|
|
43893
|
+
"coreBlocks.getComposition": {
|
|
43894
|
+
capName: "core-blocks",
|
|
43895
|
+
capScope: "system",
|
|
43896
|
+
addonId: null,
|
|
43897
|
+
access: "view"
|
|
43898
|
+
},
|
|
43461
43899
|
"coreBlocks.getTypeDefs": {
|
|
43462
43900
|
capName: "core-blocks",
|
|
43463
43901
|
capScope: "system",
|
|
@@ -43470,6 +43908,12 @@ Object.freeze({
|
|
|
43470
43908
|
addonId: null,
|
|
43471
43909
|
access: "view"
|
|
43472
43910
|
},
|
|
43911
|
+
"coreBlocks.listCompositions": {
|
|
43912
|
+
capName: "core-blocks",
|
|
43913
|
+
capScope: "system",
|
|
43914
|
+
addonId: null,
|
|
43915
|
+
access: "view"
|
|
43916
|
+
},
|
|
43473
43917
|
"coreBlocks.restart": {
|
|
43474
43918
|
capName: "core-blocks",
|
|
43475
43919
|
capScope: "system",
|
|
@@ -43488,6 +43932,18 @@ Object.freeze({
|
|
|
43488
43932
|
addonId: null,
|
|
43489
43933
|
access: "create"
|
|
43490
43934
|
},
|
|
43935
|
+
"coreBlocks.updateComposition": {
|
|
43936
|
+
capName: "core-blocks",
|
|
43937
|
+
capScope: "system",
|
|
43938
|
+
addonId: null,
|
|
43939
|
+
access: "create"
|
|
43940
|
+
},
|
|
43941
|
+
"coreBlocks.validateComposition": {
|
|
43942
|
+
capName: "core-blocks",
|
|
43943
|
+
capScope: "system",
|
|
43944
|
+
addonId: null,
|
|
43945
|
+
access: "view"
|
|
43946
|
+
},
|
|
43491
43947
|
"cover.close": {
|
|
43492
43948
|
capName: "cover",
|
|
43493
43949
|
capScope: "device",
|
|
@@ -54115,6 +54571,43 @@ async function readClusterModelPinStrict(api, stepId) {
|
|
|
54115
54571
|
reason: choice.reason
|
|
54116
54572
|
};
|
|
54117
54573
|
}
|
|
54574
|
+
var APPLE_MOBILECLIP_AMLR = {
|
|
54575
|
+
weights: "LicenseRef-Apple-AMLR",
|
|
54576
|
+
code: "MIT",
|
|
54577
|
+
upstream: {
|
|
54578
|
+
name: "Apple ml-mobileclip",
|
|
54579
|
+
url: "https://github.com/apple/ml-mobileclip"
|
|
54580
|
+
},
|
|
54581
|
+
url: "https://github.com/apple/ml-mobileclip/blob/main/LICENSE_MODELS",
|
|
54582
|
+
attribution: "Apple Machine Learning Research Model is licensed under the Apple Machine Learning Research Model License Agreement.",
|
|
54583
|
+
modifications: "model derivative: vision encoders converted to OpenVINO IR and CoreML FP16",
|
|
54584
|
+
hosting: "camstack-hf",
|
|
54585
|
+
nonCommercial: true
|
|
54586
|
+
};
|
|
54587
|
+
var APPLE_MOBILECLIP_TEXT_AMLR = {
|
|
54588
|
+
...APPLE_MOBILECLIP_AMLR,
|
|
54589
|
+
modifications: "model derivative: text encoders quantised to INT8 ONNX and converted to OpenVINO IR"
|
|
54590
|
+
};
|
|
54591
|
+
var SIGLIP2_APACHE = {
|
|
54592
|
+
weights: "Apache-2.0",
|
|
54593
|
+
code: "Apache-2.0",
|
|
54594
|
+
data: {
|
|
54595
|
+
name: "WebLI",
|
|
54596
|
+
terms: "Google internal, not released"
|
|
54597
|
+
},
|
|
54598
|
+
upstream: {
|
|
54599
|
+
name: "Google SigLIP 2 (google/siglip2-base-patch16-224)",
|
|
54600
|
+
url: "https://huggingface.co/google/siglip2-base-patch16-224"
|
|
54601
|
+
},
|
|
54602
|
+
url: "https://huggingface.co/google/siglip2-base-patch16-224",
|
|
54603
|
+
attribution: "SigLIP 2 © Google LLC, Apache-2.0.",
|
|
54604
|
+
modifications: "input scaling y = 2x - 1 baked ahead of the patch embedding; converted to OpenVINO IR and CoreML FP16, an FP32 ONNX hosted as the verification reference (scripts/build-siglip2-model.py)",
|
|
54605
|
+
hosting: "camstack-hf"
|
|
54606
|
+
};
|
|
54607
|
+
var SIGLIP2_TEXT_APACHE = {
|
|
54608
|
+
...SIGLIP2_APACHE,
|
|
54609
|
+
modifications: "input sliced to the model's 64 positions in the graph; ONNX weights FP16, OpenVINO IR and CoreML FP16; a Lowercase normalizer prepended to the Gemma tokenizer (scripts/build-siglip2-model.py)"
|
|
54610
|
+
};
|
|
54118
54611
|
//#endregion
|
|
54119
54612
|
//#region src/embedding-encoder/catalogs/embedding-models.ts
|
|
54120
54613
|
var HF_REPO = "camstack/camstack-models";
|
|
@@ -54190,6 +54683,7 @@ var SIGLIP2_META = {
|
|
|
54190
54683
|
var CLIP_IMAGE_MODELS = [
|
|
54191
54684
|
{
|
|
54192
54685
|
id: "mobileclip-s1",
|
|
54686
|
+
license: APPLE_MOBILECLIP_AMLR,
|
|
54193
54687
|
name: "MobileCLIP S1",
|
|
54194
54688
|
description: "Apple MobileCLIP S1 — balanced vision encoder, 512-dim, 256×256 (fp16 OpenVINO/CoreML)",
|
|
54195
54689
|
inputSize: {
|
|
@@ -54212,6 +54706,7 @@ var CLIP_IMAGE_MODELS = [
|
|
|
54212
54706
|
},
|
|
54213
54707
|
{
|
|
54214
54708
|
id: "mobileclip-s2",
|
|
54709
|
+
license: APPLE_MOBILECLIP_AMLR,
|
|
54215
54710
|
name: "MobileCLIP S2",
|
|
54216
54711
|
description: "Apple MobileCLIP S2 — high-accuracy vision encoder, 512-dim, 256×256 (fp16 OpenVINO/CoreML)",
|
|
54217
54712
|
inputSize: {
|
|
@@ -54234,6 +54729,7 @@ var CLIP_IMAGE_MODELS = [
|
|
|
54234
54729
|
},
|
|
54235
54730
|
{
|
|
54236
54731
|
id: "siglip2-b16-224",
|
|
54732
|
+
license: SIGLIP2_APACHE,
|
|
54237
54733
|
name: "SigLIP2 B/16",
|
|
54238
54734
|
description: "Google SigLIP2 base, patch 16, 224×224 — Apache-2.0 vision encoder, 768-dim (fp16 OpenVINO/CoreML)",
|
|
54239
54735
|
inputSize: {
|
|
@@ -54242,7 +54738,6 @@ var CLIP_IMAGE_MODELS = [
|
|
|
54242
54738
|
},
|
|
54243
54739
|
labels: [],
|
|
54244
54740
|
inputNormalization: "none",
|
|
54245
|
-
license: "Apache-2.0",
|
|
54246
54741
|
clip: SIGLIP2_META,
|
|
54247
54742
|
formats: {
|
|
54248
54743
|
openvino: ovFormat(hf("clip/siglip2/openvino/camstack-siglip2-b16-224-vision.xml"), 186),
|
|
@@ -54266,6 +54761,7 @@ var CLIP_IMAGE_MODELS = [
|
|
|
54266
54761
|
var CLIP_TEXT_MODELS = [
|
|
54267
54762
|
{
|
|
54268
54763
|
id: "mobileclip-s1-text",
|
|
54764
|
+
license: APPLE_MOBILECLIP_TEXT_AMLR,
|
|
54269
54765
|
name: "MobileCLIP S1 Text Encoder",
|
|
54270
54766
|
description: "Text encoder for MobileCLIP S1, 512-dim, int8 quantized (61 MB)",
|
|
54271
54767
|
inputSize: {
|
|
@@ -54284,6 +54780,7 @@ var CLIP_TEXT_MODELS = [
|
|
|
54284
54780
|
},
|
|
54285
54781
|
{
|
|
54286
54782
|
id: "mobileclip-s2-text",
|
|
54783
|
+
license: APPLE_MOBILECLIP_TEXT_AMLR,
|
|
54287
54784
|
name: "MobileCLIP S2 Text Encoder",
|
|
54288
54785
|
description: "Text encoder for MobileCLIP S2, 512-dim, int8 quantized (61 MB)",
|
|
54289
54786
|
inputSize: {
|
|
@@ -54302,6 +54799,7 @@ var CLIP_TEXT_MODELS = [
|
|
|
54302
54799
|
},
|
|
54303
54800
|
{
|
|
54304
54801
|
id: "siglip2-b16-224-text",
|
|
54802
|
+
license: SIGLIP2_TEXT_APACHE,
|
|
54305
54803
|
name: "SigLIP2 B/16 Text Encoder",
|
|
54306
54804
|
description: "Text encoder for SigLIP2 B/16, 768-dim, fp16 (565 MB)",
|
|
54307
54805
|
inputSize: {
|
|
@@ -54309,7 +54807,6 @@ var CLIP_TEXT_MODELS = [
|
|
|
54309
54807
|
height: 0
|
|
54310
54808
|
},
|
|
54311
54809
|
labels: [],
|
|
54312
|
-
license: "Apache-2.0",
|
|
54313
54810
|
formats: {
|
|
54314
54811
|
onnx: {
|
|
54315
54812
|
url: hf("clip/siglip2/onnx/camstack-siglip2-b16-224-text.onnx"),
|