@camstack/system 1.2.422 → 1.2.424

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 (89) hide show
  1. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  2. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  3. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/alerts/alerts.addon.js +1 -1
  6. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  7. package/dist/builtins/autotrack/index.js +1 -1
  8. package/dist/builtins/autotrack/index.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  11. package/dist/builtins/calendars/calendars.addon.js +1 -1
  12. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  13. package/dist/builtins/camera-grid/index.js +1 -1
  14. package/dist/builtins/camera-grid/index.mjs +1 -1
  15. package/dist/builtins/composer/composer.addon.js +2 -2
  16. package/dist/builtins/composer/composer.addon.mjs +2 -2
  17. package/dist/builtins/console-logging/index.js +1 -1
  18. package/dist/builtins/console-logging/index.mjs +1 -1
  19. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  20. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  21. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  22. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  23. package/dist/builtins/hub-forwarder/index.js +1 -1
  24. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  25. package/dist/builtins/keychain/index.js +3 -3
  26. package/dist/builtins/keychain/index.mjs +3 -3
  27. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  28. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  29. package/dist/builtins/local-auth/local-auth.addon.js +2 -2
  30. package/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  31. package/dist/builtins/local-network/local-network.addon.js +1 -1
  32. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  33. package/dist/builtins/loki-logging/index.js +1 -1
  34. package/dist/builtins/loki-logging/index.mjs +1 -1
  35. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  36. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  37. package/dist/builtins/platform-probe/index.js +1 -1
  38. package/dist/builtins/platform-probe/index.mjs +1 -1
  39. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  40. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  41. package/dist/builtins/snapshot/index.js +1 -1
  42. package/dist/builtins/snapshot/index.mjs +1 -1
  43. package/dist/builtins/sqlite-storage/file-host-client.d.ts +59 -0
  44. package/dist/builtins/sqlite-storage/file-host-handlers.d.ts +23 -0
  45. package/dist/builtins/sqlite-storage/file-host-protocol.d.ts +151 -0
  46. package/dist/builtins/sqlite-storage/file-host-worker.d.ts +1 -0
  47. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  48. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  49. package/dist/builtins/sqlite-storage/index.js +21 -20
  50. package/dist/builtins/sqlite-storage/index.mjs +2 -1
  51. package/dist/builtins/sqlite-storage/owned-sqlite-file.d.ts +136 -0
  52. package/dist/builtins/sqlite-storage/placement-errors.d.ts +60 -0
  53. package/dist/builtins/sqlite-storage/placement-router.d.ts +80 -0
  54. package/dist/builtins/sqlite-storage/retired-collections.d.ts +7 -0
  55. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +68 -8
  56. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +23 -26
  57. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  58. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  59. package/dist/builtins/sqlite-storage/vector-provider.d.ts +24 -0
  60. package/dist/builtins/sqlite-storage/wal-maintenance.d.ts +17 -0
  61. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +3 -1
  62. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +3 -1
  63. package/dist/builtins/system-config/system-config.addon.js +2 -2
  64. package/dist/builtins/system-config/system-config.addon.mjs +2 -2
  65. package/dist/builtins/winston-logging/index.js +1 -1
  66. package/dist/builtins/winston-logging/index.mjs +1 -1
  67. package/dist/{composition-sources-BstNkBVe.js → composition-sources-BWNs-ZeH.js} +1 -1
  68. package/dist/{composition-sources-f_VjTBgs.mjs → composition-sources-tRG7nKWK.mjs} +1 -1
  69. package/dist/{constants-CY4vXTV-.js → constants-BBWZlnpQ.js} +1 -1
  70. package/dist/{constants-iLQM7god.mjs → constants-DHhhVjkt.mjs} +1 -1
  71. package/dist/{dist-CHsJCqrf.mjs → dist-B-NmfvVC.mjs} +97 -14
  72. package/dist/{dist-FSNJUw7p.js → dist-CiUKtVkX.js} +102 -13
  73. package/dist/file-host-worker.js +144 -0
  74. package/dist/file-host-worker.mjs +144 -0
  75. package/dist/index.js +9 -8
  76. package/dist/index.mjs +6 -5
  77. package/dist/{jwt-signing-key-DUVvfILp.mjs → jwt-signing-key-CUpweD22.mjs} +1 -1
  78. package/dist/{jwt-signing-key-CPha_bf7.js → jwt-signing-key-nwRpRgf_.js} +1 -1
  79. package/dist/{restore-archive-J_BsGRBy.mjs → restore-archive-CFmPVlWQ.mjs} +1 -1
  80. package/dist/{restore-archive-BwGWspP1.js → restore-archive-DA-aJtg7.js} +1 -1
  81. package/dist/{retired-settings-keys-BuQBYfu0.js → retired-settings-keys-D62kN_hT.js} +1 -1
  82. package/dist/{retired-settings-keys-3SMjMqj0.mjs → retired-settings-keys-DCGEI4Vi.mjs} +1 -1
  83. package/dist/sqlite-snapshot-worker.js +1 -1
  84. package/dist/sqlite-snapshot-worker.mjs +1 -1
  85. package/dist/wal-checkpoint-worker.js +1 -1
  86. package/dist/wal-checkpoint-worker.mjs +1 -1
  87. package/dist/wal-maintenance-BlqNqaQ3.mjs +0 -0
  88. package/dist/wal-maintenance-BzdCQGjH.js +0 -0
  89. package/package.json +1 -1
@@ -1,7 +1,25 @@
1
- import type { BulkRecord, CollectionColumn, CollectionIndex, DataStoreEngineInfo, HistogramBucket, IScopedLogger, ISettingsBackend, QueryFilter, SettingsAggregateInput, SettingsAggregateResult, SettingsCountInput, SettingsDeleteInput, SettingsGetInput, SettingsHistogramInput, SettingsInsertInput, SettingsIsEmptyInput, SettingsQueryInput, SettingsRecord, SettingsSetInput, SettingsUpdateInput, SettingsUpsertInput } from "@camstack/types";
1
+ import type { BulkRecord, DataStoreDatabase, DataStoreEngineInfo, DeclareCollectionInput, HistogramBucket, IScopedLogger, ISettingsBackend, QueryFilter, SettingsAggregateInput, SettingsAggregateResult, SettingsCountInput, SettingsDeleteInput, SettingsGetInput, SettingsHistogramInput, SettingsInsertInput, SettingsIsEmptyInput, SettingsQueryInput, SettingsRecord, SettingsSetInput, SettingsUpdateInput, SettingsUpsertInput } from "@camstack/types";
2
2
  import Database from "better-sqlite3";
3
3
  import { type MutationFilterInput } from "./filter-compiler.js";
4
4
  import { SqliteOpProfiler } from "./query-profiler.js";
5
+ /** How one file of the engine is opened. All optional: the defaults are `camstack.db`'s. */
6
+ export interface SqliteSettingsBackendOptions {
7
+ /** Which file this is — names it in log lines. Default `settings`. */
8
+ readonly databaseId?: DataStoreDatabase;
9
+ /**
10
+ * `incremental` sets `auto_vacuum = INCREMENTAL` — but ONLY on a file this
11
+ * open CREATES: the mode is fixed when the first table is written, and
12
+ * changing it on an existing file means a full `VACUUM`, which is the ops
13
+ * script's job (D853), never a boot step. Default `none`.
14
+ */
15
+ readonly autoVacuum?: "none" | "incremental";
16
+ /**
17
+ * Declare the canonical key/value collections and seed the defaults. True
18
+ * only for `settings`: canonical KV collections are settings by definition,
19
+ * and a second copy of them in `events.db` would be a table nobody reads.
20
+ */
21
+ readonly canonicalKv?: boolean;
22
+ }
5
23
  /** Input for {@link SqliteSettingsBackend.insertMany}. */
6
24
  interface SettingsInsertManyInput {
7
25
  readonly namespace?: string;
@@ -11,6 +29,16 @@ interface SettingsInsertManyInput {
11
29
  interface SettingsInsertManyResult {
12
30
  readonly inserted: number;
13
31
  }
32
+ /** Input for {@link SqliteSettingsBackend.upsertMany}. */
33
+ interface SettingsUpsertManyInput {
34
+ readonly namespace?: string;
35
+ readonly collection: string;
36
+ readonly conflict: readonly string[];
37
+ readonly records: readonly BulkRecord[];
38
+ }
39
+ interface SettingsUpsertManyResult {
40
+ readonly upserted: number;
41
+ }
14
42
  /** Input for {@link SqliteSettingsBackend.transact}. */
15
43
  interface SettingsTransactInput {
16
44
  readonly namespace?: string;
@@ -33,6 +61,11 @@ interface SettingsTransactInput {
33
61
  readonly collection: string;
34
62
  readonly id: string;
35
63
  readonly data: Record<string, unknown>;
64
+ } | {
65
+ readonly op: "upsertMany";
66
+ readonly collection: string;
67
+ readonly conflict: readonly string[];
68
+ readonly records: readonly BulkRecord[];
36
69
  })[];
37
70
  }
38
71
  interface SettingsTransactResult {
@@ -157,7 +190,8 @@ export declare class SqliteSettingsBackend implements ISettingsBackend {
157
190
  * is the failure this was built for (`query-profiler.ts`).
158
191
  */
159
192
  private readonly profiler;
160
- constructor(dbPath: string, runtimeDefaults?: Record<string, unknown>, logger?: IScopedLogger);
193
+ private readonly options;
194
+ constructor(dbPath: string, runtimeDefaults?: Record<string, unknown>, logger?: IScopedLogger, options?: SqliteSettingsBackendOptions);
161
195
  initialize(): Promise<void>;
162
196
  private requireDeclared;
163
197
  /**
@@ -229,6 +263,18 @@ export declare class SqliteSettingsBackend implements ISettingsBackend {
229
263
  /** The synchronous body of {@link insertMany}, shared with {@link transact}. */
230
264
  private insertManySync;
231
265
  /**
266
+ * Upsert a batch in ONE transaction, on ONE prepared statement.
267
+ *
268
+ * {@link upsert}'s batch twin: `INSERT … ON CONFLICT(<slot>) DO UPDATE`. One
269
+ * statement shape means every record must name the SAME declared columns and
270
+ * every `conflict` column — a record that mentioned fewer would otherwise
271
+ * bind NULL over a value the caller never meant to touch, so a heterogeneous
272
+ * batch is refused whole, before any SQL runs.
273
+ */
274
+ upsertMany({ namespace, collection, conflict, records }: SettingsUpsertManyInput): Promise<SettingsUpsertManyResult>;
275
+ /** The synchronous body of {@link upsertMany}, shared with {@link transact}. */
276
+ private upsertManySync;
277
+ /**
232
278
  * Several writes, one transaction, behind an optional guard.
233
279
  *
234
280
  * `better-sqlite3`'s `transaction()` is synchronous and rolls the whole call
@@ -372,6 +418,25 @@ export declare class SqliteSettingsBackend implements ISettingsBackend {
372
418
  * Returns null if the backend has not been initialized yet.
373
419
  */
374
420
  getDatabase(): Database.Database | null;
421
+ /** Which file this backend serves. */
422
+ getDatabaseId(): DataStoreDatabase;
423
+ /**
424
+ * The tables this file's own `_collection_declarations` names — the
425
+ * placement authority (D851). Read from DISK, not from memory, so a table
426
+ * created and declared by an earlier life of the process still counts.
427
+ */
428
+ declaredCollectionNames(): ReadonlySet<string>;
429
+ /** Does a table of this name exist in THIS file? */
430
+ hasTable(name: string): boolean;
431
+ /** Refuse an id-addressed call on a composite-keyed collection. */
432
+ private requireSingleKey;
433
+ /**
434
+ * The composite key of a declaration, validated: every name is a declared
435
+ * column, no column also claims `primaryKey: true`, and `withoutRowid` has a
436
+ * key to be keyed by. A single-name `primaryKey` is the single-column key it
437
+ * always was and returns empty.
438
+ */
439
+ private resolveKeyColumns;
375
440
  /**
376
441
  * `EXPLAIN QUERY PLAN` for a statement, as one string per plan row.
377
442
  *
@@ -494,12 +559,7 @@ export declare class SqliteSettingsBackend implements ISettingsBackend {
494
559
  * had the chance to re-declare — which on a respawn none of them will.
495
560
  */
496
561
  private restorePersistedDeclarations;
497
- declareCollection(input: {
498
- namespace?: string;
499
- collection: string;
500
- columns: readonly CollectionColumn[];
501
- indexes?: readonly CollectionIndex[];
502
- }): Promise<void>;
562
+ declareCollection(declared: DeclareCollectionInput): Promise<void>;
503
563
  /** Serialise per-column values for SQL binding: objects → JSON, booleans → 0/1. */
504
564
  private serializeColumnValue;
505
565
  private ensureTable;
@@ -1,7 +1,8 @@
1
1
  import type { ProviderRegistration } from "@camstack/types";
2
2
  import { BaseAddon } from "@camstack/types";
3
- import { SqliteSettingsBackend } from "./sqlite-settings-backend.js";
4
- import { SqliteVecVectorIndex } from "./vector-index-vec.js";
3
+ import { PlacementRouter } from "./placement-router.js";
4
+ import type { SqliteSettingsBackend } from "./sqlite-settings-backend.js";
5
+ import type { SqliteVecVectorIndex } from "./vector-index-vec.js";
5
6
  /**
6
7
  * SQLite Settings addon — the relational ENGINE behind the data door.
7
8
  *
@@ -12,22 +13,25 @@ import { SqliteVecVectorIndex } from "./vector-index-vec.js";
12
13
  * engine only through the door — which is the point, because it is what
13
14
  * makes the engine replaceable.
14
15
  *
16
+ * ONE engine process, SEVERAL owned files ([D851](../../../../../docs/decisions/adr-0851-one-sqlite-engine-serves-several-owned-files-one-thread-per-file.md)):
17
+ * `camstack.db` (settings) is served on this thread exactly as it always was;
18
+ * `events.db` and `history.db`, when a collection names them, are each served
19
+ * by a worker thread. A {@link PlacementRouter} is the provider the door sees.
20
+ * The layout of the files is documented in `docs/architecture/storage-files.md`.
21
+ *
15
22
  * It also serves `database-snapshot` (singleton, internal): the verified copy
16
23
  * of its database that the nightly backup archives in place of the live files
17
24
  * (D693).
18
25
  *
19
- * It ALSO serves `vector-store` (singleton, internal), from the same database
20
- * file and the same open handle. That capability first shipped as its own addon
21
- * and the separation cost two round trips per write — caller → door → engine —
22
- * plus a runner process, to reach a database this addon already has open. The
26
+ * It ALSO serves `vector-store` (singleton, internal), from the settings file's
27
+ * open handle. That capability first shipped as its own addon and the
28
+ * separation cost two round trips per write — caller → door → engine — plus a
29
+ * runner process, to reach a database this addon already has open. The
23
30
  * capability is what keeps the backend swappable; the package never was.
24
31
  */
25
32
  export declare class SqliteSettingsAddon extends BaseAddon {
26
- private backend;
27
- private vectorIndex;
28
- private walMaintenance;
29
- private walCheckpointer;
30
- private shmLockCanary;
33
+ private settingsFile;
34
+ private router;
31
35
  constructor();
32
36
  /**
33
37
  * The engine behind `settings-store` cannot read that door during
@@ -40,23 +44,16 @@ export declare class SqliteSettingsAddon extends BaseAddon {
40
44
  */
41
45
  protected override resolveConfig(): Promise<void>;
42
46
  protected onInitialize(): Promise<ProviderRegistration[]>;
43
- protected onShutdown(): Promise<void>;
44
- getBackend(): SqliteSettingsBackend | null;
45
47
  /**
46
- * Build the vector index.
47
- *
48
- * ONE implementation, deliberately. A second backend behind a flag means two
49
- * code paths that can disagree, two sets of gotchas, and a silent fallback
50
- * that turns "the extension is missing" into "search is mysteriously slow" —
51
- * the failure this codebase keeps paying for. The capability is the swap
52
- * point: another provider replaces this one wholesale, it does not hide
53
- * inside it.
54
- *
55
- * So a failed extension load THROWS. A node without the native binary must
56
- * fail at boot with a message naming sqlite-vec, not serve degraded results
57
- * nobody knows are degraded.
48
+ * Housekeeping that must happen BEFORE anything can read a file: the
49
+ * retired-key purge (settings only) and the retired-table purge (every
50
+ * open file).
58
51
  */
59
- private createVectorIndex;
52
+ private purgeBeforeServing;
53
+ protected onShutdown(): Promise<void>;
54
+ getBackend(): SqliteSettingsBackend | null;
55
+ /** The placement router; null before `onInitialize`. */
56
+ getRouter(): PlacementRouter | null;
60
57
  /** Exposed for tests; null before `onInitialize`. */
61
58
  getVectorIndex(): SqliteVecVectorIndex | null;
62
59
  }
@@ -0,0 +1,24 @@
1
+ import type { IScopedLogger, IVectorStoreProvider } from "@camstack/types";
2
+ import type { SqliteSettingsBackend } from "./sqlite-settings-backend.js";
3
+ import { SqliteVecVectorIndex } from "./vector-index-vec.js";
4
+ /**
5
+ * Build the vector index over a backend's connection.
6
+ *
7
+ * ONE implementation, deliberately. A second backend behind a flag means two
8
+ * code paths that can disagree, two sets of gotchas, and a silent fallback
9
+ * that turns "the extension is missing" into "search is mysteriously slow" —
10
+ * the failure this codebase keeps paying for. The capability is the swap
11
+ * point: another provider replaces this one wholesale, it does not hide
12
+ * inside it.
13
+ *
14
+ * So a failed extension load THROWS. A node without the native binary must
15
+ * fail at boot with a message naming sqlite-vec, not serve degraded results
16
+ * nobody knows are degraded.
17
+ */
18
+ export declare function createVectorIndex(backend: SqliteSettingsBackend, logger: IScopedLogger): SqliteVecVectorIndex;
19
+ /**
20
+ * The `vector-store` provider surface over one sqlite-vec index. Extracted
21
+ * from the addon so the main thread (settings) and the file-host worker
22
+ * (events) serve the SAME mapping.
23
+ */
24
+ export declare function vectorProviderOf(vectorIndex: SqliteVecVectorIndex): IVectorStoreProvider;
@@ -74,6 +74,14 @@ export interface WalMaintenanceOptions {
74
74
  readonly idleQuietMs?: number;
75
75
  readonly intervalMs?: number;
76
76
  readonly busyTimeoutMs?: number;
77
+ /**
78
+ * Pages to hand back to the filesystem per idle tick with
79
+ * `PRAGMA incremental_vacuum(N)`. Absent or 0 = never. Only a file created
80
+ * with `auto_vacuum = INCREMENTAL` (D851) has a freelist this can shrink; on
81
+ * any other the pragma is a no-op, and the tick checks the mode first so it
82
+ * does not even try.
83
+ */
84
+ readonly incrementalVacuumPages?: number;
77
85
  }
78
86
  /**
79
87
  * Periodic, heavily gated `wal_checkpoint(TRUNCATE)`.
@@ -92,11 +100,20 @@ export declare class WalMaintenance {
92
100
  private readonly idleQuietMs;
93
101
  private readonly intervalMs;
94
102
  private readonly busyTimeoutMs;
103
+ private readonly incrementalVacuumPages;
95
104
  private timer;
96
105
  constructor(options: WalMaintenanceOptions);
97
106
  start(): void;
98
107
  stop(): void;
99
108
  isRunning(): boolean;
109
+ /**
110
+ * Give up to `incrementalVacuumPages` free pages back, when the file is in
111
+ * incremental auto-vacuum mode, has a freelist, and nothing has written for
112
+ * the idle window (the same gate the checkpoint uses — reclaiming pages
113
+ * takes the writer lock). Returns the pages released; 0 when it did nothing.
114
+ * Never throws.
115
+ */
116
+ vacuumOnce(): number;
100
117
  /** Evaluate the gate once and act. Never throws. */
101
118
  runOnce(): WalMaintenanceOutcome;
102
119
  private evaluate;
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-FSNJUw7p.js");
6
+ const require_dist = require("../../dist-CiUKtVkX.js");
7
7
  let zod = require("zod");
8
8
  let node_crypto = require("node:crypto");
9
9
  let _camstack_types_node = require("@camstack/types/node");
@@ -1237,6 +1237,7 @@ function createDataStoreDispatch(getEngines, getRemote) {
1237
1237
  insert: async (input) => (await engine()).insert(input),
1238
1238
  upsert: async (input) => (await engine()).upsert(input),
1239
1239
  insertMany: async (input) => (await engine()).insertMany(input),
1240
+ upsertMany: async (input) => (await engine()).upsertMany(input),
1240
1241
  transact: async (input) => (await engine()).transact(input),
1241
1242
  update: async (input) => (await engine()).update(input),
1242
1243
  delete: async (input) => (await engine()).delete(input),
@@ -1554,6 +1555,7 @@ function createHubSettingsForward(forward) {
1554
1555
  insert: (input) => send("insert", input),
1555
1556
  upsert: (input) => send("upsert", input),
1556
1557
  insertMany: (input) => send("insertMany", input),
1558
+ upsertMany: (input) => send("upsertMany", input),
1557
1559
  transact: (input) => send("transact", input),
1558
1560
  update: (input) => send("update", input),
1559
1561
  delete: (input) => send("delete", input),
@@ -1,4 +1,4 @@
1
- import { $r as transformSecretWrite, $t as mayReadLocation, B as StorageLocationModeSchema, Dt as evictionPolicyOfLocation, Gn as withLocationMode, H as StorageMigrationJobSchema, Ir as isSecretMarker, Jr as secretTreeFromPaths, Kr as resolveSecretMarkers, Kt as legacyModeOf, Mn as storageCapability, Nn as storageMigrationCapability, Pt as gbToBytes, Sn as resolveLocationMode, Sr as collectSecretConfigKeys, V as StorageLocationTypeSchema, Vr as parseJsonObject, cr as BaseAddon, ei as EventCategory, en as mayWriteToLocation, fr as REDACTED_SECRET, k as LegacyStorageLocationDefaultSchema, kn as settingsStoreCapability, rn as modeMayWrite, z as StorageCleanupJobSchema, zt as isLocationEnabled } from "../../dist-CHsJCqrf.mjs";
1
+ import { A as LegacyStorageLocationDefaultSchema, An as settingsStoreCapability, B as StorageCleanupJobSchema, Bt as isLocationEnabled, Cn as resolveLocationMode, Cr as collectSecretConfigKeys, Ft as gbToBytes, H as StorageLocationTypeSchema, Hr as parseJsonObject, Kn as withLocationMode, Lr as isSecretMarker, Nn as storageCapability, Ot as evictionPolicyOfLocation, Pn as storageMigrationCapability, U as StorageMigrationJobSchema, V as StorageLocationModeSchema, Yr as secretTreeFromPaths, ei as transformSecretWrite, en as mayReadLocation, in as modeMayWrite, lr as BaseAddon, pr as REDACTED_SECRET, qr as resolveSecretMarkers, qt as legacyModeOf, ti as EventCategory, tn as mayWriteToLocation } from "../../dist-B-NmfvVC.mjs";
2
2
  import { z } from "zod";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { containsOrEquals, physicalRootOf } from "@camstack/types/node";
@@ -1232,6 +1232,7 @@ function createDataStoreDispatch(getEngines, getRemote) {
1232
1232
  insert: async (input) => (await engine()).insert(input),
1233
1233
  upsert: async (input) => (await engine()).upsert(input),
1234
1234
  insertMany: async (input) => (await engine()).insertMany(input),
1235
+ upsertMany: async (input) => (await engine()).upsertMany(input),
1235
1236
  transact: async (input) => (await engine()).transact(input),
1236
1237
  update: async (input) => (await engine()).update(input),
1237
1238
  delete: async (input) => (await engine()).delete(input),
@@ -1549,6 +1550,7 @@ function createHubSettingsForward(forward) {
1549
1550
  insert: (input) => send("insert", input),
1550
1551
  upsert: (input) => send("upsert", input),
1551
1552
  insertMany: (input) => send("insertMany", input),
1553
+ upsertMany: (input) => send("upsertMany", input),
1552
1554
  transact: (input) => send("transact", input),
1553
1555
  update: (input) => send("update", input),
1554
1556
  delete: (input) => send("delete", input),
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-FSNJUw7p.js");
6
+ const require_dist = require("../../dist-CiUKtVkX.js");
7
7
  const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
8
- const require_constants$8 = require("../../constants-CY4vXTV-.js");
8
+ const require_constants$8 = require("../../constants-BBWZlnpQ.js");
9
9
  const require_x509_es = require("../../x509.es-Dzl0BbmG.js");
10
10
  const require_src$1 = require("../../src-CnAqG6EF.js");
11
11
  let zod = require("zod");
@@ -1,7 +1,7 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { $r as transformSecretWrite, Er as defineCustomActions, Fr as isSecretClear, Ir as isSecretMarker, Rr as makeSecretMarker, Tr as customAction, Yr as secretTreeFromSchema, cr as BaseAddon, jr as hydrateSchema, sr as errMsg } from "../../dist-CHsJCqrf.mjs";
2
+ import { Dr as defineCustomActions, Er as customAction, Ir as isSecretClear, Lr as isSecretMarker, Mr as hydrateSchema, Xr as secretTreeFromSchema, cr as errMsg, ei as transformSecretWrite, lr as BaseAddon, zr as makeSecretMarker } from "../../dist-B-NmfvVC.mjs";
3
3
  import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
4
- import { a as MESH_CA_KEY_REF, b as setProcessClusterSecretGate, c as MESH_JOIN_TOKEN_MAX_TTL_SEC, d as CLUSTER_SECRET_REF, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID, v as hashClusterSecret } from "../../constants-iLQM7god.mjs";
4
+ import { a as MESH_CA_KEY_REF, b as setProcessClusterSecretGate, c as MESH_JOIN_TOKEN_MAX_TTL_SEC, d as CLUSTER_SECRET_REF, i as MESH_CA_FIELD, l as SERVER_AUTH_OID, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID, v as hashClusterSecret } from "../../constants-DHhhVjkt.mjs";
5
5
  import { a as KeyUsagesExtension, c as Pkcs10CertificateRequestGenerator, d as X509Certificate$1, f as X509CertificateGenerator, i as KeyUsageFlags, n as BasicConstraintsExtension, o as PemConverter, p as cryptoProvider, r as ExtendedKeyUsageExtension, s as Pkcs10CertificateRequest, t as AuthorityKeyIdentifierExtension, u as SubjectKeyIdentifierExtension } from "../../x509.es-CAjSsrkk.mjs";
6
6
  import { t as require_src } from "../../src-hG4grMU4.mjs";
7
7
  import { z } from "zod";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-FSNJUw7p.js");
6
+ const require_dist = require("../../dist-CiUKtVkX.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { Xt as logDestinationCapability, cr as BaseAddon } from "../../dist-CHsJCqrf.mjs";
1
+ import { Zt as logDestinationCapability, lr as BaseAddon } from "../../dist-B-NmfvVC.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-FSNJUw7p.js");
1
+ const require_dist = require("./dist-CiUKtVkX.js");
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -1,4 +1,4 @@
1
- import { er as compositionSourceKey, sr as errMsg } from "./dist-CHsJCqrf.mjs";
1
+ import { cr as errMsg, tr as compositionSourceKey } from "./dist-B-NmfvVC.mjs";
2
2
  //#region src/builtins/core-blocks/composition-sources.ts
3
3
  /**
4
4
  * Describe what a composition reads and writes for SAVE-time validation
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-FSNJUw7p.js");
1
+ const require_dist = require("./dist-CiUKtVkX.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  //#region src/kernel/moleculer/cluster-secret.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { xr as buildSecretRef } from "./dist-CHsJCqrf.mjs";
1
+ import { Sr as buildSecretRef } from "./dist-B-NmfvVC.mjs";
2
2
  import { createHash, timingSafeEqual } from "node:crypto";
3
3
  //#region src/kernel/moleculer/cluster-secret.ts
4
4
  /**
@@ -15133,8 +15133,23 @@ var BulkRecordSchema = z.object({
15133
15133
  data: z.record(z.string(), z.unknown())
15134
15134
  });
15135
15135
  /**
15136
+ * The database FILES one `sqlite-settings` engine process owns (D851).
15137
+ * Closed on purpose: a file is a thing the engine opens, backs up and gives a
15138
+ * serving thread, so a new one is a code change, never a string a caller
15139
+ * invents. `settings` is `camstack.db` and the default for every collection
15140
+ * that names no file.
15141
+ */
15142
+ var DataStoreDatabaseSchema = z.enum([
15143
+ "settings",
15144
+ "events",
15145
+ "history"
15146
+ ]);
15147
+ /** Every database file, in a stable order (settings first). */
15148
+ var DATA_STORE_DATABASES = DataStoreDatabaseSchema.options;
15149
+ /**
15136
15150
  * One write inside a {@link settingsStoreCapability.methods.transact} call.
15137
- * Only the three that a "replace this set, bump that revision" write needs.
15151
+ * The three that a "replace this set, bump that revision" write needs, plus
15152
+ * the batched upsert a rollup writer needs.
15138
15153
  */
15139
15154
  var TransactOpSchema = z.discriminatedUnion("op", [
15140
15155
  z.object({
@@ -15152,6 +15167,12 @@ var TransactOpSchema = z.discriminatedUnion("op", [
15152
15167
  collection: z.string(),
15153
15168
  id: z.string(),
15154
15169
  data: z.record(z.string(), z.unknown())
15170
+ }),
15171
+ z.object({
15172
+ op: z.literal("upsertMany"),
15173
+ collection: z.string(),
15174
+ conflict: z.array(z.string()).readonly(),
15175
+ records: z.array(BulkRecordSchema).readonly()
15155
15176
  })
15156
15177
  ]);
15157
15178
  /**
@@ -15203,6 +15224,30 @@ var CollectionIndexSchema = z.object({
15203
15224
  unique: z.boolean().optional()
15204
15225
  });
15205
15226
  /**
15227
+ * The input of `declareCollection` — ONE schema for the door and for the
15228
+ * engine behind it, so the two surfaces cannot drift (the dispatcher forwards
15229
+ * the payload untouched).
15230
+ *
15231
+ * - `database` — the file the collection lives in (D851). Absent means
15232
+ * `settings`. A declaration naming a file other than the one the table is
15233
+ * already in is REFUSED by the engine, never moved.
15234
+ * - `primaryKey` — a COMPOSITE key, as column names. A single name is the same
15235
+ * as `primaryKey: true` on that column. A composite-keyed collection has no
15236
+ * `id`: it is written with `insertMany` / `upsertMany` / `transact` and read
15237
+ * with `query` / `count` / `aggregate` / `deleteWhere`; the calls that
15238
+ * address one row by id are refused.
15239
+ * - `withoutRowid` — emit `WITHOUT ROWID`. Requires a primary key.
15240
+ */
15241
+ var DeclareCollectionInputSchema = z.object({
15242
+ namespace: z.string().optional(),
15243
+ collection: z.string(),
15244
+ columns: z.array(CollectionColumnSchema).readonly(),
15245
+ indexes: z.array(CollectionIndexSchema).readonly().optional(),
15246
+ database: DataStoreDatabaseSchema.optional(),
15247
+ primaryKey: z.array(z.string()).readonly().optional(),
15248
+ withoutRowid: z.boolean().optional()
15249
+ });
15250
+ /**
15206
15251
  * settings-store — singleton capability for addon-scoped persistence.
15207
15252
  *
15208
15253
  * Every method operates within a `collection`. An optional `namespace`
@@ -15340,6 +15385,29 @@ id: z.union([z.string(), z.number()]) }), {
15340
15385
  kind: "mutation",
15341
15386
  auth: "admin"
15342
15387
  }),
15388
+ /**
15389
+ * {@link upsert} for a BATCH, in ONE transaction on ONE prepared statement.
15390
+ *
15391
+ * The write-side twin of {@link insertMany} for rows that may already
15392
+ * exist: a rollup writer recomputes a bucket and must overwrite it, and
15393
+ * N round trips with N COMMITs is the cost {@link insertMany} was added to
15394
+ * avoid. `conflict` has the meaning it has on {@link upsert} (declared
15395
+ * columns covered by a UNIQUE index or the primary key, never empty).
15396
+ *
15397
+ * Every record of a batch must carry the SAME set of declared columns and
15398
+ * every `conflict` column: one batch is one statement shape, and a record
15399
+ * that silently bound NULL over a column it did not mention would erase
15400
+ * it. A heterogeneous batch is refused whole. **All or nothing.**
15401
+ */
15402
+ upsertMany: method(z.object({
15403
+ namespace: z.string().optional(),
15404
+ collection: z.string(),
15405
+ conflict: z.array(z.string()).readonly(),
15406
+ records: z.array(BulkRecordSchema).readonly()
15407
+ }), z.object({ upserted: z.number().int() }), {
15408
+ kind: "mutation",
15409
+ auth: "admin"
15410
+ }),
15343
15411
  /** Insert a new record. */
15344
15412
  insert: method(z.object({
15345
15413
  namespace: z.string().optional(),
@@ -15538,12 +15606,7 @@ id: z.union([z.string(), z.number()]) }), {
15538
15606
  * `pipeline-analytics:object-events`) to avoid cross-addon
15539
15607
  * clashes — no automatic prefix is added.
15540
15608
  */
15541
- declareCollection: method(z.object({
15542
- namespace: z.string().optional(),
15543
- collection: z.string(),
15544
- columns: z.array(CollectionColumnSchema).readonly(),
15545
- indexes: z.array(CollectionIndexSchema).readonly().optional()
15546
- }), z.void(), {
15609
+ declareCollection: method(DeclareCollectionInputSchema, z.void(), {
15547
15610
  kind: "mutation",
15548
15611
  auth: "admin"
15549
15612
  })
@@ -15694,6 +15757,16 @@ id: z.union([z.string(), z.number()]) }), {
15694
15757
  kind: "mutation",
15695
15758
  auth: "admin"
15696
15759
  }),
15760
+ /** Upsert many records in ONE transaction; see the door's `upsertMany`. */
15761
+ upsertMany: method(z.object({
15762
+ namespace: z.string().optional(),
15763
+ collection: z.string(),
15764
+ conflict: z.array(z.string()).readonly(),
15765
+ records: z.array(BulkRecordSchema).readonly()
15766
+ }), z.object({ upserted: z.number().int() }), {
15767
+ kind: "mutation",
15768
+ auth: "admin"
15769
+ }),
15697
15770
  /** Insert many records in ONE transaction. All or nothing. */
15698
15771
  insertMany: method(z.object({
15699
15772
  namespace: z.string().optional(),
@@ -15786,12 +15859,7 @@ id: z.union([z.string(), z.number()]) }), {
15786
15859
  collection: z.string()
15787
15860
  }), z.boolean(), { auth: "admin" }),
15788
15861
  /** Declare a typed (SQL-backed) collection with columns + indexes. */
15789
- declareCollection: method(z.object({
15790
- namespace: z.string().optional(),
15791
- collection: z.string(),
15792
- columns: z.array(CollectionColumnSchema).readonly(),
15793
- indexes: z.array(CollectionIndexSchema).readonly().optional()
15794
- }), z.void(), {
15862
+ declareCollection: method(DeclareCollectionInputSchema, z.void(), {
15795
15863
  kind: "mutation",
15796
15864
  auth: "admin"
15797
15865
  })
@@ -26434,6 +26502,9 @@ var RetrainBoxReviewSchema = z.object({
26434
26502
  /** The baseline was re-derived, not snapshotted (a pre-origin row). */
26435
26503
  approximate: z.boolean(),
26436
26504
  origin: RetrainOriginSchema.optional(),
26505
+ /** The class / label the box carries NOW (a removed box: its origin's). Absent on an older hub. */
26506
+ macroClass: RetrainMacroClassSchema.optional(),
26507
+ label: z.string().optional(),
26437
26508
  iou: z.number().optional()
26438
26509
  });
26439
26510
  var RetrainFrameReviewSchema = z.object({
@@ -53095,6 +53166,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
53095
53166
  addonId: null,
53096
53167
  access: "create"
53097
53168
  },
53169
+ "dataStoreProvider.upsertMany": {
53170
+ capName: "data-store-provider",
53171
+ capScope: "system",
53172
+ addonId: null,
53173
+ access: "create"
53174
+ },
53098
53175
  "dayNight.getOptions": {
53099
53176
  capName: "day-night",
53100
53177
  capScope: "device",
@@ -57943,6 +58020,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
57943
58020
  addonId: null,
57944
58021
  access: "create"
57945
58022
  },
58023
+ "settingsStore.upsertMany": {
58024
+ capName: "settings-store",
58025
+ capScope: "system",
58026
+ addonId: null,
58027
+ access: "create"
58028
+ },
57946
58029
  "smoke.getStatus": {
57947
58030
  capName: "smoke",
57948
58031
  capScope: "device",
@@ -65445,4 +65528,4 @@ function enumerateInferenceDevices(hw) {
65445
65528
  return out;
65446
65529
  }
65447
65530
  //#endregion
65448
- export { buildStreamParamsConfigSchema as $, compositionSliceKey as $n, transformSecretWrite as $r, mayReadLocation as $t, LocationIconIdSchema as A, siteZoneKey as An, formatSecretScope as Ar, extractNestedAddonId as At, StorageLocationModeSchema as B, validateComposition as Bn, normalizeSecretOwner as Br, isObjectInput as Bt, FieldClaimModeSchema as C, resolveMethodAuth as Cn, collectZodSecretPaths as Cr, enumerateInferenceDevices as Ct, KEYCHAIN_RESET_TRIGGER_ACTOR as D, scopesAllowDeviceCap as Dn, emitDownForOwnedCaps as Dr, evictionPolicyOfLocation as Dt, HUB_MDNS_TXT_KEYS as E, scopesAllowAddon as En, defineCustomActions as Er, evaluateCompositionField as Et, RecordingStatusSchema as F, storageProviderCapability as Fn, isSecretClear as Fr, isAppLinkBase as Ft, addonSettingsCapability as G, withLocationMode as Gn, resolveCapMount as Gr, legacyAutoLinkIds as Gt, StorageMigrationJobSchema as H, vectorDimFromBase64 as Hn, parseJsonUnknown as Hr, kebabToCamel as Ht, STORAGE_ACCESS_FALLBACK as I, streamCatalogCapability as In, isSecretMarker as Ir, isArrayOutputSchema as It, authProviderCapability as J, cloneStatefulExpressionMemory as Jn, secretTreeFromPaths as Jr, localNetworkCapability as Jt, addonWidgetsCapability as K, COMPOSER_ADDON_ID as Kn, resolveSecretMarkers as Kr, legacyModeOf as Kt, STREAM_PROFILE_META as L, streamQualityLabel as Ln, isSecretMarkerLike as Lr, isCollectionArrayMethod as Lt, MINUTES_PER_DAY as M, storageCapability as Mn, isDeviceConfigCap as Mr, foldSnapshotByFunction as Mt, MOTION_CLOSE_AFTER_MS as N, storageMigrationCapability as Nn, isEvent as Nr, formatMinutes as Nt, LOG_LEVEL_RANK as O, scoreRuntimes as On, emitReadiness as Or, expandContainer as Ot, RECORDING_SOURCE_CAMSTACK_ADDON as P, storageOccupancyCapability as Pn, isKeychainStoredField as Pr, gbToBytes as Pt, buildCapabilityLookup as Q, compositionItemFieldPath as Qn, toSecretFieldView as Qr, looseSchema as Qt, ScopedTokenSchema as R, supportedRuntimes as Rn, makeSecretMarker as Rr, isDefaultAppConnectionEndpoint as Rt, FIRST_LEVEL_MACRO_CLASSES as S, resolveLocationMode as Sn, collectSecretConfigKeys as Sr, deviceStatusCapability as St, HUB_MDNS_SERVICE_TYPE as T, runtimeStatePolicyFor as Tn, customAction as Tr, enumerateSchemaFields as Tt, UserRecordSchema as U, vectorIndexDimConflictError as Un, parseSecretRef as Ur, keychainAdminCapability as Ut, StorageLocationTypeSchema as V, validateCustomAddress as Vn, parseJsonObject as Vr, isVoidInput as Vt, addonPagesCapability as W, vectorStoreCapability as Wn, readinessKey as Wr, keychainCapability as Wt, bareAddonId as X, composedDeviceStableId as Xn, sleep as Xr, logDestinationCapability as Xt, backupCapability as Y, composedDeviceRef as Yn, secretTreeFromSchema as Yr, locationIconKey as Yt, batteryCapability as Z, compositionFeatureEnabled as Zn, toNodeId as Zr, logLevelAtMost as Zt, DATABASE_SNAPSHOT_TIMEOUT_MS as _, resolveAppConnections as _n, WELL_KNOWN_TAB_MAP as _r, deriveBatteryPresence as _t, BatteryStatusSchema as a, normalizeCoreBlockWrite as an, DeviceRole as ar, compositionSourceRefs as at, DeclaredDevices as b, resolveCoreBlockFiles as bn, asString$1 as br, deviceManagerCapability as bt, CAP_NAMES_WITH_STATUS as c, objectInputDeclaresRequiredDeviceId as cn, BaseAddon as cr, coreBlockIdFromAddonId as ct, CORE_BLOCKS_ADDON_ID as d, planComposition as dn, DEVICE_STATUS_METHOD as dr, createDeviceExtensionProvider as dt, EventCategory as ei, mayWriteToLocation as en, compositionSourceKey as er, calendarsCapability as et, CORE_BLOCK_ADDON_PREFIX as f, platformProbeCapability as fn, REDACTED_SECRET as fr, dataStoreProviderCapability as ft, DATABASE_SNAPSHOT_SUFFIX as g, replacedFieldKeys as gn, SECRET_CLEAR as gr, defineExtensionSlotProvider as gt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as h, reducePoints as hn, ReadinessTimeoutError as hr, decodeVectorBase64 as ht, BaseDevice as i, motionCapability as in, DeviceFeature as ir, compositionFieldKey as it, METHOD_ACCESS_MAP as j, snapshotCapability as jn, hydrateSchema as jr, filesystemBrowseCapability as jt, LegacyStorageLocationDefaultSchema as k, settingsStoreCapability as kn, expandCapMethods as kr, expressionContainsBuiltinCall as kt, COMPOSED_ITEM_FIXED_FIELDS as l, parseStreamParamsFormPatch as ln, DATAPLANE_SECRET_HEADER as lr, coreBlockSourceKind as lt, CoreBlockSchema as m, ptzAutotrackCapability as mn, ReadinessRegistry as mr, declarationOwnerNodeId as mt, AlertSchema as n, metricsProviderCapability as nn, disarmRoseMemory as nr, checkRoleAddress as nt, CAMERA_SWITCH_ORDER as o, normalizeUnit as on, DeviceType as or, coreBlockAddonId as ot, CalendarPreferencesSchema as p, procedureAuthKey as pn, RUNTIME_DEFAULTS as pr, databaseSnapshotCapability as pt, alertsCapability as q, buildFfmpegArgs as qn, scopeKey as qr, lifecycleJobSchema as qt, ApiKeyRecordSchema as r, modeMayWrite as rn, toExpressionValue as rr, composerCapability as rt, CAMSTACK_APP_LINK_ORIGIN as s, objectInputDeclaresAddonId as sn, errMsg as sr, coreBlockComposition as st, ALL_CAPABILITY_DEFINITIONS as t, memoizePinnedFfmpeg as tn, createStatefulExpressionMemory as tr, cameraGridLayoutCapability as tt, COMPOSER_RUNNER_ID as u, pickAppLinkHub as un, DEVICE_SETTINGS_CONTRIBUTION_METHODS as ur, coreBlocksCapability as ut, DAY_NAMES as v, resolveBucketMs as vn, asJsonObject as vr, describeComposableCaps as vt, FieldClaimSchema as w, resolveNotificationTapAddress as wn, createEvent as wr, enumerateItemArrayFields as wt, DeviceStatusSchema as x, resolveHubAddressRoles as xn, buildSecretRef as xr, deviceStateCapability as xt, DERIVED_CAMERA_SILENCED_CAP_NAMES as y, resolveCoreBlockEntry as yn, asNumber as yr, deviceExtensionCapability as yt, StorageCleanupJobSchema as z, userManagementCapability as zn, nodePin as zr, isLocationEnabled as zt };
65531
+ export { buildCapabilityLookup as $, compositionItemFieldPath as $n, toSecretFieldView as $r, looseSchema as $t, LegacyStorageLocationDefaultSchema as A, settingsStoreCapability as An, expandCapMethods as Ar, expressionContainsBuiltinCall as At, StorageCleanupJobSchema as B, userManagementCapability as Bn, nodePin as Br, isLocationEnabled as Bt, FIRST_LEVEL_MACRO_CLASSES as C, resolveLocationMode as Cn, collectSecretConfigKeys as Cr, deviceStatusCapability as Ct, HUB_MDNS_TXT_KEYS as D, scopesAllowAddon as Dn, defineCustomActions as Dr, evaluateCompositionField as Dt, HUB_MDNS_SERVICE_TYPE as E, runtimeStatePolicyFor as En, customAction as Er, enumerateSchemaFields as Et, RECORDING_SOURCE_CAMSTACK_ADDON as F, storageOccupancyCapability as Fn, isKeychainStoredField as Fr, gbToBytes as Ft, addonPagesCapability as G, vectorStoreCapability as Gn, readinessKey as Gr, keychainCapability as Gt, StorageLocationTypeSchema as H, validateCustomAddress as Hn, parseJsonObject as Hr, isVoidInput as Ht, RecordingStatusSchema as I, storageProviderCapability as In, isSecretClear as Ir, isAppLinkBase as It, alertsCapability as J, buildFfmpegArgs as Jn, scopeKey as Jr, lifecycleJobSchema as Jt, addonSettingsCapability as K, withLocationMode as Kn, resolveCapMount as Kr, legacyAutoLinkIds as Kt, STORAGE_ACCESS_FALLBACK as L, streamCatalogCapability as Ln, isSecretMarker as Lr, isArrayOutputSchema as Lt, METHOD_ACCESS_MAP as M, snapshotCapability as Mn, hydrateSchema as Mr, filesystemBrowseCapability as Mt, MINUTES_PER_DAY as N, storageCapability as Nn, isDeviceConfigCap as Nr, foldSnapshotByFunction as Nt, KEYCHAIN_RESET_TRIGGER_ACTOR as O, scopesAllowDeviceCap as On, emitDownForOwnedCaps as Or, evictionPolicyOfLocation as Ot, MOTION_CLOSE_AFTER_MS as P, storageMigrationCapability as Pn, isEvent as Pr, formatMinutes as Pt, batteryCapability as Q, compositionFeatureEnabled as Qn, toNodeId as Qr, logLevelAtMost as Qt, STREAM_PROFILE_META as R, streamQualityLabel as Rn, isSecretMarkerLike as Rr, isCollectionArrayMethod as Rt, DeviceStatusSchema as S, resolveHubAddressRoles as Sn, buildSecretRef as Sr, deviceStateCapability as St, FieldClaimSchema as T, resolveNotificationTapAddress as Tn, createEvent as Tr, enumerateItemArrayFields as Tt, StorageMigrationJobSchema as U, vectorDimFromBase64 as Un, parseJsonUnknown as Ur, kebabToCamel as Ut, StorageLocationModeSchema as V, validateComposition as Vn, normalizeSecretOwner as Vr, isObjectInput as Vt, UserRecordSchema as W, vectorIndexDimConflictError as Wn, parseSecretRef as Wr, keychainAdminCapability as Wt, backupCapability as X, composedDeviceRef as Xn, secretTreeFromSchema as Xr, locationIconKey as Xt, authProviderCapability as Y, cloneStatefulExpressionMemory as Yn, secretTreeFromPaths as Yr, localNetworkCapability as Yt, bareAddonId as Z, composedDeviceStableId as Zn, sleep as Zr, logDestinationCapability as Zt, DATABASE_SNAPSHOT_TIMEOUT_MS as _, replacedFieldKeys as _n, SECRET_CLEAR as _r, defineExtensionSlotProvider as _t, BatteryStatusSchema as a, motionCapability as an, DeviceFeature as ar, compositionFieldKey as at, DERIVED_CAMERA_SILENCED_CAP_NAMES as b, resolveCoreBlockEntry as bn, asNumber as br, deviceExtensionCapability as bt, CAP_NAMES_WITH_STATUS as c, objectInputDeclaresAddonId as cn, errMsg as cr, coreBlockComposition as ct, CORE_BLOCKS_ADDON_ID as d, pickAppLinkHub as dn, DEVICE_SETTINGS_CONTRIBUTION_METHODS as dr, coreBlocksCapability as dt, transformSecretWrite as ei, mayReadLocation as en, compositionSliceKey as er, buildStreamParamsConfigSchema as et, CORE_BLOCK_ADDON_PREFIX as f, planComposition as fn, DEVICE_STATUS_METHOD as fr, createDeviceExtensionProvider as ft, DATABASE_SNAPSHOT_SUFFIX as g, reducePoints as gn, ReadinessTimeoutError as gr, decodeVectorBase64 as gt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as h, ptzAutotrackCapability as hn, ReadinessRegistry as hr, declarationOwnerNodeId as ht, BaseDevice as i, modeMayWrite as in, toExpressionValue as ir, composerCapability as it, LocationIconIdSchema as j, siteZoneKey as jn, formatSecretScope as jr, extractNestedAddonId as jt, LOG_LEVEL_RANK as k, scoreRuntimes as kn, emitReadiness as kr, expandContainer as kt, COMPOSED_ITEM_FIXED_FIELDS as l, objectInputDeclaresRequiredDeviceId as ln, BaseAddon as lr, coreBlockIdFromAddonId as lt, CoreBlockSchema as m, procedureAuthKey as mn, RUNTIME_DEFAULTS as mr, databaseSnapshotCapability as mt, AlertSchema as n, memoizePinnedFfmpeg as nn, createStatefulExpressionMemory as nr, cameraGridLayoutCapability as nt, CAMERA_SWITCH_ORDER as o, normalizeCoreBlockWrite as on, DeviceRole as or, compositionSourceRefs as ot, CalendarPreferencesSchema as p, platformProbeCapability as pn, REDACTED_SECRET as pr, dataStoreProviderCapability as pt, addonWidgetsCapability as q, COMPOSER_ADDON_ID as qn, resolveSecretMarkers as qr, legacyModeOf as qt, ApiKeyRecordSchema as r, metricsProviderCapability as rn, disarmRoseMemory as rr, checkRoleAddress as rt, CAMSTACK_APP_LINK_ORIGIN as s, normalizeUnit as sn, DeviceType as sr, coreBlockAddonId as st, ALL_CAPABILITY_DEFINITIONS as t, EventCategory as ti, mayWriteToLocation as tn, compositionSourceKey as tr, calendarsCapability as tt, COMPOSER_RUNNER_ID as u, parseStreamParamsFormPatch as un, DATAPLANE_SECRET_HEADER as ur, coreBlockSourceKind as ut, DATA_STORE_DATABASES as v, resolveAppConnections as vn, WELL_KNOWN_TAB_MAP as vr, deriveBatteryPresence as vt, FieldClaimModeSchema as w, resolveMethodAuth as wn, collectZodSecretPaths as wr, enumerateInferenceDevices as wt, DeclaredDevices as x, resolveCoreBlockFiles as xn, asString$1 as xr, deviceManagerCapability as xt, DAY_NAMES as y, resolveBucketMs as yn, asJsonObject as yr, describeComposableCaps as yt, ScopedTokenSchema as z, supportedRuntimes as zn, makeSecretMarker as zr, isDefaultAppConnectionEndpoint as zt };