@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
|
@@ -10174,6 +10174,48 @@ var ModelProviderIdSchema = _enum([
|
|
|
10174
10174
|
"scrypted",
|
|
10175
10175
|
"custom"
|
|
10176
10176
|
]);
|
|
10177
|
+
/**
|
|
10178
|
+
* The licence of a model, as a record rather than a bare SPDX string: a
|
|
10179
|
+
* permissive CODE licence routinely sits on top of restrictive WEIGHTS or
|
|
10180
|
+
* DATA, and the obligations (attribution, modification notices, source offers)
|
|
10181
|
+
* are per upstream. A persisted custom-model row written when this field was a
|
|
10182
|
+
* string still parses — the string is lifted into `{ weights }`.
|
|
10183
|
+
*
|
|
10184
|
+
* Every licence surface (the admin "Models and licenses" page,
|
|
10185
|
+
* `THIRD_PARTY_MODELS.md`, the Hugging Face model table) is GENERATED from
|
|
10186
|
+
* these records by `scripts/gen-model-licenses.ts` (D661).
|
|
10187
|
+
*/
|
|
10188
|
+
var ModelLicenseSchema = preprocess((value) => typeof value === "string" ? { weights: value } : value, object({
|
|
10189
|
+
/** SPDX id of the WEIGHTS' terms, a `LicenseRef-*` for non-SPDX terms, or `UNKNOWN`. */
|
|
10190
|
+
weights: string().min(1),
|
|
10191
|
+
/** SPDX id of the upstream code that defines / trained the network. */
|
|
10192
|
+
code: string().min(1).optional(),
|
|
10193
|
+
/** Training data whose terms add obligations (attribution, non-commercial). */
|
|
10194
|
+
data: object({
|
|
10195
|
+
name: string().min(1),
|
|
10196
|
+
terms: string().min(1),
|
|
10197
|
+
url: string().url().optional()
|
|
10198
|
+
}).optional(),
|
|
10199
|
+
/** The project the weights come from. Required on built-in entries (guard). */
|
|
10200
|
+
upstream: object({
|
|
10201
|
+
name: string().min(1),
|
|
10202
|
+
url: string().url()
|
|
10203
|
+
}).optional(),
|
|
10204
|
+
/** Where the licence text governing the weights is published. */
|
|
10205
|
+
url: string().url().optional(),
|
|
10206
|
+
/** Attribution the licence REQUIRES, verbatim. */
|
|
10207
|
+
attribution: string().min(1).optional(),
|
|
10208
|
+
/** What CamStack changed. Required when `hosting` is `camstack-hf` (guard). */
|
|
10209
|
+
modifications: string().min(1).optional(),
|
|
10210
|
+
/** Who serves the file a node downloads. */
|
|
10211
|
+
hosting: _enum([
|
|
10212
|
+
"camstack-hf",
|
|
10213
|
+
"third-party",
|
|
10214
|
+
"built-in"
|
|
10215
|
+
]).optional(),
|
|
10216
|
+
/** True when the weights or their data forbid commercial use. */
|
|
10217
|
+
nonCommercial: boolean().optional()
|
|
10218
|
+
}));
|
|
10177
10219
|
var ModelCatalogEntrySchema = object({
|
|
10178
10220
|
id: string(),
|
|
10179
10221
|
name: string(),
|
|
@@ -10229,6 +10271,16 @@ var ModelCatalogEntrySchema = object({
|
|
|
10229
10271
|
*/
|
|
10230
10272
|
postprocessor: custom().optional(),
|
|
10231
10273
|
/**
|
|
10274
|
+
* Per-MODEL default confidence floor. Absent ⇒ the step's
|
|
10275
|
+
* `StepDefinition.defaultConfidence` applies. A score is a property of one
|
|
10276
|
+
* model's output scale, not of the step slot it sits in: YuNet's
|
|
10277
|
+
* `sqrt(cls·obj)` is not SCRFD's score, and inheriting SCRFD's 0.5 filled the
|
|
10278
|
+
* face gallery with wheels and hands (D662, amends D645). An operator's
|
|
10279
|
+
* explicit value still wins over it. Resolved in ONE place —
|
|
10280
|
+
* `addon-pipeline/.../registry/effective-confidence.ts`.
|
|
10281
|
+
*/
|
|
10282
|
+
defaultConfidence: number().min(0).max(1).optional(),
|
|
10283
|
+
/**
|
|
10232
10284
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
10233
10285
|
* onto the canonical template) before this step runs, instead of a plain
|
|
10234
10286
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -10262,11 +10314,11 @@ var ModelCatalogEntrySchema = object({
|
|
|
10262
10314
|
p95LatencyMs: record(string(), number()).optional()
|
|
10263
10315
|
}).optional(),
|
|
10264
10316
|
/**
|
|
10265
|
-
*
|
|
10266
|
-
*
|
|
10267
|
-
*
|
|
10317
|
+
* The model's licence record — see {@link ModelLicenseSchema}. Optional in
|
|
10318
|
+
* the schema (a custom model's author may state none); REQUIRED and complete
|
|
10319
|
+
* on every built-in catalog entry (`scripts/check-catalog-licence.ts`).
|
|
10268
10320
|
*/
|
|
10269
|
-
license:
|
|
10321
|
+
license: ModelLicenseSchema.optional(),
|
|
10270
10322
|
/**
|
|
10271
10323
|
* Variant-selector grouping. The UI groups models by `family` + `tier` and
|
|
10272
10324
|
* offers `precision` / `optimization` as variant axes WITHIN a tier — so all
|
|
@@ -10361,23 +10413,6 @@ var ExpressionEvalError = class extends Error {
|
|
|
10361
10413
|
this.name = "ExpressionEvalError";
|
|
10362
10414
|
}
|
|
10363
10415
|
};
|
|
10364
|
-
/**
|
|
10365
|
-
* Frozen, null-prototype builtin function table for the expression engine
|
|
10366
|
-
* (spec §4 rule 4). The table is the SOLE surface of callable functions: the
|
|
10367
|
-
* parser rejects any callee not in it, and the evaluator gates each call on an
|
|
10368
|
-
* own-property check against it.
|
|
10369
|
-
*
|
|
10370
|
-
* Because the object has a NULL prototype AND is `Object.freeze`d:
|
|
10371
|
-
* - it cannot be polluted (no `__proto__` / `constructor` write reaches it);
|
|
10372
|
-
* - a lookup for `toString` / `hasOwnProperty` / `constructor` finds NOTHING
|
|
10373
|
-
* (there is no `Object.prototype` in the chain), so those names are not
|
|
10374
|
-
* callable — they are simply "unknown function" at parse time.
|
|
10375
|
-
*
|
|
10376
|
-
* Every numeric argument is validated as a finite number and every numeric
|
|
10377
|
-
* RESULT is re-checked finite, so `/0`, `sqrt(-1)` (→ NaN) and overflow
|
|
10378
|
-
* (`pow(10,400)` → Infinity) all raise `ExpressionEvalError` and fail the link
|
|
10379
|
-
* closed rather than emitting a garbage value.
|
|
10380
|
-
*/
|
|
10381
10416
|
function asFiniteNumber(value, name, index) {
|
|
10382
10417
|
if (typeof value !== "number" || !Number.isFinite(value)) throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a finite number`);
|
|
10383
10418
|
return value;
|
|
@@ -10393,6 +10428,10 @@ function finiteResult(value, name) {
|
|
|
10393
10428
|
function allFiniteNumbers(args, name) {
|
|
10394
10429
|
return args.map((a, idx) => asFiniteNumber(a, name, idx));
|
|
10395
10430
|
}
|
|
10431
|
+
function asBoolean$1(value, name, index) {
|
|
10432
|
+
if (typeof value !== "boolean") throw new ExpressionEvalError(`${name}: argument ${index + 1} must be a boolean`);
|
|
10433
|
+
return value;
|
|
10434
|
+
}
|
|
10396
10435
|
var INF = Number.POSITIVE_INFINITY;
|
|
10397
10436
|
var table = {
|
|
10398
10437
|
min: {
|
|
@@ -10493,6 +10532,40 @@ var table = {
|
|
|
10493
10532
|
if (from === to) return x;
|
|
10494
10533
|
throw new ExpressionEvalError("convert: unit conversion table not installed");
|
|
10495
10534
|
}
|
|
10535
|
+
},
|
|
10536
|
+
any: {
|
|
10537
|
+
minArgs: 1,
|
|
10538
|
+
maxArgs: INF,
|
|
10539
|
+
apply: (args) => args.map((a, i) => asBoolean$1(a, "any", i)).some((b) => b)
|
|
10540
|
+
},
|
|
10541
|
+
all: {
|
|
10542
|
+
minArgs: 1,
|
|
10543
|
+
maxArgs: INF,
|
|
10544
|
+
apply: (args) => args.map((a, i) => asBoolean$1(a, "all", i)).every((b) => b)
|
|
10545
|
+
},
|
|
10546
|
+
within: {
|
|
10547
|
+
minArgs: 2,
|
|
10548
|
+
maxArgs: 2,
|
|
10549
|
+
apply: (args, hooks) => {
|
|
10550
|
+
const windowMs = asFiniteNumber(args[1], "within", 1);
|
|
10551
|
+
if (windowMs < 0) throw new ExpressionEvalError("within: the window must not be negative");
|
|
10552
|
+
const at = args[0];
|
|
10553
|
+
if (at === null) return false;
|
|
10554
|
+
const ts = asFiniteNumber(at, "within", 0);
|
|
10555
|
+
const now = hooks.now;
|
|
10556
|
+
if (now === void 0 || !Number.isFinite(now)) throw new ExpressionEvalError("within: no clock was supplied to this evaluation");
|
|
10557
|
+
const inside = now - ts <= windowMs;
|
|
10558
|
+
if (inside) hooks.noteDeadline?.(ts + windowMs + 1);
|
|
10559
|
+
return inside;
|
|
10560
|
+
}
|
|
10561
|
+
},
|
|
10562
|
+
latest: {
|
|
10563
|
+
minArgs: 1,
|
|
10564
|
+
maxArgs: INF,
|
|
10565
|
+
apply: (args) => {
|
|
10566
|
+
const present = args.flatMap((a, i) => a === null ? [] : [asFiniteNumber(a, "latest", i)]);
|
|
10567
|
+
return present.length === 0 ? null : finiteResult(Math.max(...present), "latest");
|
|
10568
|
+
}
|
|
10496
10569
|
}
|
|
10497
10570
|
};
|
|
10498
10571
|
Object.freeze(Object.assign(Object.create(null), table));
|
|
@@ -11107,7 +11180,7 @@ var AutomationActionSchema = discriminatedUnion("kind", [
|
|
|
11107
11180
|
code: string().min(1).max(2e4)
|
|
11108
11181
|
})
|
|
11109
11182
|
]);
|
|
11110
|
-
object({
|
|
11183
|
+
var AutomationRecipeSchema = object({
|
|
11111
11184
|
triggers: array(AutomationTriggerSchema),
|
|
11112
11185
|
conditions: AutomationConditionSchema.optional(),
|
|
11113
11186
|
actions: array(AutomationActionSchema)
|
|
@@ -13283,6 +13356,195 @@ var cameraStreamsCapability = {
|
|
|
13283
13356
|
function kebabToCamel(s) {
|
|
13284
13357
|
return s.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
13285
13358
|
}
|
|
13359
|
+
/** A composed device's stableId is this prefix plus the block id. */
|
|
13360
|
+
var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
|
|
13361
|
+
/** Longest snippet a `code` source may carry (slice 4). */
|
|
13362
|
+
var MAX_COMPOSITION_CODE_LENGTH = 2e4;
|
|
13363
|
+
var CompositionSourceRefSchema = object({
|
|
13364
|
+
/** The owning addon; `stableId` is unique only within it. */
|
|
13365
|
+
addonId: string().min(1),
|
|
13366
|
+
stableId: string().min(1)
|
|
13367
|
+
});
|
|
13368
|
+
/** One field of one capability of one source device. */
|
|
13369
|
+
var CompositionFieldReadSchema = object({
|
|
13370
|
+
source: CompositionSourceRefSchema,
|
|
13371
|
+
cap: string().min(1),
|
|
13372
|
+
/** Dotted path into the source cap's runtime-state slice. */
|
|
13373
|
+
fieldPath: string().min(1)
|
|
13374
|
+
});
|
|
13375
|
+
/** `from`: copy one source field verbatim. It is also an expression's `from` binding. */
|
|
13376
|
+
var CompositionFromSourceSchema = CompositionFieldReadSchema.extend({ kind: literal("from") });
|
|
13377
|
+
var CompositionBindingSchema = discriminatedUnion("kind", [CompositionFromSourceSchema, object({
|
|
13378
|
+
kind: literal("literal"),
|
|
13379
|
+
value: union([
|
|
13380
|
+
string(),
|
|
13381
|
+
number(),
|
|
13382
|
+
boolean(),
|
|
13383
|
+
_null()
|
|
13384
|
+
])
|
|
13385
|
+
})]);
|
|
13386
|
+
/**
|
|
13387
|
+
* `expression`: a formula over named bindings, in the salvaged expression
|
|
13388
|
+
* engine. Validated at parse by the SAME function every other consumer runs,
|
|
13389
|
+
* so the editor and the store cannot disagree.
|
|
13390
|
+
*/
|
|
13391
|
+
var CompositionExpressionSourceSchema = object({
|
|
13392
|
+
kind: literal("expression"),
|
|
13393
|
+
expr: string().min(1).max(MAX_EXPRESSION_SOURCE_LENGTH),
|
|
13394
|
+
bindings: record(string().regex(EXPRESSION_IDENTIFIER_RE), CompositionBindingSchema)
|
|
13395
|
+
}).superRefine((src, ctx) => {
|
|
13396
|
+
const err = validateExpressionSource(src);
|
|
13397
|
+
if (err !== null) ctx.addIssue({
|
|
13398
|
+
code: "custom",
|
|
13399
|
+
message: err,
|
|
13400
|
+
path: ["expr"]
|
|
13401
|
+
});
|
|
13402
|
+
});
|
|
13403
|
+
/** `code`: RESERVED for slice 4 (own runner, one-way eject). */
|
|
13404
|
+
var CompositionCodeSourceSchema = object({
|
|
13405
|
+
kind: literal("code"),
|
|
13406
|
+
code: string().min(1).max(MAX_COMPOSITION_CODE_LENGTH)
|
|
13407
|
+
});
|
|
13408
|
+
var CompositionFieldSourceSchema = discriminatedUnion("kind", [
|
|
13409
|
+
CompositionFromSourceSchema,
|
|
13410
|
+
CompositionExpressionSourceSchema,
|
|
13411
|
+
CompositionCodeSourceSchema
|
|
13412
|
+
]);
|
|
13413
|
+
var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
|
|
13414
|
+
kind: literal("forward"),
|
|
13415
|
+
source: CompositionSourceRefSchema,
|
|
13416
|
+
cap: string().min(1),
|
|
13417
|
+
method: string().min(1)
|
|
13418
|
+
}), CompositionCodeSourceSchema]);
|
|
13419
|
+
var CompositionFeatureSchema = discriminatedUnion("kind", [object({
|
|
13420
|
+
kind: literal("fields"),
|
|
13421
|
+
cap: string().min(1),
|
|
13422
|
+
fields: record(string().min(1), CompositionFieldSourceSchema).refine((fields) => Object.keys(fields).length <= 32, { message: `at most 32 fields per capability` }),
|
|
13423
|
+
/** RESERVED for slice 3; refused by the validator when non-empty. */
|
|
13424
|
+
commands: record(string().min(1), CompositionCommandTargetSchema).optional()
|
|
13425
|
+
}), object({
|
|
13426
|
+
kind: literal("passthrough"),
|
|
13427
|
+
cap: string().min(1),
|
|
13428
|
+
source: CompositionSourceRefSchema
|
|
13429
|
+
})]);
|
|
13430
|
+
var CompositionSchema = object({
|
|
13431
|
+
target: discriminatedUnion("kind", [object({
|
|
13432
|
+
kind: literal("new"),
|
|
13433
|
+
type: _enum(DeviceType),
|
|
13434
|
+
role: _enum(DeviceRole).optional()
|
|
13435
|
+
}), object({
|
|
13436
|
+
kind: literal("existing"),
|
|
13437
|
+
device: CompositionSourceRefSchema
|
|
13438
|
+
})]),
|
|
13439
|
+
features: array(CompositionFeatureSchema).min(1).max(16)
|
|
13440
|
+
}).superRefine((composition, ctx) => {
|
|
13441
|
+
const seen = /* @__PURE__ */ new Set();
|
|
13442
|
+
composition.features.forEach((feature, index) => {
|
|
13443
|
+
if (seen.has(feature.cap)) ctx.addIssue({
|
|
13444
|
+
code: "custom",
|
|
13445
|
+
message: `capability \`${feature.cap}\` is composed twice — one feature per capability`,
|
|
13446
|
+
path: [
|
|
13447
|
+
"features",
|
|
13448
|
+
index,
|
|
13449
|
+
"cap"
|
|
13450
|
+
]
|
|
13451
|
+
});
|
|
13452
|
+
seen.add(feature.cap);
|
|
13453
|
+
});
|
|
13454
|
+
});
|
|
13455
|
+
/** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
|
|
13456
|
+
var CompositionProblemSchema = object({
|
|
13457
|
+
code: _enum([
|
|
13458
|
+
"reserved-variant",
|
|
13459
|
+
"unknown-capability",
|
|
13460
|
+
"not-composable",
|
|
13461
|
+
"wrong-device-type",
|
|
13462
|
+
"has-commands",
|
|
13463
|
+
"unknown-field",
|
|
13464
|
+
"nested-field",
|
|
13465
|
+
"missing-field",
|
|
13466
|
+
"kind-mismatch",
|
|
13467
|
+
"may-be-null",
|
|
13468
|
+
"source-missing",
|
|
13469
|
+
"source-unreadable",
|
|
13470
|
+
"source-capability-missing",
|
|
13471
|
+
"source-field-unknown",
|
|
13472
|
+
"expression-invalid",
|
|
13473
|
+
"cycle",
|
|
13474
|
+
"duplicate-target"
|
|
13475
|
+
]),
|
|
13476
|
+
path: string(),
|
|
13477
|
+
message: string()
|
|
13478
|
+
});
|
|
13479
|
+
var CompositionFieldKindSchema = _enum([
|
|
13480
|
+
"string",
|
|
13481
|
+
"number",
|
|
13482
|
+
"boolean",
|
|
13483
|
+
"enum"
|
|
13484
|
+
]);
|
|
13485
|
+
/** How a field says "unavailable": `null` when its schema allows it, else the device goes offline (D393). */
|
|
13486
|
+
var CompositionUnavailableModeSchema = _enum(["null", "offline"]);
|
|
13487
|
+
/**
|
|
13488
|
+
* `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
|
|
13489
|
+
* field of its cap changes value · `constant` reads nothing, computed once.
|
|
13490
|
+
*/
|
|
13491
|
+
var CompositionFieldRoleSchema = _enum([
|
|
13492
|
+
"derived",
|
|
13493
|
+
"clock",
|
|
13494
|
+
"constant"
|
|
13495
|
+
]);
|
|
13496
|
+
var CompositionFieldPlanSchema = object({
|
|
13497
|
+
cap: string(),
|
|
13498
|
+
path: string(),
|
|
13499
|
+
/** Index into `composition.features` this field's capability came from —
|
|
13500
|
+
* lets a source/cycle problem name its path as `features[N].fields.<path>`
|
|
13501
|
+
* (the same convention `planComposition`'s own problems already use). */
|
|
13502
|
+
featureIndex: number().int().nonnegative(),
|
|
13503
|
+
kind: CompositionFieldKindSchema,
|
|
13504
|
+
nullable: boolean(),
|
|
13505
|
+
required: boolean(),
|
|
13506
|
+
unavailable: CompositionUnavailableModeSchema,
|
|
13507
|
+
role: CompositionFieldRoleSchema,
|
|
13508
|
+
source: CompositionFieldSourceSchema,
|
|
13509
|
+
reads: array(CompositionFieldReadSchema)
|
|
13510
|
+
});
|
|
13511
|
+
var CompositionValidationSchema = object({
|
|
13512
|
+
ok: boolean(),
|
|
13513
|
+
problems: array(CompositionProblemSchema),
|
|
13514
|
+
fields: array(CompositionFieldPlanSchema)
|
|
13515
|
+
});
|
|
13516
|
+
/** Mirrors `CoreBlockStatus`, pinned by `core-blocks-source.spec.ts` (Task 11). */
|
|
13517
|
+
var CompositionRunStatusSchema = _enum([
|
|
13518
|
+
"stopped",
|
|
13519
|
+
"starting",
|
|
13520
|
+
"running",
|
|
13521
|
+
"failed"
|
|
13522
|
+
]);
|
|
13523
|
+
var CompositionFieldStateKindSchema = _enum([
|
|
13524
|
+
"fresh",
|
|
13525
|
+
"stale",
|
|
13526
|
+
"unavailable"
|
|
13527
|
+
]);
|
|
13528
|
+
var CompositionFieldStateSchema = object({
|
|
13529
|
+
cap: string(),
|
|
13530
|
+
path: string(),
|
|
13531
|
+
state: CompositionFieldStateKindSchema,
|
|
13532
|
+
/** `null` whenever `state === 'unavailable'`; never a plausible stand-in (D393). */
|
|
13533
|
+
value: union([
|
|
13534
|
+
string(),
|
|
13535
|
+
number(),
|
|
13536
|
+
boolean(),
|
|
13537
|
+
_null()
|
|
13538
|
+
]),
|
|
13539
|
+
reason: string().optional()
|
|
13540
|
+
});
|
|
13541
|
+
var CompositionBlockStateSchema = object({
|
|
13542
|
+
blockId: string(),
|
|
13543
|
+
deviceId: number().nullable(),
|
|
13544
|
+
status: CompositionRunStatusSchema,
|
|
13545
|
+
reason: string().optional(),
|
|
13546
|
+
fields: array(CompositionFieldStateSchema)
|
|
13547
|
+
});
|
|
13286
13548
|
/** Where a block runs. The operator chooses — a block driving a device on an
|
|
13287
13549
|
* agent is the reason placement is not fixed to the hub. */
|
|
13288
13550
|
var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
|
|
@@ -13309,6 +13571,30 @@ var CoreBlockInputSchema = object({
|
|
|
13309
13571
|
*/
|
|
13310
13572
|
integrationId: string().optional()
|
|
13311
13573
|
});
|
|
13574
|
+
/**
|
|
13575
|
+
* What a block IS (D659). Absent means `code` — every row stored before this
|
|
13576
|
+
* union keeps working unchanged.
|
|
13577
|
+
* - `code`: the TypeScript in `code`, compiled and run in its own runner;
|
|
13578
|
+
* - `recipe`: RESERVED (automations), stored shape only; refused at run by name;
|
|
13579
|
+
* - `composition`: declarative, run by the shared `composer`; `code` is `''`.
|
|
13580
|
+
*/
|
|
13581
|
+
var CoreBlockSourceSchema = discriminatedUnion("kind", [
|
|
13582
|
+
object({ kind: literal("code") }),
|
|
13583
|
+
object({
|
|
13584
|
+
kind: literal("recipe"),
|
|
13585
|
+
recipe: AutomationRecipeSchema
|
|
13586
|
+
}),
|
|
13587
|
+
object({
|
|
13588
|
+
kind: literal("composition"),
|
|
13589
|
+
composition: CompositionSchema
|
|
13590
|
+
})
|
|
13591
|
+
]);
|
|
13592
|
+
/** The client-authored half of a composition block. No `code`, no placement (hub-only; Phase 7). */
|
|
13593
|
+
var CompositionBlockInputSchema = object({
|
|
13594
|
+
name: string().min(1).max(120),
|
|
13595
|
+
enabled: boolean(),
|
|
13596
|
+
composition: CompositionSchema
|
|
13597
|
+
});
|
|
13312
13598
|
/** A stored block. */
|
|
13313
13599
|
var CoreBlockSchema = CoreBlockInputSchema.extend({
|
|
13314
13600
|
id: string(),
|
|
@@ -13324,8 +13610,38 @@ var CoreBlockSchema = CoreBlockInputSchema.extend({
|
|
|
13324
13610
|
*/
|
|
13325
13611
|
lastError: string().optional(),
|
|
13326
13612
|
/** Ms epoch of the last state change. */
|
|
13327
|
-
lastChangedAt: number()
|
|
13613
|
+
lastChangedAt: number(),
|
|
13614
|
+
/** What the block is. Absent means `code` (D659). */
|
|
13615
|
+
source: CoreBlockSourceSchema.optional()
|
|
13616
|
+
});
|
|
13617
|
+
/** A stored composition block and what the composer says about it. */
|
|
13618
|
+
var CompositionViewSchema = object({
|
|
13619
|
+
block: CoreBlockSchema,
|
|
13620
|
+
state: discriminatedUnion("kind", [object({
|
|
13621
|
+
kind: literal("answered"),
|
|
13622
|
+
state: CompositionBlockStateSchema.nullable()
|
|
13623
|
+
}), object({
|
|
13624
|
+
kind: literal("unreachable"),
|
|
13625
|
+
error: string()
|
|
13626
|
+
})])
|
|
13627
|
+
});
|
|
13628
|
+
/**
|
|
13629
|
+
* A read of the stored compositions. `not-loaded` while the `core_blocks`
|
|
13630
|
+
* table has not been READ: an empty answer then would make "not yet known"
|
|
13631
|
+
* look like "none", and invite the operator to recreate what exists (D315).
|
|
13632
|
+
*/
|
|
13633
|
+
var CompositionsNotLoadedSchema = object({
|
|
13634
|
+
state: literal("not-loaded"),
|
|
13635
|
+
reason: string()
|
|
13328
13636
|
});
|
|
13637
|
+
var CompositionListReadSchema = discriminatedUnion("state", [object({
|
|
13638
|
+
state: literal("loaded"),
|
|
13639
|
+
views: array(CompositionViewSchema)
|
|
13640
|
+
}), CompositionsNotLoadedSchema]);
|
|
13641
|
+
var CompositionGetReadSchema = discriminatedUnion("state", [object({
|
|
13642
|
+
state: literal("loaded"),
|
|
13643
|
+
view: CompositionViewSchema.nullable()
|
|
13644
|
+
}), CompositionsNotLoadedSchema]);
|
|
13329
13645
|
/** What a compile attempt produced. */
|
|
13330
13646
|
var CoreBlockCompileResultSchema = object({
|
|
13331
13647
|
ok: boolean(),
|
|
@@ -13363,7 +13679,72 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
|
|
|
13363
13679
|
}), method(object({}), object({ libs: array(object({
|
|
13364
13680
|
filePath: string(),
|
|
13365
13681
|
content: string()
|
|
13366
|
-
})) }), { auth: "admin" })
|
|
13682
|
+
})) }), { auth: "admin" }), method(object({ block: CompositionBlockInputSchema }), object({ block: CoreBlockSchema }), {
|
|
13683
|
+
kind: "mutation",
|
|
13684
|
+
auth: "admin",
|
|
13685
|
+
caller: "required"
|
|
13686
|
+
}), method(object({
|
|
13687
|
+
blockId: string(),
|
|
13688
|
+
expectedUpdatedAt: number(),
|
|
13689
|
+
block: CompositionBlockInputSchema.partial()
|
|
13690
|
+
}), object({ block: CoreBlockSchema }), {
|
|
13691
|
+
kind: "mutation",
|
|
13692
|
+
auth: "admin",
|
|
13693
|
+
caller: "required"
|
|
13694
|
+
}), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
|
|
13695
|
+
composition: CompositionSchema,
|
|
13696
|
+
blockId: string().optional()
|
|
13697
|
+
}), CompositionValidationSchema, {
|
|
13698
|
+
kind: "mutation",
|
|
13699
|
+
auth: "admin",
|
|
13700
|
+
access: "view"
|
|
13701
|
+
});
|
|
13702
|
+
var ComposerBlockSchema = object({
|
|
13703
|
+
id: string().min(1),
|
|
13704
|
+
name: string().min(1).max(120),
|
|
13705
|
+
enabled: boolean(),
|
|
13706
|
+
updatedAt: number(),
|
|
13707
|
+
composition: CompositionSchema
|
|
13708
|
+
});
|
|
13709
|
+
/**
|
|
13710
|
+
* A stored composition row that no longer PARSES — a schema a release
|
|
13711
|
+
* tightened, a row written by a newer build. Sent by id so the composer keeps
|
|
13712
|
+
* its device as a placeholder and reports the block `failed` naming the parse
|
|
13713
|
+
* error. Leaving it out would read, twice, exactly like a delete (D49).
|
|
13714
|
+
*/
|
|
13715
|
+
var ComposerUnreadableBlockSchema = object({
|
|
13716
|
+
id: string().min(1),
|
|
13717
|
+
/** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
|
|
13718
|
+
name: string().nullable(),
|
|
13719
|
+
/** The parse error, in the operator's words. */
|
|
13720
|
+
error: string()
|
|
13721
|
+
});
|
|
13722
|
+
method(object({
|
|
13723
|
+
/** The shared Blocks integration; null until `core-blocks` has reconciled it. */
|
|
13724
|
+
integrationId: string().nullable(),
|
|
13725
|
+
/** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
|
|
13726
|
+
storeLoaded: boolean(),
|
|
13727
|
+
blocks: array(ComposerBlockSchema),
|
|
13728
|
+
/** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
|
|
13729
|
+
restartBlockIds: array(string()),
|
|
13730
|
+
/** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
|
|
13731
|
+
unreadableBlocks: array(ComposerUnreadableBlockSchema)
|
|
13732
|
+
}), object({
|
|
13733
|
+
blocks: array(object({
|
|
13734
|
+
blockId: string(),
|
|
13735
|
+
status: CompositionRunStatusSchema,
|
|
13736
|
+
reason: string().optional()
|
|
13737
|
+
})),
|
|
13738
|
+
/**
|
|
13739
|
+
* False when the composer declared and withdrew NOTHING (store not loaded,
|
|
13740
|
+
* integration unknown, its own rows unread or read empty once). An empty
|
|
13741
|
+
* apply the caller owes is paid off only by one the composer acted on (D49).
|
|
13742
|
+
*/
|
|
13743
|
+
acted: boolean()
|
|
13744
|
+
}), {
|
|
13745
|
+
kind: "mutation",
|
|
13746
|
+
auth: "admin"
|
|
13747
|
+
}), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
|
|
13367
13748
|
/**
|
|
13368
13749
|
* `custom-model-registry` — collection cap exposing operator-registered
|
|
13369
13750
|
* custom detection models. Each provider (today: `addon-model-studio`)
|
|
@@ -19407,8 +19788,8 @@ var NcTestResultSchema = object({
|
|
|
19407
19788
|
className: string().optional(),
|
|
19408
19789
|
label: string().optional()
|
|
19409
19790
|
});
|
|
19410
|
-
/** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
|
|
19411
|
-
*
|
|
19791
|
+
/** The rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts` is
|
|
19792
|
+
* `z.infer` of this schema — one shape, no twin. `mixed` is DERIVED
|
|
19412
19793
|
* (a stored system rule whose kinds span families, D637) and never authored. */
|
|
19413
19794
|
var NcRuleKindSchema = _enum([
|
|
19414
19795
|
"detection",
|
|
@@ -24040,7 +24421,8 @@ var PipelineModelOptionSchema = object({
|
|
|
24040
24421
|
})),
|
|
24041
24422
|
group: ModelVariantGroupSchema.optional(),
|
|
24042
24423
|
legacy: boolean().optional(),
|
|
24043
|
-
provider: ModelProviderIdSchema.optional()
|
|
24424
|
+
provider: ModelProviderIdSchema.optional(),
|
|
24425
|
+
defaultConfidence: number().optional()
|
|
24044
24426
|
});
|
|
24045
24427
|
var ConfigFieldBridge = custom();
|
|
24046
24428
|
var PipelineAddonSchemaSchema = object({
|
|
@@ -39954,6 +40336,38 @@ var zoneRulesCapability = {
|
|
|
39954
40336
|
*/
|
|
39955
40337
|
durability: "restored"
|
|
39956
40338
|
};
|
|
40339
|
+
var NUMBER = {
|
|
40340
|
+
kind: "fixed",
|
|
40341
|
+
result: ["number"]
|
|
40342
|
+
};
|
|
40343
|
+
var BOOLEAN = {
|
|
40344
|
+
kind: "fixed",
|
|
40345
|
+
result: ["boolean"]
|
|
40346
|
+
};
|
|
40347
|
+
Object.freeze({
|
|
40348
|
+
min: NUMBER,
|
|
40349
|
+
max: NUMBER,
|
|
40350
|
+
abs: NUMBER,
|
|
40351
|
+
floor: NUMBER,
|
|
40352
|
+
ceil: NUMBER,
|
|
40353
|
+
sqrt: NUMBER,
|
|
40354
|
+
round: NUMBER,
|
|
40355
|
+
pow: NUMBER,
|
|
40356
|
+
clamp: NUMBER,
|
|
40357
|
+
avg: NUMBER,
|
|
40358
|
+
sum: NUMBER,
|
|
40359
|
+
age: NUMBER,
|
|
40360
|
+
convert: NUMBER,
|
|
40361
|
+
coalesce: { kind: "coalesce" },
|
|
40362
|
+
any: BOOLEAN,
|
|
40363
|
+
all: BOOLEAN,
|
|
40364
|
+
within: BOOLEAN,
|
|
40365
|
+
latest: {
|
|
40366
|
+
kind: "fixed",
|
|
40367
|
+
result: ["number", "null"]
|
|
40368
|
+
}
|
|
40369
|
+
});
|
|
40370
|
+
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
39957
40371
|
/**
|
|
39958
40372
|
* Most specific first. Extending this list is how a new device kind becomes
|
|
39959
40373
|
* gateable; nothing else needs to change.
|
|
@@ -43355,6 +43769,18 @@ Object.freeze({
|
|
|
43355
43769
|
addonId: null,
|
|
43356
43770
|
access: "create"
|
|
43357
43771
|
},
|
|
43772
|
+
"composer.applyBlocks": {
|
|
43773
|
+
capName: "composer",
|
|
43774
|
+
capScope: "system",
|
|
43775
|
+
addonId: null,
|
|
43776
|
+
access: "create"
|
|
43777
|
+
},
|
|
43778
|
+
"composer.getStates": {
|
|
43779
|
+
capName: "composer",
|
|
43780
|
+
capScope: "system",
|
|
43781
|
+
addonId: null,
|
|
43782
|
+
access: "view"
|
|
43783
|
+
},
|
|
43358
43784
|
"connectionTest.describeTest": {
|
|
43359
43785
|
capName: "connection-test",
|
|
43360
43786
|
capScope: "system",
|
|
@@ -43415,6 +43841,12 @@ Object.freeze({
|
|
|
43415
43841
|
addonId: null,
|
|
43416
43842
|
access: "create"
|
|
43417
43843
|
},
|
|
43844
|
+
"coreBlocks.createComposition": {
|
|
43845
|
+
capName: "core-blocks",
|
|
43846
|
+
capScope: "system",
|
|
43847
|
+
addonId: null,
|
|
43848
|
+
access: "create"
|
|
43849
|
+
},
|
|
43418
43850
|
"coreBlocks.delete": {
|
|
43419
43851
|
capName: "core-blocks",
|
|
43420
43852
|
capScope: "system",
|
|
@@ -43427,6 +43859,12 @@ Object.freeze({
|
|
|
43427
43859
|
addonId: null,
|
|
43428
43860
|
access: "view"
|
|
43429
43861
|
},
|
|
43862
|
+
"coreBlocks.getComposition": {
|
|
43863
|
+
capName: "core-blocks",
|
|
43864
|
+
capScope: "system",
|
|
43865
|
+
addonId: null,
|
|
43866
|
+
access: "view"
|
|
43867
|
+
},
|
|
43430
43868
|
"coreBlocks.getTypeDefs": {
|
|
43431
43869
|
capName: "core-blocks",
|
|
43432
43870
|
capScope: "system",
|
|
@@ -43439,6 +43877,12 @@ Object.freeze({
|
|
|
43439
43877
|
addonId: null,
|
|
43440
43878
|
access: "view"
|
|
43441
43879
|
},
|
|
43880
|
+
"coreBlocks.listCompositions": {
|
|
43881
|
+
capName: "core-blocks",
|
|
43882
|
+
capScope: "system",
|
|
43883
|
+
addonId: null,
|
|
43884
|
+
access: "view"
|
|
43885
|
+
},
|
|
43442
43886
|
"coreBlocks.restart": {
|
|
43443
43887
|
capName: "core-blocks",
|
|
43444
43888
|
capScope: "system",
|
|
@@ -43457,6 +43901,18 @@ Object.freeze({
|
|
|
43457
43901
|
addonId: null,
|
|
43458
43902
|
access: "create"
|
|
43459
43903
|
},
|
|
43904
|
+
"coreBlocks.updateComposition": {
|
|
43905
|
+
capName: "core-blocks",
|
|
43906
|
+
capScope: "system",
|
|
43907
|
+
addonId: null,
|
|
43908
|
+
access: "create"
|
|
43909
|
+
},
|
|
43910
|
+
"coreBlocks.validateComposition": {
|
|
43911
|
+
capName: "core-blocks",
|
|
43912
|
+
capScope: "system",
|
|
43913
|
+
addonId: null,
|
|
43914
|
+
access: "view"
|
|
43915
|
+
},
|
|
43460
43916
|
"cover.close": {
|
|
43461
43917
|
capName: "cover",
|
|
43462
43918
|
capScope: "device",
|
|
@@ -54084,6 +54540,43 @@ async function readClusterModelPinStrict(api, stepId) {
|
|
|
54084
54540
|
reason: choice.reason
|
|
54085
54541
|
};
|
|
54086
54542
|
}
|
|
54543
|
+
var APPLE_MOBILECLIP_AMLR = {
|
|
54544
|
+
weights: "LicenseRef-Apple-AMLR",
|
|
54545
|
+
code: "MIT",
|
|
54546
|
+
upstream: {
|
|
54547
|
+
name: "Apple ml-mobileclip",
|
|
54548
|
+
url: "https://github.com/apple/ml-mobileclip"
|
|
54549
|
+
},
|
|
54550
|
+
url: "https://github.com/apple/ml-mobileclip/blob/main/LICENSE_MODELS",
|
|
54551
|
+
attribution: "Apple Machine Learning Research Model is licensed under the Apple Machine Learning Research Model License Agreement.",
|
|
54552
|
+
modifications: "model derivative: vision encoders converted to OpenVINO IR and CoreML FP16",
|
|
54553
|
+
hosting: "camstack-hf",
|
|
54554
|
+
nonCommercial: true
|
|
54555
|
+
};
|
|
54556
|
+
var APPLE_MOBILECLIP_TEXT_AMLR = {
|
|
54557
|
+
...APPLE_MOBILECLIP_AMLR,
|
|
54558
|
+
modifications: "model derivative: text encoders quantised to INT8 ONNX and converted to OpenVINO IR"
|
|
54559
|
+
};
|
|
54560
|
+
var SIGLIP2_APACHE = {
|
|
54561
|
+
weights: "Apache-2.0",
|
|
54562
|
+
code: "Apache-2.0",
|
|
54563
|
+
data: {
|
|
54564
|
+
name: "WebLI",
|
|
54565
|
+
terms: "Google internal, not released"
|
|
54566
|
+
},
|
|
54567
|
+
upstream: {
|
|
54568
|
+
name: "Google SigLIP 2 (google/siglip2-base-patch16-224)",
|
|
54569
|
+
url: "https://huggingface.co/google/siglip2-base-patch16-224"
|
|
54570
|
+
},
|
|
54571
|
+
url: "https://huggingface.co/google/siglip2-base-patch16-224",
|
|
54572
|
+
attribution: "SigLIP 2 © Google LLC, Apache-2.0.",
|
|
54573
|
+
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)",
|
|
54574
|
+
hosting: "camstack-hf"
|
|
54575
|
+
};
|
|
54576
|
+
var SIGLIP2_TEXT_APACHE = {
|
|
54577
|
+
...SIGLIP2_APACHE,
|
|
54578
|
+
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)"
|
|
54579
|
+
};
|
|
54087
54580
|
//#endregion
|
|
54088
54581
|
//#region src/embedding-encoder/catalogs/embedding-models.ts
|
|
54089
54582
|
var HF_REPO = "camstack/camstack-models";
|
|
@@ -54159,6 +54652,7 @@ var SIGLIP2_META = {
|
|
|
54159
54652
|
var CLIP_IMAGE_MODELS = [
|
|
54160
54653
|
{
|
|
54161
54654
|
id: "mobileclip-s1",
|
|
54655
|
+
license: APPLE_MOBILECLIP_AMLR,
|
|
54162
54656
|
name: "MobileCLIP S1",
|
|
54163
54657
|
description: "Apple MobileCLIP S1 — balanced vision encoder, 512-dim, 256×256 (fp16 OpenVINO/CoreML)",
|
|
54164
54658
|
inputSize: {
|
|
@@ -54181,6 +54675,7 @@ var CLIP_IMAGE_MODELS = [
|
|
|
54181
54675
|
},
|
|
54182
54676
|
{
|
|
54183
54677
|
id: "mobileclip-s2",
|
|
54678
|
+
license: APPLE_MOBILECLIP_AMLR,
|
|
54184
54679
|
name: "MobileCLIP S2",
|
|
54185
54680
|
description: "Apple MobileCLIP S2 — high-accuracy vision encoder, 512-dim, 256×256 (fp16 OpenVINO/CoreML)",
|
|
54186
54681
|
inputSize: {
|
|
@@ -54203,6 +54698,7 @@ var CLIP_IMAGE_MODELS = [
|
|
|
54203
54698
|
},
|
|
54204
54699
|
{
|
|
54205
54700
|
id: "siglip2-b16-224",
|
|
54701
|
+
license: SIGLIP2_APACHE,
|
|
54206
54702
|
name: "SigLIP2 B/16",
|
|
54207
54703
|
description: "Google SigLIP2 base, patch 16, 224×224 — Apache-2.0 vision encoder, 768-dim (fp16 OpenVINO/CoreML)",
|
|
54208
54704
|
inputSize: {
|
|
@@ -54211,7 +54707,6 @@ var CLIP_IMAGE_MODELS = [
|
|
|
54211
54707
|
},
|
|
54212
54708
|
labels: [],
|
|
54213
54709
|
inputNormalization: "none",
|
|
54214
|
-
license: "Apache-2.0",
|
|
54215
54710
|
clip: SIGLIP2_META,
|
|
54216
54711
|
formats: {
|
|
54217
54712
|
openvino: ovFormat(hf("clip/siglip2/openvino/camstack-siglip2-b16-224-vision.xml"), 186),
|
|
@@ -54235,6 +54730,7 @@ var CLIP_IMAGE_MODELS = [
|
|
|
54235
54730
|
var CLIP_TEXT_MODELS = [
|
|
54236
54731
|
{
|
|
54237
54732
|
id: "mobileclip-s1-text",
|
|
54733
|
+
license: APPLE_MOBILECLIP_TEXT_AMLR,
|
|
54238
54734
|
name: "MobileCLIP S1 Text Encoder",
|
|
54239
54735
|
description: "Text encoder for MobileCLIP S1, 512-dim, int8 quantized (61 MB)",
|
|
54240
54736
|
inputSize: {
|
|
@@ -54253,6 +54749,7 @@ var CLIP_TEXT_MODELS = [
|
|
|
54253
54749
|
},
|
|
54254
54750
|
{
|
|
54255
54751
|
id: "mobileclip-s2-text",
|
|
54752
|
+
license: APPLE_MOBILECLIP_TEXT_AMLR,
|
|
54256
54753
|
name: "MobileCLIP S2 Text Encoder",
|
|
54257
54754
|
description: "Text encoder for MobileCLIP S2, 512-dim, int8 quantized (61 MB)",
|
|
54258
54755
|
inputSize: {
|
|
@@ -54271,6 +54768,7 @@ var CLIP_TEXT_MODELS = [
|
|
|
54271
54768
|
},
|
|
54272
54769
|
{
|
|
54273
54770
|
id: "siglip2-b16-224-text",
|
|
54771
|
+
license: SIGLIP2_TEXT_APACHE,
|
|
54274
54772
|
name: "SigLIP2 B/16 Text Encoder",
|
|
54275
54773
|
description: "Text encoder for SigLIP2 B/16, 768-dim, fp16 (565 MB)",
|
|
54276
54774
|
inputSize: {
|
|
@@ -54278,7 +54776,6 @@ var CLIP_TEXT_MODELS = [
|
|
|
54278
54776
|
height: 0
|
|
54279
54777
|
},
|
|
54280
54778
|
labels: [],
|
|
54281
|
-
license: "Apache-2.0",
|
|
54282
54779
|
formats: {
|
|
54283
54780
|
onnx: {
|
|
54284
54781
|
url: hf("clip/siglip2/onnx/camstack-siglip2-b16-224-text.onnx"),
|