@camstack/addon-post-analysis 1.2.366 → 1.2.368

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-Bsj2t3Ec.mjs → clip-model-registry-CIipVgpi.mjs} +439 -292
  2. package/dist/{clip-model-registry-CfYSfakK.js → clip-model-registry-cH-J5FCF.js} +444 -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-CBiuAq6S.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-C54yNBF1.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-CL7eBqMT.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-DoXIBD_R.mjs +26 -0
  9. package/dist/pipeline-analytics/{hostInit-6daqknJk.mjs → hostInit-CVgC4Ajt.mjs} +2 -2
  10. package/dist/pipeline-analytics/index.js +36 -5
  11. package/dist/pipeline-analytics/index.mjs +36 -5
  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-DTg0F1dD.mjs +0 -26
@@ -14309,6 +14309,329 @@ method(object({
14309
14309
  password: string()
14310
14310
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
14311
14311
  /**
14312
+ * Query filter for settings-store collections.
14313
+ */
14314
+ var QueryFilterSchema = object({
14315
+ where: record(string(), unknown()).optional(),
14316
+ whereIn: record(string(), array(unknown())).optional(),
14317
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
14318
+ /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
14319
+ whereNot: record(string(), unknown()).optional(),
14320
+ /** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
14321
+ * empty list excludes nothing. See `QueryFilter.whereNotIn`. */
14322
+ whereNotIn: record(string(), array(unknown())).optional(),
14323
+ orderBy: object({
14324
+ field: string(),
14325
+ direction: _enum(["asc", "desc"])
14326
+ }).optional(),
14327
+ limit: number().optional(),
14328
+ offset: number().optional()
14329
+ });
14330
+ /**
14331
+ * The predicate half of a filter, for BULK MUTATIONS.
14332
+ *
14333
+ * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
14334
+ * meaning for a statement that rewrites a set, and accepting them would invite
14335
+ * a caller to believe `limit` bounds the damage. Every field is optional here
14336
+ * only so the shape stays composable — the implementation REJECTS a filter
14337
+ * that compiles to no predicate, because that is the whole collection.
14338
+ */
14339
+ var MutationFilterSchema = object({
14340
+ where: record(string(), unknown()).optional(),
14341
+ whereIn: record(string(), array(unknown())).optional(),
14342
+ whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
14343
+ whereNot: record(string(), unknown()).optional(),
14344
+ whereNotIn: record(string(), array(unknown())).optional()
14345
+ });
14346
+ /**
14347
+ * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
14348
+ *
14349
+ * `as` names the slot in the result, so the SAME column may be asked twice with
14350
+ * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
14351
+ * a `Record<column, op>` shape could not express.
14352
+ */
14353
+ var AggregateFieldSchema = object({
14354
+ /** Result key. */
14355
+ as: string().min(1),
14356
+ /** Column to aggregate. Must be a real column of a declared collection. */
14357
+ field: string().min(1),
14358
+ op: _enum([
14359
+ "sum",
14360
+ "min",
14361
+ "max"
14362
+ ])
14363
+ });
14364
+ /**
14365
+ * `COUNT(*)` plus one number per requested field.
14366
+ *
14367
+ * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
14368
+ * that really is 0 are different facts, and an accounting caller that renders
14369
+ * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
14370
+ */
14371
+ var AggregateResultSchema = object({
14372
+ count: number().int(),
14373
+ values: record(string(), number().nullable())
14374
+ });
14375
+ /** A single stored record: `{ id, data }`. */
14376
+ var SettingsRecordSchema = object({
14377
+ id: string(),
14378
+ data: record(string(), unknown())
14379
+ });
14380
+ /**
14381
+ * One record of a BULK insert — {@link SettingsRecordSchema} with the id made
14382
+ * optional.
14383
+ *
14384
+ * A separate schema rather than loosening the shared one: every other method
14385
+ * on this cap addresses a row BY its id, and making that field optional
14386
+ * everywhere would turn a forgotten key into a silently generated one on
14387
+ * `update` and `delete` as well.
14388
+ */
14389
+ var BulkRecordSchema = object({
14390
+ id: string().optional(),
14391
+ data: record(string(), unknown())
14392
+ });
14393
+ /**
14394
+ * The database FILES one `sqlite-settings` engine process owns (D851).
14395
+ * Closed on purpose: a file is a thing the engine opens, backs up and gives a
14396
+ * serving thread, so a new one is a code change, never a string a caller
14397
+ * invents. `settings` is `camstack.db` and the default for every collection
14398
+ * that names no file.
14399
+ */
14400
+ var DataStoreDatabaseSchema = _enum([
14401
+ "settings",
14402
+ "events",
14403
+ "history"
14404
+ ]);
14405
+ DataStoreDatabaseSchema.options;
14406
+ /**
14407
+ * One write inside a {@link settingsStoreCapability.methods.transact} call.
14408
+ * The three that a "replace this set, bump that revision" write needs, plus
14409
+ * the batched upsert a rollup writer needs.
14410
+ */
14411
+ var TransactOpSchema = discriminatedUnion("op", [
14412
+ object({
14413
+ op: literal("deleteWhere"),
14414
+ collection: string(),
14415
+ filter: MutationFilterSchema
14416
+ }),
14417
+ object({
14418
+ op: literal("insertMany"),
14419
+ collection: string(),
14420
+ records: array(BulkRecordSchema).readonly()
14421
+ }),
14422
+ object({
14423
+ op: literal("update"),
14424
+ collection: string(),
14425
+ id: string(),
14426
+ data: record(string(), unknown())
14427
+ }),
14428
+ object({
14429
+ op: literal("upsertMany"),
14430
+ collection: string(),
14431
+ conflict: array(string()).readonly(),
14432
+ records: array(BulkRecordSchema).readonly()
14433
+ })
14434
+ ]);
14435
+ /**
14436
+ * The precondition of a transaction: the row `key` of `collection` must hold
14437
+ * `equals` in `column`, read INSIDE the transaction.
14438
+ */
14439
+ var TransactGuardSchema = object({
14440
+ collection: string(),
14441
+ key: string(),
14442
+ column: string(),
14443
+ equals: unknown()
14444
+ });
14445
+ /**
14446
+ * Column declaration for a structured (SQL-backed) collection.
14447
+ *
14448
+ * Logical types — the backend translates each to the matching SQLite
14449
+ * storage class and handles per-type marshaling:
14450
+ * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
14451
+ * - `JSON` — TEXT under the hood; serialised on write, parsed on read
14452
+ * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
14453
+ */
14454
+ var CollectionColumnSchema = object({
14455
+ name: string(),
14456
+ type: _enum([
14457
+ "TEXT",
14458
+ "INTEGER",
14459
+ "REAL",
14460
+ "JSON",
14461
+ "BOOLEAN"
14462
+ ]),
14463
+ primaryKey: boolean().optional(),
14464
+ notNull: boolean().optional(),
14465
+ unique: boolean().optional(),
14466
+ /**
14467
+ * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
14468
+ * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
14469
+ * collection surface simply cannot express their existing tables — which is
14470
+ * why they were still on the uncapped `table*` API.
14471
+ */
14472
+ defaultValue: union([
14473
+ string(),
14474
+ number(),
14475
+ boolean()
14476
+ ]).optional()
14477
+ });
14478
+ var CollectionIndexSchema = object({
14479
+ name: string(),
14480
+ columns: array(string()).readonly(),
14481
+ unique: boolean().optional()
14482
+ });
14483
+ /**
14484
+ * The input of `declareCollection` — ONE schema for the door and for the
14485
+ * engine behind it, so the two surfaces cannot drift (the dispatcher forwards
14486
+ * the payload untouched).
14487
+ *
14488
+ * - `database` — the file the collection lives in (D851). Absent means
14489
+ * `settings`. A declaration naming a file other than the one the table is
14490
+ * already in is REFUSED by the engine, never moved.
14491
+ * - `primaryKey` — a COMPOSITE key, as column names. A single name is the same
14492
+ * as `primaryKey: true` on that column. A composite-keyed collection has no
14493
+ * `id`: it is written with `insertMany` / `upsertMany` / `transact` and read
14494
+ * with `query` / `count` / `aggregate` / `deleteWhere`; the calls that
14495
+ * address one row by id are refused.
14496
+ * - `withoutRowid` — emit `WITHOUT ROWID`. Requires a primary key.
14497
+ */
14498
+ var DeclareCollectionInputSchema = object({
14499
+ namespace: string().optional(),
14500
+ collection: string(),
14501
+ columns: array(CollectionColumnSchema).readonly(),
14502
+ indexes: array(CollectionIndexSchema).readonly().optional(),
14503
+ database: DataStoreDatabaseSchema.optional(),
14504
+ primaryKey: array(string()).readonly().optional(),
14505
+ withoutRowid: boolean().optional()
14506
+ });
14507
+ method(object({
14508
+ namespace: string().optional(),
14509
+ collection: string(),
14510
+ key: string()
14511
+ }), unknown(), { auth: "admin" }), method(object({
14512
+ namespace: string().optional(),
14513
+ collection: string(),
14514
+ key: string(),
14515
+ value: unknown()
14516
+ }), _void(), {
14517
+ kind: "mutation",
14518
+ auth: "admin"
14519
+ }), method(object({
14520
+ namespace: string().optional(),
14521
+ collection: string(),
14522
+ filter: QueryFilterSchema.optional(),
14523
+ columns: array(string()).readonly().optional()
14524
+ }), array(SettingsRecordSchema).readonly(), { auth: "admin" }), method(object({
14525
+ namespace: string().optional(),
14526
+ collection: string(),
14527
+ /** Declared columns identifying the slot; must be covered by a UNIQUE
14528
+ * index on the collection. Never empty. */
14529
+ conflict: array(string()).readonly(),
14530
+ record: BulkRecordSchema
14531
+ }), object({
14532
+ /** The id the row HAS: assigned by SQLite on an insert, or the existing
14533
+ * row's own id on an update. */
14534
+ id: union([string(), number()]) }), {
14535
+ kind: "mutation",
14536
+ auth: "admin"
14537
+ }), method(object({
14538
+ namespace: string().optional(),
14539
+ collection: string(),
14540
+ conflict: array(string()).readonly(),
14541
+ records: array(BulkRecordSchema).readonly()
14542
+ }), object({ upserted: number().int() }), {
14543
+ kind: "mutation",
14544
+ auth: "admin"
14545
+ }), method(object({
14546
+ namespace: string().optional(),
14547
+ collection: string(),
14548
+ record: object({
14549
+ id: string().optional(),
14550
+ data: record(string(), unknown())
14551
+ })
14552
+ }), object({
14553
+ /**
14554
+ * The id the row ACTUALLY got (D473): the one supplied, the UUID minted
14555
+ * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
14556
+ * primary key — which is the only place an auto key is knowable.
14557
+ */
14558
+ id: union([string(), number()]) }), {
14559
+ kind: "mutation",
14560
+ auth: "admin"
14561
+ }), method(object({
14562
+ namespace: string().optional(),
14563
+ collection: string(),
14564
+ records: array(BulkRecordSchema).readonly()
14565
+ }), object({ inserted: number().int() }), {
14566
+ kind: "mutation",
14567
+ auth: "admin"
14568
+ }), method(object({
14569
+ namespace: string().optional(),
14570
+ guard: TransactGuardSchema.optional(),
14571
+ ops: array(TransactOpSchema).readonly()
14572
+ }), object({
14573
+ applied: boolean(),
14574
+ current: unknown().optional()
14575
+ }), {
14576
+ kind: "mutation",
14577
+ auth: "admin"
14578
+ }), method(object({
14579
+ namespace: string().optional(),
14580
+ collection: string(),
14581
+ id: string(),
14582
+ data: record(string(), unknown())
14583
+ }), _void(), {
14584
+ kind: "mutation",
14585
+ auth: "admin"
14586
+ }), method(object({
14587
+ namespace: string().optional(),
14588
+ collection: string(),
14589
+ key: string()
14590
+ }), _void(), {
14591
+ kind: "mutation",
14592
+ auth: "admin"
14593
+ }), method(object({
14594
+ namespace: string().optional(),
14595
+ collection: string(),
14596
+ filter: MutationFilterSchema
14597
+ }), object({ deleted: number().int() }), {
14598
+ kind: "mutation",
14599
+ auth: "admin"
14600
+ }), method(object({
14601
+ namespace: string().optional(),
14602
+ collection: string(),
14603
+ filter: MutationFilterSchema,
14604
+ data: record(string(), unknown())
14605
+ }), object({ updated: number().int() }), {
14606
+ kind: "mutation",
14607
+ auth: "admin"
14608
+ }), method(object({
14609
+ namespace: string().optional(),
14610
+ collection: string(),
14611
+ filter: QueryFilterSchema.optional()
14612
+ }), number(), { auth: "admin" }), method(object({
14613
+ namespace: string().optional(),
14614
+ collection: string(),
14615
+ fields: array(AggregateFieldSchema).readonly(),
14616
+ filter: QueryFilterSchema.optional()
14617
+ }), AggregateResultSchema, { auth: "admin" }), method(object({
14618
+ namespace: string().optional(),
14619
+ collection: string(),
14620
+ field: string(),
14621
+ bucketSize: number().int().positive(),
14622
+ origin: number().int(),
14623
+ filter: QueryFilterSchema.optional()
14624
+ }), array(object({
14625
+ bucket: number().int(),
14626
+ count: number().int()
14627
+ })).readonly(), { auth: "admin" }), method(object({
14628
+ namespace: string().optional(),
14629
+ collection: string()
14630
+ }), boolean(), { auth: "admin" }), method(DeclareCollectionInputSchema, _void(), {
14631
+ kind: "mutation",
14632
+ auth: "admin"
14633
+ });
14634
+ /**
14312
14635
  * How long one snapshot may take end to end: the pinned copy of the whole
14313
14636
  * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
14314
14637
  * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
@@ -14321,7 +14644,11 @@ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
14321
14644
  * database has no sidecars and is just as owned). Paths are absolute on the
14322
14645
  * owner's host.
14323
14646
  */
14324
- var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
14647
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({
14648
+ /** Which owned file this is — the handle `writeSnapshot` takes. */
14649
+ databaseId: DataStoreDatabaseSchema,
14650
+ livePath: string()
14651
+ })) });
14325
14652
  /** One b-tree table of the snapshot and the rows it holds. */
14326
14653
  var DatabaseSnapshotTableSchema = object({
14327
14654
  name: string(),
@@ -14354,6 +14681,10 @@ var DatabaseSnapshotResultSchema = object({
14354
14681
  /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
14355
14682
  takenAt: number()
14356
14683
  });
14684
+ /** A snapshot the owner wrote, with the file it belongs to. */
14685
+ var DatabaseSnapshotWrittenSchema = DatabaseSnapshotResultSchema.extend({ databaseId: DataStoreDatabaseSchema });
14686
+ /** Which database `writeSnapshot` copies. Required: an unstated ask is not guessed. */
14687
+ var DatabaseSnapshotRequestSchema = object({ databaseId: DataStoreDatabaseSchema });
14357
14688
  /**
14358
14689
  * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
14359
14690
  * the same facts, with both paths relative to the archive root (the node's
@@ -14363,9 +14694,11 @@ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
14363
14694
  /** Archive-relative path of the live database the archive does NOT carry. */
14364
14695
  livePath: string(),
14365
14696
  /** Archive-relative path of the verified copy it carries in its place. */
14366
- snapshotPath: string()
14697
+ snapshotPath: string(),
14698
+ /** Absent on an archive made before several files were owned: that was `settings`. */
14699
+ databaseId: DataStoreDatabaseSchema.optional()
14367
14700
  });
14368
- method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
14701
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(DatabaseSnapshotRequestSchema, DatabaseSnapshotWrittenSchema, {
14369
14702
  kind: "mutation",
14370
14703
  auth: "admin",
14371
14704
  timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
@@ -14486,7 +14819,12 @@ var BackupArchiveEntrySchema = object({
14486
14819
  /** Top-level locations included in the archive (db, addons, tls, …). */
14487
14820
  locations: array(string()).readonly(),
14488
14821
  /** Present when the archive is encrypted; restore then needs that key. */
14489
- encryption: BackupArchiveEncryptionSchema.optional()
14822
+ encryption: BackupArchiveEncryptionSchema.optional(),
14823
+ /**
14824
+ * The databases the run asked to carry (its retention class). Absent on an
14825
+ * archive made before several files were owned: that was `['settings']`.
14826
+ */
14827
+ databases: array(DataStoreDatabaseSchema).readonly().optional()
14490
14828
  });
14491
14829
  var BackupEntrySchema = object({
14492
14830
  id: string(),
@@ -14520,7 +14858,12 @@ var ArchiveManifestSchema = object({
14520
14858
  * Live SQLite databases this archive carries as their OWNER's verified
14521
14859
  * snapshot instead of as files (D693). Absent on archives made before.
14522
14860
  */
14523
- sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
14861
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional(),
14862
+ /**
14863
+ * Owned database files the run did NOT carry (not selected): left out of the
14864
+ * tar and the entry list alike. Absent when every owned file was carried.
14865
+ */
14866
+ omittedDatabases: array(DataStoreDatabaseSchema).optional()
14524
14867
  });
14525
14868
  var LocationStatSchema = object({
14526
14869
  name: string(),
@@ -14642,6 +14985,12 @@ var BackupScheduleSchema = object({
14642
14985
  /** Optional subset of source locations to include; omitted = all. */
14643
14986
  dataSources: array(string()).readonly().optional(),
14644
14987
  /**
14988
+ * Which database files this schedule carries. Absent = `['settings']`
14989
+ * (an unstated ask is the minimum, D382). Events and history run weekly,
14990
+ * settings nightly (D852).
14991
+ */
14992
+ databases: array(DataStoreDatabaseSchema).readonly().optional(),
14993
+ /**
14645
14994
  * ms-epoch of the last tick that FIRED this schedule. Stamped before the
14646
14995
  * archive runs (it is the dedupe anchor), so it says "attempted", never
14647
14996
  * "succeeded" — a run refused by every destination stamps it too.
@@ -14665,7 +15014,9 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
14665
15014
  * retention). Omitted = each destination's own policy
14666
15015
  * retention (manual runs).
14667
15016
  */
14668
- retentionCount: number().int().min(1).max(1e3).optional()
15017
+ retentionCount: number().int().min(1).max(1e3).optional(),
15018
+ /** Database files to carry; omitted = `['settings']`. */
15019
+ databases: array(DataStoreDatabaseSchema).optional()
14669
15020
  }).optional(), BackupTriggerResultSchema, {
14670
15021
  kind: "mutation",
14671
15022
  auth: "admin"
@@ -14740,14 +15091,18 @@ method(_void(), array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }
14740
15091
  ok: boolean(),
14741
15092
  error: string().optional(),
14742
15093
  nextRuns: array(number()).readonly()
14743
- })), method(_void(), array(BackupScheduleSchema).readonly(), { auth: "admin" }), method(object({
15094
+ })), method(_void(), array(BackupScheduleSchema).readonly(), { auth: "admin" }), method(_void(), object({
15095
+ answered: boolean(),
15096
+ databases: array(DataStoreDatabaseSchema).readonly()
15097
+ }), { auth: "admin" }), method(object({
14744
15098
  id: string().optional(),
14745
15099
  label: string(),
14746
15100
  cron: string(),
14747
15101
  enabled: boolean(),
14748
15102
  locationIds: array(string()).readonly(),
14749
15103
  retentionCount: number().int().min(1).max(1e3),
14750
- dataSources: array(string()).readonly().optional()
15104
+ dataSources: array(string()).readonly().optional(),
15105
+ databases: array(DataStoreDatabaseSchema).readonly().optional()
14751
15106
  }), BackupScheduleSchema, {
14752
15107
  kind: "mutation",
14753
15108
  auth: "admin"
@@ -16527,282 +16882,6 @@ method(_void(), array(CustomModelDescriptorSchema).readonly(), { auth: "admin" }
16527
16882
  timeoutMs: 30 * 6e4
16528
16883
  });
16529
16884
  /**
16530
- * Query filter for settings-store collections.
16531
- */
16532
- var QueryFilterSchema = object({
16533
- where: record(string(), unknown()).optional(),
16534
- whereIn: record(string(), array(unknown())).optional(),
16535
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
16536
- /** NULL-safe exclusion: matches rows whose field is NULL OR != the value. */
16537
- whereNot: record(string(), unknown()).optional(),
16538
- /** NULL-safe exclusion of a SET — `whereNot` for more than one value. An
16539
- * empty list excludes nothing. See `QueryFilter.whereNotIn`. */
16540
- whereNotIn: record(string(), array(unknown())).optional(),
16541
- orderBy: object({
16542
- field: string(),
16543
- direction: _enum(["asc", "desc"])
16544
- }).optional(),
16545
- limit: number().optional(),
16546
- offset: number().optional()
16547
- });
16548
- /**
16549
- * The predicate half of a filter, for BULK MUTATIONS.
16550
- *
16551
- * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
16552
- * meaning for a statement that rewrites a set, and accepting them would invite
16553
- * a caller to believe `limit` bounds the damage. Every field is optional here
16554
- * only so the shape stays composable — the implementation REJECTS a filter
16555
- * that compiles to no predicate, because that is the whole collection.
16556
- */
16557
- var MutationFilterSchema = object({
16558
- where: record(string(), unknown()).optional(),
16559
- whereIn: record(string(), array(unknown())).optional(),
16560
- whereBetween: record(string(), tuple([unknown(), unknown()])).optional(),
16561
- whereNot: record(string(), unknown()).optional(),
16562
- whereNotIn: record(string(), array(unknown())).optional()
16563
- });
16564
- /**
16565
- * One scalar an {@link settingsStoreCapability.methods.aggregate} call asks for.
16566
- *
16567
- * `as` names the slot in the result, so the SAME column may be asked twice with
16568
- * two operations (`MIN(startMs)` and `MAX(startMs)` in one round trip) — which
16569
- * a `Record<column, op>` shape could not express.
16570
- */
16571
- var AggregateFieldSchema = object({
16572
- /** Result key. */
16573
- as: string().min(1),
16574
- /** Column to aggregate. Must be a real column of a declared collection. */
16575
- field: string().min(1),
16576
- op: _enum([
16577
- "sum",
16578
- "min",
16579
- "max"
16580
- ])
16581
- });
16582
- /**
16583
- * `COUNT(*)` plus one number per requested field.
16584
- *
16585
- * `null` means NO ROW MATCHED, never zero: a `SUM` over an empty set and a sum
16586
- * that really is 0 are different facts, and an accounting caller that renders
16587
- * "0 bytes, oldest = 0" for "nothing here" reports a lie about a disk.
16588
- */
16589
- var AggregateResultSchema = object({
16590
- count: number().int(),
16591
- values: record(string(), number().nullable())
16592
- });
16593
- /** A single stored record: `{ id, data }`. */
16594
- var SettingsRecordSchema = object({
16595
- id: string(),
16596
- data: record(string(), unknown())
16597
- });
16598
- /**
16599
- * One record of a BULK insert — {@link SettingsRecordSchema} with the id made
16600
- * optional.
16601
- *
16602
- * A separate schema rather than loosening the shared one: every other method
16603
- * on this cap addresses a row BY its id, and making that field optional
16604
- * everywhere would turn a forgotten key into a silently generated one on
16605
- * `update` and `delete` as well.
16606
- */
16607
- var BulkRecordSchema = object({
16608
- id: string().optional(),
16609
- data: record(string(), unknown())
16610
- });
16611
- /**
16612
- * One write inside a {@link settingsStoreCapability.methods.transact} call.
16613
- * Only the three that a "replace this set, bump that revision" write needs.
16614
- */
16615
- var TransactOpSchema = discriminatedUnion("op", [
16616
- object({
16617
- op: literal("deleteWhere"),
16618
- collection: string(),
16619
- filter: MutationFilterSchema
16620
- }),
16621
- object({
16622
- op: literal("insertMany"),
16623
- collection: string(),
16624
- records: array(BulkRecordSchema).readonly()
16625
- }),
16626
- object({
16627
- op: literal("update"),
16628
- collection: string(),
16629
- id: string(),
16630
- data: record(string(), unknown())
16631
- })
16632
- ]);
16633
- /**
16634
- * The precondition of a transaction: the row `key` of `collection` must hold
16635
- * `equals` in `column`, read INSIDE the transaction.
16636
- */
16637
- var TransactGuardSchema = object({
16638
- collection: string(),
16639
- key: string(),
16640
- column: string(),
16641
- equals: unknown()
16642
- });
16643
- /**
16644
- * Column declaration for a structured (SQL-backed) collection.
16645
- *
16646
- * Logical types — the backend translates each to the matching SQLite
16647
- * storage class and handles per-type marshaling:
16648
- * - `TEXT` / `INTEGER` / `REAL` — native SQLite types, pass-through
16649
- * - `JSON` — TEXT under the hood; serialised on write, parsed on read
16650
- * - `BOOLEAN` — INTEGER 0/1 under the hood; coerced both directions
16651
- */
16652
- var CollectionColumnSchema = object({
16653
- name: string(),
16654
- type: _enum([
16655
- "TEXT",
16656
- "INTEGER",
16657
- "REAL",
16658
- "JSON",
16659
- "BOOLEAN"
16660
- ]),
16661
- primaryKey: boolean().optional(),
16662
- notNull: boolean().optional(),
16663
- unique: boolean().optional(),
16664
- /**
16665
- * Column DEFAULT. Required for B2: the four `ensureTable` consumers declare
16666
- * columns like `enabled INTEGER NOT NULL DEFAULT 1`, and without this the
16667
- * collection surface simply cannot express their existing tables — which is
16668
- * why they were still on the uncapped `table*` API.
16669
- */
16670
- defaultValue: union([
16671
- string(),
16672
- number(),
16673
- boolean()
16674
- ]).optional()
16675
- });
16676
- var CollectionIndexSchema = object({
16677
- name: string(),
16678
- columns: array(string()).readonly(),
16679
- unique: boolean().optional()
16680
- });
16681
- method(object({
16682
- namespace: string().optional(),
16683
- collection: string(),
16684
- key: string()
16685
- }), unknown(), { auth: "admin" }), method(object({
16686
- namespace: string().optional(),
16687
- collection: string(),
16688
- key: string(),
16689
- value: unknown()
16690
- }), _void(), {
16691
- kind: "mutation",
16692
- auth: "admin"
16693
- }), method(object({
16694
- namespace: string().optional(),
16695
- collection: string(),
16696
- filter: QueryFilterSchema.optional(),
16697
- columns: array(string()).readonly().optional()
16698
- }), array(SettingsRecordSchema).readonly(), { auth: "admin" }), method(object({
16699
- namespace: string().optional(),
16700
- collection: string(),
16701
- /** Declared columns identifying the slot; must be covered by a UNIQUE
16702
- * index on the collection. Never empty. */
16703
- conflict: array(string()).readonly(),
16704
- record: BulkRecordSchema
16705
- }), object({
16706
- /** The id the row HAS: assigned by SQLite on an insert, or the existing
16707
- * row's own id on an update. */
16708
- id: union([string(), number()]) }), {
16709
- kind: "mutation",
16710
- auth: "admin"
16711
- }), method(object({
16712
- namespace: string().optional(),
16713
- collection: string(),
16714
- record: object({
16715
- id: string().optional(),
16716
- data: record(string(), unknown())
16717
- })
16718
- }), object({
16719
- /**
16720
- * The id the row ACTUALLY got (D473): the one supplied, the UUID minted
16721
- * for an absent one, or the ROWID SQLite assigned on an `INTEGER`
16722
- * primary key — which is the only place an auto key is knowable.
16723
- */
16724
- id: union([string(), number()]) }), {
16725
- kind: "mutation",
16726
- auth: "admin"
16727
- }), method(object({
16728
- namespace: string().optional(),
16729
- collection: string(),
16730
- records: array(BulkRecordSchema).readonly()
16731
- }), object({ inserted: number().int() }), {
16732
- kind: "mutation",
16733
- auth: "admin"
16734
- }), method(object({
16735
- namespace: string().optional(),
16736
- guard: TransactGuardSchema.optional(),
16737
- ops: array(TransactOpSchema).readonly()
16738
- }), object({
16739
- applied: boolean(),
16740
- current: unknown().optional()
16741
- }), {
16742
- kind: "mutation",
16743
- auth: "admin"
16744
- }), method(object({
16745
- namespace: string().optional(),
16746
- collection: string(),
16747
- id: string(),
16748
- data: record(string(), unknown())
16749
- }), _void(), {
16750
- kind: "mutation",
16751
- auth: "admin"
16752
- }), method(object({
16753
- namespace: string().optional(),
16754
- collection: string(),
16755
- key: string()
16756
- }), _void(), {
16757
- kind: "mutation",
16758
- auth: "admin"
16759
- }), method(object({
16760
- namespace: string().optional(),
16761
- collection: string(),
16762
- filter: MutationFilterSchema
16763
- }), object({ deleted: number().int() }), {
16764
- kind: "mutation",
16765
- auth: "admin"
16766
- }), method(object({
16767
- namespace: string().optional(),
16768
- collection: string(),
16769
- filter: MutationFilterSchema,
16770
- data: record(string(), unknown())
16771
- }), object({ updated: number().int() }), {
16772
- kind: "mutation",
16773
- auth: "admin"
16774
- }), method(object({
16775
- namespace: string().optional(),
16776
- collection: string(),
16777
- filter: QueryFilterSchema.optional()
16778
- }), number(), { auth: "admin" }), method(object({
16779
- namespace: string().optional(),
16780
- collection: string(),
16781
- fields: array(AggregateFieldSchema).readonly(),
16782
- filter: QueryFilterSchema.optional()
16783
- }), AggregateResultSchema, { auth: "admin" }), method(object({
16784
- namespace: string().optional(),
16785
- collection: string(),
16786
- field: string(),
16787
- bucketSize: number().int().positive(),
16788
- origin: number().int(),
16789
- filter: QueryFilterSchema.optional()
16790
- }), array(object({
16791
- bucket: number().int(),
16792
- count: number().int()
16793
- })).readonly(), { auth: "admin" }), method(object({
16794
- namespace: string().optional(),
16795
- collection: string()
16796
- }), boolean(), { auth: "admin" }), method(object({
16797
- namespace: string().optional(),
16798
- collection: string(),
16799
- columns: array(CollectionColumnSchema).readonly(),
16800
- indexes: array(CollectionIndexSchema).readonly().optional()
16801
- }), _void(), {
16802
- kind: "mutation",
16803
- auth: "admin"
16804
- });
16805
- /**
16806
16885
  * What one engine says about itself. The orchestrator uses `kind` to pick
16807
16886
  * a registrant for a collection; `engineId` is what a log line names when
16808
16887
  * a call is routed or refused.
@@ -16882,6 +16961,14 @@ id: union([string(), number()]) }), {
16882
16961
  }), object({ id: union([string(), number()]) }), {
16883
16962
  kind: "mutation",
16884
16963
  auth: "admin"
16964
+ }), method(object({
16965
+ namespace: string().optional(),
16966
+ collection: string(),
16967
+ conflict: array(string()).readonly(),
16968
+ records: array(BulkRecordSchema).readonly()
16969
+ }), object({ upserted: number().int() }), {
16970
+ kind: "mutation",
16971
+ auth: "admin"
16885
16972
  }), method(object({
16886
16973
  namespace: string().optional(),
16887
16974
  collection: string(),
@@ -16951,12 +17038,7 @@ id: union([string(), number()]) }), {
16951
17038
  })).readonly(), { auth: "admin" }), method(object({
16952
17039
  namespace: string().optional(),
16953
17040
  collection: string()
16954
- }), boolean(), { auth: "admin" }), method(object({
16955
- namespace: string().optional(),
16956
- collection: string(),
16957
- columns: array(CollectionColumnSchema).readonly(),
16958
- indexes: array(CollectionIndexSchema).readonly().optional()
16959
- }), _void(), {
17041
+ }), boolean(), { auth: "admin" }), method(DeclareCollectionInputSchema, _void(), {
16960
17042
  kind: "mutation",
16961
17043
  auth: "admin"
16962
17044
  });
@@ -35762,6 +35844,18 @@ var CalendarInfoSchema = object({
35762
35844
  source: CalendarSourceKindSchema,
35763
35845
  enabled: boolean()
35764
35846
  });
35847
+ /**
35848
+ * Time contract of {@link CalendarEvent}.
35849
+ *
35850
+ * - Timed event: `startMs` / `endMs` are real instants; `endMs` is exclusive.
35851
+ * - All-day event (`allDay: true`): the event is a run of calendar DATES, not
35852
+ * instants. `startMs` is UTC midnight of the first date and `endMs` is UTC
35853
+ * midnight of the day AFTER the last date (RFC 5545 exclusive DTEND), so a
35854
+ * one-day event spans exactly 24 h. Every provider produces that and no
35855
+ * consumer may read the instants in a local timezone: use
35856
+ * {@link calendarEventLocalSpan}. Reading UTC midnight as local time put an
35857
+ * all-day event on the following day for any viewer ahead of UTC.
35858
+ */
35765
35859
  var CalendarEventSchema = object({
35766
35860
  id: string().min(1),
35767
35861
  calendarId: string().min(1),
@@ -35778,6 +35872,33 @@ var CalendarListEventsInputSchema = object({
35778
35872
  endMs: number().int()
35779
35873
  });
35780
35874
  method(_void(), array(CalendarInfoSchema).readonly(), { auth: "admin" }), method(CalendarListEventsInputSchema, array(CalendarEventSchema).readonly(), { auth: "admin" });
35875
+ function localMidnightOfUtcDate(utcMidnightMs) {
35876
+ const d = new Date(utcMidnightMs);
35877
+ return new Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate()).getTime();
35878
+ }
35879
+ /**
35880
+ * The interval an event occupies on the viewer's local clock, end exclusive.
35881
+ * A timed event is returned as is; an all-day event's UTC dates are re-read as
35882
+ * local calendar dates (local midnight to local midnight, DST-safe). A
35883
+ * degenerate all-day end (`<=` start) is widened to one day.
35884
+ */
35885
+ function calendarEventLocalSpan(ev) {
35886
+ if (ev.allDay !== true) return {
35887
+ startMs: ev.startMs,
35888
+ endMs: ev.endMs
35889
+ };
35890
+ const startMs = localMidnightOfUtcDate(ev.startMs);
35891
+ const endMs = localMidnightOfUtcDate(ev.endMs);
35892
+ if (endMs > startMs) return {
35893
+ startMs,
35894
+ endMs
35895
+ };
35896
+ const start = new Date(startMs);
35897
+ return {
35898
+ startMs,
35899
+ endMs: new Date(start.getFullYear(), start.getMonth(), start.getDate() + 1).getTime()
35900
+ };
35901
+ }
35781
35902
  /**
35782
35903
  * `calendars` — system-scoped singleton. Public surface admin-ui and the
35783
35904
  * notification-center calendar-events producer consume.
@@ -38811,7 +38932,15 @@ var HubAddressBookSchema = object({
38811
38932
  publicEndpoint: HubAddressRoleResolutionSchema
38812
38933
  }),
38813
38934
  /** The `hub=` an app link carries (D709), or null. */
38814
- appLinkHub: string().nullable()
38935
+ appLinkHub: string().nullable(),
38936
+ /**
38937
+ * Every origin a browser can really reach this hub at, in the scheme each
38938
+ * listener serves: `https://<lan>:<httpsPort>`, and `http://<lan>:<httpPort>`
38939
+ * while LAN HTTP is on, plus the public and custom addresses. Distinct from
38940
+ * `rows`, which show `http://` only while LAN HTTP is on. Never loopback,
38941
+ * never the app link. Absent on a hub older than D794's amendment.
38942
+ */
38943
+ listenerOrigins: array(string()).readonly().optional()
38815
38944
  });
38816
38945
  var AllowedAddressesSchema = object({
38817
38946
  /**
@@ -48385,6 +48514,12 @@ Object.freeze({
48385
48514
  addonId: null,
48386
48515
  access: "view"
48387
48516
  },
48517
+ "backup.listAvailableDatabases": {
48518
+ capName: "backup",
48519
+ capScope: "system",
48520
+ addonId: null,
48521
+ access: "view"
48522
+ },
48388
48523
  "backup.listDestinations": {
48389
48524
  capName: "backup",
48390
48525
  capScope: "system",
@@ -49105,6 +49240,12 @@ Object.freeze({
49105
49240
  addonId: null,
49106
49241
  access: "create"
49107
49242
  },
49243
+ "dataStoreProvider.upsertMany": {
49244
+ capName: "data-store-provider",
49245
+ capScope: "system",
49246
+ addonId: null,
49247
+ access: "create"
49248
+ },
49108
49249
  "dayNight.getOptions": {
49109
49250
  capName: "day-night",
49110
49251
  capScope: "device",
@@ -53953,6 +54094,12 @@ Object.freeze({
53953
54094
  addonId: null,
53954
54095
  access: "create"
53955
54096
  },
54097
+ "settingsStore.upsertMany": {
54098
+ capName: "settings-store",
54099
+ capScope: "system",
54100
+ addonId: null,
54101
+ access: "create"
54102
+ },
53956
54103
  "smoke.getStatus": {
53957
54104
  capName: "smoke",
53958
54105
  capScope: "device",
@@ -64487,6 +64634,12 @@ Object.defineProperty(exports, "buildViewerLink", {
64487
64634
  return buildViewerLink;
64488
64635
  }
64489
64636
  });
64637
+ Object.defineProperty(exports, "calendarEventLocalSpan", {
64638
+ enumerable: true,
64639
+ get: function() {
64640
+ return calendarEventLocalSpan;
64641
+ }
64642
+ });
64490
64643
  Object.defineProperty(exports, "canonicalHash", {
64491
64644
  enumerable: true,
64492
64645
  get: function() {