@camstack/addon-post-analysis 1.2.366 → 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 (14) hide show
  1. package/dist/{clip-model-registry-CfYSfakK.js → clip-model-registry-4RExEITD.js} +380 -289
  2. package/dist/{clip-model-registry-Bsj2t3Ec.mjs → clip-model-registry-vU1x2Lyf.mjs} +380 -289
  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-CBiuAq6S.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-DTg0F1dD.mjs → _virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-rBUOVUOg.mjs} +1 -1
  9. package/dist/pipeline-analytics/{hostInit-6daqknJk.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
@@ -14278,6 +14278,329 @@ method(object({
14278
14278
  password: string()
14279
14279
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
14280
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
+ /**
14281
14604
  * How long one snapshot may take end to end: the pinned copy of the whole
14282
14605
  * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
14283
14606
  * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
@@ -14290,7 +14613,11 @@ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
14290
14613
  * database has no sidecars and is just as owned). Paths are absolute on the
14291
14614
  * owner's host.
14292
14615
  */
14293
- 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
+ })) });
14294
14621
  /** One b-tree table of the snapshot and the rows it holds. */
14295
14622
  var DatabaseSnapshotTableSchema = object({
14296
14623
  name: string(),
@@ -14323,6 +14650,10 @@ var DatabaseSnapshotResultSchema = object({
14323
14650
  /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
14324
14651
  takenAt: number()
14325
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 });
14326
14657
  /**
14327
14658
  * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
14328
14659
  * the same facts, with both paths relative to the archive root (the node's
@@ -14332,9 +14663,11 @@ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
14332
14663
  /** Archive-relative path of the live database the archive does NOT carry. */
14333
14664
  livePath: string(),
14334
14665
  /** Archive-relative path of the verified copy it carries in its place. */
14335
- snapshotPath: string()
14666
+ snapshotPath: string(),
14667
+ /** Absent on an archive made before several files were owned: that was `settings`. */
14668
+ databaseId: DataStoreDatabaseSchema.optional()
14336
14669
  });
14337
- method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
14670
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(DatabaseSnapshotRequestSchema, DatabaseSnapshotWrittenSchema, {
14338
14671
  kind: "mutation",
14339
14672
  auth: "admin",
14340
14673
  timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
@@ -14455,7 +14788,12 @@ var BackupArchiveEntrySchema = object({
14455
14788
  /** Top-level locations included in the archive (db, addons, tls, …). */
14456
14789
  locations: array(string()).readonly(),
14457
14790
  /** Present when the archive is encrypted; restore then needs that key. */
14458
- 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()
14459
14797
  });
14460
14798
  var BackupEntrySchema = object({
14461
14799
  id: string(),
@@ -14489,7 +14827,12 @@ var ArchiveManifestSchema = object({
14489
14827
  * Live SQLite databases this archive carries as their OWNER's verified
14490
14828
  * snapshot instead of as files (D693). Absent on archives made before.
14491
14829
  */
14492
- 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()
14493
14836
  });
14494
14837
  var LocationStatSchema = object({
14495
14838
  name: string(),
@@ -14611,6 +14954,12 @@ var BackupScheduleSchema = object({
14611
14954
  /** Optional subset of source locations to include; omitted = all. */
14612
14955
  dataSources: array(string()).readonly().optional(),
14613
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
+ /**
14614
14963
  * ms-epoch of the last tick that FIRED this schedule. Stamped before the
14615
14964
  * archive runs (it is the dedupe anchor), so it says "attempted", never
14616
14965
  * "succeeded" — a run refused by every destination stamps it too.
@@ -14634,7 +14983,9 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
14634
14983
  * retention). Omitted = each destination's own policy
14635
14984
  * retention (manual runs).
14636
14985
  */
14637
- 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()
14638
14989
  }).optional(), BackupTriggerResultSchema, {
14639
14990
  kind: "mutation",
14640
14991
  auth: "admin"
@@ -14716,7 +15067,8 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
14716
15067
  enabled: boolean(),
14717
15068
  locationIds: array(string()).readonly(),
14718
15069
  retentionCount: number().int().min(1).max(1e3),
14719
- dataSources: array(string()).readonly().optional()
15070
+ dataSources: array(string()).readonly().optional(),
15071
+ databases: array(DataStoreDatabaseSchema).readonly().optional()
14720
15072
  }), BackupScheduleSchema, {
14721
15073
  kind: "mutation",
14722
15074
  auth: "admin"
@@ -16496,282 +16848,6 @@ method(_void(), array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }
16496
16848
  timeoutMs: 30 * 6e4
16497
16849
  });
16498
16850
  /**
16499
- * Query filter for settings-store collections.
16500
- */
16501
- var QueryFilterSchema = object({
16502
- where: record(string(), unknown()).optional(),
16503
- whereIn: record(string(), array(unknown())).optional(),
16504
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
16505
- /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
16506
- whereNot: record(string(), unknown()).optional(),
16507
- /** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
16508
- * empty list excludes nothing. See `QueryFilter.whereNotIn`. */
16509
- whereNotIn: record(string(), array(unknown())).optional(),
16510
- orderBy: object({
16511
- field: string(),
16512
- direction: _enum(["asc", "desc"])
16513
- }).optional(),
16514
- limit: number().optional(),
16515
- offset: number().optional()
16516
- });
16517
- /**
16518
- * The predicate half of a filter, for BULK MUTATIONS.
16519
- *
16520
- * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
16521
- * meaning for a statement that rewrites a set, and accepting them would invite
16522
- * a caller to believe `limit` bounds the damage. Every field is optional here
16523
- * only so the shape stays composable — the implementation REJECTS a filter
16524
- * that compiles to no predicate, because that is the whole collection.
16525
- */
16526
- var MutationFilterSchema = object({
16527
- where: record(string(), unknown()).optional(),
16528
- whereIn: record(string(), array(unknown())).optional(),
16529
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
16530
- whereNot: record(string(), unknown()).optional(),
16531
- whereNotIn: record(string(), array(unknown())).optional()
16532
- });
16533
- /**
16534
- * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
16535
- *
16536
- * `as` names the slot in the result, so the SAME column may be asked twice with
16537
- * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
16538
- * a `Record<column, op>` shape could not express.
16539
- */
16540
- var AggregateFieldSchema = object({
16541
- /** Result key. */
16542
- as: string().min(1),
16543
- /** Column to aggregate. Must be a real column of a declared collection. */
16544
- field: string().min(1),
16545
- op: _enum([
16546
- "sum",
16547
- "min",
16548
- "max"
16549
- ])
16550
- });
16551
- /**
16552
- * `COUNT(*)` plus one number per requested field.
16553
- *
16554
- * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
16555
- * that really is 0 are different facts, and an accounting caller that renders
16556
- * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
16557
- */
16558
- var AggregateResultSchema = object({
16559
- count: number().int(),
16560
- values: record(string(), number().nullable())
16561
- });
16562
- /** A single stored record: `{ id, data }`. */
16563
- var SettingsRecordSchema = object({
16564
- id: string(),
16565
- data: record(string(), unknown())
16566
- });
16567
- /**
16568
- * One record of a BULK insert — {@link SettingsRecordSchema} with the id made
16569
- * optional.
16570
- *
16571
- * A separate schema rather than loosening the shared one: every other method
16572
- * on this cap addresses a row BY its id, and making that field optional
16573
- * everywhere would turn a forgotten key into a silently generated one on
16574
- * `update` and `delete` as well.
16575
- */
16576
- var BulkRecordSchema = object({
16577
- id: string().optional(),
16578
- data: record(string(), unknown())
16579
- });
16580
- /**
16581
- * One write inside a {@link settingsStoreCapability.methods.transact} call.
16582
- * Only the three that a "replace this set, bump that revision" write needs.
16583
- */
16584
- var TransactOpSchema = discriminatedUnion("op", [
16585
- object({
16586
- op: literal("deleteWhere"),
16587
- collection: string(),
16588
- filter: MutationFilterSchema
16589
- }),
16590
- object({
16591
- op: literal("insertMany"),
16592
- collection: string(),
16593
- records: array(BulkRecordSchema).readonly()
16594
- }),
16595
- object({
16596
- op: literal("update"),
16597
- collection: string(),
16598
- id: string(),
16599
- data: record(string(), unknown())
16600
- })
16601
- ]);
16602
- /**
16603
- * The precondition of a transaction: the row `key` of `collection` must hold
16604
- * `equals` in `column`, read INSIDE the transaction.
16605
- */
16606
- var TransactGuardSchema = object({
16607
- collection: string(),
16608
- key: string(),
16609
- column: string(),
16610
- equals: unknown()
16611
- });
16612
- /**
16613
- * Column declaration for a structured (SQL-backed) collection.
16614
- *
16615
- * Logical types — the backend translates each to the matching SQLite
16616
- * storage class and handles per-type marshaling:
16617
- * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
16618
- * - `JSON` — TEXT under the hood; serialised on write, parsed on read
16619
- * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
16620
- */
16621
- var CollectionColumnSchema = object({
16622
- name: string(),
16623
- type: _enum([
16624
- "TEXT",
16625
- "INTEGER",
16626
- "REAL",
16627
- "JSON",
16628
- "BOOLEAN"
16629
- ]),
16630
- primaryKey: boolean().optional(),
16631
- notNull: boolean().optional(),
16632
- unique: boolean().optional(),
16633
- /**
16634
- * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
16635
- * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
16636
- * collection surface simply cannot express their existing tables — which is
16637
- * why they were still on the uncapped `table*` API.
16638
- */
16639
- defaultValue: union([
16640
- string(),
16641
- number(),
16642
- boolean()
16643
- ]).optional()
16644
- });
16645
- var CollectionIndexSchema = object({
16646
- name: string(),
16647
- columns: array(string()).readonly(),
16648
- unique: boolean().optional()
16649
- });
16650
- method(object({
16651
- namespace: string().optional(),
16652
- collection: string(),
16653
- key: string()
16654
- }), unknown(), { auth: "admin" }), method(object({
16655
- namespace: string().optional(),
16656
- collection: string(),
16657
- key: string(),
16658
- value: unknown()
16659
- }), _void(), {
16660
- kind: "mutation",
16661
- auth: "admin"
16662
- }), method(object({
16663
- namespace: string().optional(),
16664
- collection: string(),
16665
- filter: QueryFilterSchema.optional(),
16666
- columns: array(string()).readonly().optional()
16667
- }), array(SettingsRecordSchema).readonly(), { auth: "admin" }), method(object({
16668
- namespace: string().optional(),
16669
- collection: string(),
16670
- /** Declared columns identifying the slot; must be covered by a UNIQUE
16671
- * index on the collection. Never empty. */
16672
- conflict: array(string()).readonly(),
16673
- record: BulkRecordSchema
16674
- }), object({
16675
- /** The id the row HAS: assigned by SQLite on an insert, or the existing
16676
- * row's own id on an update. */
16677
- id: union([string(), number()]) }), {
16678
- kind: "mutation",
16679
- auth: "admin"
16680
- }), method(object({
16681
- namespace: string().optional(),
16682
- collection: string(),
16683
- record: object({
16684
- id: string().optional(),
16685
- data: record(string(), unknown())
16686
- })
16687
- }), object({
16688
- /**
16689
- * The id the row ACTUALLY got (D473): the one supplied, the UUID minted
16690
- * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
16691
- * primary key — which is the only place an auto key is knowable.
16692
- */
16693
- id: union([string(), number()]) }), {
16694
- kind: "mutation",
16695
- auth: "admin"
16696
- }), method(object({
16697
- namespace: string().optional(),
16698
- collection: string(),
16699
- records: array(BulkRecordSchema).readonly()
16700
- }), object({ inserted: number().int() }), {
16701
- kind: "mutation",
16702
- auth: "admin"
16703
- }), method(object({
16704
- namespace: string().optional(),
16705
- guard: TransactGuardSchema.optional(),
16706
- ops: array(TransactOpSchema).readonly()
16707
- }), object({
16708
- applied: boolean(),
16709
- current: unknown().optional()
16710
- }), {
16711
- kind: "mutation",
16712
- auth: "admin"
16713
- }), method(object({
16714
- namespace: string().optional(),
16715
- collection: string(),
16716
- id: string(),
16717
- data: record(string(), unknown())
16718
- }), _void(), {
16719
- kind: "mutation",
16720
- auth: "admin"
16721
- }), method(object({
16722
- namespace: string().optional(),
16723
- collection: string(),
16724
- key: string()
16725
- }), _void(), {
16726
- kind: "mutation",
16727
- auth: "admin"
16728
- }), method(object({
16729
- namespace: string().optional(),
16730
- collection: string(),
16731
- filter: MutationFilterSchema
16732
- }), object({ deleted: number().int() }), {
16733
- kind: "mutation",
16734
- auth: "admin"
16735
- }), method(object({
16736
- namespace: string().optional(),
16737
- collection: string(),
16738
- filter: MutationFilterSchema,
16739
- data: record(string(), unknown())
16740
- }), object({ updated: number().int() }), {
16741
- kind: "mutation",
16742
- auth: "admin"
16743
- }), method(object({
16744
- namespace: string().optional(),
16745
- collection: string(),
16746
- filter: QueryFilterSchema.optional()
16747
- }), number(), { auth: "admin" }), method(object({
16748
- namespace: string().optional(),
16749
- collection: string(),
16750
- fields: array(AggregateFieldSchema).readonly(),
16751
- filter: QueryFilterSchema.optional()
16752
- }), AggregateResultSchema, { auth: "admin" }), method(object({
16753
- namespace: string().optional(),
16754
- collection: string(),
16755
- field: string(),
16756
- bucketSize: number().int().positive(),
16757
- origin: number().int(),
16758
- filter: QueryFilterSchema.optional()
16759
- }), array(object({
16760
- bucket: number().int(),
16761
- count: number().int()
16762
- })).readonly(), { auth: "admin" }), method(object({
16763
- namespace: string().optional(),
16764
- collection: string()
16765
- }), boolean(), { auth: "admin" }), method(object({
16766
- namespace: string().optional(),
16767
- collection: string(),
16768
- columns: array(CollectionColumnSchema).readonly(),
16769
- indexes: array(CollectionIndexSchema).readonly().optional()
16770
- }), _void(), {
16771
- kind: "mutation",
16772
- auth: "admin"
16773
- });
16774
- /**
16775
16851
  * What one engine says about itself. The orchestrator uses `kind` to pick
16776
16852
  * a registrant for a collection; `engineId` is what a log line names when
16777
16853
  * a call is routed or refused.
@@ -16851,6 +16927,14 @@ id: union([string(), number()]) }), {
16851
16927
  }), object({ id: union([string(), number()]) }), {
16852
16928
  kind: "mutation",
16853
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"
16854
16938
  }), method(object({
16855
16939
  namespace: string().optional(),
16856
16940
  collection: string(),
@@ -16920,12 +17004,7 @@ id: union([string(), number()]) }), {
16920
17004
  })).readonly(), { auth: "admin" }), method(object({
16921
17005
  namespace: string().optional(),
16922
17006
  collection: string()
16923
- }), boolean(), { auth: "admin" }), method(object({
16924
- namespace: string().optional(),
16925
- collection: string(),
16926
- columns: array(CollectionColumnSchema).readonly(),
16927
- indexes: array(CollectionIndexSchema).readonly().optional()
16928
- }), _void(), {
17007
+ }), boolean(), { auth: "admin" }), method(DeclareCollectionInputSchema, _void(), {
16929
17008
  kind: "mutation",
16930
17009
  auth: "admin"
16931
17010
  });
@@ -49074,6 +49153,12 @@ Object.freeze({
49074
49153
  addonId: null,
49075
49154
  access: "create"
49076
49155
  },
49156
+ "dataStoreProvider.upsertMany": {
49157
+ capName: "data-store-provider",
49158
+ capScope: "system",
49159
+ addonId: null,
49160
+ access: "create"
49161
+ },
49077
49162
  "dayNight.getOptions": {
49078
49163
  capName: "day-night",
49079
49164
  capScope: "device",
@@ -53922,6 +54007,12 @@ Object.freeze({
53922
54007
  addonId: null,
53923
54008
  access: "create"
53924
54009
  },
54010
+ "settingsStore.upsertMany": {
54011
+ capName: "settings-store",
54012
+ capScope: "system",
54013
+ addonId: null,
54014
+ access: "create"
54015
+ },
53925
54016
  "smoke.getStatus": {
53926
54017
  capName: "smoke",
53927
54018
  capScope: "device",