@camstack/addon-agent-ui 1.2.312 → 1.2.314

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/dist/addon.js CHANGED
@@ -5840,7 +5840,7 @@ var ZodIssueCode = {
5840
5840
  var ZodFirstPartyTypeKind;
5841
5841
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5842
5842
  //#endregion
5843
- //#region ../types/dist/sleep-B-vp7x15.mjs
5843
+ //#region ../types/dist/sleep-CdJHPm-k.mjs
5844
5844
  /**
5845
5845
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5846
5846
  * window to float samples (D455).
@@ -5957,7 +5957,7 @@ function isKeychainStoredField(field) {
5957
5957
  var SECRET_CLEAR = { $secretClear: true };
5958
5958
  /** The `'***'` token D634 redaction writes for non-admins. */
5959
5959
  var LEGACY_DEVICE_REDACTION = "***";
5960
- function isRecord$6(value) {
5960
+ function isRecord$7(value) {
5961
5961
  return typeof value === "object" && value !== null && !Array.isArray(value);
5962
5962
  }
5963
5963
  function makeSecretMarker(ref) {
@@ -5968,12 +5968,12 @@ function makeSecretMarker(ref) {
5968
5968
  }
5969
5969
  /** A stored marker: an object whose `$secret` is a non-empty string. */
5970
5970
  function isSecretMarker(value) {
5971
- if (!isRecord$6(value)) return false;
5971
+ if (!isRecord$7(value)) return false;
5972
5972
  const ref = value["$secret"];
5973
5973
  return typeof ref === "string" && ref.length > 0;
5974
5974
  }
5975
5975
  function isSecretClear(value) {
5976
- return isRecord$6(value) && value["$secretClear"] === true;
5976
+ return isRecord$7(value) && value["$secretClear"] === true;
5977
5977
  }
5978
5978
  /**
5979
5979
  * The UI view of a stored secret field value: a marker becomes "set", inline
@@ -6679,7 +6679,7 @@ var KeychainWriteRefusedError = class extends Error {
6679
6679
  }
6680
6680
  };
6681
6681
  var KEEP = { kind: "keep" };
6682
- function isRecord$5(value) {
6682
+ function isRecord$6(value) {
6683
6683
  return typeof value === "object" && value !== null && !Array.isArray(value);
6684
6684
  }
6685
6685
  function defaultMintId() {
@@ -6692,7 +6692,7 @@ function collectSecretMarkerRefs(value, out = []) {
6692
6692
  return out;
6693
6693
  }
6694
6694
  if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
6695
- else if (isRecord$5(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6695
+ else if (isRecord$6(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6696
6696
  return out;
6697
6697
  }
6698
6698
  async function storedValueEquals(secrets, marker, candidate) {
@@ -6747,7 +6747,7 @@ function rowId(row, idKey) {
6747
6747
  return null;
6748
6748
  }
6749
6749
  async function writeArray(ctx, node, incoming, stored, fieldPath) {
6750
- const storedRows = Array.isArray(stored) ? stored.filter(isRecord$5) : [];
6750
+ const storedRows = Array.isArray(stored) ? stored.filter(isRecord$6) : [];
6751
6751
  if (!Array.isArray(incoming)) {
6752
6752
  ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
6753
6753
  return {
@@ -6763,7 +6763,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
6763
6763
  const kept = /* @__PURE__ */ new Set();
6764
6764
  const rows = [];
6765
6765
  for (const row of incoming) {
6766
- if (!isRecord$5(row)) {
6766
+ if (!isRecord$6(row)) {
6767
6767
  rows.push(row);
6768
6768
  continue;
6769
6769
  }
@@ -6788,7 +6788,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6788
6788
  case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
6789
6789
  case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
6790
6790
  case "object": {
6791
- if (!isRecord$5(incoming)) {
6791
+ if (!isRecord$6(incoming)) {
6792
6792
  if (incoming === void 0) return KEEP;
6793
6793
  ctx.deletes.push(...collectSecretMarkerRefs(stored));
6794
6794
  return {
@@ -6796,7 +6796,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6796
6796
  value: incoming
6797
6797
  };
6798
6798
  }
6799
- const storedObj = isRecord$5(stored) ? stored : {};
6799
+ const storedObj = isRecord$6(stored) ? stored : {};
6800
6800
  return {
6801
6801
  kind: "value",
6802
6802
  value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
@@ -6919,7 +6919,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
6919
6919
  value: items
6920
6920
  };
6921
6921
  }
6922
- if (isRecord$5(v)) {
6922
+ if (isRecord$6(v)) {
6923
6923
  const out = {};
6924
6924
  for (const [k, child] of Object.entries(v)) {
6925
6925
  const s = substitute(child);
@@ -6951,7 +6951,7 @@ var SecretOverwriteRefusedError = class extends Error {
6951
6951
  this.name = "SecretOverwriteRefusedError";
6952
6952
  }
6953
6953
  };
6954
- function isRecord$4(value) {
6954
+ function isRecord$5(value) {
6955
6955
  return typeof value === "object" && value !== null && !Array.isArray(value);
6956
6956
  }
6957
6957
  function resolvedValue(pass, marker) {
@@ -6980,7 +6980,7 @@ function inArray(pass, incoming, stored) {
6980
6980
  return incoming.map((item, index) => {
6981
6981
  const twin = stored[index];
6982
6982
  if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
6983
- if (isRecord$4(item) && isRecord$4(twin)) return inArrayRow(pass, item, twin);
6983
+ if (isRecord$5(item) && isRecord$5(twin)) return inArrayRow(pass, item, twin);
6984
6984
  if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
6985
6985
  return item;
6986
6986
  });
@@ -6991,7 +6991,7 @@ function inArrayRow(pass, incoming, stored) {
6991
6991
  const twin = stored[key];
6992
6992
  if (isSecretMarker(twin)) {
6993
6993
  if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
6994
- } else if (isRecord$4(value) && isRecord$4(twin)) out[key] = inArrayRow(pass, value, twin);
6994
+ } else if (isRecord$5(value) && isRecord$5(twin)) out[key] = inArrayRow(pass, value, twin);
6995
6995
  else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
6996
6996
  }
6997
6997
  return out;
@@ -6999,7 +6999,7 @@ function inArrayRow(pass, incoming, stored) {
6999
6999
  async function walk(pass, incoming, stored) {
7000
7000
  if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
7001
7001
  if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
7002
- if (!isRecord$4(incoming) || !isRecord$4(stored)) return incoming;
7002
+ if (!isRecord$5(incoming) || !isRecord$5(stored)) return incoming;
7003
7003
  const out = { ...incoming };
7004
7004
  for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
7005
7005
  return out;
@@ -7030,7 +7030,7 @@ async function restoreUnchangedSecrets(input) {
7030
7030
  function isJsonEqual(a, b) {
7031
7031
  if (Object.is(a, b)) return true;
7032
7032
  if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
7033
- if (isRecord$4(a) && isRecord$4(b)) {
7033
+ if (isRecord$5(a) && isRecord$5(b)) {
7034
7034
  const keys = Object.keys(a);
7035
7035
  if (keys.length !== Object.keys(b).length) return false;
7036
7036
  return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
@@ -7054,7 +7054,7 @@ function markerKeysOf(blob, owner) {
7054
7054
  }
7055
7055
  function nodeFromStored(value, owner) {
7056
7056
  if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
7057
- if (!isRecord$4(value)) return null;
7057
+ if (!isRecord$5(value)) return null;
7058
7058
  const children = /* @__PURE__ */ new Map();
7059
7059
  for (const [key, child] of Object.entries(value)) {
7060
7060
  const node = nodeFromStored(child, owner);
@@ -7673,6 +7673,44 @@ var BaseAddon = class {
7673
7673
  return null;
7674
7674
  }
7675
7675
  /**
7676
+ * D986 scoped settings: the form shape of the CLUSTER-wide settings one capability this addon
7677
+ * provides owns, or `null` when it has none. `cap` is a capability name the addon's manifest
7678
+ * declares. Stored as `addon-settings` rows `<addonId>.<field>`. The keys of this schema, of
7679
+ * {@link nodeSettingsSchema} and of {@link deviceDefaultsSchema} are disjoint, and a key never
7680
+ * contains `@` (guard `check-scoped-settings-declared`). SHAPE only: values are read by scope.
7681
+ */
7682
+ async clusterSettingsSchema(_cap) {
7683
+ return null;
7684
+ }
7685
+ /**
7686
+ * D986: the form shape of the settings one capability owns PER NODE, or `null`. Stored as
7687
+ * `addon-settings` rows `<addonId>.<field>@<nodeId>` carrying `nodeId` in the row data, so a
7688
+ * forgotten node's rows go in one central delete.
7689
+ */
7690
+ async nodeSettingsSchema(_cap) {
7691
+ return null;
7692
+ }
7693
+ /**
7694
+ * D986: the form shape of the FLEET DEFAULTS of the per-device settings one capability owns,
7695
+ * or `null`. Stored as `addon-settings` rows `<addonId>.<field>`; a device resolves its value
7696
+ * as device row, then this default, then the schema default (`resolveDeviceSettings`).
7697
+ */
7698
+ async deviceDefaultsSchema(_cap) {
7699
+ return null;
7700
+ }
7701
+ /**
7702
+ * The host's read of the scoped declarations: the schema one capability declares for `scope`,
7703
+ * or `null`. Beside {@link getIntegrationFormSchema}, the same shape: the hook is protected, the
7704
+ * host asks this method.
7705
+ */
7706
+ async getScopedSettingsSchema(scope, cap) {
7707
+ switch (scope) {
7708
+ case "cluster": return this.clusterSettingsSchema(cap);
7709
+ case "node": return this.nodeSettingsSchema(cap);
7710
+ case "device-defaults": return this.deviceDefaultsSchema(cap);
7711
+ }
7712
+ }
7713
+ /**
7676
7714
  * What the create wizard and the integration edit page render for one instance: the addon's
7677
7715
  * per-instance schema when it declares one, else its global schema (what they always showed).
7678
7716
  */
@@ -8466,6 +8504,21 @@ function normalizeAddonInitResult(result) {
8466
8504
  if (Array.isArray(result)) return { providers: result };
8467
8505
  return result;
8468
8506
  }
8507
+ /** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
8508
+ /** The files a kind may live in. `history` is device-history's (D850), never records. */
8509
+ var RECORD_DATABASES = ["settings", "events"];
8510
+ /** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
8511
+ var RECORD_CLASSES = [
8512
+ "config",
8513
+ "ledger",
8514
+ "audit",
8515
+ "mirror",
8516
+ "ephemeral"
8517
+ ];
8518
+ var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
8519
+ var RECORD_MAX_DATA_BYTES = 1024 * 1024;
8520
+ var RECORD_BATCH_MAX = 1e3;
8521
+ var RECORD_QUERY_MAX = 1e3;
8469
8522
  /**
8470
8523
  * The share-view scope kinds a share-link token can carry. The hub mints
8471
8524
  * and validates them (`ShareViewGrantSchema` builds its
@@ -8490,21 +8543,6 @@ var PeerBytesTicketSchema = object({
8490
8543
  */
8491
8544
  declaredBytes: number().int().nonnegative().nullable()
8492
8545
  });
8493
- /** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
8494
- /** The files a kind may live in. `history` is device-history's (D850), never records. */
8495
- var RECORD_DATABASES = ["settings", "events"];
8496
- /** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
8497
- var RECORD_CLASSES = [
8498
- "config",
8499
- "ledger",
8500
- "audit",
8501
- "mirror",
8502
- "ephemeral"
8503
- ];
8504
- var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
8505
- var RECORD_MAX_DATA_BYTES = 1024 * 1024;
8506
- var RECORD_BATCH_MAX = 1e3;
8507
- var RECORD_QUERY_MAX = 1e3;
8508
8546
  /**
8509
8547
  * Record kinds (D881): the declaration an addon makes of one kind of fact, the
8510
8548
  * Zod row schema that describes it, and the helper that turns the two into the
@@ -9304,6 +9342,7 @@ var CAP_NAMES = Object.freeze([
9304
9342
  "humidity-sensor",
9305
9343
  "image",
9306
9344
  "image-settings",
9345
+ "integration-instances",
9307
9346
  "integrations",
9308
9347
  "intercom",
9309
9348
  "ir-transmitter",
@@ -11237,7 +11276,7 @@ object({
11237
11276
  params: record(string(), union([string(), number()])).optional()
11238
11277
  });
11239
11278
  //#endregion
11240
- //#region ../types/dist/composition-kKKOdFIG.mjs
11279
+ //#region ../types/dist/composition-BDUoQsw9.mjs
11241
11280
  /**
11242
11281
  * The ffmpeg build every CamStack node downloads, per platform and arch.
11243
11282
  *
@@ -15493,8 +15532,18 @@ var LogChannelDescriptorSchema = object({
15493
15532
  * the operator narrows to one camera, sees nothing, and concludes the code
15494
15533
  * path was never taken.
15495
15534
  */
15496
- perDevice: boolean()
15497
- });
15535
+ perDevice: boolean(),
15536
+ /**
15537
+ * What the channel is FOR, so the UI can list the channels an addon offers.
15538
+ *
15539
+ * - `diagnostic` (the default): a per-component diagnostic armed from the
15540
+ * Levels page, emitted at its declared level.
15541
+ * - `debug`: a `debug.<channel>` dump watched live for a short window
15542
+ * (`ctx.debug`). Always per-device, and its lines are denied by the log
15543
+ * ring unless somebody is watching that device.
15544
+ */
15545
+ kind: _enum(["diagnostic", "debug"]).default("diagnostic")
15546
+ }).refine((d) => d.kind !== "debug" || d.name.startsWith("debug.") && d.perDevice, { message: "a debug channel is named debug.<channel> and is per-device" });
15498
15547
  /**
15499
15548
  * An armed window over one channel, as the document hands it to a mirror.
15500
15549
  *
@@ -20710,6 +20759,7 @@ var SYSTEM_CAP_VOCABULARY = {
20710
20759
  "load-contribution": system(INTERNAL),
20711
20760
  "local-network": system(NETWORK),
20712
20761
  "log-channels": system(INTERNAL),
20762
+ "integration-instances": system(INTERNAL),
20713
20763
  "log-destination": system(INTERNAL),
20714
20764
  "login-method": system(IDENTITY),
20715
20765
  "mesh-network": system(NETWORK),
@@ -42856,7 +42906,7 @@ var TargetKindCapsSchema = object({
42856
42906
  * the union is large and not meant for runtime validation here; the exported
42857
42907
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
42858
42908
  */
42859
- var ConfigSchemaPassthrough$3 = unknown();
42909
+ var ConfigSchemaPassthrough$4 = unknown();
42860
42910
  var TargetKindSchema = object({
42861
42911
  kind: string(),
42862
42912
  label: string(),
@@ -42893,7 +42943,7 @@ var TargetKindSchema = object({
42893
42943
  * its raster path, which is the safe default for an unknown image.
42894
42944
  */
42895
42945
  iconMediaType: string().optional(),
42896
- configSchema: ConfigSchemaPassthrough$3,
42946
+ configSchema: ConfigSchemaPassthrough$4,
42897
42947
  /**
42898
42948
  * The config keys that decide WHERE this kind's secrets are sent (server,
42899
42949
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -49173,6 +49223,45 @@ method(_void(), _void(), { kind: "mutation" }), method(_void(), _void(), { kind:
49173
49223
  auth: "admin"
49174
49224
  });
49175
49225
  /**
49226
+ * What the passive listener of `local-network` saw on the wire, before any
49227
+ * provider classified it. Device-manager turns an observation into the hits
49228
+ * of the providers whose declared discovery modes it matches.
49229
+ */
49230
+ var DiscoveryObservationSchema = discriminatedUnion("kind", [object({
49231
+ kind: literal("mdns"),
49232
+ /** Normalised DNS-SD service type, e.g. `_esphomelib._tcp`. */
49233
+ serviceType: string(),
49234
+ instance: string(),
49235
+ host: string(),
49236
+ /** The A record address when the announcement carried one. */
49237
+ address: string().nullable(),
49238
+ port: number().int(),
49239
+ txt: record(string(), string())
49240
+ }), object({
49241
+ kind: literal("ssdp"),
49242
+ /** Sender address of the datagram. */
49243
+ host: string(),
49244
+ port: number().int(),
49245
+ /** `NT` of a NOTIFY, `ST` of a search response. */
49246
+ target: string(),
49247
+ headers: record(string(), string())
49248
+ })]);
49249
+ object({
49250
+ addonId: string(),
49251
+ candidate: DiscoveryCandidateSchema,
49252
+ firstSeenAt: number(),
49253
+ lastSeenAt: number(),
49254
+ dismissed: boolean()
49255
+ });
49256
+ var DiscoveryProposalSchema = object({
49257
+ id: string(),
49258
+ addonId: string(),
49259
+ candidate: DiscoveryCandidateSchema,
49260
+ firstSeenAt: number(),
49261
+ lastSeenAt: number(),
49262
+ dismissed: boolean()
49263
+ });
49264
+ /**
49176
49265
  * Device Manager capability — hub-side singleton that unifies device persistence,
49177
49266
  * live registry access, and all management operations into a single tRPC surface.
49178
49267
  *
@@ -49901,6 +49990,19 @@ method(object({
49901
49990
  }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
49902
49991
  kind: "mutation",
49903
49992
  auth: "admin"
49993
+ }), method(object({}), object({ proposals: array(DiscoveryProposalSchema).readonly() }), { auth: "admin" }), method(object({ id: string() }), object({ dismissed: boolean() }), {
49994
+ kind: "mutation",
49995
+ auth: "admin"
49996
+ }), method(object({ observations: array(DiscoveryObservationSchema).max(512) }), object({ proposed: number().int() }), {
49997
+ kind: "mutation",
49998
+ auth: "admin"
49999
+ }), method(object({}), object({
50000
+ providers: number().int(),
50001
+ proposed: number().int()
50002
+ }), {
50003
+ kind: "mutation",
50004
+ auth: "admin",
50005
+ timeoutMs: 12e4
49904
50006
  }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
49905
50007
  deviceId: number(),
49906
50008
  key: string(),
@@ -52561,6 +52663,78 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
52561
52663
  auth: "admin"
52562
52664
  });
52563
52665
  /**
52666
+ * `integration-instances` - the connection of an addon that holds ONE or SEVERAL
52667
+ * (an account, a relay, a destination) as typed records (D985, D986). The addon's
52668
+ * own function page reads and writes them (Logging for Loki); the Integrations
52669
+ * page lists only the integrations that bring devices (D996).
52670
+ *
52671
+ * A collection of providers: each addon that holds connections registers one and a
52672
+ * caller reaches a provider with the pinned `addonId`.
52673
+ *
52674
+ * Identity: the instance id is immutable and opaque to the caller. A record the
52675
+ * Loki migration made keeps the `integrations` registry id it was created under
52676
+ * (`int_NNNN`); a single instance made by its function page takes the addon id.
52677
+ * `name` is the editable label.
52678
+ *
52679
+ * Secrets: every field the instance kind marks `.meta({ secret: true })` reaches
52680
+ * the form as a `SecretFieldView`, never text (D789). A patch value omitted, `''`
52681
+ * or the redaction token KEEPS the stored secret; `{ $secretClear: true }`
52682
+ * clears it.
52683
+ */
52684
+ var ConfigSchemaPassthrough$3 = custom();
52685
+ var IntegrationInstanceIdSchema = string().min(1);
52686
+ var IntegrationInstanceDescriptionSchema = object({
52687
+ /** `single`: at most one instance can exist (Loki). `multiple`: an account each. */
52688
+ instanceMode: _enum(["single", "multiple"]),
52689
+ /** What the instance is, for the UI (`destination`, `relay`, `account`). */
52690
+ kind: string(),
52691
+ /** True when `testInstance` really probes the remote. */
52692
+ canTest: boolean()
52693
+ });
52694
+ var IntegrationInstanceStatusSchema = object({
52695
+ state: _enum([
52696
+ "ok",
52697
+ "off",
52698
+ "error",
52699
+ "unknown"
52700
+ ]),
52701
+ detail: string().optional()
52702
+ });
52703
+ var IntegrationInstanceSchema = object({
52704
+ id: IntegrationInstanceIdSchema,
52705
+ name: string(),
52706
+ /** The addon's own rule (an URL is present, a client id is present...). */
52707
+ configured: boolean(),
52708
+ /** Values for the instance form; a secret is a `SecretFieldView`, never text. */
52709
+ formValues: record(string(), unknown()),
52710
+ status: IntegrationInstanceStatusSchema.optional()
52711
+ });
52712
+ var IntegrationInstancePatchSchema = object({
52713
+ id: IntegrationInstanceIdSchema,
52714
+ name: string().min(1).optional(),
52715
+ /** Omitted / '' / redaction token keeps a secret; `{ $secretClear: true }` clears it. */
52716
+ values: record(string(), unknown())
52717
+ });
52718
+ method(_void(), IntegrationInstanceDescriptionSchema, { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema.nullable() }), ConfigSchemaPassthrough$3, { auth: "admin" }), method(_void(), array(IntegrationInstanceSchema).readonly(), { auth: "admin" }), method(object({ id: IntegrationInstanceIdSchema }), IntegrationInstanceSchema.nullable(), { auth: "admin" }), method(object({
52719
+ id: IntegrationInstanceIdSchema,
52720
+ name: string().min(1)
52721
+ }), object({ id: string() }), {
52722
+ kind: "mutation",
52723
+ auth: "admin"
52724
+ }), method(IntegrationInstancePatchSchema, object({ ok: literal(true) }), {
52725
+ kind: "mutation",
52726
+ auth: "admin"
52727
+ }), method(object({ id: IntegrationInstanceIdSchema }), object({ ok: literal(true) }), {
52728
+ kind: "mutation",
52729
+ auth: "admin"
52730
+ }), optionalMethod(object({
52731
+ id: IntegrationInstanceIdSchema.nullable(),
52732
+ values: record(string(), unknown())
52733
+ }), TestConnectionResultSchema$1, {
52734
+ kind: "mutation",
52735
+ auth: "admin"
52736
+ });
52737
+ /**
52564
52738
  * Two-way audio / talk-back cap. Clients open a WebRTC audio-only
52565
52739
  * session (server-initiated offer pattern, identical to the main
52566
52740
  * video WebRTC flow) and the browser captures the mic; the server
@@ -70261,7 +70435,16 @@ DeviceType.Sensor;
70261
70435
  * future fields without breaking the existing call sites.
70262
70436
  */
70263
70437
  var EmailAddressSchema = email();
70438
+ /**
70439
+ * Which relay of a multi-relay provider answers (D996). Absent = the provider's first / default
70440
+ * relay, so a caller written before relays existed keeps working unchanged. A provider with one
70441
+ * fixed relay ignores it. This is the integration instance id (`int_NNNN`), NOT the addon id: the
70442
+ * collection pin `addonId` still picks the provider, `instanceId` picks the relay inside it.
70443
+ */
70444
+ var InstanceIdSchema = string().min(1).optional();
70445
+ var RelayPinSchema = object({ instanceId: InstanceIdSchema });
70264
70446
  var SendEmailInputSchema = object({
70447
+ instanceId: InstanceIdSchema,
70265
70448
  to: union([EmailAddressSchema, array(EmailAddressSchema).min(1)]),
70266
70449
  cc: array(EmailAddressSchema).optional(),
70267
70450
  bcc: array(EmailAddressSchema).optional(),
@@ -70297,11 +70480,11 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
70297
70480
  kind: "mutation",
70298
70481
  auth: "admin",
70299
70482
  access: "create"
70300
- }), method(_void(), SmtpStatusSchema, {
70483
+ }), method(RelayPinSchema, SmtpStatusSchema, {
70301
70484
  kind: "mutation",
70302
70485
  auth: "admin",
70303
70486
  access: "view"
70304
- }), method(_void(), SmtpStatusSchema, { auth: "admin" });
70487
+ }), method(RelayPinSchema, SmtpStatusSchema, { auth: "admin" });
70305
70488
  /**
70306
70489
  * A single device snapshot returned as base64 JPEG/PNG.
70307
70490
  *
@@ -71687,6 +71870,40 @@ var LoggingSettingsStateSchema = object({
71687
71870
  opsLogRetentionDays: number().int().min(0),
71688
71871
  persisted: boolean()
71689
71872
  });
71873
+ /**
71874
+ * Debug WATCH — a short, per-device window over `debug.<channel>` lines.
71875
+ *
71876
+ * `start` opens (or re-arms) a 10 minute window; `rearm` extends a LIVE one
71877
+ * and never revives a lapsed one; `stop` closes it; `list` only reads. No
71878
+ * chain of re-arms outlives 60 minutes from the first start. The hub holds the
71879
+ * watches in memory and pushes the interest to every node, so a watch lapses
71880
+ * by itself and survives nothing — a restart is a stop.
71881
+ */
71882
+ var DebugWatchInputSchema = object({
71883
+ action: _enum([
71884
+ "list",
71885
+ "start",
71886
+ "rearm",
71887
+ "stop"
71888
+ ]),
71889
+ /** Full channel names, `debug.<channel>`, each declared with `kind: 'debug'`. */
71890
+ channels: array(string().min(1)).readonly().default([]),
71891
+ /** Numeric device ids. Required (non-empty) for `start`. */
71892
+ deviceIds: array(number().int()).readonly().default([])
71893
+ });
71894
+ var DebugWatchStateSchema = object({
71895
+ channel: string(),
71896
+ deviceIds: array(number().int()).readonly(),
71897
+ startedAtMs: number(),
71898
+ untilMs: number(),
71899
+ capAtMs: number()
71900
+ });
71901
+ var DebugWatchResultSchema = object({
71902
+ nowMs: number(),
71903
+ watches: array(DebugWatchStateSchema).readonly(),
71904
+ /** Channels a `rearm` found already lapsed: nothing was revived. */
71905
+ lapsed: array(string()).readonly()
71906
+ });
71690
71907
  method(_void(), SystemInfoSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
71691
71908
  kind: "mutation",
71692
71909
  auth: "admin"
@@ -71702,6 +71919,9 @@ method(_void(), SystemInfoSchema), method(_void(), HealthStatusSchema), method(_
71702
71919
  }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(_void(), array(ReportedFailureContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
71703
71920
  kind: "mutation",
71704
71921
  auth: "admin"
71922
+ }), method(DebugWatchInputSchema, DebugWatchResultSchema, {
71923
+ kind: "mutation",
71924
+ auth: "admin"
71705
71925
  });
71706
71926
  object({
71707
71927
  /** True when the device's tamper switch / case-open contact is
@@ -76575,6 +76795,13 @@ Object.freeze({
76575
76795
  access: "view",
76576
76796
  role: "admin"
76577
76797
  },
76798
+ "deviceManager.dismissDiscoveryProposal": {
76799
+ capName: "device-manager",
76800
+ capScope: "system",
76801
+ addonId: null,
76802
+ access: "create",
76803
+ role: "admin"
76804
+ },
76578
76805
  "deviceManager.enable": {
76579
76806
  capName: "device-manager",
76580
76807
  capScope: "system",
@@ -76757,6 +76984,13 @@ Object.freeze({
76757
76984
  access: "view",
76758
76985
  role: "viewer"
76759
76986
  },
76987
+ "deviceManager.listDiscoveryProposals": {
76988
+ capName: "device-manager",
76989
+ capScope: "system",
76990
+ addonId: null,
76991
+ access: "view",
76992
+ role: "admin"
76993
+ },
76760
76994
  "deviceManager.listLocationDescriptions": {
76761
76995
  capName: "device-manager",
76762
76996
  capScope: "system",
@@ -76911,6 +77145,13 @@ Object.freeze({
76911
77145
  access: "create",
76912
77146
  role: "admin"
76913
77147
  },
77148
+ "deviceManager.reportDiscoveryObservations": {
77149
+ capName: "device-manager",
77150
+ capScope: "system",
77151
+ addonId: null,
77152
+ access: "create",
77153
+ role: "admin"
77154
+ },
76914
77155
  "deviceManager.runDeviceAction": {
76915
77156
  capName: "device-manager",
76916
77157
  capScope: "system",
@@ -76918,6 +77159,13 @@ Object.freeze({
76918
77159
  access: "create",
76919
77160
  role: "admin"
76920
77161
  },
77162
+ "deviceManager.runDiscoverySweep": {
77163
+ capName: "device-manager",
77164
+ capScope: "system",
77165
+ addonId: null,
77166
+ access: "create",
77167
+ role: "admin"
77168
+ },
76921
77169
  "deviceManager.setChildLayout": {
76922
77170
  capName: "device-manager",
76923
77171
  capScope: "system",
@@ -77849,6 +78097,62 @@ Object.freeze({
77849
78097
  access: "create",
77850
78098
  role: "admin"
77851
78099
  },
78100
+ "integrationInstances.createInstance": {
78101
+ capName: "integration-instances",
78102
+ capScope: "system",
78103
+ addonId: null,
78104
+ access: "create",
78105
+ role: "admin"
78106
+ },
78107
+ "integrationInstances.deleteInstance": {
78108
+ capName: "integration-instances",
78109
+ capScope: "system",
78110
+ addonId: null,
78111
+ access: "delete",
78112
+ role: "admin"
78113
+ },
78114
+ "integrationInstances.describe": {
78115
+ capName: "integration-instances",
78116
+ capScope: "system",
78117
+ addonId: null,
78118
+ access: "view",
78119
+ role: "admin"
78120
+ },
78121
+ "integrationInstances.getInstance": {
78122
+ capName: "integration-instances",
78123
+ capScope: "system",
78124
+ addonId: null,
78125
+ access: "view",
78126
+ role: "admin"
78127
+ },
78128
+ "integrationInstances.instanceFormSchema": {
78129
+ capName: "integration-instances",
78130
+ capScope: "system",
78131
+ addonId: null,
78132
+ access: "view",
78133
+ role: "admin"
78134
+ },
78135
+ "integrationInstances.listInstances": {
78136
+ capName: "integration-instances",
78137
+ capScope: "system",
78138
+ addonId: null,
78139
+ access: "view",
78140
+ role: "admin"
78141
+ },
78142
+ "integrationInstances.testInstance": {
78143
+ capName: "integration-instances",
78144
+ capScope: "system",
78145
+ addonId: null,
78146
+ access: "create",
78147
+ role: "admin"
78148
+ },
78149
+ "integrationInstances.updateInstance": {
78150
+ capName: "integration-instances",
78151
+ capScope: "system",
78152
+ addonId: null,
78153
+ access: "create",
78154
+ role: "admin"
78155
+ },
77852
78156
  "integrations.create": {
77853
78157
  capName: "integrations",
77854
78158
  capScope: "system",
@@ -83505,6 +83809,13 @@ Object.freeze({
83505
83809
  access: "create",
83506
83810
  role: "viewer"
83507
83811
  },
83812
+ "system.debugWatch": {
83813
+ capName: "system",
83814
+ capScope: "system",
83815
+ addonId: null,
83816
+ access: "create",
83817
+ role: "admin"
83818
+ },
83508
83819
  "system.detectSiteLocation": {
83509
83820
  capName: "system",
83510
83821
  capScope: "system",
@@ -87423,6 +87734,11 @@ Object.freeze({
87423
87734
  form: "single",
87424
87735
  optional: false
87425
87736
  }],
87737
+ "system.debugWatch": [{
87738
+ name: "deviceIds",
87739
+ form: "array",
87740
+ optional: true
87741
+ }],
87426
87742
  "tamper.getStatus": [{
87427
87743
  name: "deviceId",
87428
87744
  form: "single",
@@ -89142,7 +89458,7 @@ var AgentUIAddon = class extends BaseAddon {
89142
89458
  capability: adminUiCapability,
89143
89459
  provider: {
89144
89460
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
89145
- getVersion: async () => ({ version: "1.2.312" })
89461
+ getVersion: async () => ({ version: "1.2.314" })
89146
89462
  }
89147
89463
  }];
89148
89464
  }