@camstack/addon-post-analysis 1.2.365 → 1.2.367

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (15) hide show
  1. package/dist/{clip-model-registry-CsJpPkau.js → clip-model-registry-4RExEITD.js} +396 -291
  2. package/dist/{clip-model-registry-BRXTB6Qa.mjs → clip-model-registry-vU1x2Lyf.mjs} +396 -291
  3. package/dist/embedding-encoder/index.js +1 -1
  4. package/dist/embedding-encoder/index.mjs +1 -1
  5. package/dist/pipeline-analytics/_stub.js +2 -2
  6. package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DUGlfHVc.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DQnRVBZI.mjs} +2 -2
  7. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-vq8Jf6ja.mjs +26 -0
  8. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-rBUOVUOg.mjs +26 -0
  9. package/dist/pipeline-analytics/{hostInit-DH-l3-BR.mjs → hostInit-D-t5Eh-v.mjs} +2 -2
  10. package/dist/pipeline-analytics/index.js +25 -3
  11. package/dist/pipeline-analytics/index.mjs +25 -3
  12. package/dist/pipeline-analytics/remoteEntry.js +1 -1
  13. package/package.json +1 -1
  14. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Cul2786X.mjs +0 -26
  15. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Duvan2CO.mjs +0 -26
@@ -10769,6 +10769,7 @@ var RETRAIN_REVIEW_STATUSES = [
10769
10769
  ];
10770
10770
  /** Two boxes this close on every edge are the same rectangle (an exact match). */
10771
10771
  var EXACT_EDGE_EPSILON = 1e-6;
10772
+ var optLabel = (label) => label !== void 0 ? { label } : {};
10772
10773
  /** Intersection over union of two normalised rectangles. */
10773
10774
  function retrainBoxIou(a, b) {
10774
10775
  const inter = Math.max(0, Math.min(a.x + a.w, b.x + b.w) - Math.max(a.x, b.x)) * Math.max(0, Math.min(a.y + a.h, b.y + b.h) - Math.max(a.y, b.y));
@@ -10778,13 +10779,13 @@ function retrainBoxIou(a, b) {
10778
10779
  function sameRect(a, b) {
10779
10780
  return Math.abs(a.x - b.x) <= EXACT_EDGE_EPSILON && Math.abs(a.y - b.y) <= EXACT_EDGE_EPSILON && Math.abs(a.w - b.w) <= EXACT_EDGE_EPSILON && Math.abs(a.h - b.h) <= EXACT_EDGE_EPSILON;
10780
10781
  }
10781
- function labelOf(value) {
10782
+ function labelField(value) {
10782
10783
  return value?.trim() ?? "";
10783
10784
  }
10784
10785
  /** Kept box versus its baseline: class/label first, then geometry. */
10785
10786
  function compareKept(saved, baseline, adjustedIou) {
10786
10787
  const iou = retrainBoxIou(saved.bbox, baseline.bbox);
10787
- if (saved.macroClass !== baseline.macroClass || labelOf(saved.label) !== labelOf(baseline.label)) return {
10788
+ if (saved.macroClass !== baseline.macroClass || labelField(saved.label) !== labelField(baseline.label)) return {
10788
10789
  status: "reclassified",
10789
10790
  iou
10790
10791
  };
@@ -10859,6 +10860,8 @@ function classifyRetrainReview(saved, origins, dismissed, opts = {}) {
10859
10860
  savedId: box.id,
10860
10861
  status: "model-error",
10861
10862
  approximate: false,
10863
+ macroClass: box.macroClass,
10864
+ ...optLabel(box.label),
10862
10865
  ...baseline !== null ? {
10863
10866
  origin: baseline,
10864
10867
  iou: retrainBoxIou(box.bbox, baseline.bbox)
@@ -10872,6 +10875,8 @@ function classifyRetrainReview(saved, origins, dismissed, opts = {}) {
10872
10875
  savedId: box.id,
10873
10876
  status: "added",
10874
10877
  approximate: approximate && baseline === null,
10878
+ macroClass: box.macroClass,
10879
+ ...optLabel(box.label),
10875
10880
  ...baseline !== null ? { origin: baseline } : {}
10876
10881
  });
10877
10882
  return;
@@ -10882,6 +10887,8 @@ function classifyRetrainReview(saved, origins, dismissed, opts = {}) {
10882
10887
  savedId: box.id,
10883
10888
  status: verdict.status,
10884
10889
  approximate,
10890
+ macroClass: box.macroClass,
10891
+ ...optLabel(box.label),
10885
10892
  origin: baseline,
10886
10893
  iou: verdict.iou
10887
10894
  });
@@ -10890,6 +10897,8 @@ function classifyRetrainReview(saved, origins, dismissed, opts = {}) {
10890
10897
  ref: entry.ref,
10891
10898
  status: "removed",
10892
10899
  approximate: false,
10900
+ macroClass: entry.snapshot.macroClass,
10901
+ ...optLabel(entry.snapshot.label),
10893
10902
  origin: entry.snapshot
10894
10903
  });
10895
10904
  if (opts.inferRemoved === true) for (const origin of origins) {
@@ -10898,6 +10907,8 @@ function classifyRetrainReview(saved, origins, dismissed, opts = {}) {
10898
10907
  ref: origin.ref,
10899
10908
  status: "removed",
10900
10909
  approximate: true,
10910
+ macroClass: origin.macroClass,
10911
+ ...optLabel(origin.label),
10901
10912
  origin
10902
10913
  });
10903
10914
  }
@@ -14267,6 +14278,329 @@ method(object({
14267
14278
  password: string()
14268
14279
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
14269
14280
  /**
14281
+ * Query filter for settings-store collections.
14282
+ */
14283
+ var QueryFilterSchema = object({
14284
+ where: record(string(), unknown()).optional(),
14285
+ whereIn: record(string(), array(unknown())).optional(),
14286
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
14287
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
14288
+ whereNot: record(string(), unknown()).optional(),
14289
+ /** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
14290
+ * empty list excludes nothing. See `QueryFilter.whereNotIn`. */
14291
+ whereNotIn: record(string(), array(unknown())).optional(),
14292
+ orderBy: object({
14293
+ field: string(),
14294
+ direction: _enum(["asc", "desc"])
14295
+ }).optional(),
14296
+ limit: number().optional(),
14297
+ offset: number().optional()
14298
+ });
14299
+ /**
14300
+ * The predicate half of a filter, for BULK MUTATIONS.
14301
+ *
14302
+ * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
14303
+ * meaning for a statement that rewrites a set, and accepting them would invite
14304
+ * a caller to believe `limit` bounds the damage. Every field is optional here
14305
+ * only so the shape stays composable — the implementation REJECTS a filter
14306
+ * that compiles to no predicate, because that is the whole collection.
14307
+ */
14308
+ var MutationFilterSchema = object({
14309
+ where: record(string(), unknown()).optional(),
14310
+ whereIn: record(string(), array(unknown())).optional(),
14311
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
14312
+ whereNot: record(string(), unknown()).optional(),
14313
+ whereNotIn: record(string(), array(unknown())).optional()
14314
+ });
14315
+ /**
14316
+ * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
14317
+ *
14318
+ * `as` names the slot in the result, so the SAME column may be asked twice with
14319
+ * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
14320
+ * a `Record<column, op>` shape could not express.
14321
+ */
14322
+ var AggregateFieldSchema = object({
14323
+ /** Result key. */
14324
+ as: string().min(1),
14325
+ /** Column to aggregate. Must be a real column of a declared collection. */
14326
+ field: string().min(1),
14327
+ op: _enum([
14328
+ "sum",
14329
+ "min",
14330
+ "max"
14331
+ ])
14332
+ });
14333
+ /**
14334
+ * `COUNT(*)` plus one number per requested field.
14335
+ *
14336
+ * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
14337
+ * that really is 0 are different facts, and an accounting caller that renders
14338
+ * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
14339
+ */
14340
+ var AggregateResultSchema = object({
14341
+ count: number().int(),
14342
+ values: record(string(), number().nullable())
14343
+ });
14344
+ /** A single stored record: `{ id, data }`. */
14345
+ var SettingsRecordSchema = object({
14346
+ id: string(),
14347
+ data: record(string(), unknown())
14348
+ });
14349
+ /**
14350
+ * One record of a BULK insert — {@link SettingsRecordSchema} with the id made
14351
+ * optional.
14352
+ *
14353
+ * A separate schema rather than loosening the shared one: every other method
14354
+ * on this cap addresses a row BY its id, and making that field optional
14355
+ * everywhere would turn a forgotten key into a silently generated one on
14356
+ * `update` and `delete` as well.
14357
+ */
14358
+ var BulkRecordSchema = object({
14359
+ id: string().optional(),
14360
+ data: record(string(), unknown())
14361
+ });
14362
+ /**
14363
+ * The database FILES one `sqlite-settings` engine process owns (D851).
14364
+ * Closed on purpose: a file is a thing the engine opens, backs up and gives a
14365
+ * serving thread, so a new one is a code change, never a string a caller
14366
+ * invents. `settings` is `camstack.db` and the default for every collection
14367
+ * that names no file.
14368
+ */
14369
+ var DataStoreDatabaseSchema = _enum([
14370
+ "settings",
14371
+ "events",
14372
+ "history"
14373
+ ]);
14374
+ DataStoreDatabaseSchema.options;
14375
+ /**
14376
+ * One write inside a {@link settingsStoreCapability.methods.transact} call.
14377
+ * The three that a "replace this set, bump that revision" write needs, plus
14378
+ * the batched upsert a rollup writer needs.
14379
+ */
14380
+ var TransactOpSchema = discriminatedUnion("op", [
14381
+ object({
14382
+ op: literal("deleteWhere"),
14383
+ collection: string(),
14384
+ filter: MutationFilterSchema
14385
+ }),
14386
+ object({
14387
+ op: literal("insertMany"),
14388
+ collection: string(),
14389
+ records: array(BulkRecordSchema).readonly()
14390
+ }),
14391
+ object({
14392
+ op: literal("update"),
14393
+ collection: string(),
14394
+ id: string(),
14395
+ data: record(string(), unknown())
14396
+ }),
14397
+ object({
14398
+ op: literal("upsertMany"),
14399
+ collection: string(),
14400
+ conflict: array(string()).readonly(),
14401
+ records: array(BulkRecordSchema).readonly()
14402
+ })
14403
+ ]);
14404
+ /**
14405
+ * The precondition of a transaction: the row `key` of `collection` must hold
14406
+ * `equals` in `column`, read INSIDE the transaction.
14407
+ */
14408
+ var TransactGuardSchema = object({
14409
+ collection: string(),
14410
+ key: string(),
14411
+ column: string(),
14412
+ equals: unknown()
14413
+ });
14414
+ /**
14415
+ * Column declaration for a structured (SQL-backed) collection.
14416
+ *
14417
+ * Logical types — the backend translates each to the matching SQLite
14418
+ * storage class and handles per-type marshaling:
14419
+ * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
14420
+ * - `JSON` — TEXT under the hood; serialised on write, parsed on read
14421
+ * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
14422
+ */
14423
+ var CollectionColumnSchema = object({
14424
+ name: string(),
14425
+ type: _enum([
14426
+ "TEXT",
14427
+ "INTEGER",
14428
+ "REAL",
14429
+ "JSON",
14430
+ "BOOLEAN"
14431
+ ]),
14432
+ primaryKey: boolean().optional(),
14433
+ notNull: boolean().optional(),
14434
+ unique: boolean().optional(),
14435
+ /**
14436
+ * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
14437
+ * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
14438
+ * collection surface simply cannot express their existing tables — which is
14439
+ * why they were still on the uncapped `table*` API.
14440
+ */
14441
+ defaultValue: union([
14442
+ string(),
14443
+ number(),
14444
+ boolean()
14445
+ ]).optional()
14446
+ });
14447
+ var CollectionIndexSchema = object({
14448
+ name: string(),
14449
+ columns: array(string()).readonly(),
14450
+ unique: boolean().optional()
14451
+ });
14452
+ /**
14453
+ * The input of `declareCollection` — ONE schema for the door and for the
14454
+ * engine behind it, so the two surfaces cannot drift (the dispatcher forwards
14455
+ * the payload untouched).
14456
+ *
14457
+ * - `database` — the file the collection lives in (D851). Absent means
14458
+ * `settings`. A declaration naming a file other than the one the table is
14459
+ * already in is REFUSED by the engine, never moved.
14460
+ * - `primaryKey` — a COMPOSITE key, as column names. A single name is the same
14461
+ * as `primaryKey: true` on that column. A composite-keyed collection has no
14462
+ * `id`: it is written with `insertMany` / `upsertMany` / `transact` and read
14463
+ * with `query` / `count` / `aggregate` / `deleteWhere`; the calls that
14464
+ * address one row by id are refused.
14465
+ * - `withoutRowid` — emit `WITHOUT ROWID`. Requires a primary key.
14466
+ */
14467
+ var DeclareCollectionInputSchema = object({
14468
+ namespace: string().optional(),
14469
+ collection: string(),
14470
+ columns: array(CollectionColumnSchema).readonly(),
14471
+ indexes: array(CollectionIndexSchema).readonly().optional(),
14472
+ database: DataStoreDatabaseSchema.optional(),
14473
+ primaryKey: array(string()).readonly().optional(),
14474
+ withoutRowid: boolean().optional()
14475
+ });
14476
+ method(object({
14477
+ namespace: string().optional(),
14478
+ collection: string(),
14479
+ key: string()
14480
+ }), unknown(), { auth: "admin" }), method(object({
14481
+ namespace: string().optional(),
14482
+ collection: string(),
14483
+ key: string(),
14484
+ value: unknown()
14485
+ }), _void(), {
14486
+ kind: "mutation",
14487
+ auth: "admin"
14488
+ }), method(object({
14489
+ namespace: string().optional(),
14490
+ collection: string(),
14491
+ filter: QueryFilterSchema.optional(),
14492
+ columns: array(string()).readonly().optional()
14493
+ }), array(SettingsRecordSchema).readonly(), { auth: "admin" }), method(object({
14494
+ namespace: string().optional(),
14495
+ collection: string(),
14496
+ /** Declared columns identifying the slot; must be covered by a UNIQUE
14497
+ * index on the collection. Never empty. */
14498
+ conflict: array(string()).readonly(),
14499
+ record: BulkRecordSchema
14500
+ }), object({
14501
+ /** The id the row HAS: assigned by SQLite on an insert, or the existing
14502
+ * row's own id on an update. */
14503
+ id: union([string(), number()]) }), {
14504
+ kind: "mutation",
14505
+ auth: "admin"
14506
+ }), method(object({
14507
+ namespace: string().optional(),
14508
+ collection: string(),
14509
+ conflict: array(string()).readonly(),
14510
+ records: array(BulkRecordSchema).readonly()
14511
+ }), object({ upserted: number().int() }), {
14512
+ kind: "mutation",
14513
+ auth: "admin"
14514
+ }), method(object({
14515
+ namespace: string().optional(),
14516
+ collection: string(),
14517
+ record: object({
14518
+ id: string().optional(),
14519
+ data: record(string(), unknown())
14520
+ })
14521
+ }), object({
14522
+ /**
14523
+ * The id the row ACTUALLY got (D473): the one supplied, the UUID minted
14524
+ * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
14525
+ * primary key — which is the only place an auto key is knowable.
14526
+ */
14527
+ id: union([string(), number()]) }), {
14528
+ kind: "mutation",
14529
+ auth: "admin"
14530
+ }), method(object({
14531
+ namespace: string().optional(),
14532
+ collection: string(),
14533
+ records: array(BulkRecordSchema).readonly()
14534
+ }), object({ inserted: number().int() }), {
14535
+ kind: "mutation",
14536
+ auth: "admin"
14537
+ }), method(object({
14538
+ namespace: string().optional(),
14539
+ guard: TransactGuardSchema.optional(),
14540
+ ops: array(TransactOpSchema).readonly()
14541
+ }), object({
14542
+ applied: boolean(),
14543
+ current: unknown().optional()
14544
+ }), {
14545
+ kind: "mutation",
14546
+ auth: "admin"
14547
+ }), method(object({
14548
+ namespace: string().optional(),
14549
+ collection: string(),
14550
+ id: string(),
14551
+ data: record(string(), unknown())
14552
+ }), _void(), {
14553
+ kind: "mutation",
14554
+ auth: "admin"
14555
+ }), method(object({
14556
+ namespace: string().optional(),
14557
+ collection: string(),
14558
+ key: string()
14559
+ }), _void(), {
14560
+ kind: "mutation",
14561
+ auth: "admin"
14562
+ }), method(object({
14563
+ namespace: string().optional(),
14564
+ collection: string(),
14565
+ filter: MutationFilterSchema
14566
+ }), object({ deleted: number().int() }), {
14567
+ kind: "mutation",
14568
+ auth: "admin"
14569
+ }), method(object({
14570
+ namespace: string().optional(),
14571
+ collection: string(),
14572
+ filter: MutationFilterSchema,
14573
+ data: record(string(), unknown())
14574
+ }), object({ updated: number().int() }), {
14575
+ kind: "mutation",
14576
+ auth: "admin"
14577
+ }), method(object({
14578
+ namespace: string().optional(),
14579
+ collection: string(),
14580
+ filter: QueryFilterSchema.optional()
14581
+ }), number(), { auth: "admin" }), method(object({
14582
+ namespace: string().optional(),
14583
+ collection: string(),
14584
+ fields: array(AggregateFieldSchema).readonly(),
14585
+ filter: QueryFilterSchema.optional()
14586
+ }), AggregateResultSchema, { auth: "admin" }), method(object({
14587
+ namespace: string().optional(),
14588
+ collection: string(),
14589
+ field: string(),
14590
+ bucketSize: number().int().positive(),
14591
+ origin: number().int(),
14592
+ filter: QueryFilterSchema.optional()
14593
+ }), array(object({
14594
+ bucket: number().int(),
14595
+ count: number().int()
14596
+ })).readonly(), { auth: "admin" }), method(object({
14597
+ namespace: string().optional(),
14598
+ collection: string()
14599
+ }), boolean(), { auth: "admin" }), method(DeclareCollectionInputSchema, _void(), {
14600
+ kind: "mutation",
14601
+ auth: "admin"
14602
+ });
14603
+ /**
14270
14604
  * How long one snapshot may take end to end: the pinned copy of the whole
14271
14605
  * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
14272
14606
  * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
@@ -14279,7 +14613,11 @@ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
14279
14613
  * database has no sidecars and is just as owned). Paths are absolute on the
14280
14614
  * owner's host.
14281
14615
  */
14282
- var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
14616
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({
14617
+ /** Which owned file this is — the handle `writeSnapshot` takes. */
14618
+ databaseId: DataStoreDatabaseSchema,
14619
+ livePath: string()
14620
+ })) });
14283
14621
  /** One b-tree table of the snapshot and the rows it holds. */
14284
14622
  var DatabaseSnapshotTableSchema = object({
14285
14623
  name: string(),
@@ -14312,6 +14650,10 @@ var DatabaseSnapshotResultSchema = object({
14312
14650
  /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
14313
14651
  takenAt: number()
14314
14652
  });
14653
+ /** A snapshot the owner wrote, with the file it belongs to. */
14654
+ var DatabaseSnapshotWrittenSchema = DatabaseSnapshotResultSchema.extend({ databaseId: DataStoreDatabaseSchema });
14655
+ /** Which database `writeSnapshot` copies. Required: an unstated ask is not guessed. */
14656
+ var DatabaseSnapshotRequestSchema = object({ databaseId: DataStoreDatabaseSchema });
14315
14657
  /**
14316
14658
  * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
14317
14659
  * the same facts, with both paths relative to the archive root (the node's
@@ -14321,9 +14663,11 @@ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
14321
14663
  /** Archive-relative path of the live database the archive does NOT carry. */
14322
14664
  livePath: string(),
14323
14665
  /** Archive-relative path of the verified copy it carries in its place. */
14324
- snapshotPath: string()
14666
+ snapshotPath: string(),
14667
+ /** Absent on an archive made before several files were owned: that was `settings`. */
14668
+ databaseId: DataStoreDatabaseSchema.optional()
14325
14669
  });
14326
- method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
14670
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(DatabaseSnapshotRequestSchema, DatabaseSnapshotWrittenSchema, {
14327
14671
  kind: "mutation",
14328
14672
  auth: "admin",
14329
14673
  timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
@@ -14444,7 +14788,12 @@ var BackupArchiveEntrySchema = object({
14444
14788
  /** Top-level locations included in the archive (db, addons, tls, …). */
14445
14789
  locations: array(string()).readonly(),
14446
14790
  /** Present when the archive is encrypted; restore then needs that key. */
14447
- encryption: BackupArchiveEncryptionSchema.optional()
14791
+ encryption: BackupArchiveEncryptionSchema.optional(),
14792
+ /**
14793
+ * The databases the run asked to carry (its retention class). Absent on an
14794
+ * archive made before several files were owned: that was `['settings']`.
14795
+ */
14796
+ databases: array(DataStoreDatabaseSchema).readonly().optional()
14448
14797
  });
14449
14798
  var BackupEntrySchema = object({
14450
14799
  id: string(),
@@ -14478,7 +14827,12 @@ var ArchiveManifestSchema = object({
14478
14827
  * Live SQLite databases this archive carries as their OWNER's verified
14479
14828
  * snapshot instead of as files (D693). Absent on archives made before.
14480
14829
  */
14481
- sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
14830
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional(),
14831
+ /**
14832
+ * Owned database files the run did NOT carry (not selected): left out of the
14833
+ * tar and the entry list alike. Absent when every owned file was carried.
14834
+ */
14835
+ omittedDatabases: array(DataStoreDatabaseSchema).optional()
14482
14836
  });
14483
14837
  var LocationStatSchema = object({
14484
14838
  name: string(),
@@ -14600,6 +14954,12 @@ var BackupScheduleSchema = object({
14600
14954
  /** Optional subset of source locations to include; omitted = all. */
14601
14955
  dataSources: array(string()).readonly().optional(),
14602
14956
  /**
14957
+ * Which database files this schedule carries. Absent = `['settings']`
14958
+ * (an unstated ask is the minimum, D382). Events and history run weekly,
14959
+ * settings nightly (D852).
14960
+ */
14961
+ databases: array(DataStoreDatabaseSchema).readonly().optional(),
14962
+ /**
14603
14963
  * ms-epoch of the last tick that FIRED this schedule. Stamped before the
14604
14964
  * archive runs (it is the dedupe anchor), so it says "attempted", never
14605
14965
  * "succeeded" — a run refused by every destination stamps it too.
@@ -14623,7 +14983,9 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
14623
14983
  * retention). Omitted = each destination's own policy
14624
14984
  * retention (manual runs).
14625
14985
  */
14626
- retentionCount: number().int().min(1).max(1e3).optional()
14986
+ retentionCount: number().int().min(1).max(1e3).optional(),
14987
+ /** Database files to carry; omitted = `['settings']`. */
14988
+ databases: array(DataStoreDatabaseSchema).optional()
14627
14989
  }).optional(), BackupTriggerResultSchema, {
14628
14990
  kind: "mutation",
14629
14991
  auth: "admin"
@@ -14705,7 +15067,8 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
14705
15067
  enabled: boolean(),
14706
15068
  locationIds: array(string()).readonly(),
14707
15069
  retentionCount: number().int().min(1).max(1e3),
14708
- dataSources: array(string()).readonly().optional()
15070
+ dataSources: array(string()).readonly().optional(),
15071
+ databases: array(DataStoreDatabaseSchema).readonly().optional()
14709
15072
  }), BackupScheduleSchema, {
14710
15073
  kind: "mutation",
14711
15074
  auth: "admin"
@@ -16485,282 +16848,6 @@ method(_void(), array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }
16485
16848
  timeoutMs: 30 * 6e4
16486
16849
  });
16487
16850
  /**
16488
- * Query filter for settings-store collections.
16489
- */
16490
- var QueryFilterSchema = object({
16491
- where: record(string(), unknown()).optional(),
16492
- whereIn: record(string(), array(unknown())).optional(),
16493
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
16494
- /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
16495
- whereNot: record(string(), unknown()).optional(),
16496
- /** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
16497
- * empty list excludes nothing. See `QueryFilter.whereNotIn`. */
16498
- whereNotIn: record(string(), array(unknown())).optional(),
16499
- orderBy: object({
16500
- field: string(),
16501
- direction: _enum(["asc", "desc"])
16502
- }).optional(),
16503
- limit: number().optional(),
16504
- offset: number().optional()
16505
- });
16506
- /**
16507
- * The predicate half of a filter, for BULK MUTATIONS.
16508
- *
16509
- * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
16510
- * meaning for a statement that rewrites a set, and accepting them would invite
16511
- * a caller to believe `limit` bounds the damage. Every field is optional here
16512
- * only so the shape stays composable — the implementation REJECTS a filter
16513
- * that compiles to no predicate, because that is the whole collection.
16514
- */
16515
- var MutationFilterSchema = object({
16516
- where: record(string(), unknown()).optional(),
16517
- whereIn: record(string(), array(unknown())).optional(),
16518
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
16519
- whereNot: record(string(), unknown()).optional(),
16520
- whereNotIn: record(string(), array(unknown())).optional()
16521
- });
16522
- /**
16523
- * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
16524
- *
16525
- * `as` names the slot in the result, so the SAME column may be asked twice with
16526
- * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
16527
- * a `Record<column, op>` shape could not express.
16528
- */
16529
- var AggregateFieldSchema = object({
16530
- /** Result key. */
16531
- as: string().min(1),
16532
- /** Column to aggregate. Must be a real column of a declared collection. */
16533
- field: string().min(1),
16534
- op: _enum([
16535
- "sum",
16536
- "min",
16537
- "max"
16538
- ])
16539
- });
16540
- /**
16541
- * `COUNT(*)` plus one number per requested field.
16542
- *
16543
- * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
16544
- * that really is 0 are different facts, and an accounting caller that renders
16545
- * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
16546
- */
16547
- var AggregateResultSchema = object({
16548
- count: number().int(),
16549
- values: record(string(), number().nullable())
16550
- });
16551
- /** A single stored record: `{ id, data }`. */
16552
- var SettingsRecordSchema = object({
16553
- id: string(),
16554
- data: record(string(), unknown())
16555
- });
16556
- /**
16557
- * One record of a BULK insert — {@link SettingsRecordSchema} with the id made
16558
- * optional.
16559
- *
16560
- * A separate schema rather than loosening the shared one: every other method
16561
- * on this cap addresses a row BY its id, and making that field optional
16562
- * everywhere would turn a forgotten key into a silently generated one on
16563
- * `update` and `delete` as well.
16564
- */
16565
- var BulkRecordSchema = object({
16566
- id: string().optional(),
16567
- data: record(string(), unknown())
16568
- });
16569
- /**
16570
- * One write inside a {@link settingsStoreCapability.methods.transact} call.
16571
- * Only the three that a "replace this set, bump that revision" write needs.
16572
- */
16573
- var TransactOpSchema = discriminatedUnion("op", [
16574
- object({
16575
- op: literal("deleteWhere"),
16576
- collection: string(),
16577
- filter: MutationFilterSchema
16578
- }),
16579
- object({
16580
- op: literal("insertMany"),
16581
- collection: string(),
16582
- records: array(BulkRecordSchema).readonly()
16583
- }),
16584
- object({
16585
- op: literal("update"),
16586
- collection: string(),
16587
- id: string(),
16588
- data: record(string(), unknown())
16589
- })
16590
- ]);
16591
- /**
16592
- * The precondition of a transaction: the row `key` of `collection` must hold
16593
- * `equals` in `column`, read INSIDE the transaction.
16594
- */
16595
- var TransactGuardSchema = object({
16596
- collection: string(),
16597
- key: string(),
16598
- column: string(),
16599
- equals: unknown()
16600
- });
16601
- /**
16602
- * Column declaration for a structured (SQL-backed) collection.
16603
- *
16604
- * Logical types — the backend translates each to the matching SQLite
16605
- * storage class and handles per-type marshaling:
16606
- * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
16607
- * - `JSON` — TEXT under the hood; serialised on write, parsed on read
16608
- * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
16609
- */
16610
- var CollectionColumnSchema = object({
16611
- name: string(),
16612
- type: _enum([
16613
- "TEXT",
16614
- "INTEGER",
16615
- "REAL",
16616
- "JSON",
16617
- "BOOLEAN"
16618
- ]),
16619
- primaryKey: boolean().optional(),
16620
- notNull: boolean().optional(),
16621
- unique: boolean().optional(),
16622
- /**
16623
- * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
16624
- * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
16625
- * collection surface simply cannot express their existing tables — which is
16626
- * why they were still on the uncapped `table*` API.
16627
- */
16628
- defaultValue: union([
16629
- string(),
16630
- number(),
16631
- boolean()
16632
- ]).optional()
16633
- });
16634
- var CollectionIndexSchema = object({
16635
- name: string(),
16636
- columns: array(string()).readonly(),
16637
- unique: boolean().optional()
16638
- });
16639
- method(object({
16640
- namespace: string().optional(),
16641
- collection: string(),
16642
- key: string()
16643
- }), unknown(), { auth: "admin" }), method(object({
16644
- namespace: string().optional(),
16645
- collection: string(),
16646
- key: string(),
16647
- value: unknown()
16648
- }), _void(), {
16649
- kind: "mutation",
16650
- auth: "admin"
16651
- }), method(object({
16652
- namespace: string().optional(),
16653
- collection: string(),
16654
- filter: QueryFilterSchema.optional(),
16655
- columns: array(string()).readonly().optional()
16656
- }), array(SettingsRecordSchema).readonly(), { auth: "admin" }), method(object({
16657
- namespace: string().optional(),
16658
- collection: string(),
16659
- /** Declared columns identifying the slot; must be covered by a UNIQUE
16660
- * index on the collection. Never empty. */
16661
- conflict: array(string()).readonly(),
16662
- record: BulkRecordSchema
16663
- }), object({
16664
- /** The id the row HAS: assigned by SQLite on an insert, or the existing
16665
- * row's own id on an update. */
16666
- id: union([string(), number()]) }), {
16667
- kind: "mutation",
16668
- auth: "admin"
16669
- }), method(object({
16670
- namespace: string().optional(),
16671
- collection: string(),
16672
- record: object({
16673
- id: string().optional(),
16674
- data: record(string(), unknown())
16675
- })
16676
- }), object({
16677
- /**
16678
- * The id the row ACTUALLY got (D473): the one supplied, the UUID minted
16679
- * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
16680
- * primary key — which is the only place an auto key is knowable.
16681
- */
16682
- id: union([string(), number()]) }), {
16683
- kind: "mutation",
16684
- auth: "admin"
16685
- }), method(object({
16686
- namespace: string().optional(),
16687
- collection: string(),
16688
- records: array(BulkRecordSchema).readonly()
16689
- }), object({ inserted: number().int() }), {
16690
- kind: "mutation",
16691
- auth: "admin"
16692
- }), method(object({
16693
- namespace: string().optional(),
16694
- guard: TransactGuardSchema.optional(),
16695
- ops: array(TransactOpSchema).readonly()
16696
- }), object({
16697
- applied: boolean(),
16698
- current: unknown().optional()
16699
- }), {
16700
- kind: "mutation",
16701
- auth: "admin"
16702
- }), method(object({
16703
- namespace: string().optional(),
16704
- collection: string(),
16705
- id: string(),
16706
- data: record(string(), unknown())
16707
- }), _void(), {
16708
- kind: "mutation",
16709
- auth: "admin"
16710
- }), method(object({
16711
- namespace: string().optional(),
16712
- collection: string(),
16713
- key: string()
16714
- }), _void(), {
16715
- kind: "mutation",
16716
- auth: "admin"
16717
- }), method(object({
16718
- namespace: string().optional(),
16719
- collection: string(),
16720
- filter: MutationFilterSchema
16721
- }), object({ deleted: number().int() }), {
16722
- kind: "mutation",
16723
- auth: "admin"
16724
- }), method(object({
16725
- namespace: string().optional(),
16726
- collection: string(),
16727
- filter: MutationFilterSchema,
16728
- data: record(string(), unknown())
16729
- }), object({ updated: number().int() }), {
16730
- kind: "mutation",
16731
- auth: "admin"
16732
- }), method(object({
16733
- namespace: string().optional(),
16734
- collection: string(),
16735
- filter: QueryFilterSchema.optional()
16736
- }), number(), { auth: "admin" }), method(object({
16737
- namespace: string().optional(),
16738
- collection: string(),
16739
- fields: array(AggregateFieldSchema).readonly(),
16740
- filter: QueryFilterSchema.optional()
16741
- }), AggregateResultSchema, { auth: "admin" }), method(object({
16742
- namespace: string().optional(),
16743
- collection: string(),
16744
- field: string(),
16745
- bucketSize: number().int().positive(),
16746
- origin: number().int(),
16747
- filter: QueryFilterSchema.optional()
16748
- }), array(object({
16749
- bucket: number().int(),
16750
- count: number().int()
16751
- })).readonly(), { auth: "admin" }), method(object({
16752
- namespace: string().optional(),
16753
- collection: string()
16754
- }), boolean(), { auth: "admin" }), method(object({
16755
- namespace: string().optional(),
16756
- collection: string(),
16757
- columns: array(CollectionColumnSchema).readonly(),
16758
- indexes: array(CollectionIndexSchema).readonly().optional()
16759
- }), _void(), {
16760
- kind: "mutation",
16761
- auth: "admin"
16762
- });
16763
- /**
16764
16851
  * What one engine says about itself. The orchestrator uses `kind` to pick
16765
16852
  * a registrant for a collection; `engineId` is what a log line names when
16766
16853
  * a call is routed or refused.
@@ -16840,6 +16927,14 @@ id: union([string(), number()]) }), {
16840
16927
  }), object({ id: union([string(), number()]) }), {
16841
16928
  kind: "mutation",
16842
16929
  auth: "admin"
16930
+ }), method(object({
16931
+ namespace: string().optional(),
16932
+ collection: string(),
16933
+ conflict: array(string()).readonly(),
16934
+ records: array(BulkRecordSchema).readonly()
16935
+ }), object({ upserted: number().int() }), {
16936
+ kind: "mutation",
16937
+ auth: "admin"
16843
16938
  }), method(object({
16844
16939
  namespace: string().optional(),
16845
16940
  collection: string(),
@@ -16909,12 +17004,7 @@ id: union([string(), number()]) }), {
16909
17004
  })).readonly(), { auth: "admin" }), method(object({
16910
17005
  namespace: string().optional(),
16911
17006
  collection: string()
16912
- }), boolean(), { auth: "admin" }), method(object({
16913
- namespace: string().optional(),
16914
- collection: string(),
16915
- columns: array(CollectionColumnSchema).readonly(),
16916
- indexes: array(CollectionIndexSchema).readonly().optional()
16917
- }), _void(), {
17007
+ }), boolean(), { auth: "admin" }), method(DeclareCollectionInputSchema, _void(), {
16918
17008
  kind: "mutation",
16919
17009
  auth: "admin"
16920
17010
  });
@@ -26629,6 +26719,9 @@ var RetrainFrameReviewSchema = object({
26629
26719
  /** The baseline was re-derived, not snapshotted (a pre-origin row). */
26630
26720
  approximate: boolean(),
26631
26721
  origin: RetrainOriginSchema.optional(),
26722
+ /** The class / label the box carries NOW (a removed box: its origin's). Absent on an older hub. */
26723
+ macroClass: RetrainMacroClassSchema.optional(),
26724
+ label: string().optional(),
26632
26725
  iou: number().optional()
26633
26726
  })).readonly(),
26634
26727
  summary: object({
@@ -49060,6 +49153,12 @@ Object.freeze({
49060
49153
  addonId: null,
49061
49154
  access: "create"
49062
49155
  },
49156
+ "dataStoreProvider.upsertMany": {
49157
+ capName: "data-store-provider",
49158
+ capScope: "system",
49159
+ addonId: null,
49160
+ access: "create"
49161
+ },
49063
49162
  "dayNight.getOptions": {
49064
49163
  capName: "day-night",
49065
49164
  capScope: "device",
@@ -53908,6 +54007,12 @@ Object.freeze({
53908
54007
  addonId: null,
53909
54008
  access: "create"
53910
54009
  },
54010
+ "settingsStore.upsertMany": {
54011
+ capName: "settings-store",
54012
+ capScope: "system",
54013
+ addonId: null,
54014
+ access: "create"
54015
+ },
53911
54016
  "smoke.getStatus": {
53912
54017
  capName: "smoke",
53913
54018
  capScope: "device",