@camstack/server 1.2.779 → 1.2.780
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.
- package/CHANGELOG.md +15 -0
- package/dist/agent/main.js +5 -1
- package/dist/agent/stale-addon-gate.js +52 -15
- package/dist/api/addon-upload.js +41 -0
- package/dist/api/core/cap-providers.js +19 -29
- package/dist/api/core/integration-role.js +15 -2
- package/dist/api/tarball-manifest.js +10 -1
- package/dist/api/trpc/generated-cap-mounts.js +1 -9
- package/dist/api/trpc/generated-cap-routers.js +9 -88
- package/dist/core/addon/addon-package.service.js +24 -8
- package/dist/core/addon/addon-registry.service.js +61 -10
- package/dist/core/addon/hub-spawn-gate.js +92 -0
- package/dist/core/addon/integration-instances-provider.js +22 -0
- package/dist/core/agent/agent-registry.service.js +6 -2
- package/dist/core/agent/delivery-requirements.js +22 -6
- package/dist/core/updates/required-addon-update.js +188 -0
- package/dist/launcher.js +4 -0
- package/dist/manual-boot.js +27 -0
- package/dist/server-root/index.js +74 -3
- package/package.json +33 -9
- package/system/dist/addon-runner.js +179 -4
- package/system/dist/addon-runner.mjs +180 -5
- package/system/dist/{agent-https-swBZI1iJ.js → agent-https-A9wsxVGn.js} +1 -1
- package/system/dist/{agent-https-BrINLeNj.mjs → agent-https-DuxDC67S.mjs} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/migrations/migrations-provider.d.ts +5 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +12 -4
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +12 -4
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-D_ImDrdj.mjs → capture-engine-CEChNpAD.mjs} +1 -1
- package/system/dist/{capture-engine-BXV6UiHl.js → capture-engine-D6mXfLFQ.js} +1 -1
- package/system/dist/{composition-sources-BjktkDte.mjs → composition-sources-6XYW86Kw.mjs} +1 -1
- package/system/dist/{composition-sources-DjTxqryW.js → composition-sources-cVWKVph4.js} +1 -1
- package/system/dist/{constants-CGXiM2LV.js → constants-B5Yg02ii.js} +1 -1
- package/system/dist/{constants-C68806R6.mjs → constants-DqwDEYfb.mjs} +1 -1
- package/system/dist/{device-ca-D_q1MiQ3.js → device-ca-BVz14dRd.js} +1 -1
- package/system/dist/{device-ca-CFRagVlE.mjs → device-ca-oY4Xqd7s.mjs} +1 -1
- package/system/dist/{dist-C9Ms2Ul9.js → dist-B4wrqheM.js} +833 -631
- package/system/dist/{dist-BzpjKSec.mjs → dist-BX8nZeXV.mjs} +804 -632
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CFsSp0tc.mjs → hub-mdns-ciao-BDPMfOgq.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-C87S9O_n.js → hub-mdns-ciao-CiMMA0rT.js} +2 -2
- package/system/dist/index.js +416 -14
- package/system/dist/index.mjs +411 -16
- package/system/dist/kernel/addon-installer.d.ts +44 -1
- package/system/dist/kernel/held-installs.d.ts +21 -0
- package/system/dist/kernel/index.d.ts +6 -0
- package/system/dist/kernel/moleculer/migration-api-facade.d.ts +73 -0
- package/system/dist/kernel/requires-registry.d.ts +31 -0
- package/system/dist/{legacy-integration-rows-door-CI-AaB-M.mjs → legacy-integration-rows-door-DDA3YOxL.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-C_aaT1DH.js → legacy-integration-rows-door-YuWqHZW4.js} +1 -1
- package/system/dist/migrations/hub/__fixtures__/seed.d.ts +23 -0
- package/system/dist/{restore-archive-D3K33hws.mjs → restore-archive-BrtpgNCt.mjs} +82 -82
- package/system/dist/{restore-archive-BC8OECG8.js → restore-archive-Cn9OShm4.js} +1 -1
- package/system/dist/{wal-maintenance-Bf9m0JZr.js → wal-maintenance-BTzu3s-6.js} +0 -0
- package/system/dist/{wal-maintenance-CMjTxyAC.mjs → wal-maintenance-jgyV9NbL.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -1171,7 +1171,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1171
1171
|
return DeviceRole;
|
|
1172
1172
|
}({});
|
|
1173
1173
|
//#endregion
|
|
1174
|
-
//#region ../types/dist/sleep-
|
|
1174
|
+
//#region ../types/dist/sleep-BX_MqzUe.mjs
|
|
1175
1175
|
/**
|
|
1176
1176
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1177
1177
|
* window to float samples (D455).
|
|
@@ -2888,6 +2888,28 @@ var SECRET_RETRY_MAX_MS = 5 * 6e4;
|
|
|
2888
2888
|
/** Coalesces a burst of `keychain.changed` events into one re-resolve. */
|
|
2889
2889
|
var SECRET_CHANGE_DEBOUNCE_MS = 250;
|
|
2890
2890
|
/**
|
|
2891
|
+
* Pair a catalogue with the function that builds its ports FROM THE MIGRATION API. The one
|
|
2892
|
+
* place a catalogue is bound: a migration reaches nothing a ports binder cannot reach
|
|
2893
|
+
* through `api` (guard `check-migration-ports-surface`).
|
|
2894
|
+
*/
|
|
2895
|
+
function migrationSet(catalogue, bindPorts) {
|
|
2896
|
+
return { bind: (api) => defineAddonMigrations(catalogue, bindPorts(api)) };
|
|
2897
|
+
}
|
|
2898
|
+
/** A mixed array is a mistake: the other kind would be dropped without a word. */
|
|
2899
|
+
function refuseMixed(form, kept, dropped) {
|
|
2900
|
+
if (dropped > 0) throw new Error(`runMigrations(${form}): ${dropped} of ${kept + dropped} entries are of the other kind and would be dropped; pass one kind per call`);
|
|
2901
|
+
}
|
|
2902
|
+
function catalogueOf(list) {
|
|
2903
|
+
const kept = list.filter((entry) => !("execute" in entry));
|
|
2904
|
+
refuseMixed("catalogue, (api) => ports", kept.length, list.length - kept.length);
|
|
2905
|
+
return kept;
|
|
2906
|
+
}
|
|
2907
|
+
function boundOf(list) {
|
|
2908
|
+
const kept = list.filter((entry) => "execute" in entry);
|
|
2909
|
+
refuseMixed("bound migrations", kept.length, list.length - kept.length);
|
|
2910
|
+
return kept;
|
|
2911
|
+
}
|
|
2912
|
+
/**
|
|
2891
2913
|
* Base class for CamStack addons. Eliminates settings boilerplate:
|
|
2892
2914
|
*
|
|
2893
2915
|
* - Typed `config` property with automatic resolution from store + defaults
|
|
@@ -3054,23 +3076,21 @@ var BaseAddon = class {
|
|
|
3054
3076
|
await this.loadScopedSchemas();
|
|
3055
3077
|
return normalized;
|
|
3056
3078
|
}
|
|
3079
|
+
async runMigrations(first, second, third) {
|
|
3080
|
+
if (typeof second === "function") return this.runMigrationSets([migrationSet(catalogueOf(first), second)], third);
|
|
3081
|
+
return this.runBound(boundOf(first), second);
|
|
3082
|
+
}
|
|
3057
3083
|
/**
|
|
3058
|
-
*
|
|
3059
|
-
*
|
|
3060
|
-
*
|
|
3061
|
-
* restored devices — with the catalogue bound to the addon's ports
|
|
3062
|
-
* (`defineAddonMigrations(ADDON_MIGRATIONS, ports)`).
|
|
3063
|
-
*
|
|
3064
|
-
* An engine that cannot be reached or refuses the catalogue is logged and runs
|
|
3065
|
-
* nothing; the boot continues. A migration that FAILED (or was blocked by one)
|
|
3066
|
-
* and declares `onFailure: 'block-owner'` makes this throw, so the addon does not
|
|
3067
|
-
* serve data whose shape it cannot trust; `tolerate` migrations never do.
|
|
3068
|
-
*
|
|
3069
|
-
* ALWAYS pass the whole catalogue; a phase that must run only some of it passes
|
|
3070
|
-
* `{ only: [ids] }` — never a filtered catalogue (the engine would judge the
|
|
3071
|
-
* omitted applied ids "newer").
|
|
3084
|
+
* Several catalogues of ONE owner in one declaration (the engine replaces an owner's
|
|
3085
|
+
* catalogue on every declare, so two calls would each judge the other's ids "newer").
|
|
3086
|
+
* Build each entry with `migrationSet(catalogue, (api) => ports)`.
|
|
3072
3087
|
*/
|
|
3073
|
-
async
|
|
3088
|
+
async runMigrationSets(sets, options) {
|
|
3089
|
+
const api = this.ctx.migrationApi;
|
|
3090
|
+
if (api === void 0) throw new Error(`${this.ctx.id}: the migration API is not available on this context`);
|
|
3091
|
+
return this.runBound(sets.flatMap((set) => set.bind(api)), options);
|
|
3092
|
+
}
|
|
3093
|
+
async runBound(migrations, options) {
|
|
3074
3094
|
const api = this.ctx.api.migrations;
|
|
3075
3095
|
const report = await runAddonMigrations({
|
|
3076
3096
|
declareOwner: (input) => api.declareOwner.mutate(input),
|
|
@@ -4737,6 +4757,20 @@ function assertTransactScope(members) {
|
|
|
4737
4757
|
if (new Set(kinds.map((m) => m.declaration.transactFamily)).size > 1) throw new TransactRefusedError(`cross-family: the ops span more than one transactFamily (${kinds.map((m) => `${m.kind}=${String(m.declaration.transactFamily)}`).join(", ")})`);
|
|
4738
4758
|
}
|
|
4739
4759
|
/**
|
|
4760
|
+
* Entry kinds (D881): every list of user-created entries (notification
|
|
4761
|
+
* targets, brokers, LLM profiles) is ONE record kind with an id, a name and a
|
|
4762
|
+
* kind-specific body, and the admin UI lists/adds/edits/deletes all of them
|
|
4763
|
+
* through the `record-entries` capability with password fields derived from
|
|
4764
|
+
* the schema (`.meta({ secret: true })`).
|
|
4765
|
+
*/
|
|
4766
|
+
/** The body of a plain entry: a name and the fields the kind adds. */
|
|
4767
|
+
function entryBody(shape) {
|
|
4768
|
+
return zod.z.object({
|
|
4769
|
+
name: zod.z.string().min(1),
|
|
4770
|
+
...shape
|
|
4771
|
+
});
|
|
4772
|
+
}
|
|
4773
|
+
/**
|
|
4740
4774
|
* Declare one entry kind. An entry is configuration: never trimmed by the
|
|
4741
4775
|
* engine, never aged, belonging to no device.
|
|
4742
4776
|
*/
|
|
@@ -11149,7 +11183,7 @@ new Set(EVENT_OWNER_TYPES);
|
|
|
11149
11183
|
*/
|
|
11150
11184
|
/** `>=MAJOR.MINOR.PATCH[-prerelease]` — the only range shape a requirement uses. */
|
|
11151
11185
|
var MinVersionSchema = zod.z.string().regex(/^>=\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/, "a minimum is written \">=X.Y.Z\"");
|
|
11152
|
-
zod.z.object({
|
|
11186
|
+
var PackageRequiresSchema = zod.z.object({
|
|
11153
11187
|
/** The oldest `@camstack/server` this package runs on. */
|
|
11154
11188
|
server: MinVersionSchema.optional(),
|
|
11155
11189
|
/** The oldest installed version of each named addon package. */
|
|
@@ -11160,6 +11194,34 @@ zod.z.object({
|
|
|
11160
11194
|
image: MinVersionSchema.optional()
|
|
11161
11195
|
}).optional()
|
|
11162
11196
|
});
|
|
11197
|
+
/** `>=1.2.3` to `1.2.3`; `null` when the text is not a minimum. */
|
|
11198
|
+
function minimumOf(range) {
|
|
11199
|
+
return MinVersionSchema.safeParse(range).success ? range.slice(2) : null;
|
|
11200
|
+
}
|
|
11201
|
+
function parts(version) {
|
|
11202
|
+
const dash = version.indexOf("-");
|
|
11203
|
+
return {
|
|
11204
|
+
nums: (dash === -1 ? version : version.slice(0, dash)).split(".").map((s) => {
|
|
11205
|
+
const n = Number.parseInt(s, 10);
|
|
11206
|
+
return Number.isNaN(n) ? 0 : n;
|
|
11207
|
+
}),
|
|
11208
|
+
pre: dash === -1 ? null : version.slice(dash + 1)
|
|
11209
|
+
};
|
|
11210
|
+
}
|
|
11211
|
+
/** -1 | 0 | 1; a prerelease sorts below its release. Never throws. */
|
|
11212
|
+
function compareVersions(a, b) {
|
|
11213
|
+
const pa = parts(a);
|
|
11214
|
+
const pb = parts(b);
|
|
11215
|
+
for (let i = 0; i < Math.max(pa.nums.length, pb.nums.length); i++) {
|
|
11216
|
+
const x = pa.nums[i] ?? 0;
|
|
11217
|
+
const y = pb.nums[i] ?? 0;
|
|
11218
|
+
if (x !== y) return x < y ? -1 : 1;
|
|
11219
|
+
}
|
|
11220
|
+
if (pa.pre === pb.pre) return 0;
|
|
11221
|
+
if (pa.pre === null) return 1;
|
|
11222
|
+
if (pb.pre === null) return -1;
|
|
11223
|
+
return pa.pre < pb.pre ? -1 : 1;
|
|
11224
|
+
}
|
|
11163
11225
|
/** One unmet requirement; each names the versions on both sides. */
|
|
11164
11226
|
var UnmetRequirementSchema = zod.z.discriminatedUnion("kind", [
|
|
11165
11227
|
zod.z.object({
|
|
@@ -11190,6 +11252,51 @@ var RequiredAddonUpdateSchema = zod.z.object({
|
|
|
11190
11252
|
/** What this node has; `null` when the addon is not installed. */
|
|
11191
11253
|
installed: zod.z.string().nullable()
|
|
11192
11254
|
});
|
|
11255
|
+
function meets(running, minimum) {
|
|
11256
|
+
return typeof running === "string" && running.length > 0 && compareVersions(running, minimum) >= 0;
|
|
11257
|
+
}
|
|
11258
|
+
/** Every requirement of `requires` that `running` does not meet. Empty means "fine". */
|
|
11259
|
+
function unmetRequirements(requires, running) {
|
|
11260
|
+
if (requires === void 0) return [];
|
|
11261
|
+
const unmet = [];
|
|
11262
|
+
const server = requires.server === void 0 ? null : minimumOf(requires.server);
|
|
11263
|
+
if (server !== null && !meets(running.server, server)) unmet.push({
|
|
11264
|
+
kind: "server-too-old",
|
|
11265
|
+
required: server,
|
|
11266
|
+
running: running.server
|
|
11267
|
+
});
|
|
11268
|
+
for (const [packageName, range] of Object.entries(requires.addons ?? {})) {
|
|
11269
|
+
const minimum = minimumOf(range);
|
|
11270
|
+
const have = running.addons[packageName] ?? null;
|
|
11271
|
+
if (minimum !== null && !meets(have, minimum)) unmet.push({
|
|
11272
|
+
kind: "addon-too-old",
|
|
11273
|
+
packageName,
|
|
11274
|
+
required: minimum,
|
|
11275
|
+
running: have
|
|
11276
|
+
});
|
|
11277
|
+
}
|
|
11278
|
+
for (const kind of ["desktop", "image"]) {
|
|
11279
|
+
const range = requires.wrapper?.[kind];
|
|
11280
|
+
const minimum = range === void 0 ? null : minimumOf(range);
|
|
11281
|
+
if (minimum === null || running.wrapper?.kind !== kind) continue;
|
|
11282
|
+
if (!meets(running.wrapper.version, minimum)) unmet.push({
|
|
11283
|
+
kind: "wrapper-too-old",
|
|
11284
|
+
wrapper: kind,
|
|
11285
|
+
required: minimum,
|
|
11286
|
+
running: running.wrapper.version
|
|
11287
|
+
});
|
|
11288
|
+
}
|
|
11289
|
+
return unmet;
|
|
11290
|
+
}
|
|
11291
|
+
/** One line, naming both versions — the text an operator reads. */
|
|
11292
|
+
function describeUnmet(unmet) {
|
|
11293
|
+
const have = (v, none) => v === null ? none : v;
|
|
11294
|
+
switch (unmet.kind) {
|
|
11295
|
+
case "server-too-old": return `requires server >= ${unmet.required}, running ${have(unmet.running, "unknown")}`;
|
|
11296
|
+
case "addon-too-old": return `requires ${unmet.packageName} >= ${unmet.required}, installed ${have(unmet.running, "none")}`;
|
|
11297
|
+
case "wrapper-too-old": return `requires the ${unmet.wrapper} wrapper >= ${unmet.required}, it reports ${have(unmet.running, "no version")}`;
|
|
11298
|
+
}
|
|
11299
|
+
}
|
|
11193
11300
|
/**
|
|
11194
11301
|
* Which integration instance a settings form is for. An addon that serves several instances
|
|
11195
11302
|
* (`instanceMode: multiple`) can show a different form per instance — an NVR integration
|
|
@@ -11334,26 +11441,16 @@ var RecordIntegrationInstances = class {
|
|
|
11334
11441
|
...this.hooks.description,
|
|
11335
11442
|
mintsId: true
|
|
11336
11443
|
};
|
|
11337
|
-
|
|
11338
|
-
* The record an id names. A caller holding the `integrations` registry id (the Integrations
|
|
11339
|
-
* page) reaches a kind whose body links to it through `integrationId`; an id that is itself a
|
|
11340
|
-
* record id answers as it is. An id that names nothing comes back unchanged.
|
|
11341
|
-
*/
|
|
11342
|
-
async resolveRecordId(id) {
|
|
11343
|
-
if (await this.handle.get(id) !== null) return id;
|
|
11344
|
-
const linked = (await this.handle.query({ limit: INSTANCES_LIST_MAX })).records.find((record) => record.data["integrationId"] === id);
|
|
11345
|
-
return linked === void 0 ? id : linked.id;
|
|
11346
|
-
}
|
|
11347
|
-
instanceFormSchema = async ({ id }) => this.hooks.formSchema(id === null ? null : await this.resolveRecordId(id));
|
|
11444
|
+
instanceFormSchema = async ({ id }) => this.hooks.formSchema(id);
|
|
11348
11445
|
listInstances = async () => {
|
|
11349
11446
|
return (await this.handle.query({ limit: INSTANCES_LIST_MAX })).records.map((record) => this.viewOf(record));
|
|
11350
11447
|
};
|
|
11351
11448
|
getInstance = async ({ id }) => {
|
|
11352
|
-
const record = await this.handle.get(
|
|
11449
|
+
const record = await this.handle.get(id);
|
|
11353
11450
|
return record === null ? null : this.viewOf(record);
|
|
11354
11451
|
};
|
|
11355
11452
|
/** Insert ONE row (`ifRev: 0`: an existing id is refused, never overwritten). */
|
|
11356
|
-
createInstance = async ({ id, name, kind }) => {
|
|
11453
|
+
createInstance = async ({ id, name, kind, values }) => {
|
|
11357
11454
|
const minted = id ?? this.hooks.mintId?.({
|
|
11358
11455
|
name,
|
|
11359
11456
|
...kind !== void 0 ? { kind } : {}
|
|
@@ -11363,11 +11460,20 @@ var RecordIntegrationInstances = class {
|
|
|
11363
11460
|
id: minted,
|
|
11364
11461
|
data: this.hooks.initialBody(name, kind)
|
|
11365
11462
|
}, { ifRev: 0 });
|
|
11463
|
+
const patch = this.patchOf(values ?? {});
|
|
11464
|
+
if (Object.keys(patch).length > 0) await this.handle.patch(minted, patch);
|
|
11366
11465
|
await this.hooks.onChanged?.(minted, "created");
|
|
11367
11466
|
return { id: minted };
|
|
11368
11467
|
};
|
|
11369
|
-
updateInstance = async ({ id
|
|
11370
|
-
const
|
|
11468
|
+
updateInstance = async ({ id, name, values }) => {
|
|
11469
|
+
const patch = this.patchOf(values);
|
|
11470
|
+
if (name !== void 0) patch[this.nameField] = name;
|
|
11471
|
+
await this.handle.patch(id, patch);
|
|
11472
|
+
await this.hooks.onChanged?.(id, "updated");
|
|
11473
|
+
return { ok: true };
|
|
11474
|
+
};
|
|
11475
|
+
/** The record patch a form `values` object means: secrets kept, cleared or replaced. */
|
|
11476
|
+
patchOf(values) {
|
|
11371
11477
|
const patch = {};
|
|
11372
11478
|
for (const [key, value] of Object.entries(values)) {
|
|
11373
11479
|
if (value === void 0) continue;
|
|
@@ -11378,11 +11484,8 @@ var RecordIntegrationInstances = class {
|
|
|
11378
11484
|
else if (isSecretClear(value)) patch[key] = null;
|
|
11379
11485
|
else if (typeof value === "string" && value !== "" && value !== "__camstack_redacted__" && !isSecretFieldView(value)) patch[key] = value;
|
|
11380
11486
|
}
|
|
11381
|
-
|
|
11382
|
-
|
|
11383
|
-
await this.hooks.onChanged?.(id, "updated");
|
|
11384
|
-
return { ok: true };
|
|
11385
|
-
};
|
|
11487
|
+
return patch;
|
|
11488
|
+
}
|
|
11386
11489
|
/** The switch lives in the record body; the addon is told so it applies it (D996). */
|
|
11387
11490
|
setInstanceEnabled = async ({ id, enabled }) => {
|
|
11388
11491
|
if (this.registryOwnsEnabled) throw new Error(`instance "${id}": the integrations registry owns the on/off switch of this addon; set it with integrations.update`);
|
|
@@ -11402,10 +11505,7 @@ var RecordIntegrationInstances = class {
|
|
|
11402
11505
|
status: "unsupported",
|
|
11403
11506
|
error: "This integration declares no connection test"
|
|
11404
11507
|
};
|
|
11405
|
-
return this.hooks.test(input
|
|
11406
|
-
...input,
|
|
11407
|
-
id: await this.resolveRecordId(input.id)
|
|
11408
|
-
});
|
|
11508
|
+
return this.hooks.test(input);
|
|
11409
11509
|
};
|
|
11410
11510
|
/** The flat provider object to hand to `registerProvider`. */
|
|
11411
11511
|
toProvider() {
|
|
@@ -13970,6 +14070,40 @@ var UnstampedEventMediaCountSchema = zod.z.object({
|
|
|
13970
14070
|
/** Sum across both, or `null` when either lane could not be counted. */
|
|
13971
14071
|
total: zod.z.number().int().nonnegative().nullable()
|
|
13972
14072
|
}).nullable();
|
|
14073
|
+
/**
|
|
14074
|
+
* Where the stored event media sits, per storage location: how many media rows
|
|
14075
|
+
* and how many bytes carry each location id, how many carry none (legacy,
|
|
14076
|
+
* resolved to the default `eventMedia` location), and how many name a location
|
|
14077
|
+
* that was not asked about (a deleted or never-listed one).
|
|
14078
|
+
*
|
|
14079
|
+
* One covering-index aggregate per asked location plus the NULL one, and one
|
|
14080
|
+
* unfiltered total that scans the covering index: O(rows), not a walk of the
|
|
14081
|
+
* rows themselves. `unlisted` is total minus the ASKED locations minus NULL, so
|
|
14082
|
+
* it is a deleted location only when every location id was asked.
|
|
14083
|
+
* `null` is "could not be measured", never zero.
|
|
14084
|
+
*/
|
|
14085
|
+
var MediaLocationCensusInputSchema = zod.z.object({ locationIds: zod.z.array(zod.z.string().min(1)).max(50).readonly() });
|
|
14086
|
+
var MediaLocationCensusRowSchema = zod.z.object({
|
|
14087
|
+
locationId: zod.z.string(),
|
|
14088
|
+
rows: zod.z.number().int().nonnegative(),
|
|
14089
|
+
bytes: zod.z.number().nonnegative()
|
|
14090
|
+
});
|
|
14091
|
+
var MediaLocationCensusSchema = zod.z.object({
|
|
14092
|
+
locations: zod.z.array(MediaLocationCensusRowSchema).readonly(),
|
|
14093
|
+
unstamped: zod.z.object({
|
|
14094
|
+
rows: zod.z.number().int().nonnegative(),
|
|
14095
|
+
bytes: zod.z.number().nonnegative()
|
|
14096
|
+
}),
|
|
14097
|
+
/** Rows stamped with a location id that was not in the asked list. */
|
|
14098
|
+
unlisted: zod.z.object({
|
|
14099
|
+
rows: zod.z.number().int().nonnegative(),
|
|
14100
|
+
bytes: zod.z.number().nonnegative()
|
|
14101
|
+
}),
|
|
14102
|
+
total: zod.z.object({
|
|
14103
|
+
rows: zod.z.number().int().nonnegative(),
|
|
14104
|
+
bytes: zod.z.number().nonnegative()
|
|
14105
|
+
})
|
|
14106
|
+
});
|
|
13973
14107
|
var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: zod.z.string().min(1) });
|
|
13974
14108
|
/** The independently selectable logical storage classes — every class
|
|
13975
14109
|
* `storage.listLocationDeclarations` reports, so an operator never meets a
|
|
@@ -47932,52 +48066,7 @@ onBrightnessChanged: { data: zod.z.object({
|
|
|
47932
48066
|
minIntervalMs: 0
|
|
47933
48067
|
} } }
|
|
47934
48068
|
};
|
|
47935
|
-
|
|
47936
|
-
* `broker` — unified pub/sub broker registry, system-scoped collection.
|
|
47937
|
-
*
|
|
47938
|
-
* The cap models any kind-tagged message broker the user wants to
|
|
47939
|
-
* register and that other addons might consume. The first two kinds
|
|
47940
|
-
* are MQTT (mosquitto / aedes embedded / cloud bridge) and
|
|
47941
|
-
* Home Assistant (HA WebSocket — subscribe_entities + call_service).
|
|
47942
|
-
* Future kinds (Zigbee2MQTT bridge, ZHA, KNX, Telegram, …) plug in
|
|
47943
|
-
* the same surface.
|
|
47944
|
-
*
|
|
47945
|
-
* Why one cap, not one cap per kind:
|
|
47946
|
-
* - The integrations page wants a single table of "every broker"
|
|
47947
|
-
* across kinds; a unified cap drives it without join logic.
|
|
47948
|
-
* - Generic admin operations (add / remove / test / status) are
|
|
47949
|
-
* identical across kinds — duplicating them per cap was busywork.
|
|
47950
|
-
* - The `network-access` cap precedent: same interface, many
|
|
47951
|
-
* `providerKind: 'ingress'` implementations (Tailscale, ngrok, …).
|
|
47952
|
-
*
|
|
47953
|
-
* What stays kind-specific:
|
|
47954
|
-
* - `getBrokerConfig` payload (kind decides whether it returns
|
|
47955
|
-
* mqtt URL+creds, HA baseUrl+token, …) — typed as
|
|
47956
|
-
* `Record<string, unknown>` at the wire; consumers narrow.
|
|
47957
|
-
* - `publish` / `subscribe` / `getState` arguments (target / filter /
|
|
47958
|
-
* key) — also typed as `Record<string, unknown>` so each kind can
|
|
47959
|
-
* evolve its surface (MQTT topic+qos vs HA entity_id+domain)
|
|
47960
|
-
* without rebreaking the cap signature.
|
|
47961
|
-
* - `add` `settings` payload (different fields per kind, validated by
|
|
47962
|
-
* the kind-specific provider).
|
|
47963
|
-
*
|
|
47964
|
-
* Bidirectionality:
|
|
47965
|
-
* - `publish` is RPC — synchronous result (provider-defined).
|
|
47966
|
-
* - `subscribe` returns a subscription handle; the actual message
|
|
47967
|
-
* stream flows over the typed event-bus as `broker.message` events
|
|
47968
|
-
* keyed by `(brokerId, subscriptionId)`. Consumers filter in their
|
|
47969
|
-
* event handler. Subscriptions persist across reconnects — the
|
|
47970
|
-
* provider re-subscribes upstream after a transport drop.
|
|
47971
|
-
*
|
|
47972
|
-
* Why event-bus push (not a subscription RPC stream):
|
|
47973
|
-
* - Matches the rest of CamStack's D8 contract — events for telemetry,
|
|
47974
|
-
* RPC for loss-is-a-bug. Broker messages are telemetry (a single
|
|
47975
|
-
* drop is recoverable via `getState({key})`).
|
|
47976
|
-
* - Frees `broker.subscribe` from holding a long-lived RPC channel.
|
|
47977
|
-
* - Cross-process: events already route through `$event-bus`; no
|
|
47978
|
-
* per-broker wire-shaping needed.
|
|
47979
|
-
*/
|
|
47980
|
-
var BrokerStatusEnum = zod.z.enum([
|
|
48069
|
+
zod.z.enum([
|
|
47981
48070
|
"connected",
|
|
47982
48071
|
"disconnected",
|
|
47983
48072
|
"connecting",
|
|
@@ -47985,141 +48074,12 @@ var BrokerStatusEnum = zod.z.enum([
|
|
|
47985
48074
|
"unreachable",
|
|
47986
48075
|
"error"
|
|
47987
48076
|
]);
|
|
47988
|
-
var BrokerInfoSchema = zod.z.object({
|
|
47989
|
-
/** Stable broker id. Persisted; survives addon restarts. */
|
|
47990
|
-
id: zod.z.string(),
|
|
47991
|
-
/** Addon id of the provider that OWNS this broker.
|
|
47992
|
-
*
|
|
47993
|
-
* The `broker` cap is a system-scoped collection: several addons
|
|
47994
|
-
* register a `broker` provider, each owning a DISJOINT set of
|
|
47995
|
-
* brokers (mqtt-broker owns `mqtt_*`, provider-homeassistant owns
|
|
47996
|
-
* `ha_*`). A broker therefore belongs to exactly one addon — like a
|
|
47997
|
-
* device belongs to one integration. The admin UI threads this id
|
|
47998
|
-
* back as the `{ addonId }` system-collection selector on every
|
|
47999
|
-
* id-keyed call (`get` / `getSettings` / `setSettings` / `remove` /
|
|
48000
|
-
* `testConnection`), so the call routes to the OWNING provider
|
|
48001
|
-
* instead of defaulting to the first-registered one. */
|
|
48002
|
-
addonId: zod.z.string(),
|
|
48003
|
-
/** Human-readable name (operator-chosen at add-time). */
|
|
48004
|
-
name: zod.z.string(),
|
|
48005
|
-
/** Provider-defined kind tag — `mqtt` / `home-assistant` / future. */
|
|
48006
|
-
kind: zod.z.string(),
|
|
48007
|
-
status: BrokerStatusEnum,
|
|
48008
|
-
/** Free-form provider-specific info (HA version, MQTT broker
|
|
48009
|
-
* flavour, latency, mTLS active, …). */
|
|
48010
|
-
info: zod.z.record(zod.z.string(), zod.z.unknown()),
|
|
48011
|
-
/** Ms epoch of the last connection probe / status update. */
|
|
48012
|
-
lastCheckedAt: zod.z.number().nullable(),
|
|
48013
|
-
/** Last error message, when `status` indicates failure. */
|
|
48014
|
-
error: zod.z.string().nullable()
|
|
48015
|
-
});
|
|
48016
48077
|
var RegistryStatusSchema = zod.z.object({
|
|
48017
48078
|
brokerCount: zod.z.number().int().nonnegative(),
|
|
48018
48079
|
connectedCount: zod.z.number().int().nonnegative()
|
|
48019
48080
|
});
|
|
48020
|
-
/**
|
|
48021
|
-
* One entry per `broker` provider — which addon provides which broker
|
|
48022
|
-
* kind(s). The unified create picker reads this to know, for each
|
|
48023
|
-
* (addonId, kind) pair the operator can pick, where to route the
|
|
48024
|
-
* follow-up `getSettingsSchema` / `testSettings` / `add` calls (via the
|
|
48025
|
-
* `{ addonId }` selector). A provider only advertises a kind here when
|
|
48026
|
-
* it implements `getSettingsSchema` for that kind (so the picker never
|
|
48027
|
-
* offers a kind whose creation form can't be rendered).
|
|
48028
|
-
*/
|
|
48029
|
-
var BrokerProviderInfoSchema = zod.z.object({
|
|
48030
|
-
/** Addon id of the `broker` provider this entry describes. */
|
|
48031
|
-
addonId: zod.z.string(),
|
|
48032
|
-
/** Broker kinds this provider can create, with a display label. */
|
|
48033
|
-
kinds: zod.z.array(zod.z.object({
|
|
48034
|
-
kind: zod.z.string(),
|
|
48035
|
-
label: zod.z.string(),
|
|
48036
|
-
/**
|
|
48037
|
-
* Relative hub path to start an interactive account link (OAuth popup).
|
|
48038
|
-
* May include `{{brokerId}}`; admin-ui substitutes and appends `?popup=1`.
|
|
48039
|
-
*/
|
|
48040
|
-
interactiveConnectPath: zod.z.string().min(1).optional(),
|
|
48041
|
-
/** Relative hub path to disconnect the linked account (same popup pattern). */
|
|
48042
|
-
interactiveDisconnectPath: zod.z.string().min(1).optional(),
|
|
48043
|
-
/**
|
|
48044
|
-
* The kind signs in through a server-held interactive session instead of
|
|
48045
|
-
* (or before) typed credentials. `basePath` is a hub-relative route set
|
|
48046
|
-
* served by the owning addon (`/addon/<id>/...`) speaking the sign-in
|
|
48047
|
-
* contract: `POST {basePath}/start` (body: the form's settings) answers
|
|
48048
|
-
* `{ sessionId, loginUrl }`; `GET {basePath}/status?sessionId=` answers
|
|
48049
|
-
* `{ phase: 'starting' | 'awaiting-login' | 'captured' | 'error' |
|
|
48050
|
-
* 'cancelled', loginUrl, error }`; `POST {basePath}/commit`
|
|
48051
|
-
* (`{ sessionId, name, brokerId? }`) stores the credentials on a new or
|
|
48052
|
-
* existing broker and answers `{ brokerId }`; `POST {basePath}/cancel`
|
|
48053
|
-
* (`{ sessionId }`) drops the session. The dialog that edits a broker
|
|
48054
|
-
* offers it as the default path; the fields the session fills are
|
|
48055
|
-
* marked `filledBySignIn` in the kind's settings schema.
|
|
48056
|
-
*
|
|
48057
|
-
* `methods` lists the ways the session can sign in, recommended first:
|
|
48058
|
-
* `'device-code'` adds `POST {basePath}/code/start` (body: the form's
|
|
48059
|
-
* settings) answering `{ sessionId, userCode, verificationUrl,
|
|
48060
|
-
* expiresAt }` — the operator types `userCode` at `verificationUrl` on
|
|
48061
|
-
* any device, and the same `status` / `commit` / `cancel` routes follow
|
|
48062
|
-
* (status then carries `method`, `userCode`, `verificationUrl`,
|
|
48063
|
-
* `expiresAt` and the phases `'awaiting-code'` / `'expired'`);
|
|
48064
|
-
* `'proxy'` is the `{basePath}/start` flow above. Absent means
|
|
48065
|
-
* `['proxy']`.
|
|
48066
|
-
*/
|
|
48067
|
-
signIn: zod.z.object({
|
|
48068
|
-
basePath: zod.z.string().min(1),
|
|
48069
|
-
methods: zod.z.array(zod.z.enum(["device-code", "proxy"])).optional()
|
|
48070
|
-
}).optional()
|
|
48071
|
-
}))
|
|
48072
|
-
});
|
|
48073
|
-
var ListInputSchema = zod.z.object({
|
|
48074
|
-
/** Optional kind filter — `list({kind:'home-assistant'})` returns
|
|
48075
|
-
* only HA brokers. Omit to list every broker. */
|
|
48076
|
-
kind: zod.z.string().optional() });
|
|
48077
48081
|
var GetInputSchema = zod.z.object({ id: zod.z.string() });
|
|
48078
|
-
var AddInputSchema = zod.z.object({
|
|
48079
|
-
kind: zod.z.string().min(1),
|
|
48080
|
-
name: zod.z.string().min(1),
|
|
48081
|
-
/**
|
|
48082
|
-
* ADOPT an existing id instead of minting a new one.
|
|
48083
|
-
*
|
|
48084
|
-
* Written the day this cost an outage. A broker's id is not a detail: HA
|
|
48085
|
-
* devices carry it inside their `stableId` (`ha:ha_004:dev:…`), so a broker
|
|
48086
|
-
* lost from config and re-added as `ha_001` leaves every one of its devices
|
|
48087
|
-
* bound to a broker that no longer exists. Re-entering the password under the
|
|
48088
|
-
* ORIGINAL id turns a multi-step device migration back into re-entering a
|
|
48089
|
-
* password.
|
|
48090
|
-
*
|
|
48091
|
-
* A provider MUST refuse an id that is already in use — adopting a live
|
|
48092
|
-
* broker's id would silently take it over.
|
|
48093
|
-
*/
|
|
48094
|
-
id: zod.z.string().min(1).optional(),
|
|
48095
|
-
/** Kind-specific settings (e.g. MQTT `{url,username,password}` or HA
|
|
48096
|
-
* `{baseUrl,accessToken}`). Validated by the kind-specific provider
|
|
48097
|
-
* branch on receipt — invalid shape rejects the add. */
|
|
48098
|
-
settings: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
48099
|
-
});
|
|
48100
|
-
var AddResultSchema = zod.z.object({ id: zod.z.string() });
|
|
48101
|
-
var RemoveInputSchema = zod.z.object({ id: zod.z.string() });
|
|
48102
|
-
var TestConnectionResultSchema = zod.z.discriminatedUnion("ok", [zod.z.object({
|
|
48103
|
-
ok: zod.z.literal(true),
|
|
48104
|
-
latencyMs: zod.z.number().nonnegative()
|
|
48105
|
-
}), zod.z.object({
|
|
48106
|
-
ok: zod.z.literal(false),
|
|
48107
|
-
error: zod.z.string()
|
|
48108
|
-
})]);
|
|
48109
48082
|
var SettingsRecordSchema$1 = zod.z.record(zod.z.string(), zod.z.unknown());
|
|
48110
|
-
var SettingsSchemaInputSchema = zod.z.object({ kind: zod.z.string() });
|
|
48111
|
-
var TestSettingsInputSchema = zod.z.object({
|
|
48112
|
-
kind: zod.z.string(),
|
|
48113
|
-
settings: SettingsRecordSchema$1
|
|
48114
|
-
});
|
|
48115
|
-
var TestSettingsResultSchema = zod.z.discriminatedUnion("ok", [zod.z.object({
|
|
48116
|
-
ok: zod.z.literal(true),
|
|
48117
|
-
latencyMs: zod.z.number().nonnegative().optional()
|
|
48118
|
-
}).strict(), zod.z.object({
|
|
48119
|
-
ok: zod.z.literal(false),
|
|
48120
|
-
error: zod.z.string()
|
|
48121
|
-
})]);
|
|
48122
|
-
var SettingsSchemaResultSchema = zod.z.unknown().nullable();
|
|
48123
48083
|
var PublishInputSchema = zod.z.object({
|
|
48124
48084
|
brokerId: zod.z.string(),
|
|
48125
48085
|
/** Kind-specific routing target.
|
|
@@ -48163,51 +48123,12 @@ var brokerCapability = {
|
|
|
48163
48123
|
kind: "poll"
|
|
48164
48124
|
},
|
|
48165
48125
|
methods: {
|
|
48166
|
-
list: method(ListInputSchema, zod.z.array(BrokerInfoSchema)),
|
|
48167
|
-
get: method(GetInputSchema, BrokerInfoSchema.nullable()),
|
|
48168
|
-
/** Enumerate which addon provides which broker kind(s) for the
|
|
48169
|
-
* unified create picker. The auto-mount fans this array across
|
|
48170
|
-
* every registered `broker` provider (array-output method), so the
|
|
48171
|
-
* picker sees every kind from every provider in one call. */
|
|
48172
|
-
listProviders: method(zod.z.void(), zod.z.array(BrokerProviderInfoSchema), { auth: "admin" }),
|
|
48173
|
-
add: method(AddInputSchema, AddResultSchema, {
|
|
48174
|
-
kind: "mutation",
|
|
48175
|
-
auth: "admin"
|
|
48176
|
-
}),
|
|
48177
|
-
remove: method(RemoveInputSchema, zod.z.void(), {
|
|
48178
|
-
kind: "mutation",
|
|
48179
|
-
auth: "admin"
|
|
48180
|
-
}),
|
|
48181
|
-
testConnection: method(GetInputSchema, TestConnectionResultSchema, {
|
|
48182
|
-
kind: "mutation",
|
|
48183
|
-
auth: "admin"
|
|
48184
|
-
}),
|
|
48185
|
-
/** Read the persisted settings record for a broker (kind-specific
|
|
48186
|
-
* shape). Admin-only — settings may contain secrets. Returns `null`
|
|
48187
|
-
* when the broker id is unknown to the provider (the collection
|
|
48188
|
-
* fallback may route a foreign id to the first provider). */
|
|
48189
|
-
getSettings: method(GetInputSchema, SettingsRecordSchema$1.nullable(), { auth: "admin" }),
|
|
48190
|
-
/** Overwrite the persisted settings record. The kind-specific
|
|
48191
|
-
* provider validates the shape and applies the change (reconnects
|
|
48192
|
-
* if credentials changed). */
|
|
48193
|
-
setSettings: method(zod.z.object({
|
|
48194
|
-
id: zod.z.string(),
|
|
48195
|
-
settings: SettingsRecordSchema$1
|
|
48196
|
-
}), zod.z.void(), {
|
|
48197
|
-
kind: "mutation",
|
|
48198
|
-
auth: "admin"
|
|
48199
|
-
}),
|
|
48200
48126
|
/** Returns the kind-specific connection config the consumer needs
|
|
48201
48127
|
* to open its own client (MQTT pattern: `{url, username, password,
|
|
48202
48128
|
* clientIdPrefix}`). HA providers MAY return the auth envelope
|
|
48203
48129
|
* but typical HA consumers use `publish` / `subscribe` instead.
|
|
48204
48130
|
* Returns `null` when the broker id is unknown to the provider. */
|
|
48205
48131
|
getBrokerConfig: method(GetInputSchema, SettingsRecordSchema$1.nullable(), { auth: "admin" }),
|
|
48206
|
-
getSettingsSchema: method(SettingsSchemaInputSchema, SettingsSchemaResultSchema, { auth: "admin" }),
|
|
48207
|
-
testSettings: method(TestSettingsInputSchema, TestSettingsResultSchema, {
|
|
48208
|
-
kind: "mutation",
|
|
48209
|
-
auth: "admin"
|
|
48210
|
-
}),
|
|
48211
48132
|
publish: method(PublishInputSchema, zod.z.unknown(), {
|
|
48212
48133
|
kind: "mutation",
|
|
48213
48134
|
auth: "admin"
|
|
@@ -62282,7 +62203,7 @@ var TestConnectionStatusEnum = zod.z.enum([
|
|
|
62282
62203
|
"inconclusive",
|
|
62283
62204
|
"unsupported"
|
|
62284
62205
|
]);
|
|
62285
|
-
var TestConnectionResultSchema
|
|
62206
|
+
var TestConnectionResultSchema = zod.z.object({
|
|
62286
62207
|
/** True ONLY for `validated`. Never true for a test that did not run. */
|
|
62287
62208
|
success: zod.z.boolean(),
|
|
62288
62209
|
error: zod.z.string().optional(),
|
|
@@ -62339,7 +62260,7 @@ var integrationsCapability = {
|
|
|
62339
62260
|
testConnection: method(zod.z.object({
|
|
62340
62261
|
addonId: zod.z.string(),
|
|
62341
62262
|
settings: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
62342
|
-
}), TestConnectionResultSchema
|
|
62263
|
+
}), TestConnectionResultSchema, {
|
|
62343
62264
|
kind: "mutation",
|
|
62344
62265
|
auth: "admin"
|
|
62345
62266
|
})
|
|
@@ -62370,6 +62291,14 @@ var ConfigSchemaPassthrough$3 = zod.z.custom();
|
|
|
62370
62291
|
var IntegrationInstanceIdSchema = zod.z.string().min(1);
|
|
62371
62292
|
var IntegrationInstanceModeSchema = zod.z.enum(["single", "multiple"]);
|
|
62372
62293
|
/**
|
|
62294
|
+
* What the addon's instances ARE for the Integrations page (planning#416). `devices`: each
|
|
62295
|
+
* instance is an integration that brings devices (the registry owns its on/off switch);
|
|
62296
|
+
* `services`: a connection configured from the addon's own function page, never listed on
|
|
62297
|
+
* Integrations.
|
|
62298
|
+
* It is the same vocabulary as the manifest's `integrationRole`, which stays as an override.
|
|
62299
|
+
*/
|
|
62300
|
+
var IntegrationInstanceRoleSchema = zod.z.enum(["devices", "services"]);
|
|
62301
|
+
/**
|
|
62373
62302
|
* One kind of instance a provider can create (an adapter, an account type). The sign-in and
|
|
62374
62303
|
* connect fields follow the `broker` contract (`broker.cap.ts`): `signIn.basePath` is a
|
|
62375
62304
|
* hub-relative route set speaking the sign-in contract, `connectPath` / `disconnectPath` open an
|
|
@@ -62380,6 +62309,22 @@ var IntegrationInstanceKindSchema = zod.z.object({
|
|
|
62380
62309
|
/** Stable id of the kind, sent back as `createInstance.kind`. */
|
|
62381
62310
|
id: zod.z.string().min(1),
|
|
62382
62311
|
label: zod.z.string().min(1),
|
|
62312
|
+
/**
|
|
62313
|
+
* The function capability this kind is configured for (`broker`, `smtp-provider`,
|
|
62314
|
+
* `device-provider`, ...). A page section is the kinds whose `functionCap` it names (D1013); a
|
|
62315
|
+
* provider with more than one section must name it on every kind.
|
|
62316
|
+
*/
|
|
62317
|
+
functionCap: zod.z.string().min(1),
|
|
62318
|
+
/**
|
|
62319
|
+
* For `functionCap: 'broker'`: the registry kind of the broker an instance of this kind is
|
|
62320
|
+
* (`matter`, `home-assistant`, ...). A caller that needs a broker of one kind (a link field)
|
|
62321
|
+
* finds the instances whose kind names it; absent takes the kind `id`.
|
|
62322
|
+
*/
|
|
62323
|
+
brokerKind: zod.z.string().min(1).optional(),
|
|
62324
|
+
/** What instances of this kind are for the Integrations page; absent takes the provider's `role`. */
|
|
62325
|
+
role: IntegrationInstanceRoleSchema.optional(),
|
|
62326
|
+
/** `testInstance` really probes the remote for this kind; absent takes the provider's `canTest`. */
|
|
62327
|
+
canTest: zod.z.boolean().optional(),
|
|
62383
62328
|
/** The kind signs in through a server-held interactive session. */
|
|
62384
62329
|
signIn: zod.z.object({
|
|
62385
62330
|
basePath: zod.z.string().min(1),
|
|
@@ -62391,18 +62336,6 @@ var IntegrationInstanceKindSchema = zod.z.object({
|
|
|
62391
62336
|
disconnectPath: zod.z.string().min(1).optional()
|
|
62392
62337
|
});
|
|
62393
62338
|
/**
|
|
62394
|
-
* What the addon's instances ARE for the Integrations page (planning#416). `devices`: each
|
|
62395
|
-
* instance is an integration that brings devices (the registry owns its on/off switch);
|
|
62396
|
-
* `services`: a connection configured from the addon's own function page, never listed on
|
|
62397
|
-
* Integrations; `both`: a dual entry listed for its devices that also keeps service connections.
|
|
62398
|
-
* It is the same vocabulary as the manifest's `integrationRole`, which stays as an override.
|
|
62399
|
-
*/
|
|
62400
|
-
var IntegrationInstanceRoleSchema = zod.z.enum([
|
|
62401
|
-
"devices",
|
|
62402
|
-
"services",
|
|
62403
|
-
"both"
|
|
62404
|
-
]);
|
|
62405
|
-
/**
|
|
62406
62339
|
* How devices of an instance are found. `none`: the operator adds them by hand; `lan`: the addon
|
|
62407
62340
|
* scans the network before any instance exists (the wizard offers the candidates); `account`: the
|
|
62408
62341
|
* devices appear after the instance signs in. `scopedToInstance`: a discovery run belongs to ONE
|
|
@@ -62486,7 +62419,11 @@ var integrationInstancesCapability = {
|
|
|
62486
62419
|
methods: {
|
|
62487
62420
|
describe: method(zod.z.void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }),
|
|
62488
62421
|
/** The form; `id: null` is the create form. */
|
|
62489
|
-
instanceFormSchema: method(zod.z.object({
|
|
62422
|
+
instanceFormSchema: method(zod.z.object({
|
|
62423
|
+
id: IntegrationInstanceIdSchema.nullable(),
|
|
62424
|
+
/** The kind of the create form (`id: null`) of a provider with several. */
|
|
62425
|
+
kind: zod.z.string().min(1).optional()
|
|
62426
|
+
}), ConfigSchemaPassthrough$3, { auth: "admin" }),
|
|
62490
62427
|
listInstances: method(zod.z.void(), zod.z.array(IntegrationInstanceSchema).readonly(), { auth: "admin" }),
|
|
62491
62428
|
getInstance: method(zod.z.object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), { auth: "admin" }),
|
|
62492
62429
|
/**
|
|
@@ -62496,7 +62433,9 @@ var integrationInstancesCapability = {
|
|
|
62496
62433
|
createInstance: method(zod.z.object({
|
|
62497
62434
|
id: IntegrationInstanceIdSchema.optional(),
|
|
62498
62435
|
name: zod.z.string().min(1),
|
|
62499
|
-
kind: zod.z.string().min(1).optional()
|
|
62436
|
+
kind: zod.z.string().min(1).optional(),
|
|
62437
|
+
/** Form values written with the record (a link picked in the create dialog). */
|
|
62438
|
+
values: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
62500
62439
|
}), zod.z.object({ id: zod.z.string() }), {
|
|
62501
62440
|
kind: "mutation",
|
|
62502
62441
|
auth: "admin"
|
|
@@ -62523,8 +62462,10 @@ var integrationInstancesCapability = {
|
|
|
62523
62462
|
}),
|
|
62524
62463
|
testInstance: optionalMethod(zod.z.object({
|
|
62525
62464
|
id: IntegrationInstanceIdSchema.nullable(),
|
|
62526
|
-
values: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
62527
|
-
|
|
62465
|
+
values: zod.z.record(zod.z.string(), zod.z.unknown()),
|
|
62466
|
+
/** The kind to test when `id` is null and the provider has several. */
|
|
62467
|
+
kind: zod.z.string().min(1).optional()
|
|
62468
|
+
}), TestConnectionResultSchema, {
|
|
62528
62469
|
kind: "mutation",
|
|
62529
62470
|
auth: "admin"
|
|
62530
62471
|
})
|
|
@@ -66265,6 +66206,568 @@ var metricsProviderCapability = {
|
|
|
66265
66206
|
}
|
|
66266
66207
|
};
|
|
66267
66208
|
/**
|
|
66209
|
+
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
66210
|
+
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
66211
|
+
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
66212
|
+
*
|
|
66213
|
+
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
66214
|
+
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
66215
|
+
* that with the addon id closed over). It is deliberately NOT in any input
|
|
66216
|
+
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
66217
|
+
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
66218
|
+
* addons go through the owner's capability.
|
|
66219
|
+
*
|
|
66220
|
+
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
66221
|
+
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
66222
|
+
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
66223
|
+
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
66224
|
+
* row's own ref.
|
|
66225
|
+
*
|
|
66226
|
+
* Internal: addons reach it through `ctx.records`, never directly.
|
|
66227
|
+
*/
|
|
66228
|
+
var RecordIdSchema = zod.z.string().min(1).max(256);
|
|
66229
|
+
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
66230
|
+
var RecordBodySchema = zod.z.record(zod.z.string(), zod.z.unknown());
|
|
66231
|
+
var RecordInputSchema = zod.z.object({
|
|
66232
|
+
id: RecordIdSchema,
|
|
66233
|
+
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
66234
|
+
deviceId: zod.z.number().int().optional(),
|
|
66235
|
+
/** The domain clock, ms: observed / created / opened. */
|
|
66236
|
+
at: zod.z.number().int().optional(),
|
|
66237
|
+
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
66238
|
+
expiresAt: zod.z.number().int().optional(),
|
|
66239
|
+
data: RecordBodySchema
|
|
66240
|
+
});
|
|
66241
|
+
var RecordViewSchema = zod.z.object({
|
|
66242
|
+
id: zod.z.string(),
|
|
66243
|
+
deviceId: zod.z.number().int().nullable(),
|
|
66244
|
+
at: zod.z.number().nullable(),
|
|
66245
|
+
expiresAt: zod.z.number().nullable(),
|
|
66246
|
+
rev: zod.z.number().int(),
|
|
66247
|
+
updatedAt: zod.z.number(),
|
|
66248
|
+
data: RecordBodySchema
|
|
66249
|
+
});
|
|
66250
|
+
/** One predicate on a declared index field: equality, a set, or a range. */
|
|
66251
|
+
var RecordWhereValueSchema = zod.z.union([
|
|
66252
|
+
zod.z.string(),
|
|
66253
|
+
zod.z.number(),
|
|
66254
|
+
zod.z.boolean(),
|
|
66255
|
+
zod.z.object({ in: zod.z.array(zod.z.union([
|
|
66256
|
+
zod.z.string(),
|
|
66257
|
+
zod.z.number(),
|
|
66258
|
+
zod.z.boolean()
|
|
66259
|
+
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
66260
|
+
zod.z.object({
|
|
66261
|
+
gt: zod.z.union([zod.z.string(), zod.z.number()]).optional(),
|
|
66262
|
+
gte: zod.z.union([zod.z.string(), zod.z.number()]).optional(),
|
|
66263
|
+
lt: zod.z.union([zod.z.string(), zod.z.number()]).optional(),
|
|
66264
|
+
lte: zod.z.union([zod.z.string(), zod.z.number()]).optional()
|
|
66265
|
+
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
66266
|
+
]);
|
|
66267
|
+
/** Declared index fields only. Anything else does not compile, by design. */
|
|
66268
|
+
var RecordWhereSchema = zod.z.record(RecordFieldPathSchema, RecordWhereValueSchema);
|
|
66269
|
+
var KindShape = { kind: RecordKindNameSchema };
|
|
66270
|
+
var TimeWindowShape = {
|
|
66271
|
+
deviceId: zod.z.number().int().optional(),
|
|
66272
|
+
atFrom: zod.z.number().optional(),
|
|
66273
|
+
atTo: zod.z.number().optional()
|
|
66274
|
+
};
|
|
66275
|
+
var RecordQueryInputSchema = zod.z.object({
|
|
66276
|
+
...KindShape,
|
|
66277
|
+
...TimeWindowShape,
|
|
66278
|
+
where: RecordWhereSchema.optional(),
|
|
66279
|
+
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
66280
|
+
order: zod.z.enum(["at", "id"]).optional(),
|
|
66281
|
+
desc: zod.z.boolean().optional(),
|
|
66282
|
+
limit: zod.z.number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
66283
|
+
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
66284
|
+
cursor: zod.z.string().min(1).optional()
|
|
66285
|
+
});
|
|
66286
|
+
var RecordQueryResultSchema = zod.z.object({
|
|
66287
|
+
records: zod.z.array(RecordViewSchema),
|
|
66288
|
+
nextCursor: zod.z.string().nullable()
|
|
66289
|
+
});
|
|
66290
|
+
var RecordKindStateSchema = zod.z.enum([
|
|
66291
|
+
"created",
|
|
66292
|
+
"unchanged",
|
|
66293
|
+
"updated"
|
|
66294
|
+
]);
|
|
66295
|
+
var DeclareKindResultSchema = zod.z.object({
|
|
66296
|
+
kindId: zod.z.number().int(),
|
|
66297
|
+
state: RecordKindStateSchema,
|
|
66298
|
+
createdIndexes: zod.z.array(zod.z.string())
|
|
66299
|
+
});
|
|
66300
|
+
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
66301
|
+
var SecretRefsList = zod.z.array(zod.z.string());
|
|
66302
|
+
/**
|
|
66303
|
+
* One op of a `transact`: the single-row writes, each on a kind of the caller.
|
|
66304
|
+
* All ops of one call share ONE database file and ONE `transactFamily`.
|
|
66305
|
+
*/
|
|
66306
|
+
var RecordTransactOpSchema = zod.z.discriminatedUnion("op", [
|
|
66307
|
+
zod.z.object({
|
|
66308
|
+
op: zod.z.literal("put"),
|
|
66309
|
+
kind: RecordKindNameSchema,
|
|
66310
|
+
record: RecordInputSchema,
|
|
66311
|
+
ifRev: zod.z.number().int().min(0).optional()
|
|
66312
|
+
}),
|
|
66313
|
+
zod.z.object({
|
|
66314
|
+
op: zod.z.literal("patch"),
|
|
66315
|
+
kind: RecordKindNameSchema,
|
|
66316
|
+
id: RecordIdSchema,
|
|
66317
|
+
data: RecordBodySchema,
|
|
66318
|
+
at: zod.z.number().int().nullable().optional(),
|
|
66319
|
+
expiresAt: zod.z.number().int().nullable().optional(),
|
|
66320
|
+
ifRev: zod.z.number().int().min(1).optional()
|
|
66321
|
+
}),
|
|
66322
|
+
zod.z.object({
|
|
66323
|
+
op: zod.z.literal("delete"),
|
|
66324
|
+
kind: RecordKindNameSchema,
|
|
66325
|
+
id: RecordIdSchema
|
|
66326
|
+
})
|
|
66327
|
+
]);
|
|
66328
|
+
var RecordSecretRefsSchema = zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), zod.z.string()));
|
|
66329
|
+
var recordsCapability = {
|
|
66330
|
+
name: "records",
|
|
66331
|
+
scope: "system",
|
|
66332
|
+
mode: "singleton",
|
|
66333
|
+
internal: true,
|
|
66334
|
+
methods: {
|
|
66335
|
+
/** Reconcile this addon's kinds: create the catalog rows and the declared indexes. Additive only. */
|
|
66336
|
+
declareKinds: method(zod.z.object({ kinds: zod.z.record(RecordKindNameSchema, RecordKindDeclarationSchema) }), zod.z.object({ kinds: zod.z.record(zod.z.string(), DeclareKindResultSchema) }), {
|
|
66337
|
+
kind: "mutation",
|
|
66338
|
+
auth: "admin"
|
|
66339
|
+
}),
|
|
66340
|
+
get: method(zod.z.object({
|
|
66341
|
+
...KindShape,
|
|
66342
|
+
id: RecordIdSchema
|
|
66343
|
+
}), RecordViewSchema.nullable(), { auth: "admin" }),
|
|
66344
|
+
getMany: method(zod.z.object({
|
|
66345
|
+
...KindShape,
|
|
66346
|
+
ids: zod.z.array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
66347
|
+
}), zod.z.array(RecordViewSchema), { auth: "admin" }),
|
|
66348
|
+
/** The keychain refs of the rows' secret fields, by id and concrete path. For the owner's `ctx.secrets`. */
|
|
66349
|
+
secretRefs: method(zod.z.object({
|
|
66350
|
+
...KindShape,
|
|
66351
|
+
ids: zod.z.array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
66352
|
+
}), RecordSecretRefsSchema, { auth: "admin" }),
|
|
66353
|
+
put: method(zod.z.object({
|
|
66354
|
+
...KindShape,
|
|
66355
|
+
record: RecordInputSchema,
|
|
66356
|
+
/** Compare-and-set. `0` means "the row must not exist". */
|
|
66357
|
+
ifRev: zod.z.number().int().min(0).optional()
|
|
66358
|
+
}), zod.z.object({
|
|
66359
|
+
rev: zod.z.number().int(),
|
|
66360
|
+
releasedRefs: SecretRefsList
|
|
66361
|
+
}), {
|
|
66362
|
+
kind: "mutation",
|
|
66363
|
+
auth: "admin"
|
|
66364
|
+
}),
|
|
66365
|
+
putMany: method(zod.z.object({
|
|
66366
|
+
...KindShape,
|
|
66367
|
+
records: zod.z.array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
66368
|
+
}), zod.z.object({
|
|
66369
|
+
count: zod.z.number().int(),
|
|
66370
|
+
releasedRefs: SecretRefsList
|
|
66371
|
+
}), {
|
|
66372
|
+
kind: "mutation",
|
|
66373
|
+
auth: "admin"
|
|
66374
|
+
}),
|
|
66375
|
+
/** One-statement RFC 7396 merge: `null` removes a field; a merge never reads. */
|
|
66376
|
+
patch: method(zod.z.object({
|
|
66377
|
+
...KindShape,
|
|
66378
|
+
id: RecordIdSchema,
|
|
66379
|
+
data: RecordBodySchema,
|
|
66380
|
+
at: zod.z.number().int().nullable().optional(),
|
|
66381
|
+
expiresAt: zod.z.number().int().nullable().optional(),
|
|
66382
|
+
ifRev: zod.z.number().int().min(1).optional()
|
|
66383
|
+
}), zod.z.object({
|
|
66384
|
+
rev: zod.z.number().int(),
|
|
66385
|
+
releasedRefs: SecretRefsList
|
|
66386
|
+
}), {
|
|
66387
|
+
kind: "mutation",
|
|
66388
|
+
auth: "admin"
|
|
66389
|
+
}),
|
|
66390
|
+
delete: method(zod.z.object({
|
|
66391
|
+
...KindShape,
|
|
66392
|
+
id: RecordIdSchema
|
|
66393
|
+
}), zod.z.object({
|
|
66394
|
+
deleted: zod.z.boolean(),
|
|
66395
|
+
secretRefs: SecretRefsList
|
|
66396
|
+
}), {
|
|
66397
|
+
kind: "mutation",
|
|
66398
|
+
auth: "admin"
|
|
66399
|
+
}),
|
|
66400
|
+
deleteMany: method(zod.z.object({
|
|
66401
|
+
...KindShape,
|
|
66402
|
+
ids: zod.z.array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
66403
|
+
}), zod.z.object({
|
|
66404
|
+
deleted: zod.z.number().int(),
|
|
66405
|
+
secretRefs: SecretRefsList
|
|
66406
|
+
}), {
|
|
66407
|
+
kind: "mutation",
|
|
66408
|
+
auth: "admin"
|
|
66409
|
+
}),
|
|
66410
|
+
query: method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }),
|
|
66411
|
+
count: method(zod.z.object({
|
|
66412
|
+
...KindShape,
|
|
66413
|
+
...TimeWindowShape,
|
|
66414
|
+
where: RecordWhereSchema.optional()
|
|
66415
|
+
}), zod.z.object({ count: zod.z.number().int() }), { auth: "admin" }),
|
|
66416
|
+
histogram: method(zod.z.object({
|
|
66417
|
+
...KindShape,
|
|
66418
|
+
deviceId: zod.z.number().int().optional(),
|
|
66419
|
+
from: zod.z.number(),
|
|
66420
|
+
to: zod.z.number(),
|
|
66421
|
+
bucketMs: zod.z.number().int().positive()
|
|
66422
|
+
}), zod.z.object({ buckets: zod.z.array(zod.z.object({
|
|
66423
|
+
bucketStart: zod.z.number(),
|
|
66424
|
+
count: zod.z.number().int()
|
|
66425
|
+
})) }), { auth: "admin" }),
|
|
66426
|
+
/** Index-served only: every field must belong to ONE declared index. */
|
|
66427
|
+
aggregate: method(zod.z.object({
|
|
66428
|
+
...KindShape,
|
|
66429
|
+
op: zod.z.enum([
|
|
66430
|
+
"sum",
|
|
66431
|
+
"min",
|
|
66432
|
+
"max",
|
|
66433
|
+
"count"
|
|
66434
|
+
]),
|
|
66435
|
+
field: RecordFieldPathSchema.optional(),
|
|
66436
|
+
groupBy: RecordFieldPathSchema.optional(),
|
|
66437
|
+
where: RecordWhereSchema.optional()
|
|
66438
|
+
}), zod.z.object({ rows: zod.z.array(zod.z.object({
|
|
66439
|
+
group: zod.z.union([
|
|
66440
|
+
zod.z.string(),
|
|
66441
|
+
zod.z.number(),
|
|
66442
|
+
zod.z.null()
|
|
66443
|
+
]),
|
|
66444
|
+
value: zod.z.number().nullable()
|
|
66445
|
+
})) }), { auth: "admin" }),
|
|
66446
|
+
/** Batched (5 000 rows per statement, yielding between). Needs a predicate: there is no "delete all". */
|
|
66447
|
+
deleteWhere: method(zod.z.object({
|
|
66448
|
+
...KindShape,
|
|
66449
|
+
deviceId: zod.z.number().int().optional(),
|
|
66450
|
+
atBefore: zod.z.number().optional(),
|
|
66451
|
+
where: RecordWhereSchema.optional()
|
|
66452
|
+
}), zod.z.object({
|
|
66453
|
+
deleted: zod.z.number().int(),
|
|
66454
|
+
secretRefs: SecretRefsList
|
|
66455
|
+
}), {
|
|
66456
|
+
kind: "mutation",
|
|
66457
|
+
auth: "admin"
|
|
66458
|
+
}),
|
|
66459
|
+
/**
|
|
66460
|
+
* Several single-row writes (put / patch / delete) in ONE SQLite transaction:
|
|
66461
|
+
* all land or none does. Every op's kind must sit in one file and share one
|
|
66462
|
+
* `transactFamily` (`records/transact-refused` otherwise). Results are in op order.
|
|
66463
|
+
*/
|
|
66464
|
+
transact: method(zod.z.object({ ops: zod.z.array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), zod.z.object({
|
|
66465
|
+
results: zod.z.array(zod.z.object({
|
|
66466
|
+
rev: zod.z.number().int().nullable(),
|
|
66467
|
+
deleted: zod.z.boolean()
|
|
66468
|
+
})),
|
|
66469
|
+
releasedRefs: SecretRefsList,
|
|
66470
|
+
secretRefs: SecretRefsList
|
|
66471
|
+
}), {
|
|
66472
|
+
kind: "mutation",
|
|
66473
|
+
auth: "admin"
|
|
66474
|
+
}),
|
|
66475
|
+
/** The D865 hook body: every kind of this addon declared `deviceRemoval: 'delete'`. */
|
|
66476
|
+
deleteDevice: method(zod.z.object({
|
|
66477
|
+
deviceId: zod.z.number().int(),
|
|
66478
|
+
kinds: zod.z.array(RecordKindNameSchema).optional()
|
|
66479
|
+
}), zod.z.object({
|
|
66480
|
+
deleted: zod.z.record(zod.z.string(), zod.z.number().int()),
|
|
66481
|
+
secretRefs: SecretRefsList
|
|
66482
|
+
}), {
|
|
66483
|
+
kind: "mutation",
|
|
66484
|
+
auth: "admin"
|
|
66485
|
+
}),
|
|
66486
|
+
/** A monotonically increasing integer per kind (replaces "resume from the highest"). */
|
|
66487
|
+
allocateId: method(zod.z.object(KindShape), zod.z.object({ id: zod.z.number().int() }), {
|
|
66488
|
+
kind: "mutation",
|
|
66489
|
+
auth: "admin"
|
|
66490
|
+
})
|
|
66491
|
+
}
|
|
66492
|
+
};
|
|
66493
|
+
/**
|
|
66494
|
+
* The wire shapes of the migration API, version 1 (planning#447).
|
|
66495
|
+
*
|
|
66496
|
+
* A migration is code that outlives the server it was written against: an addon at
|
|
66497
|
+
* version 1.4 that is brought to 1.9 in one jump still runs its 1.4 catalogue, against
|
|
66498
|
+
* the 1.9 kernel. The only thing that code may call is {@link MigrationApiV1}; this file
|
|
66499
|
+
* is the contract of every method of it, one Zod pair per method.
|
|
66500
|
+
*
|
|
66501
|
+
* APPEND-ONLY. A released method is never removed and never changes meaning: an input
|
|
66502
|
+
* field is never removed or made required, an enum never narrows, an output field is
|
|
66503
|
+
* never removed. A change that cannot be expressed that way is `migration-api.v2`, next
|
|
66504
|
+
* to this file. `scripts/check-migration-api-append-only.ts` holds the line against
|
|
66505
|
+
* `scripts/migration-api-contract.json`, and every `behaviours` id below must have an
|
|
66506
|
+
* `it('<id>'` in `migration-api.contract.spec.ts`.
|
|
66507
|
+
*/
|
|
66508
|
+
var Rows = zod.z.record(zod.z.string(), zod.z.unknown());
|
|
66509
|
+
var IntegrationId = zod.z.object({ integrationId: zod.z.string().min(1) });
|
|
66510
|
+
var RecordId = zod.z.object({ id: zod.z.string().min(1) });
|
|
66511
|
+
var RecordRowSchema = zod.z.object({
|
|
66512
|
+
id: zod.z.string(),
|
|
66513
|
+
deviceId: zod.z.number().int().nullable(),
|
|
66514
|
+
at: zod.z.number().nullable(),
|
|
66515
|
+
expiresAt: zod.z.number().nullable(),
|
|
66516
|
+
rev: zod.z.number().int(),
|
|
66517
|
+
updatedAt: zod.z.number(),
|
|
66518
|
+
data: Rows
|
|
66519
|
+
});
|
|
66520
|
+
var RecordPutShape = {
|
|
66521
|
+
id: zod.z.string().min(1),
|
|
66522
|
+
deviceId: zod.z.number().int().optional(),
|
|
66523
|
+
at: zod.z.number().int().optional(),
|
|
66524
|
+
expiresAt: zod.z.number().int().optional(),
|
|
66525
|
+
data: Rows
|
|
66526
|
+
};
|
|
66527
|
+
var MigrationIntegrationSchema = zod.z.object({
|
|
66528
|
+
id: zod.z.string(),
|
|
66529
|
+
addonId: zod.z.string(),
|
|
66530
|
+
name: zod.z.string(),
|
|
66531
|
+
info: Rows,
|
|
66532
|
+
originStableId: zod.z.string().optional()
|
|
66533
|
+
});
|
|
66534
|
+
var MigrationDeviceSchema = zod.z.object({
|
|
66535
|
+
id: zod.z.number().int(),
|
|
66536
|
+
integrationId: zod.z.string().nullable().optional(),
|
|
66537
|
+
/** The owning device; null or absent for a root. */
|
|
66538
|
+
parentDeviceId: zod.z.number().int().nullable().optional(),
|
|
66539
|
+
type: zod.z.string().optional(),
|
|
66540
|
+
name: zod.z.string().optional(),
|
|
66541
|
+
stableId: zod.z.string().optional()
|
|
66542
|
+
});
|
|
66543
|
+
/** What the engine says about the migration API it serves: lets an addon notice an older server. */
|
|
66544
|
+
var MigrationApiInfoSchema = zod.z.object({
|
|
66545
|
+
version: zod.z.number().int(),
|
|
66546
|
+
methods: zod.z.array(zod.z.string())
|
|
66547
|
+
});
|
|
66548
|
+
var LogInput = zod.z.object({
|
|
66549
|
+
message: zod.z.string(),
|
|
66550
|
+
meta: Rows.optional(),
|
|
66551
|
+
/** Grouping tags of the line; a line about a device carries `{ deviceId }`. */
|
|
66552
|
+
tags: zod.z.object({ deviceId: zod.z.number().int().optional() }).optional()
|
|
66553
|
+
});
|
|
66554
|
+
var MIGRATION_API_V1_METHODS = {
|
|
66555
|
+
"ledger.declare": {
|
|
66556
|
+
input: zod.z.object({
|
|
66557
|
+
owner: zod.z.string().min(1),
|
|
66558
|
+
metas: zod.z.array(MigrationMetaSchema)
|
|
66559
|
+
}),
|
|
66560
|
+
output: zod.z.object({
|
|
66561
|
+
bootId: zod.z.string(),
|
|
66562
|
+
snapshot: zod.z.enum([
|
|
66563
|
+
"none",
|
|
66564
|
+
"written",
|
|
66565
|
+
"refused"
|
|
66566
|
+
]),
|
|
66567
|
+
steps: zod.z.array(MigrationOwnerStepSchema),
|
|
66568
|
+
/** The migration API the engine serves; absent from a server that predates it. */
|
|
66569
|
+
migrationApi: MigrationApiInfoSchema.optional()
|
|
66570
|
+
}),
|
|
66571
|
+
behaviours: ["ledger.declare.answers-steps-in-engine-order", "ledger.declare.answers-the-migration-api"]
|
|
66572
|
+
},
|
|
66573
|
+
"ledger.start": {
|
|
66574
|
+
input: zod.z.object({ id: zod.z.string().min(1) }),
|
|
66575
|
+
output: zod.z.object({
|
|
66576
|
+
proceed: zod.z.boolean(),
|
|
66577
|
+
state: zod.z.union([zod.z.literal("pending"), MigrationStatusSchema]),
|
|
66578
|
+
reason: zod.z.string().nullable()
|
|
66579
|
+
}),
|
|
66580
|
+
behaviours: ["ledger.start.proceeds-when-predecessors-applied"]
|
|
66581
|
+
},
|
|
66582
|
+
"ledger.finish": {
|
|
66583
|
+
input: zod.z.object({
|
|
66584
|
+
id: zod.z.string().min(1),
|
|
66585
|
+
result: MigrationOwnerResultSchema
|
|
66586
|
+
}),
|
|
66587
|
+
output: zod.z.object({
|
|
66588
|
+
status: MigrationStatusSchema,
|
|
66589
|
+
error: zod.z.string().nullable(),
|
|
66590
|
+
rowsChanged: zod.z.number().int().nonnegative()
|
|
66591
|
+
}),
|
|
66592
|
+
behaviours: ["ledger.finish.records-the-outcome"]
|
|
66593
|
+
},
|
|
66594
|
+
"legacyRows.read": {
|
|
66595
|
+
input: IntegrationId,
|
|
66596
|
+
output: Rows,
|
|
66597
|
+
behaviours: [
|
|
66598
|
+
"legacyRows.read.returns-stored-rows",
|
|
66599
|
+
"legacyRows.read.absent-store-is-empty",
|
|
66600
|
+
"legacyRows.caller.sibling-package"
|
|
66601
|
+
]
|
|
66602
|
+
},
|
|
66603
|
+
"legacyRows.clear": {
|
|
66604
|
+
input: IntegrationId,
|
|
66605
|
+
output: zod.z.object({
|
|
66606
|
+
rows: zod.z.number().int().nonnegative(),
|
|
66607
|
+
secrets: zod.z.number().int().nonnegative()
|
|
66608
|
+
}),
|
|
66609
|
+
behaviours: ["legacyRows.clear.deletes-the-rows", "legacyRows.clear.absent-store-is-noop"]
|
|
66610
|
+
},
|
|
66611
|
+
"legacyRows.patch": {
|
|
66612
|
+
input: IntegrationId.extend({ patch: Rows }),
|
|
66613
|
+
output: zod.z.object({ written: zod.z.boolean() }),
|
|
66614
|
+
behaviours: ["legacyRows.patch.upserts-keys-and-keeps-the-rest", "legacyRows.patch.absent-store-writes-nothing"]
|
|
66615
|
+
},
|
|
66616
|
+
"legacyRows.deleteKeys": {
|
|
66617
|
+
input: IntegrationId.extend({ keys: zod.z.array(zod.z.string().min(1)) }),
|
|
66618
|
+
output: zod.z.object({
|
|
66619
|
+
present: zod.z.boolean(),
|
|
66620
|
+
removed: Rows
|
|
66621
|
+
}),
|
|
66622
|
+
behaviours: ["legacyRows.deleteKeys.removes-the-named-keys", "legacyRows.deleteKeys.absent-store-reports-not-present"]
|
|
66623
|
+
},
|
|
66624
|
+
"records.get": {
|
|
66625
|
+
input: RecordId,
|
|
66626
|
+
output: RecordRowSchema.nullable(),
|
|
66627
|
+
behaviours: ["records.get.returns-the-row-or-null"]
|
|
66628
|
+
},
|
|
66629
|
+
"records.getResolved": {
|
|
66630
|
+
input: RecordId,
|
|
66631
|
+
output: RecordRowSchema.nullable(),
|
|
66632
|
+
behaviours: ["records.getResolved.resolves-secret-fields"]
|
|
66633
|
+
},
|
|
66634
|
+
"records.put": {
|
|
66635
|
+
input: zod.z.object({
|
|
66636
|
+
...RecordPutShape,
|
|
66637
|
+
ifRev: zod.z.number().int().optional()
|
|
66638
|
+
}),
|
|
66639
|
+
output: zod.z.object({ rev: zod.z.number().int() }),
|
|
66640
|
+
behaviours: ["records.put.creates-and-replaces", "records.put.if-rev-conflict-throws"]
|
|
66641
|
+
},
|
|
66642
|
+
"records.putMany": {
|
|
66643
|
+
input: zod.z.object({ records: zod.z.array(zod.z.object(RecordPutShape)) }),
|
|
66644
|
+
output: zod.z.object({ count: zod.z.number().int().nonnegative() }),
|
|
66645
|
+
behaviours: ["records.putMany.writes-every-row"]
|
|
66646
|
+
},
|
|
66647
|
+
"records.patch": {
|
|
66648
|
+
input: RecordId.extend({
|
|
66649
|
+
partial: Rows,
|
|
66650
|
+
ifRev: zod.z.number().int().optional()
|
|
66651
|
+
}),
|
|
66652
|
+
output: zod.z.object({ rev: zod.z.number().int() }),
|
|
66653
|
+
behaviours: ["records.patch.merges-and-null-removes"]
|
|
66654
|
+
},
|
|
66655
|
+
"records.delete": {
|
|
66656
|
+
input: RecordId,
|
|
66657
|
+
output: zod.z.object({ deleted: zod.z.boolean() }),
|
|
66658
|
+
behaviours: ["records.delete.reports-whether-a-row-went"]
|
|
66659
|
+
},
|
|
66660
|
+
"records.query": {
|
|
66661
|
+
input: zod.z.object({
|
|
66662
|
+
deviceId: zod.z.number().int().optional(),
|
|
66663
|
+
atFrom: zod.z.number().optional(),
|
|
66664
|
+
atTo: zod.z.number().optional(),
|
|
66665
|
+
where: RecordWhereSchema.optional(),
|
|
66666
|
+
limit: zod.z.number().int().min(1).optional(),
|
|
66667
|
+
cursor: zod.z.string().min(1).optional(),
|
|
66668
|
+
resolveSecrets: zod.z.boolean().optional()
|
|
66669
|
+
}),
|
|
66670
|
+
output: zod.z.object({
|
|
66671
|
+
records: zod.z.array(RecordRowSchema),
|
|
66672
|
+
nextCursor: zod.z.string().nullable()
|
|
66673
|
+
}),
|
|
66674
|
+
behaviours: ["records.query.pages-with-a-cursor", "records.query.filters-on-a-declared-index"]
|
|
66675
|
+
},
|
|
66676
|
+
"records.deleteWhere": {
|
|
66677
|
+
input: zod.z.object({
|
|
66678
|
+
deviceId: zod.z.number().int().optional(),
|
|
66679
|
+
atBefore: zod.z.number().optional(),
|
|
66680
|
+
where: RecordWhereSchema.optional()
|
|
66681
|
+
}),
|
|
66682
|
+
output: zod.z.object({ count: zod.z.number().int().nonnegative() }),
|
|
66683
|
+
behaviours: ["records.deleteWhere.deletes-the-matching-rows"]
|
|
66684
|
+
},
|
|
66685
|
+
"settings.read": {
|
|
66686
|
+
input: zod.z.object({}),
|
|
66687
|
+
output: zod.z.object({ store: Rows }),
|
|
66688
|
+
behaviours: ["settings.read.returns-the-addon-store"]
|
|
66689
|
+
},
|
|
66690
|
+
"settings.write": {
|
|
66691
|
+
input: zod.z.object({ patch: Rows }),
|
|
66692
|
+
output: zod.z.object({}),
|
|
66693
|
+
behaviours: ["settings.write.merges-and-keeps-other-keys"]
|
|
66694
|
+
},
|
|
66695
|
+
"settings.deleteKeys": {
|
|
66696
|
+
input: zod.z.object({ keys: zod.z.array(zod.z.string().min(1)) }),
|
|
66697
|
+
output: zod.z.object({ removed: zod.z.array(zod.z.string()) }),
|
|
66698
|
+
behaviours: ["settings.deleteKeys.removes-only-the-named-keys"]
|
|
66699
|
+
},
|
|
66700
|
+
"secrets.resolve": {
|
|
66701
|
+
input: zod.z.object({ refs: zod.z.array(zod.z.string()) }),
|
|
66702
|
+
output: zod.z.object({ values: zod.z.record(zod.z.string(), zod.z.string().nullable()) }),
|
|
66703
|
+
behaviours: ["secrets.resolve.answers-null-for-a-missing-ref"]
|
|
66704
|
+
},
|
|
66705
|
+
"secrets.put": {
|
|
66706
|
+
input: zod.z.object({
|
|
66707
|
+
ref: zod.z.string().min(1),
|
|
66708
|
+
value: zod.z.string()
|
|
66709
|
+
}),
|
|
66710
|
+
output: zod.z.object({}),
|
|
66711
|
+
behaviours: ["secrets.put.stores-under-the-owner"]
|
|
66712
|
+
},
|
|
66713
|
+
"secrets.delete": {
|
|
66714
|
+
input: zod.z.object({ refs: zod.z.array(zod.z.string()) }),
|
|
66715
|
+
output: zod.z.object({ deleted: zod.z.number().int().nonnegative() }),
|
|
66716
|
+
behaviours: ["secrets.delete.ignores-unknown-refs"]
|
|
66717
|
+
},
|
|
66718
|
+
"integrations.list": {
|
|
66719
|
+
input: zod.z.object({}),
|
|
66720
|
+
output: zod.z.object({ integrations: zod.z.array(MigrationIntegrationSchema) }),
|
|
66721
|
+
behaviours: ["integrations.list.lists-every-integration"]
|
|
66722
|
+
},
|
|
66723
|
+
"integrations.get": {
|
|
66724
|
+
input: zod.z.object({ id: zod.z.string().min(1) }),
|
|
66725
|
+
output: MigrationIntegrationSchema.nullable(),
|
|
66726
|
+
behaviours: ["integrations.get.null-for-an-unknown-id"]
|
|
66727
|
+
},
|
|
66728
|
+
"devices.list": {
|
|
66729
|
+
input: zod.z.object({
|
|
66730
|
+
addonId: zod.z.string().min(1),
|
|
66731
|
+
integrationId: zod.z.string().min(1).optional()
|
|
66732
|
+
}),
|
|
66733
|
+
output: zod.z.object({ devices: zod.z.array(MigrationDeviceSchema) }),
|
|
66734
|
+
behaviours: ["devices.list.scoped-to-the-addon", "devices.list.filters-by-integration"]
|
|
66735
|
+
},
|
|
66736
|
+
"devices.get": {
|
|
66737
|
+
input: zod.z.object({ deviceId: zod.z.number().int() }),
|
|
66738
|
+
output: zod.z.object({
|
|
66739
|
+
id: zod.z.number().int(),
|
|
66740
|
+
integrationId: zod.z.string().nullable(),
|
|
66741
|
+
/** Whether the device carries any stored config; its content is not offered. */
|
|
66742
|
+
hasConfig: zod.z.boolean()
|
|
66743
|
+
}).nullable(),
|
|
66744
|
+
behaviours: ["devices.get.null-for-an-unknown-id", "devices.get.reports-link-and-config"]
|
|
66745
|
+
},
|
|
66746
|
+
"devices.setIntegrationId": {
|
|
66747
|
+
input: zod.z.object({
|
|
66748
|
+
deviceId: zod.z.number().int(),
|
|
66749
|
+
integrationId: zod.z.string().min(1)
|
|
66750
|
+
}),
|
|
66751
|
+
output: zod.z.object({}),
|
|
66752
|
+
behaviours: ["devices.setIntegrationId.links-the-device"]
|
|
66753
|
+
},
|
|
66754
|
+
"node.localNodeId": {
|
|
66755
|
+
input: zod.z.object({}),
|
|
66756
|
+
output: zod.z.object({ nodeId: zod.z.string() }),
|
|
66757
|
+
behaviours: ["node.localNodeId.names-this-node"]
|
|
66758
|
+
},
|
|
66759
|
+
"log.info": {
|
|
66760
|
+
input: LogInput,
|
|
66761
|
+
output: zod.z.object({}),
|
|
66762
|
+
behaviours: ["log.info.writes-a-line"]
|
|
66763
|
+
},
|
|
66764
|
+
"log.warn": {
|
|
66765
|
+
input: LogInput,
|
|
66766
|
+
output: zod.z.object({}),
|
|
66767
|
+
behaviours: ["log.warn.writes-a-line"]
|
|
66768
|
+
}
|
|
66769
|
+
};
|
|
66770
|
+
/**
|
|
66268
66771
|
* migrations — the ledger and the controls of the boot-time migration engine
|
|
66269
66772
|
* (D987). Hub-only and internal: `sqlite-settings` is the registrant, because the
|
|
66270
66773
|
* ledger lives INSIDE the database files it serves (`camstack.db`, `events.db`,
|
|
@@ -66339,7 +66842,9 @@ var migrationsCapability = {
|
|
|
66339
66842
|
"written",
|
|
66340
66843
|
"refused"
|
|
66341
66844
|
]),
|
|
66342
|
-
steps: zod.z.array(MigrationOwnerStepSchema)
|
|
66845
|
+
steps: zod.z.array(MigrationOwnerStepSchema),
|
|
66846
|
+
/** The migration API this engine serves (additive: a server that predates it omits it). */
|
|
66847
|
+
migrationApi: MigrationApiInfoSchema.optional()
|
|
66343
66848
|
}), {
|
|
66344
66849
|
kind: "mutation",
|
|
66345
66850
|
auth: "admin"
|
|
@@ -69460,6 +69965,20 @@ var pipelineAnalyticsCapability = {
|
|
|
69460
69965
|
*/
|
|
69461
69966
|
countUnstampedEventMedia: method(zod.z.object({}), UnstampedEventMediaCountSchema, { auth: "admin" }),
|
|
69462
69967
|
/**
|
|
69968
|
+
* Stored media per storage location: rows and bytes stamped with each asked
|
|
69969
|
+
* location id, the rows with none, and the rows naming a location that was
|
|
69970
|
+
* not asked about. One indexed aggregate per location (`idx_media_location_size`,
|
|
69971
|
+
* a covering index) plus the NULL one, and one unfiltered total that is a
|
|
69972
|
+
* covering-index scan: O(rows), cheap per row but not constant, so a hub with
|
|
69973
|
+
* millions of rows pays for it once per call. `unlisted` is relative to the
|
|
69974
|
+
* ids ASKED: it means "gone" only when every location id was asked. A failed
|
|
69975
|
+
* read throws; it never reads as zero.
|
|
69976
|
+
*/
|
|
69977
|
+
getMediaLocationCensus: method(MediaLocationCensusInputSchema, MediaLocationCensusSchema, {
|
|
69978
|
+
kind: "query",
|
|
69979
|
+
auth: "admin"
|
|
69980
|
+
}),
|
|
69981
|
+
/**
|
|
69463
69982
|
* How many rows a pass would STILL act on against `toLocationId`.
|
|
69464
69983
|
*
|
|
69465
69984
|
* One derivation, two consumers: it is the media lane's denominator (the
|
|
@@ -72925,7 +73444,7 @@ var BrokerStatusSchema$1 = zod.z.enum([
|
|
|
72925
73444
|
"unreachable",
|
|
72926
73445
|
"tls-error"
|
|
72927
73446
|
]);
|
|
72928
|
-
var BrokerInfoSchema
|
|
73447
|
+
var BrokerInfoSchema = zod.z.object({
|
|
72929
73448
|
id: zod.z.string(),
|
|
72930
73449
|
name: zod.z.string(),
|
|
72931
73450
|
url: zod.z.string(),
|
|
@@ -72998,7 +73517,7 @@ var mqttBrokerCapability = {
|
|
|
72998
73517
|
kind: "poll"
|
|
72999
73518
|
},
|
|
73000
73519
|
methods: {
|
|
73001
|
-
listBrokers: method(zod.z.void(), zod.z.array(BrokerInfoSchema
|
|
73520
|
+
listBrokers: method(zod.z.void(), zod.z.array(BrokerInfoSchema)),
|
|
73002
73521
|
getBrokerConfig: method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }),
|
|
73003
73522
|
addBroker: method(AddBrokerInputSchema, AddBrokerResultSchema, {
|
|
73004
73523
|
kind: "mutation",
|
|
@@ -81385,291 +81904,6 @@ var rebootCapability = {
|
|
|
81385
81904
|
}) }
|
|
81386
81905
|
};
|
|
81387
81906
|
/**
|
|
81388
|
-
* records - an addon's own facts and documents (D881): ledgers, audit rows,
|
|
81389
|
-
* config documents, mirrors. The third storage API next to `ctx.settings`
|
|
81390
|
-
* (operator intent, D870) and device-history (numbers over time, D850).
|
|
81391
|
-
*
|
|
81392
|
-
* Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
|
|
81393
|
-
* crossed a process and stated by a hub in-process caller (`ctx.records` does
|
|
81394
|
-
* that with the addon id closed over). It is deliberately NOT in any input
|
|
81395
|
-
* schema, so a session can never supply it, and a call with no stamp is refused
|
|
81396
|
-
* `records/no-caller`. A kind is readable and writable only by its owner; other
|
|
81397
|
-
* addons go through the owner's capability.
|
|
81398
|
-
*
|
|
81399
|
-
* Every read is three-way: a row, `null`, or the call THROWS. A failed read is
|
|
81400
|
-
* never `[]`. Secret fields are never on the wire: a read shows the
|
|
81401
|
-
* redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
|
|
81402
|
-
* resolves itself, and a write may carry only a keychain marker bound to the
|
|
81403
|
-
* row's own ref.
|
|
81404
|
-
*
|
|
81405
|
-
* Internal: addons reach it through `ctx.records`, never directly.
|
|
81406
|
-
*/
|
|
81407
|
-
var RecordIdSchema = zod.z.string().min(1).max(256);
|
|
81408
|
-
/** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
|
|
81409
|
-
var RecordBodySchema = zod.z.record(zod.z.string(), zod.z.unknown());
|
|
81410
|
-
var RecordInputSchema = zod.z.object({
|
|
81411
|
-
id: RecordIdSchema,
|
|
81412
|
-
/** The device this row belongs to (D865 removal, per-device reads). */
|
|
81413
|
-
deviceId: zod.z.number().int().optional(),
|
|
81414
|
-
/** The domain clock, ms: observed / created / opened. */
|
|
81415
|
-
at: zod.z.number().int().optional(),
|
|
81416
|
-
/** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
|
|
81417
|
-
expiresAt: zod.z.number().int().optional(),
|
|
81418
|
-
data: RecordBodySchema
|
|
81419
|
-
});
|
|
81420
|
-
var RecordViewSchema = zod.z.object({
|
|
81421
|
-
id: zod.z.string(),
|
|
81422
|
-
deviceId: zod.z.number().int().nullable(),
|
|
81423
|
-
at: zod.z.number().nullable(),
|
|
81424
|
-
expiresAt: zod.z.number().nullable(),
|
|
81425
|
-
rev: zod.z.number().int(),
|
|
81426
|
-
updatedAt: zod.z.number(),
|
|
81427
|
-
data: RecordBodySchema
|
|
81428
|
-
});
|
|
81429
|
-
/** One predicate on a declared index field: equality, a set, or a range. */
|
|
81430
|
-
var RecordWhereValueSchema = zod.z.union([
|
|
81431
|
-
zod.z.string(),
|
|
81432
|
-
zod.z.number(),
|
|
81433
|
-
zod.z.boolean(),
|
|
81434
|
-
zod.z.object({ in: zod.z.array(zod.z.union([
|
|
81435
|
-
zod.z.string(),
|
|
81436
|
-
zod.z.number(),
|
|
81437
|
-
zod.z.boolean()
|
|
81438
|
-
])).min(1).max(RECORD_BATCH_MAX) }),
|
|
81439
|
-
zod.z.object({
|
|
81440
|
-
gt: zod.z.union([zod.z.string(), zod.z.number()]).optional(),
|
|
81441
|
-
gte: zod.z.union([zod.z.string(), zod.z.number()]).optional(),
|
|
81442
|
-
lt: zod.z.union([zod.z.string(), zod.z.number()]).optional(),
|
|
81443
|
-
lte: zod.z.union([zod.z.string(), zod.z.number()]).optional()
|
|
81444
|
-
}).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
|
|
81445
|
-
]);
|
|
81446
|
-
/** Declared index fields only. Anything else does not compile, by design. */
|
|
81447
|
-
var RecordWhereSchema = zod.z.record(RecordFieldPathSchema, RecordWhereValueSchema);
|
|
81448
|
-
var KindShape = { kind: RecordKindNameSchema };
|
|
81449
|
-
var TimeWindowShape = {
|
|
81450
|
-
deviceId: zod.z.number().int().optional(),
|
|
81451
|
-
atFrom: zod.z.number().optional(),
|
|
81452
|
-
atTo: zod.z.number().optional()
|
|
81453
|
-
};
|
|
81454
|
-
var RecordQueryInputSchema = zod.z.object({
|
|
81455
|
-
...KindShape,
|
|
81456
|
-
...TimeWindowShape,
|
|
81457
|
-
where: RecordWhereSchema.optional(),
|
|
81458
|
-
/** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
|
|
81459
|
-
order: zod.z.enum(["at", "id"]).optional(),
|
|
81460
|
-
desc: zod.z.boolean().optional(),
|
|
81461
|
-
limit: zod.z.number().int().min(1).max(RECORD_QUERY_MAX).default(100),
|
|
81462
|
-
/** Opaque keyset cursor from a previous answer. There is no offset. */
|
|
81463
|
-
cursor: zod.z.string().min(1).optional()
|
|
81464
|
-
});
|
|
81465
|
-
var RecordQueryResultSchema = zod.z.object({
|
|
81466
|
-
records: zod.z.array(RecordViewSchema),
|
|
81467
|
-
nextCursor: zod.z.string().nullable()
|
|
81468
|
-
});
|
|
81469
|
-
var RecordKindStateSchema = zod.z.enum([
|
|
81470
|
-
"created",
|
|
81471
|
-
"unchanged",
|
|
81472
|
-
"updated"
|
|
81473
|
-
]);
|
|
81474
|
-
var DeclareKindResultSchema = zod.z.object({
|
|
81475
|
-
kindId: zod.z.number().int(),
|
|
81476
|
-
state: RecordKindStateSchema,
|
|
81477
|
-
createdIndexes: zod.z.array(zod.z.string())
|
|
81478
|
-
});
|
|
81479
|
-
/** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
|
|
81480
|
-
var SecretRefsList = zod.z.array(zod.z.string());
|
|
81481
|
-
/**
|
|
81482
|
-
* One op of a `transact`: the single-row writes, each on a kind of the caller.
|
|
81483
|
-
* All ops of one call share ONE database file and ONE `transactFamily`.
|
|
81484
|
-
*/
|
|
81485
|
-
var RecordTransactOpSchema = zod.z.discriminatedUnion("op", [
|
|
81486
|
-
zod.z.object({
|
|
81487
|
-
op: zod.z.literal("put"),
|
|
81488
|
-
kind: RecordKindNameSchema,
|
|
81489
|
-
record: RecordInputSchema,
|
|
81490
|
-
ifRev: zod.z.number().int().min(0).optional()
|
|
81491
|
-
}),
|
|
81492
|
-
zod.z.object({
|
|
81493
|
-
op: zod.z.literal("patch"),
|
|
81494
|
-
kind: RecordKindNameSchema,
|
|
81495
|
-
id: RecordIdSchema,
|
|
81496
|
-
data: RecordBodySchema,
|
|
81497
|
-
at: zod.z.number().int().nullable().optional(),
|
|
81498
|
-
expiresAt: zod.z.number().int().nullable().optional(),
|
|
81499
|
-
ifRev: zod.z.number().int().min(1).optional()
|
|
81500
|
-
}),
|
|
81501
|
-
zod.z.object({
|
|
81502
|
-
op: zod.z.literal("delete"),
|
|
81503
|
-
kind: RecordKindNameSchema,
|
|
81504
|
-
id: RecordIdSchema
|
|
81505
|
-
})
|
|
81506
|
-
]);
|
|
81507
|
-
var RecordSecretRefsSchema = zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), zod.z.string()));
|
|
81508
|
-
var recordsCapability = {
|
|
81509
|
-
name: "records",
|
|
81510
|
-
scope: "system",
|
|
81511
|
-
mode: "singleton",
|
|
81512
|
-
internal: true,
|
|
81513
|
-
methods: {
|
|
81514
|
-
/** Reconcile this addon's kinds: create the catalog rows and the declared indexes. Additive only. */
|
|
81515
|
-
declareKinds: method(zod.z.object({ kinds: zod.z.record(RecordKindNameSchema, RecordKindDeclarationSchema) }), zod.z.object({ kinds: zod.z.record(zod.z.string(), DeclareKindResultSchema) }), {
|
|
81516
|
-
kind: "mutation",
|
|
81517
|
-
auth: "admin"
|
|
81518
|
-
}),
|
|
81519
|
-
get: method(zod.z.object({
|
|
81520
|
-
...KindShape,
|
|
81521
|
-
id: RecordIdSchema
|
|
81522
|
-
}), RecordViewSchema.nullable(), { auth: "admin" }),
|
|
81523
|
-
getMany: method(zod.z.object({
|
|
81524
|
-
...KindShape,
|
|
81525
|
-
ids: zod.z.array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
81526
|
-
}), zod.z.array(RecordViewSchema), { auth: "admin" }),
|
|
81527
|
-
/** The keychain refs of the rows' secret fields, by id and concrete path. For the owner's `ctx.secrets`. */
|
|
81528
|
-
secretRefs: method(zod.z.object({
|
|
81529
|
-
...KindShape,
|
|
81530
|
-
ids: zod.z.array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
81531
|
-
}), RecordSecretRefsSchema, { auth: "admin" }),
|
|
81532
|
-
put: method(zod.z.object({
|
|
81533
|
-
...KindShape,
|
|
81534
|
-
record: RecordInputSchema,
|
|
81535
|
-
/** Compare-and-set. `0` means "the row must not exist". */
|
|
81536
|
-
ifRev: zod.z.number().int().min(0).optional()
|
|
81537
|
-
}), zod.z.object({
|
|
81538
|
-
rev: zod.z.number().int(),
|
|
81539
|
-
releasedRefs: SecretRefsList
|
|
81540
|
-
}), {
|
|
81541
|
-
kind: "mutation",
|
|
81542
|
-
auth: "admin"
|
|
81543
|
-
}),
|
|
81544
|
-
putMany: method(zod.z.object({
|
|
81545
|
-
...KindShape,
|
|
81546
|
-
records: zod.z.array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
|
|
81547
|
-
}), zod.z.object({
|
|
81548
|
-
count: zod.z.number().int(),
|
|
81549
|
-
releasedRefs: SecretRefsList
|
|
81550
|
-
}), {
|
|
81551
|
-
kind: "mutation",
|
|
81552
|
-
auth: "admin"
|
|
81553
|
-
}),
|
|
81554
|
-
/** One-statement RFC 7396 merge: `null` removes a field; a merge never reads. */
|
|
81555
|
-
patch: method(zod.z.object({
|
|
81556
|
-
...KindShape,
|
|
81557
|
-
id: RecordIdSchema,
|
|
81558
|
-
data: RecordBodySchema,
|
|
81559
|
-
at: zod.z.number().int().nullable().optional(),
|
|
81560
|
-
expiresAt: zod.z.number().int().nullable().optional(),
|
|
81561
|
-
ifRev: zod.z.number().int().min(1).optional()
|
|
81562
|
-
}), zod.z.object({
|
|
81563
|
-
rev: zod.z.number().int(),
|
|
81564
|
-
releasedRefs: SecretRefsList
|
|
81565
|
-
}), {
|
|
81566
|
-
kind: "mutation",
|
|
81567
|
-
auth: "admin"
|
|
81568
|
-
}),
|
|
81569
|
-
delete: method(zod.z.object({
|
|
81570
|
-
...KindShape,
|
|
81571
|
-
id: RecordIdSchema
|
|
81572
|
-
}), zod.z.object({
|
|
81573
|
-
deleted: zod.z.boolean(),
|
|
81574
|
-
secretRefs: SecretRefsList
|
|
81575
|
-
}), {
|
|
81576
|
-
kind: "mutation",
|
|
81577
|
-
auth: "admin"
|
|
81578
|
-
}),
|
|
81579
|
-
deleteMany: method(zod.z.object({
|
|
81580
|
-
...KindShape,
|
|
81581
|
-
ids: zod.z.array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
|
|
81582
|
-
}), zod.z.object({
|
|
81583
|
-
deleted: zod.z.number().int(),
|
|
81584
|
-
secretRefs: SecretRefsList
|
|
81585
|
-
}), {
|
|
81586
|
-
kind: "mutation",
|
|
81587
|
-
auth: "admin"
|
|
81588
|
-
}),
|
|
81589
|
-
query: method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }),
|
|
81590
|
-
count: method(zod.z.object({
|
|
81591
|
-
...KindShape,
|
|
81592
|
-
...TimeWindowShape,
|
|
81593
|
-
where: RecordWhereSchema.optional()
|
|
81594
|
-
}), zod.z.object({ count: zod.z.number().int() }), { auth: "admin" }),
|
|
81595
|
-
histogram: method(zod.z.object({
|
|
81596
|
-
...KindShape,
|
|
81597
|
-
deviceId: zod.z.number().int().optional(),
|
|
81598
|
-
from: zod.z.number(),
|
|
81599
|
-
to: zod.z.number(),
|
|
81600
|
-
bucketMs: zod.z.number().int().positive()
|
|
81601
|
-
}), zod.z.object({ buckets: zod.z.array(zod.z.object({
|
|
81602
|
-
bucketStart: zod.z.number(),
|
|
81603
|
-
count: zod.z.number().int()
|
|
81604
|
-
})) }), { auth: "admin" }),
|
|
81605
|
-
/** Index-served only: every field must belong to ONE declared index. */
|
|
81606
|
-
aggregate: method(zod.z.object({
|
|
81607
|
-
...KindShape,
|
|
81608
|
-
op: zod.z.enum([
|
|
81609
|
-
"sum",
|
|
81610
|
-
"min",
|
|
81611
|
-
"max",
|
|
81612
|
-
"count"
|
|
81613
|
-
]),
|
|
81614
|
-
field: RecordFieldPathSchema.optional(),
|
|
81615
|
-
groupBy: RecordFieldPathSchema.optional(),
|
|
81616
|
-
where: RecordWhereSchema.optional()
|
|
81617
|
-
}), zod.z.object({ rows: zod.z.array(zod.z.object({
|
|
81618
|
-
group: zod.z.union([
|
|
81619
|
-
zod.z.string(),
|
|
81620
|
-
zod.z.number(),
|
|
81621
|
-
zod.z.null()
|
|
81622
|
-
]),
|
|
81623
|
-
value: zod.z.number().nullable()
|
|
81624
|
-
})) }), { auth: "admin" }),
|
|
81625
|
-
/** Batched (5 000 rows per statement, yielding between). Needs a predicate: there is no "delete all". */
|
|
81626
|
-
deleteWhere: method(zod.z.object({
|
|
81627
|
-
...KindShape,
|
|
81628
|
-
deviceId: zod.z.number().int().optional(),
|
|
81629
|
-
atBefore: zod.z.number().optional(),
|
|
81630
|
-
where: RecordWhereSchema.optional()
|
|
81631
|
-
}), zod.z.object({
|
|
81632
|
-
deleted: zod.z.number().int(),
|
|
81633
|
-
secretRefs: SecretRefsList
|
|
81634
|
-
}), {
|
|
81635
|
-
kind: "mutation",
|
|
81636
|
-
auth: "admin"
|
|
81637
|
-
}),
|
|
81638
|
-
/**
|
|
81639
|
-
* Several single-row writes (put / patch / delete) in ONE SQLite transaction:
|
|
81640
|
-
* all land or none does. Every op's kind must sit in one file and share one
|
|
81641
|
-
* `transactFamily` (`records/transact-refused` otherwise). Results are in op order.
|
|
81642
|
-
*/
|
|
81643
|
-
transact: method(zod.z.object({ ops: zod.z.array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), zod.z.object({
|
|
81644
|
-
results: zod.z.array(zod.z.object({
|
|
81645
|
-
rev: zod.z.number().int().nullable(),
|
|
81646
|
-
deleted: zod.z.boolean()
|
|
81647
|
-
})),
|
|
81648
|
-
releasedRefs: SecretRefsList,
|
|
81649
|
-
secretRefs: SecretRefsList
|
|
81650
|
-
}), {
|
|
81651
|
-
kind: "mutation",
|
|
81652
|
-
auth: "admin"
|
|
81653
|
-
}),
|
|
81654
|
-
/** The D865 hook body: every kind of this addon declared `deviceRemoval: 'delete'`. */
|
|
81655
|
-
deleteDevice: method(zod.z.object({
|
|
81656
|
-
deviceId: zod.z.number().int(),
|
|
81657
|
-
kinds: zod.z.array(RecordKindNameSchema).optional()
|
|
81658
|
-
}), zod.z.object({
|
|
81659
|
-
deleted: zod.z.record(zod.z.string(), zod.z.number().int()),
|
|
81660
|
-
secretRefs: SecretRefsList
|
|
81661
|
-
}), {
|
|
81662
|
-
kind: "mutation",
|
|
81663
|
-
auth: "admin"
|
|
81664
|
-
}),
|
|
81665
|
-
/** A monotonically increasing integer per kind (replaces "resume from the highest"). */
|
|
81666
|
-
allocateId: method(zod.z.object(KindShape), zod.z.object({ id: zod.z.number().int() }), {
|
|
81667
|
-
kind: "mutation",
|
|
81668
|
-
auth: "admin"
|
|
81669
|
-
})
|
|
81670
|
-
}
|
|
81671
|
-
};
|
|
81672
|
-
/**
|
|
81673
81907
|
* record-entries - the ONE admin surface for every list of user-created entries
|
|
81674
81908
|
* (D881): notification targets, brokers, LLM profiles, anything an addon
|
|
81675
81909
|
* declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
|
|
@@ -96391,20 +96625,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
96391
96625
|
access: "create",
|
|
96392
96626
|
role: "viewer"
|
|
96393
96627
|
},
|
|
96394
|
-
"broker.add": {
|
|
96395
|
-
capName: "broker",
|
|
96396
|
-
capScope: "system",
|
|
96397
|
-
addonId: null,
|
|
96398
|
-
access: "create",
|
|
96399
|
-
role: "admin"
|
|
96400
|
-
},
|
|
96401
|
-
"broker.get": {
|
|
96402
|
-
capName: "broker",
|
|
96403
|
-
capScope: "system",
|
|
96404
|
-
addonId: null,
|
|
96405
|
-
access: "view",
|
|
96406
|
-
role: "admin"
|
|
96407
|
-
},
|
|
96408
96628
|
"broker.getBrokerConfig": {
|
|
96409
96629
|
capName: "broker",
|
|
96410
96630
|
capScope: "system",
|
|
@@ -96412,20 +96632,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
96412
96632
|
access: "view",
|
|
96413
96633
|
role: "admin"
|
|
96414
96634
|
},
|
|
96415
|
-
"broker.getSettings": {
|
|
96416
|
-
capName: "broker",
|
|
96417
|
-
capScope: "system",
|
|
96418
|
-
addonId: null,
|
|
96419
|
-
access: "view",
|
|
96420
|
-
role: "admin"
|
|
96421
|
-
},
|
|
96422
|
-
"broker.getSettingsSchema": {
|
|
96423
|
-
capName: "broker",
|
|
96424
|
-
capScope: "system",
|
|
96425
|
-
addonId: null,
|
|
96426
|
-
access: "view",
|
|
96427
|
-
role: "admin"
|
|
96428
|
-
},
|
|
96429
96635
|
"broker.getState": {
|
|
96430
96636
|
capName: "broker",
|
|
96431
96637
|
capScope: "system",
|
|
@@ -96440,20 +96646,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
96440
96646
|
access: "view",
|
|
96441
96647
|
role: "admin"
|
|
96442
96648
|
},
|
|
96443
|
-
"broker.list": {
|
|
96444
|
-
capName: "broker",
|
|
96445
|
-
capScope: "system",
|
|
96446
|
-
addonId: null,
|
|
96447
|
-
access: "view",
|
|
96448
|
-
role: "admin"
|
|
96449
|
-
},
|
|
96450
|
-
"broker.listProviders": {
|
|
96451
|
-
capName: "broker",
|
|
96452
|
-
capScope: "system",
|
|
96453
|
-
addonId: null,
|
|
96454
|
-
access: "view",
|
|
96455
|
-
role: "admin"
|
|
96456
|
-
},
|
|
96457
96649
|
"broker.publish": {
|
|
96458
96650
|
capName: "broker",
|
|
96459
96651
|
capScope: "system",
|
|
@@ -96461,20 +96653,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
96461
96653
|
access: "create",
|
|
96462
96654
|
role: "admin"
|
|
96463
96655
|
},
|
|
96464
|
-
"broker.remove": {
|
|
96465
|
-
capName: "broker",
|
|
96466
|
-
capScope: "system",
|
|
96467
|
-
addonId: null,
|
|
96468
|
-
access: "delete",
|
|
96469
|
-
role: "admin"
|
|
96470
|
-
},
|
|
96471
|
-
"broker.setSettings": {
|
|
96472
|
-
capName: "broker",
|
|
96473
|
-
capScope: "system",
|
|
96474
|
-
addonId: null,
|
|
96475
|
-
access: "create",
|
|
96476
|
-
role: "admin"
|
|
96477
|
-
},
|
|
96478
96656
|
"broker.subscribe": {
|
|
96479
96657
|
capName: "broker",
|
|
96480
96658
|
capScope: "system",
|
|
@@ -96482,20 +96660,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
96482
96660
|
access: "create",
|
|
96483
96661
|
role: "admin"
|
|
96484
96662
|
},
|
|
96485
|
-
"broker.testConnection": {
|
|
96486
|
-
capName: "broker",
|
|
96487
|
-
capScope: "system",
|
|
96488
|
-
addonId: null,
|
|
96489
|
-
access: "create",
|
|
96490
|
-
role: "admin"
|
|
96491
|
-
},
|
|
96492
|
-
"broker.testSettings": {
|
|
96493
|
-
capName: "broker",
|
|
96494
|
-
capScope: "system",
|
|
96495
|
-
addonId: null,
|
|
96496
|
-
access: "create",
|
|
96497
|
-
role: "admin"
|
|
96498
|
-
},
|
|
96499
96663
|
"broker.unsubscribe": {
|
|
96500
96664
|
capName: "broker",
|
|
96501
96665
|
capScope: "system",
|
|
@@ -101459,6 +101623,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
101459
101623
|
access: "view",
|
|
101460
101624
|
role: "viewer"
|
|
101461
101625
|
},
|
|
101626
|
+
"pipelineAnalytics.getMediaLocationCensus": {
|
|
101627
|
+
capName: "pipeline-analytics",
|
|
101628
|
+
capScope: "device",
|
|
101629
|
+
addonId: null,
|
|
101630
|
+
access: "view",
|
|
101631
|
+
role: "admin"
|
|
101632
|
+
},
|
|
101462
101633
|
"pipelineAnalytics.getMediaReclaimStatus": {
|
|
101463
101634
|
capName: "pipeline-analytics",
|
|
101464
101635
|
capScope: "device",
|
|
@@ -111309,6 +111480,7 @@ zod.z.object({
|
|
|
111309
111480
|
delay: zod.z.number().nonnegative().optional(),
|
|
111310
111481
|
commands: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
111311
111482
|
});
|
|
111483
|
+
entryBody({ brokerId: zod.z.string() });
|
|
111312
111484
|
//#endregion
|
|
111313
111485
|
Object.defineProperty(exports, "ACTION_TARGET_INVALIDATION_EVENTS", {
|
|
111314
111486
|
enumerable: true,
|
|
@@ -111892,6 +112064,12 @@ Object.defineProperty(exports, "METHOD_ACCESS_MAP", {
|
|
|
111892
112064
|
return METHOD_ACCESS_MAP;
|
|
111893
112065
|
}
|
|
111894
112066
|
});
|
|
112067
|
+
Object.defineProperty(exports, "MIGRATION_API_V1_METHODS", {
|
|
112068
|
+
enumerable: true,
|
|
112069
|
+
get: function() {
|
|
112070
|
+
return MIGRATION_API_V1_METHODS;
|
|
112071
|
+
}
|
|
112072
|
+
});
|
|
111895
112073
|
Object.defineProperty(exports, "MINUTES_PER_DAY", {
|
|
111896
112074
|
enumerable: true,
|
|
111897
112075
|
get: function() {
|
|
@@ -111952,6 +112130,12 @@ Object.defineProperty(exports, "PROPOSAL_MIN_SPAN_MS", {
|
|
|
111952
112130
|
return PROPOSAL_MIN_SPAN_MS;
|
|
111953
112131
|
}
|
|
111954
112132
|
});
|
|
112133
|
+
Object.defineProperty(exports, "PackageRequiresSchema", {
|
|
112134
|
+
enumerable: true,
|
|
112135
|
+
get: function() {
|
|
112136
|
+
return PackageRequiresSchema;
|
|
112137
|
+
}
|
|
112138
|
+
});
|
|
111955
112139
|
Object.defineProperty(exports, "PlaintextSecretError", {
|
|
111956
112140
|
enumerable: true,
|
|
111957
112141
|
get: function() {
|
|
@@ -112522,6 +112706,12 @@ Object.defineProperty(exports, "colorCapability", {
|
|
|
112522
112706
|
return colorCapability;
|
|
112523
112707
|
}
|
|
112524
112708
|
});
|
|
112709
|
+
Object.defineProperty(exports, "compareVersions", {
|
|
112710
|
+
enumerable: true,
|
|
112711
|
+
get: function() {
|
|
112712
|
+
return compareVersions;
|
|
112713
|
+
}
|
|
112714
|
+
});
|
|
112525
112715
|
Object.defineProperty(exports, "compileScalarOverride", {
|
|
112526
112716
|
enumerable: true,
|
|
112527
112717
|
get: function() {
|
|
@@ -112726,6 +112916,12 @@ Object.defineProperty(exports, "describeComposableCaps", {
|
|
|
112726
112916
|
return describeComposableCaps;
|
|
112727
112917
|
}
|
|
112728
112918
|
});
|
|
112919
|
+
Object.defineProperty(exports, "describeUnmet", {
|
|
112920
|
+
enumerable: true,
|
|
112921
|
+
get: function() {
|
|
112922
|
+
return describeUnmet;
|
|
112923
|
+
}
|
|
112924
|
+
});
|
|
112729
112925
|
Object.defineProperty(exports, "deviceCredentialsCapability", {
|
|
112730
112926
|
enumerable: true,
|
|
112731
112927
|
get: function() {
|
|
@@ -113884,6 +114080,12 @@ Object.defineProperty(exports, "transformSecretWrite", {
|
|
|
113884
114080
|
return transformSecretWrite;
|
|
113885
114081
|
}
|
|
113886
114082
|
});
|
|
114083
|
+
Object.defineProperty(exports, "unmetRequirements", {
|
|
114084
|
+
enumerable: true,
|
|
114085
|
+
get: function() {
|
|
114086
|
+
return unmetRequirements;
|
|
114087
|
+
}
|
|
114088
|
+
});
|
|
113887
114089
|
Object.defineProperty(exports, "userError", {
|
|
113888
114090
|
enumerable: true,
|
|
113889
114091
|
get: function() {
|