@camstack/system 1.2.444 → 1.2.446

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 (144) hide show
  1. package/dist/addon-runner.js +40 -31
  2. package/dist/addon-runner.mjs +41 -32
  3. package/dist/{agent-https-DlpTMDqA.js → agent-https-5DYAOJMO.js} +810 -12
  4. package/dist/{agent-https-U0d4uvn2.mjs → agent-https-BWUEf6ev.mjs} +697 -13
  5. package/dist/auth/admin-token-manager.d.ts +9 -3
  6. package/dist/auth/api-key-manager.d.ts +9 -3
  7. package/dist/auth/auth-audit-log.d.ts +9 -3
  8. package/dist/auth/device-credential-manager.d.ts +5 -1
  9. package/dist/auth/external-identity-manager.d.ts +8 -21
  10. package/dist/auth/login-session-manager.d.ts +11 -3
  11. package/dist/auth/scoped-token-manager.d.ts +8 -52
  12. package/dist/auth/totp-manager.d.ts +11 -3
  13. package/dist/auth/user-manager.d.ts +10 -17
  14. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  15. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  16. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  17. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  18. package/dist/builtins/alerts/alert-store.d.ts +32 -0
  19. package/dist/builtins/alerts/alerts.addon.d.ts +9 -2
  20. package/dist/builtins/alerts/alerts.addon.js +373 -154
  21. package/dist/builtins/alerts/alerts.addon.mjs +372 -154
  22. package/dist/builtins/alerts/critical-push.d.ts +4 -0
  23. package/dist/builtins/alerts/emit-alert-policy.d.ts +28 -0
  24. package/dist/builtins/alerts/record-kinds.d.ts +15 -0
  25. package/dist/builtins/autotrack/index.js +1 -1
  26. package/dist/builtins/autotrack/index.mjs +1 -1
  27. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +1 -0
  28. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +134 -193
  29. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +134 -193
  30. package/dist/builtins/backup-orchestrator/destination-policy.d.ts +4 -2
  31. package/dist/builtins/backup-orchestrator/encryption-key-store.d.ts +4 -2
  32. package/dist/builtins/backup-orchestrator/record-kinds.d.ts +58 -0
  33. package/dist/builtins/backup-orchestrator/schedule-store.d.ts +4 -2
  34. package/dist/builtins/backup-orchestrator/seed-marker-store.d.ts +4 -2
  35. package/dist/builtins/calendars/calendar-prefs-store.d.ts +13 -5
  36. package/dist/builtins/calendars/calendars.addon.d.ts +2 -2
  37. package/dist/builtins/calendars/calendars.addon.js +67 -64
  38. package/dist/builtins/calendars/calendars.addon.mjs +59 -64
  39. package/dist/builtins/calendars/record-kinds.d.ts +18 -0
  40. package/dist/builtins/camera-grid/index.js +1 -1
  41. package/dist/builtins/camera-grid/index.mjs +1 -1
  42. package/dist/builtins/cluster-agent/record-kinds.d.ts +36 -0
  43. package/dist/builtins/composer/composer.addon.js +2 -2
  44. package/dist/builtins/composer/composer.addon.mjs +2 -2
  45. package/dist/builtins/console-logging/index.js +1 -1
  46. package/dist/builtins/console-logging/index.mjs +1 -1
  47. package/dist/builtins/core-blocks/block-settings-store.d.ts +8 -4
  48. package/dist/builtins/core-blocks/core-block-store.d.ts +8 -16
  49. package/dist/builtins/core-blocks/core-blocks.addon.js +85 -112
  50. package/dist/builtins/core-blocks/core-blocks.addon.mjs +86 -113
  51. package/dist/builtins/core-blocks/index.mjs +1 -1
  52. package/dist/builtins/core-blocks/record-kinds.d.ts +26 -0
  53. package/dist/builtins/device-manager/device-manager.addon.js +111 -187
  54. package/dist/builtins/device-manager/device-manager.addon.mjs +110 -187
  55. package/dist/builtins/device-manager/device-tombstone-store.d.ts +9 -48
  56. package/dist/builtins/device-manager/record-kinds.d.ts +14 -0
  57. package/dist/builtins/hub-forwarder/index.js +1 -1
  58. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  59. package/dist/builtins/keychain/index.js +152 -22
  60. package/dist/builtins/keychain/index.mjs +152 -22
  61. package/dist/builtins/keychain/keychain-service.d.ts +3 -2
  62. package/dist/builtins/keychain/keychain-store.d.ts +13 -2
  63. package/dist/builtins/keychain/record-kinds.d.ts +16 -0
  64. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  65. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  66. package/dist/builtins/local-auth/auth-schema.d.ts +3 -1
  67. package/dist/builtins/local-auth/local-auth.addon.js +2903 -2123
  68. package/dist/builtins/local-auth/local-auth.addon.mjs +2904 -2124
  69. package/dist/builtins/local-auth/oauth-session-manager.d.ts +8 -48
  70. package/dist/builtins/local-auth/record-kinds.d.ts +141 -0
  71. package/dist/builtins/local-network/local-network.addon.js +2 -2
  72. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  73. package/dist/builtins/loki-logging/index.js +1 -1
  74. package/dist/builtins/loki-logging/index.mjs +1 -1
  75. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  76. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  77. package/dist/builtins/platform-probe/index.js +1 -1
  78. package/dist/builtins/platform-probe/index.mjs +1 -1
  79. package/dist/builtins/record-entries/index.js +1 -1
  80. package/dist/builtins/record-entries/index.mjs +1 -1
  81. package/dist/builtins/records/legacy-table-row-count.d.ts +5 -0
  82. package/dist/builtins/records/phase6-declare-gate.d.ts +28 -0
  83. package/dist/builtins/records-isolated.d.ts +10 -0
  84. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  85. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  86. package/dist/builtins/snapshot/index.js +1 -1
  87. package/dist/builtins/snapshot/index.mjs +1 -1
  88. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  89. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  90. package/dist/builtins/sqlite-storage/index.js +1 -1
  91. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  92. package/dist/builtins/sqlite-storage/integration-record-kinds.d.ts +30 -0
  93. package/dist/builtins/sqlite-storage/integration-registry.d.ts +10 -16
  94. package/dist/builtins/sqlite-storage/records/count-settings-array-legacy.d.ts +5 -0
  95. package/dist/builtins/sqlite-storage/records/count-settings-brokers-legacy.d.ts +6 -0
  96. package/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +5 -0
  97. package/dist/builtins/sqlite-storage/records/records-engine.d.ts +4 -0
  98. package/dist/builtins/sqlite-storage/records/records-provider.d.ts +5 -1
  99. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +17 -0
  100. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +111 -3
  101. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +111 -3
  102. package/dist/builtins/sqlite-storage/storage-admin-provider.d.ts +9 -1
  103. package/dist/builtins/storage-orchestrator/drain-state-store.d.ts +5 -2
  104. package/dist/builtins/storage-orchestrator/location-store.d.ts +7 -2
  105. package/dist/builtins/storage-orchestrator/record-kinds.d.ts +38 -0
  106. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +2 -0
  107. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +196 -5
  108. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +195 -6
  109. package/dist/builtins/system-config/record-kinds.d.ts +32 -0
  110. package/dist/builtins/system-config/system-config.addon.js +53 -618
  111. package/dist/builtins/system-config/system-config.addon.mjs +29 -577
  112. package/dist/builtins/winston-logging/index.js +1 -1
  113. package/dist/builtins/winston-logging/index.mjs +1 -1
  114. package/dist/{composition-sources-C3rKncIF.mjs → composition-sources-BmC5jAUv.mjs} +1 -1
  115. package/dist/{composition-sources-NAPZddic.js → composition-sources-BwIIltnZ.js} +1 -1
  116. package/dist/{constants-BKX2QnIg.mjs → constants-6XHGmEUF.mjs} +1 -1
  117. package/dist/{constants-BXiNEIeV.js → constants-DA_tjzIk.js} +1 -1
  118. package/dist/{device-ca-jxjSL8Ov.mjs → device-ca-Bh_ClxMO.mjs} +1 -1
  119. package/dist/{device-ca-DT9X2S6d.js → device-ca-CnbrgfmW.js} +1 -1
  120. package/dist/{dist-D1vECb_6.js → dist-BkNfEJKa.js} +521 -64
  121. package/dist/{dist-DERK-gP5.mjs → dist-CkZIrsAP.mjs} +462 -65
  122. package/dist/file-host-worker.js +1 -1
  123. package/dist/file-host-worker.mjs +1 -1
  124. package/dist/{hub-mdns-ciao-CRaC97V0.mjs → hub-mdns-ciao-CoyIUWHC.mjs} +2 -2
  125. package/dist/{hub-mdns-ciao-Cah9GCIg.js → hub-mdns-ciao-m5LIr4oA.js} +2 -2
  126. package/dist/index.d.ts +7 -0
  127. package/dist/index.js +3095 -2821
  128. package/dist/index.mjs +3067 -2810
  129. package/dist/kernel/index.d.ts +2 -0
  130. package/dist/kernel/moleculer/event-bus.d.ts +3 -1
  131. package/dist/kernel/moleculer/mesh-mtls/mesh-certificate-registry.d.ts +5 -1
  132. package/dist/kernel/moleculer/remote-logger.d.ts +2 -2
  133. package/dist/kernel/transport/cap-route-resolver.d.ts +9 -38
  134. package/dist/phase6-declare-gate-BDWZuB2n.mjs +93 -0
  135. package/dist/phase6-declare-gate-Bl7KocEs.js +98 -0
  136. package/dist/read-all-rows-CVoO1ONM.js +29 -0
  137. package/dist/read-all-rows-TaPqdWNF.mjs +25 -0
  138. package/dist/records/read-all-rows.d.ts +6 -0
  139. package/dist/{restore-archive-Dy-qKTdF.js → restore-archive-B57xI5Ue.js} +353 -5
  140. package/dist/{restore-archive-daKyE24F.mjs → restore-archive-CMr4V7Fi.mjs} +339 -9
  141. package/dist/tls/agent-https-names.d.ts +9 -13
  142. package/dist/{wal-maintenance-zRc24mOC.mjs → wal-maintenance-Bqm4zrNA.mjs} +0 -0
  143. package/dist/{wal-maintenance-dAv4IdzC.js → wal-maintenance-CuG1DUca.js} +0 -0
  144. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
- import type { SettingsStoreClient, TokenScope } from "@camstack/types";
1
+ import type { RecordKindHandle, SettingsStoreClient, TokenScope } from "@camstack/types";
2
+ import type { OauthSessionBody } from "./record-kinds.js";
2
3
  export interface OauthSession {
3
4
  readonly id: string;
4
5
  readonly userId: string;
@@ -15,61 +16,20 @@ interface CreateInput {
15
16
  readonly integrationId: string;
16
17
  readonly scopes: TokenScope[];
17
18
  }
19
+ export interface OauthSessionRecordsDeps {
20
+ readonly oauthSessionsKind: RecordKindHandle<OauthSessionBody>;
21
+ readonly legacyStore?: SettingsStoreClient;
22
+ }
18
23
  export declare class OauthSessionManager {
24
+ private readonly kind;
19
25
  private readonly store;
20
- constructor(store: SettingsStoreClient);
21
- /**
22
- * Create a new OAuth session record. Generates a UUID as the session id,
23
- * sets `createdAt` and `lastUsedAt` to now, `revokedAt` to null.
24
- */
26
+ constructor(deps: SettingsStoreClient | OauthSessionRecordsDeps);
25
27
  create(input: CreateInput): Promise<OauthSession>;
26
- /**
27
- * Return all sessions — both active and revoked. Callers decide
28
- * whether to filter by `revokedAt`.
29
- */
30
28
  list(): Promise<OauthSession[]>;
31
- /**
32
- * Look up a session by its id. Returns null when not found.
33
- */
34
29
  getById(id: string): Promise<OauthSession | null>;
35
- /**
36
- * Mark a session as revoked by setting `revokedAt = now`.
37
- *
38
- * - Returns `true` on success (including idempotent re-revoke — the
39
- * existing `revokedAt` timestamp is preserved; it is NOT updated).
40
- * - Returns `false` when the session id is not found.
41
- */
42
30
  markRevoked(id: string): Promise<boolean>;
43
- /**
44
- * Delete one session row. Used by hub bulk revoke when the link is already
45
- * revoked ("Remove revoked"): absence fails closed the same way as a
46
- * revoked row, so dropping it only clears the list.
47
- */
48
31
  remove(id: string): Promise<boolean>;
49
- /**
50
- * Delete sessions revoked longer ago than `horizonMs`.
51
- *
52
- * Safe because an ABSENT session already fails closed exactly like a revoked
53
- * one: every consumer in `oauth-grants.ts` reads
54
- * `if (!session || session.revokedAt != null) return null`. Deleting the row
55
- * therefore cannot re-enable a link that was cut — it removes a record whose
56
- * only remaining job was to say "no", which the absence says too.
57
- *
58
- * A retention window rather than an immediate delete: a revoked account link
59
- * is the kind of thing an operator looks up AFTER the fact ("when did I
60
- * unlink that?"), and the row is tiny. Active sessions are never touched —
61
- * the filter matches only rows with a `revokedAt` timestamp in range, and
62
- * `revokedAt` is NULL on every live session, which SQL's `BETWEEN` never
63
- * matches.
64
- *
65
- * Returns how many rows went.
66
- */
67
32
  reapRevoked(horizonMs: number): Promise<number>;
68
- /**
69
- * Update `lastUsedAt` to now. No-op (does not throw) when the session
70
- * id is not found — the caller (token-use hot path) should not fail
71
- * for a missing session that may have been concurrently revoked.
72
- */
73
33
  touch(id: string): Promise<void>;
74
34
  }
75
35
  export {};
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Record kinds owned by `local-auth` (records plan phase 6 / §2.8).
3
+ *
4
+ * Operator-only legacy drop: auth tables are NEVER removed by the orphan job —
5
+ * use `storageAdmin.dropCollection` with `expectRows` after verify (see
6
+ * `docs/design/records-phase-6-auth-migration.md`).
7
+ *
8
+ * Before hub restart: mint and test an admin token (`csa_`); snapshot every kind.
9
+ */
10
+ import { ApiKeyRecordSchema, type DefinedRecordKind, type RecordKindHandle, type RecordsAccess, ScopedTokenSchema, TokenScopeSchema, UserRecordSchema } from "@camstack/types";
11
+ import { z } from "zod";
12
+ export type UserBody = Omit<z.infer<typeof UserRecordSchema>, "id">;
13
+ export declare const UserBodySchema: z.ZodType<UserBody>;
14
+ export type ApiKeyBody = Omit<z.infer<typeof ApiKeyRecordSchema>, "id">;
15
+ export declare const ApiKeyBodySchema: z.ZodType<ApiKeyBody>;
16
+ export type ScopedTokenBody = Omit<z.infer<typeof ScopedTokenSchema>, "id">;
17
+ export declare const ScopedTokenBodySchema: z.ZodType<ScopedTokenBody>;
18
+ export type AdminTokenBody = {
19
+ readonly createdBy: string;
20
+ readonly name: string;
21
+ readonly tokenHash: string;
22
+ readonly tokenPrefix: string;
23
+ readonly createdAt: number;
24
+ readonly expiresAt: number;
25
+ readonly lastUsedAt?: number | null;
26
+ readonly revokedAt?: number | null;
27
+ };
28
+ export declare const AdminTokenBodySchema: z.ZodType<AdminTokenBody>;
29
+ export type LoginSessionBody = {
30
+ readonly userId: string;
31
+ readonly method: string;
32
+ readonly refreshable: boolean;
33
+ readonly createdAt: number;
34
+ readonly lastUsedAt: number;
35
+ readonly expiresAt: number;
36
+ readonly revokedAt?: number | null;
37
+ readonly revokedReason?: string | null;
38
+ readonly refreshHash?: string | null;
39
+ readonly previousRefreshHash?: string | null;
40
+ readonly rotatedAt?: number | null;
41
+ readonly client?: string | null;
42
+ readonly ip?: string | null;
43
+ readonly credentialId?: string | null;
44
+ };
45
+ export declare const LoginSessionBodySchema: z.ZodType<LoginSessionBody>;
46
+ export type LoginSessionCutoffBody = {
47
+ readonly notBefore: number;
48
+ };
49
+ export declare const LoginSessionCutoffBodySchema: z.ZodType<LoginSessionCutoffBody>;
50
+ export type OauthSessionBody = {
51
+ readonly userId: string;
52
+ readonly username: string;
53
+ readonly integrationId: string;
54
+ readonly scopes: z.infer<typeof TokenScopeSchema>[];
55
+ readonly createdAt: number;
56
+ readonly lastUsedAt: number;
57
+ readonly revokedAt?: number | null;
58
+ };
59
+ export declare const OauthSessionBodySchema: z.ZodType<OauthSessionBody>;
60
+ /** TOTP seed is a keychain-backed secret (D878); the row holds only a marker. */
61
+ export type UserTotpBody = {
62
+ readonly confirmedAt?: number | null;
63
+ readonly createdAt: number;
64
+ readonly secret: string;
65
+ };
66
+ export declare const UserTotpBodySchema: z.ZodType<UserTotpBody>;
67
+ export type ExternalIdentityBody = {
68
+ readonly provider: string;
69
+ readonly subject: string;
70
+ readonly issuer: string;
71
+ readonly userId: string;
72
+ readonly label?: string | null;
73
+ readonly linkedAt: number;
74
+ };
75
+ export declare const ExternalIdentityBodySchema: z.ZodType<ExternalIdentityBody>;
76
+ export type DeviceCredentialBody = {
77
+ readonly userId: string;
78
+ readonly deviceName: string;
79
+ readonly platform: string;
80
+ readonly enrolledVia: string;
81
+ readonly fingerprint: string;
82
+ readonly serial: string;
83
+ readonly previousFingerprint?: string | null;
84
+ readonly renewedAt?: number | null;
85
+ readonly publicKey: string;
86
+ readonly issuedAt: number;
87
+ readonly expiresAt: number;
88
+ readonly lastUsedAt?: number | null;
89
+ readonly lastUsedFrom?: string | null;
90
+ readonly revokedAt?: number | null;
91
+ readonly revokedBy?: string | null;
92
+ };
93
+ export declare const DeviceCredentialBodySchema: z.ZodType<DeviceCredentialBody>;
94
+ export type AuthAuditBody = {
95
+ readonly action: string;
96
+ readonly userId?: string | null;
97
+ readonly ip?: string | null;
98
+ readonly detail?: string | null;
99
+ };
100
+ export declare const AuthAuditBodySchema: z.ZodType<AuthAuditBody>;
101
+ export type LocalAuthRecordKindsMap = {
102
+ readonly users: DefinedRecordKind<z.ZodType<UserBody>>;
103
+ readonly "api-keys": DefinedRecordKind<z.ZodType<ApiKeyBody>>;
104
+ readonly "scoped-tokens": DefinedRecordKind<z.ZodType<ScopedTokenBody>>;
105
+ readonly "admin-tokens": DefinedRecordKind<z.ZodType<AdminTokenBody>>;
106
+ readonly "login-sessions": DefinedRecordKind<z.ZodType<LoginSessionBody>>;
107
+ readonly "login-session-cutoffs": DefinedRecordKind<z.ZodType<LoginSessionCutoffBody>>;
108
+ readonly "oauth-sessions": DefinedRecordKind<z.ZodType<OauthSessionBody>>;
109
+ readonly "user-totp": DefinedRecordKind<z.ZodType<UserTotpBody>>;
110
+ readonly "user-external-identities": DefinedRecordKind<z.ZodType<ExternalIdentityBody>>;
111
+ readonly "device-credentials": DefinedRecordKind<z.ZodType<DeviceCredentialBody>>;
112
+ readonly "auth-audit": DefinedRecordKind<z.ZodType<AuthAuditBody>>;
113
+ };
114
+ export declare const localAuthRecordKinds: LocalAuthRecordKindsMap;
115
+ export declare const localAuthUsersRecordKind: DefinedRecordKind<z.ZodType<UserBody>>;
116
+ export declare const localAuthApiKeysRecordKind: DefinedRecordKind<z.ZodType<ApiKeyBody>>;
117
+ export declare const localAuthScopedTokensRecordKind: DefinedRecordKind<z.ZodType<ScopedTokenBody>>;
118
+ export declare const localAuthAdminTokensRecordKind: DefinedRecordKind<z.ZodType<AdminTokenBody>>;
119
+ export declare const localAuthLoginSessionsRecordKind: DefinedRecordKind<z.ZodType<LoginSessionBody>>;
120
+ export declare const localAuthLoginSessionCutoffsRecordKind: DefinedRecordKind<z.ZodType<LoginSessionCutoffBody>>;
121
+ export declare const localAuthOauthSessionsRecordKind: DefinedRecordKind<z.ZodType<OauthSessionBody>>;
122
+ export declare const localAuthUserTotpRecordKind: DefinedRecordKind<z.ZodType<UserTotpBody>>;
123
+ export declare const localAuthUserExternalIdentitiesRecordKind: DefinedRecordKind<z.ZodType<ExternalIdentityBody>>;
124
+ export declare const localAuthDeviceCredentialsRecordKind: DefinedRecordKind<z.ZodType<DeviceCredentialBody>>;
125
+ export declare const localAuthAuthAuditRecordKind: DefinedRecordKind<z.ZodType<AuthAuditBody>>;
126
+ /** Legacy collections that must not be `declareCollection` once these kinds are live. */
127
+ export declare const LOCAL_AUTH_RECORDS_LEGACY_COLLECTIONS: readonly string[];
128
+ export interface LocalAuthRecordStores {
129
+ readonly users: RecordKindHandle<UserBody>;
130
+ readonly apiKeys: RecordKindHandle<ApiKeyBody>;
131
+ readonly scopedTokens: RecordKindHandle<ScopedTokenBody>;
132
+ readonly adminTokens: RecordKindHandle<AdminTokenBody>;
133
+ readonly loginSessions: RecordKindHandle<LoginSessionBody>;
134
+ readonly loginSessionCutoffs: RecordKindHandle<LoginSessionCutoffBody>;
135
+ readonly oauthSessions: RecordKindHandle<OauthSessionBody>;
136
+ readonly userTotp: RecordKindHandle<UserTotpBody>;
137
+ readonly userExternalIdentities: RecordKindHandle<ExternalIdentityBody>;
138
+ readonly deviceCredentials: RecordKindHandle<DeviceCredentialBody>;
139
+ readonly authAudit: RecordKindHandle<AuthAuditBody>;
140
+ }
141
+ export declare function localAuthRecordStoresOf(records: Pick<RecordsAccess, "kind">): LocalAuthRecordStores;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-D1vECb_6.js");
4
- const require_hub_mdns_ciao = require("../../hub-mdns-ciao-Cah9GCIg.js");
3
+ const require_dist = require("../../dist-BkNfEJKa.js");
4
+ const require_hub_mdns_ciao = require("../../hub-mdns-ciao-m5LIr4oA.js");
5
5
  let zod = require("zod");
6
6
  let node_net = require("node:net");
7
7
  let node_os = require("node:os");
@@ -1,5 +1,5 @@
1
- import { $i as EventCategory, Bn as resolveAppConnections, Fr as BaseAddon, I as HUB_MDNS_SERVICE_TYPE, L as HUB_MDNS_TXT_KEYS, W as NetworkTunnelStartedDataSchema, Wn as resolveHubAddressRoles, an as isDefaultAppConnectionEndpoint, bt as checkRoleAddress, hn as localNetworkCapability, jn as pickAppLinkHub, nn as isAppLinkBase, pr as validateCustomAddress, qn as resolveNotificationTapAddress, u as CAMSTACK_APP_LINK_ORIGIN } from "../../dist-DERK-gP5.mjs";
2
- import { P as readLanHttpState, a as storeUploadedCertificate, d as servedHttpsLeafFingerprint, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, v as writeExtraSans, w as ensureTlsCert } from "../../hub-mdns-ciao-CRaC97V0.mjs";
1
+ import { Fn as pickAppLinkHub, Jn as resolveHubAddressRoles, L as HUB_MDNS_SERVICE_TYPE, R as HUB_MDNS_TXT_KEYS, Rr as BaseAddon, Wn as resolveAppConnections, Zn as resolveNotificationTapAddress, _r as validateCustomAddress, l as CAMSTACK_APP_LINK_ORIGIN, la as EventCategory, ln as isDefaultAppConnectionEndpoint, on as isAppLinkBase, q as NetworkTunnelStartedDataSchema, wt as checkRoleAddress, yn as localNetworkCapability } from "../../dist-CkZIrsAP.mjs";
2
+ import { P as readLanHttpState, a as storeUploadedCertificate, d as servedHttpsLeafFingerprint, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, v as writeExtraSans, w as ensureTlsCert } from "../../hub-mdns-ciao-CoyIUWHC.mjs";
3
3
  import { z } from "zod";
4
4
  import { isIP } from "node:net";
5
5
  import * as os$1 from "node:os";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-D1vECb_6.js");
6
+ const require_dist = require("../../dist-BkNfEJKa.js");
7
7
  //#region src/builtins/loki-logging/loki-payload.ts
8
8
  /**
9
9
  * Loki rejects a label name that is not a valid Prometheus label
@@ -1,4 +1,4 @@
1
- import { Fr as BaseAddon, _n as logDestinationCapability } from "../../dist-DERK-gP5.mjs";
1
+ import { Rr as BaseAddon, xn as logDestinationCapability } from "../../dist-CkZIrsAP.mjs";
2
2
  //#region src/builtins/loki-logging/loki-payload.ts
3
3
  /**
4
4
  * Loki rejects a label name that is not a valid Prometheus label
@@ -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-D1vECb_6.js");
6
+ const require_dist = require("../../dist-BkNfEJKa.js");
7
7
  let node_fs_promises = require("node:fs/promises");
8
8
  let node_util = require("node:util");
9
9
  let node_os = require("node:os");
@@ -1,4 +1,4 @@
1
- import { $i as EventCategory, Cn as metricsProviderCapability, Fr as BaseAddon, Pr as errMsg, Rn as reducePoints, Vn as resolveBucketMs, Zt as foldSnapshotByFunction, yi as createEvent } from "../../dist-DERK-gP5.mjs";
1
+ import { Ci as createEvent, Dn as metricsProviderCapability, Gn as resolveBucketMs, Hn as reducePoints, Lr as errMsg, Rr as BaseAddon, la as EventCategory, tn as foldSnapshotByFunction } from "../../dist-CkZIrsAP.mjs";
2
2
  import { access, readFile, readdir } from "node:fs/promises";
3
3
  import { promisify } from "node:util";
4
4
  import * as os$1 from "node:os";
@@ -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-D1vECb_6.js");
6
+ const require_dist = require("../../dist-BkNfEJKa.js");
7
7
  let node_util = require("node:util");
8
8
  let node_os = require("node:os");
9
9
  node_os = require_chunk.__toESM(node_os);
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
2
- import { $i as EventCategory, Ci as emitReadiness, Fr as BaseAddon, Ht as enumerateInferenceDevices, Nn as platformProbeCapability, Pr as errMsg, Zn as scoreRuntimes } from "../../dist-DERK-gP5.mjs";
2
+ import { Kt as enumerateInferenceDevices, Ln as platformProbeCapability, Lr as errMsg, Rr as BaseAddon, ki as emitReadiness, la as EventCategory, tr as scoreRuntimes } from "../../dist-CkZIrsAP.mjs";
3
3
  import { promisify } from "node:util";
4
4
  import * as os$1 from "node:os";
5
5
  import * as fs from "node:fs";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-D1vECb_6.js");
6
+ const require_dist = require("../../dist-BkNfEJKa.js");
7
7
  let zod = require("zod");
8
8
  let node_crypto = require("node:crypto");
9
9
  //#region src/builtins/record-entries/entries-service.ts
@@ -1,4 +1,4 @@
1
- import { Fr as BaseAddon, In as recordEntriesCapability, Ur as InvalidRecordError, ci as UnknownRecordKindError } from "../../dist-DERK-gP5.mjs";
1
+ import { Bn as recordEntriesCapability, Rr as BaseAddon, fi as UnknownRecordKindError, qr as InvalidRecordError } from "../../dist-CkZIrsAP.mjs";
2
2
  import { z } from "zod";
3
3
  import { randomUUID } from "node:crypto";
4
4
  //#region src/builtins/record-entries/entries-service.ts
@@ -0,0 +1,5 @@
1
+ /** Row count for a physical settings-db table (matches the records engine `legacyRowCount`). */
2
+ export declare function legacyTableRowCountFromList(tables: readonly {
3
+ readonly name: string;
4
+ readonly rows: number;
5
+ }[], collection: string): number;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Phase 6 auth/alert builtins: do not call `ctx.records.declare` while legacy
3
+ * tables still hold rows unless every kind is already adopted, or the operator
4
+ * set {@link CAMSTACK_RECORDS_DECLARE_PHASE6} for the declare pass before
5
+ * `records-adopt.ts --apply`.
6
+ */
7
+ import { type AddonContext, type DefinedRecordKind, type RecordsAccess, type StorageKind } from "@camstack/types";
8
+ /** Operator override: declare kinds even when adoption is still pending (legacy path until adopt completes). */
9
+ export declare const CAMSTACK_RECORDS_DECLARE_PHASE6 = "CAMSTACK_RECORDS_DECLARE_PHASE6";
10
+ export declare function isPhase6RecordsDeclareForced(): boolean;
11
+ export interface Phase6DeclareGateDeps {
12
+ readonly owner: string;
13
+ readonly records: RecordsAccess;
14
+ readonly kinds: Readonly<Record<string, DefinedRecordKind>>;
15
+ readonly legacyCollections: readonly string[];
16
+ readonly legacyRowCount: (collection: string) => Promise<number>;
17
+ readonly listKindsForOwner: (owner: string) => Promise<readonly StorageKind[]>;
18
+ readonly isAdoptedLegacyTable: (collection: string) => Promise<boolean>;
19
+ readonly log: {
20
+ info(message: string, meta?: Record<string, unknown>): void;
21
+ };
22
+ }
23
+ /**
24
+ * @returns `true` when stores should bind record kinds; `false` for legacy collections only.
25
+ */
26
+ export declare function resolvePhase6UseRecordsPath(deps: Phase6DeclareGateDeps): Promise<boolean>;
27
+ /** Shared wiring for hub builtins (local-auth, keychain, alert-center). */
28
+ export declare function resolvePhase6UseRecordsPathForHub(ctx: Pick<AddonContext, "api" | "logger" | "records">, owner: string, kinds: Readonly<Record<string, DefinedRecordKind>>, legacyCollections: readonly string[]): Promise<boolean>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Bounds for hub `record-kinds` modules under emit-isolated-dts (TS9010).
3
+ *
4
+ * Annotate with `: IsolatedZodSchema` / `: IsolatedRecordKinds` erases inference
5
+ * (`z.infer` → `unknown`, string index → `| undefined`). Use `satisfies` instead.
6
+ */
7
+ import type { DefinedRecordKind } from "@camstack/types";
8
+ import type { z } from "zod";
9
+ export type IsolatedZodSchema = z.ZodTypeAny;
10
+ export type IsolatedRecordKinds = Readonly<Record<string, DefinedRecordKind>>;
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-D1vECb_6.js");
6
+ const require_dist = require("../../dist-BkNfEJKa.js");
7
7
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
8
8
  /**
9
9
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -1,4 +1,4 @@
1
- import { $i as EventCategory, Fr as BaseAddon } from "../../dist-DERK-gP5.mjs";
1
+ import { Rr as BaseAddon, la as EventCategory } from "../../dist-CkZIrsAP.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -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-D1vECb_6.js");
6
+ const require_dist = require("../../dist-BkNfEJKa.js");
7
7
  const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { $i as EventCategory, Fr as BaseAddon, Ft as deriveBatteryPresence, Ii as nodePin, Nr as DeviceType, Pr as errMsg, Sn as memoizePinnedFfmpeg, dt as bareAddonId, ft as batteryCapability, jr as DeviceFeature, lr as streamQualityLabel, s as BatteryStatusSchema, tr as snapshotCapability } from "../../dist-DERK-gP5.mjs";
1
+ import { En as memoizePinnedFfmpeg, Hi as nodePin, Ir as DeviceType, Lr as errMsg, Pr as DeviceFeature, Rr as BaseAddon, ar as snapshotCapability, gt as batteryCapability, ht as bareAddonId, la as EventCategory, pr as streamQualityLabel, s as BatteryStatusSchema, zt as deriveBatteryPresence } from "../../dist-CkZIrsAP.mjs";
2
2
  import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CyFs1M3I.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -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-D1vECb_6.js");
6
+ const require_dist = require("../../dist-BkNfEJKa.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Fr as BaseAddon, Xt as filesystemBrowseCapability, sr as storageProviderCapability } from "../../dist-DERK-gP5.mjs";
1
+ import { Rr as BaseAddon, dr as storageProviderCapability, en as filesystemBrowseCapability } from "../../dist-CkZIrsAP.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
6
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.js");
7
- const require_wal_maintenance = require("../../wal-maintenance-dAv4IdzC.js");
7
+ const require_wal_maintenance = require("../../wal-maintenance-CuG1DUca.js");
8
8
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./sqlite-settings.addon.js");
9
9
  //#region src/builtins/sqlite-storage/config-store.ts
10
10
  var ConfigStore = class {
@@ -1,5 +1,5 @@
1
1
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
2
- import { A as SQLITE_MMAP_FLOOR_BYTES, B as SqliteOpProfiler, F as SQLITE_ENGINE_STORM_WALL_SHARE, I as SQLITE_PROFILE_REPORT_FLOOR_MS, L as SQLITE_PROFILE_REPORT_INTERVAL_MS, M as SQLITE_PAGE_CACHE_FLOOR_KIB, N as sqliteMmapSizeFor, O as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as sqlitePageCacheKibFor, R as SQLITE_PROFILE_TOP_N, V as sqliteEngineStorm, a as WalMaintenance, c as SqliteSettingsBackend, i as WAL_MAINTENANCE_INTERVAL_MS, j as SQLITE_PAGE_CACHE_CEILING_KIB, k as SQLITE_MMAP_CEILING_BYTES, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as SQLITE_SLOW_CALL_MS } from "../../wal-maintenance-zRc24mOC.mjs";
2
+ import { A as SQLITE_MMAP_FLOOR_BYTES, B as SqliteOpProfiler, F as SQLITE_ENGINE_STORM_WALL_SHARE, I as SQLITE_PROFILE_REPORT_FLOOR_MS, L as SQLITE_PROFILE_REPORT_INTERVAL_MS, M as SQLITE_PAGE_CACHE_FLOOR_KIB, N as sqliteMmapSizeFor, O as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as sqlitePageCacheKibFor, R as SQLITE_PROFILE_TOP_N, V as sqliteEngineStorm, a as WalMaintenance, c as SqliteSettingsBackend, i as WAL_MAINTENANCE_INTERVAL_MS, j as SQLITE_PAGE_CACHE_CEILING_KIB, k as SQLITE_MMAP_CEILING_BYTES, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as SQLITE_SLOW_CALL_MS } from "../../wal-maintenance-Bqm4zrNA.mjs";
3
3
  import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
4
4
  //#region src/builtins/sqlite-storage/config-store.ts
5
5
  var ConfigStore = class {
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Record kinds owned by integration-registry (phase 4).
3
+ */
4
+ import { type DefinedRecordKind } from "@camstack/types";
5
+ import { z } from "zod";
6
+ export declare const INTEGRATIONS_LEGACY = "integrations";
7
+ export declare const INTEGRATION_SETTINGS_LEGACY = "integration_settings";
8
+ export type IntegrationBody = {
9
+ readonly addonId: string;
10
+ readonly name: string;
11
+ readonly enabled: boolean;
12
+ readonly info: Record<string, unknown>;
13
+ readonly createdAt: number;
14
+ readonly updatedAt: number;
15
+ };
16
+ export declare const IntegrationBodySchema: z.ZodType<IntegrationBody>;
17
+ export type IntegrationSettingBody = {
18
+ readonly integrationId: string;
19
+ readonly key: string;
20
+ readonly value: string;
21
+ readonly valueType: string;
22
+ };
23
+ export declare const IntegrationSettingBodySchema: z.ZodType<IntegrationSettingBody>;
24
+ export type IntegrationRegistryRecordKindsMap = {
25
+ readonly integrations: DefinedRecordKind<z.ZodType<IntegrationBody>>;
26
+ readonly "integration-settings": DefinedRecordKind<z.ZodType<IntegrationSettingBody>>;
27
+ };
28
+ export declare const integrationRegistryRecordKinds: IntegrationRegistryRecordKindsMap;
29
+ export declare const integrationsRecordKind: DefinedRecordKind<z.ZodType<IntegrationBody>>;
30
+ export declare const integrationSettingsRecordKind: DefinedRecordKind<z.ZodType<IntegrationSettingBody>>;
@@ -1,22 +1,16 @@
1
- import type { CreateIntegrationInput, IIntegrationRegistry, Integration, ISettingsStoreProvider } from "@camstack/types";
2
- /**
3
- * The persisted INTEGRATIONS — one row per provider instance an operator (or a
4
- * declaring addon) added, plus that instance's settings.
5
- *
6
- * It had a device half once: `devices` + `device_settings_kv`, `dev_NNNN` ids,
7
- * `createDevice` / `listCameras` / `setDeviceSetting`. It was removed on
8
- * 2026-08-19 with both tables ([D183](../../../../../docs/decisions/adr-0183-code-that-is-deleted-takes-its-tables-with-it.md)):
9
- * measured on the reference hub it held 0 rows against 974 live devices, no
10
- * production caller ever reached it, and its id-space could not be reconciled
11
- * with the numeric ids every track, rule and binding in the system uses. The
12
- * fleet is `device-manager:devices`. Do not add a device method here — the
13
- * device authority is the device-manager, and a second one that agrees with
14
- * nothing is how this half came to exist.
15
- */
1
+ import type { CreateIntegrationInput, IIntegrationRegistry, Integration, ISettingsStoreProvider, RecordKindHandle, RecordsAccess } from "@camstack/types";
2
+ import { type IntegrationBody, type IntegrationSettingBody } from "./integration-record-kinds.js";
3
+ export interface IntegrationRecordStores {
4
+ readonly integrations: RecordKindHandle<IntegrationBody>;
5
+ readonly settings: RecordKindHandle<IntegrationSettingBody>;
6
+ }
16
7
  export declare class IntegrationRegistry implements IIntegrationRegistry {
17
8
  private readonly store;
18
- constructor(backend: ISettingsStoreProvider);
9
+ private readonly recordStores;
10
+ constructor(backend: ISettingsStoreProvider, recordStores?: IntegrationRecordStores);
11
+ static recordStoresOf(records: Pick<RecordsAccess, "kind">): IntegrationRecordStores;
19
12
  initialize(): Promise<void>;
13
+ private resumeCounter;
20
14
  createIntegration(input: CreateIntegrationInput): Promise<Integration>;
21
15
  getIntegration(id: string): Promise<Integration | null>;
22
16
  getIntegrationByAddonId(addonId: string): Promise<Integration | null>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Boot guard (B3): addon-settings array fields block adoption until copied.
3
+ */
4
+ import type { PlacementRouter } from "../placement-router.js";
5
+ export declare function countSettingsArrayLegacy(router: PlacementRouter, addonId: string, settingsKey: string): Promise<number>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boot guard (B2): brokers still in addon-settings block adoption until
3
+ * `records-adopt` copies them into the entry kind.
4
+ */
5
+ import type { PlacementRouter } from "../placement-router.js";
6
+ export declare function countSettingsBrokersLegacy(router: PlacementRouter, addonId: string): Promise<number>;
@@ -37,6 +37,11 @@ export interface RecordsEngineOps extends OwnedOps {
37
37
  readonly owner: string;
38
38
  readonly kind: string;
39
39
  }): Promise<void>;
40
+ /** Undo a false `complete` when the legacy table still holds rows. */
41
+ revokeAdopted(input: {
42
+ readonly owner: string;
43
+ readonly kind: string;
44
+ }): Promise<void>;
40
45
  }
41
46
  export type RecordsOp = keyof RecordsEngineOps;
42
47
  export type RecordsInput<K extends RecordsOp> = Parameters<RecordsEngineOps[K]>[0];
@@ -87,4 +87,8 @@ export declare class RecordsEngine implements RecordsEngineOps {
87
87
  readonly owner: string;
88
88
  readonly kind: string;
89
89
  }): Promise<void>;
90
+ revokeAdopted(input: {
91
+ readonly owner: string;
92
+ readonly kind: string;
93
+ }): Promise<void>;
90
94
  }
@@ -17,7 +17,9 @@ import { type IRecordsProvider, type IScopedLogger, type IStorageAdminProvider,
17
17
  import type { PlacementRouter } from "../placement-router.js";
18
18
  /** The caller the transport stamped, or a refusal. */
19
19
  export declare function recordsCallerOf(input: unknown): string;
20
- type AdminRecords = Pick<IStorageAdminProvider, "listKinds" | "readRecords" | "adoptRecords">;
20
+ type AdminRecords = Pick<IStorageAdminProvider, "listKinds" | "readRecords" | "adoptRecords"> & {
21
+ isAdoptedLegacyTable(collection: string): Promise<boolean>;
22
+ };
21
23
  export declare class RecordsProvider implements IRecordsProvider, AdminRecords {
22
24
  private readonly router;
23
25
  private readonly logger;
@@ -52,6 +54,8 @@ export declare class RecordsProvider implements IRecordsProvider, AdminRecords {
52
54
  kinds: StorageKind[];
53
55
  }>;
54
56
  readRecords(input: Parameters<IStorageAdminProvider["readRecords"]>[0]): ReturnType<IStorageAdminProvider["readRecords"]>;
57
+ /** True when a declared kind lists `collection` as `adoptsFrom` and adoption finished. */
58
+ isAdoptedLegacyTable(collection: string): Promise<boolean>;
55
59
  adoptRecords(input: Parameters<IStorageAdminProvider["adoptRecords"]>[0]): ReturnType<IStorageAdminProvider["adoptRecords"]>;
56
60
  /** Housekeeping: delete rows past `expires_at` in every file that hosts kinds. */
57
61
  sweepExpired(): Promise<number>;
@@ -437,6 +437,23 @@ export declare class SqliteSettingsBackend implements ISettingsBackend {
437
437
  bytes: number | null;
438
438
  declaredThisBoot: boolean;
439
439
  }[];
440
+ /** Storage-admin only: adopted legacy may still be in `declaredThisBoot` from vestigial declares. */
441
+ forgetDeclaredThisBoot(name: string): void;
442
+ /**
443
+ * Paginated `(id, data)` read of a physical table. Does not consult
444
+ * `declareCollection` — for migration scripts only.
445
+ */
446
+ readLegacyCollection(input: {
447
+ readonly collection: string;
448
+ readonly cursor?: string | undefined;
449
+ readonly limit?: number | undefined;
450
+ }): {
451
+ rows: {
452
+ id: string;
453
+ data: Record<string, unknown>;
454
+ }[];
455
+ nextCursor: string | null;
456
+ };
440
457
  /**
441
458
  * Drop one table nobody owns (D870 migration, one-shot). Refuses a canonical
442
459
  * or engine table, one a running addon declared since boot, a table that is