@camstack/types 1.2.562 → 1.2.563

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 CHANGED
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.563] - 2026-11-13
11
+
12
+ ### Added
13
+
14
+ - Device search can require vocabulary actions, so a command picker lists only devices that offer the command.
15
+ - A switch offers Toggle, which flips it from its current on or off state.
16
+
17
+ ### Changed
18
+
19
+ - Notification templates can use {{headline}}, the subject and the place of a detection.
20
+ - Notification templates can count how many devices or nodes went offline and came back in a summary.
21
+ - A disarm notification can name who disarmed the alarm.
22
+ - Notification history can show the title and body that were sent.
23
+ - Email images travel as peerBytes tickets on smtp-provider.sendEmail.
24
+ - A cluster update can name a server install that stalled or hit its time limit.
25
+
10
26
  ## [1.2.562] - 2026-11-13
11
27
 
12
28
  ### Added
package/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-Cb2px0Nb.js");
2
+ const require_sleep = require("./sleep-RUgd-FgK.js");
3
3
  const require_event_category = require("./event-category-Ps2LC8dN.js");
4
4
  const require_composed_stable_id = require("./composed-stable-id-Bp33yrYi.js");
5
5
  //#region src/generated/cap-input-defaults.ts
@@ -453,7 +453,7 @@ function isCollectionArrayMethodName(capName, method) {
453
453
  * Per capability, the methods declared `optionalMethod` — the ones whose
454
454
  * ABSENCE on a provider is a fact about that provider, not a bug.
455
455
  *
456
- * Coverage: 10 caps, 44 methods.
456
+ * Coverage: 11 caps, 45 methods.
457
457
  */
458
458
  var PROVIDER_OPTIONAL_METHODS = Object.freeze({
459
459
  "climate-control": [
@@ -507,6 +507,7 @@ var PROVIDER_OPTIONAL_METHODS = Object.freeze({
507
507
  "volumeDown",
508
508
  "volumeUp"
509
509
  ],
510
+ "switch": ["toggle"],
510
511
  "valve": ["setPosition"],
511
512
  "videoclips": [
512
513
  "dialClipStream",
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as DEVICE_CHILDREN_BATCH_MAX, $n as isZodSecret, $r as recordSecretRef, A as CAP_ADVANCE_FIELDS, Ai as InvalidRecordError, An as PEER_BYTES_CHUNK_BYTES, Bi as TransactRefusedError, Bn as entryBody, Cn as MIN_SCRUBBED_LENGTH, Da as findMigrationsBlocked, Di as DeclarationRefusedError, Dn as registerKnownSecret, Ea as AddonMigrationsBlockedError, Ei as BatchTooLargeError, En as knownSecretCount, Et as createDebugEmitter, F as withoutCallerStamp, Fi as RecordSecretUnavailableError, Fn as CALLER_USERNAME_HEADER, Fr as nodeIdOfScopedKey, G as readNodePin, Gn as RecordKindNameSchema, H as commandOrigin, Hi as UnknownRecordKindError, Hn as RecordFieldPathSchema, I as customAction, Ii as RecordTooLargeError, In as DATAPLANE_SECRET_HEADER, Ir as resolveDeviceSettings, J as PipelineRunResultBridge, Jn as assertValidDeclaration, Jr as collectSecretLeaves, Kn as RecordRetentionSchema, Kr as secretViewsOf, L as defineCustomActions, Li as RecordUniqueViolationError, Lr as resolvedValues, Mi as PlaintextSecretError, Mn as PEER_BYTES_STALL_MS, N as CAP_STATE_LEAVES, Ni as RECORDS_ERROR_CODES, Nn as PEER_BYTES_TICKET_TTL_MS, O as HF_REPO, Oi as FilterRequiredError, On as scrubKnownSecrets, P as CALLER_STAMPED_CAPABILITIES, Pi as RecordNotFoundError, Pr as SCOPED_SETTINGS_SCOPES, Q as deviceOpsCapability, Qn as collectZodSecretPaths, Qr as recordSecretCollection, R as describeCustomActions, Ri as RecordsError, Rn as DisposerChain, Si as parseSecretRef, Sn as createSecretsAccess, T as isCommand, Tn as forgetKnownSecret, U as nodePin, Ui as asRecordsError, Un as RecordIndexSchema, Vi as UnindexedFilterError, Vn as EntryDescriptorSchema, W as readCommandOrigin, Wi as recordsErrorFromMessage, Wn as RecordKindDeclarationSchema, X as MIGRATION_API_VERSION, Xn as defineRecordKinds, Xr as parseSecretPath, Y as PipelineStepInputSchema, Yn as declarationsOf, Yr as mapSecretLeaves, Zr as recordArrayItemPath, _a as makeSecretMarker, _i as buildSecretRef, _n as makeInMemoryRecords, ai as RECORD_DEFAULT_MAX_DATA_BYTES, bi as isSecretRef, bn as resolveSecretViewsIn, c as asString, ci as RECORD_MAX_DATA_BYTES, d as parseJsonUnknown, da as SECRET_CLEAR, di as RECORD_QUERY_MAX, ea as createEvent, ei as secretArrayPrefixes, et as adminUiCapability, f as hfModelUrl, fa as classifySecretWrite, fi as RECORD_SECRET_COLLECTION_PREFIX, g as createDeviceProxy, ga as isSecretMarkerLike, gi as arrayItemFieldPath, gn as ruleFireOfClaim, gr as ErrorI18nPayloadSchema, h as isDeviceScopedCap, ha as isSecretMarker, hi as SECRET_REF_SCHEME, hn as RuleFireOriginSchema, ht as ReadinessTimeoutError, ii as RECORD_DATABASES, j as CAP_METHOD_TIMEOUTS_MS, ji as NoCallerError, jn as PEER_BYTES_MAX_OUTSTANDING, ki as ForeignSecretMarkerError, kn as shortSecretRefHash, li as RECORD_MAX_INDEXES, m as DEVICE_SCOPED_CAPS, ma as isSecretFieldView, mi as RECORD_SWEEP_INTERVAL_MS, mn as CommandOriginClaimSchema, mt as ReadinessRegistry, ni as RECORD_BATCH_MAX_BYTES, nt as addonPagesSourceCapability, o as asJsonObject, oi as RECORD_DELETE_BATCH, p as BOOT_RECOVERY_BACKOFF_MS, pa as isSecretClear, pi as RECORD_SETTINGS_MAX_ROWS, pt as MODEL_FORMATS, q as viewerUiCapability, qn as StoredRecordKindDeclarationSchema, qr as REMOVE_LEAF, r as maskUrlCredentials, ri as RECORD_CLASSES, si as RECORD_ID_MAX_LENGTH, sr as expandCapMethods, t as sleep, ta as emitReadiness, ti as RECORD_BATCH_MAX, ui as RECORD_MAX_INDEX_FIELDS, v as addonSliceHandleApi, va as toSecretFieldView, vi as formatSecretScope, vn as createRecordsAccess, vt as scopeKey, wn as clearKnownSecrets, wr as normalizeAddonInitResult, xi as normalizeSecretOwner, xn as REVALIDATE_AFTER_MS, xr as BaseAddon, y as createEventBusSliceSource, yi as globalSecretScope, yn as assertTransactScope, yr as readErrorI18n, zi as RevConflictError, zn as defineEntryKind } from "./sleep-Cykc2bzi.mjs";
1
+ import { $ as DEVICE_CHILDREN_BATCH_MAX, $n as isZodSecret, $r as recordSecretRef, A as CAP_ADVANCE_FIELDS, Ai as InvalidRecordError, An as PEER_BYTES_CHUNK_BYTES, Bi as TransactRefusedError, Bn as entryBody, Cn as MIN_SCRUBBED_LENGTH, Da as findMigrationsBlocked, Di as DeclarationRefusedError, Dn as registerKnownSecret, Ea as AddonMigrationsBlockedError, Ei as BatchTooLargeError, En as knownSecretCount, Et as createDebugEmitter, F as withoutCallerStamp, Fi as RecordSecretUnavailableError, Fn as CALLER_USERNAME_HEADER, Fr as nodeIdOfScopedKey, G as readNodePin, Gn as RecordKindNameSchema, H as commandOrigin, Hi as UnknownRecordKindError, Hn as RecordFieldPathSchema, I as customAction, Ii as RecordTooLargeError, In as DATAPLANE_SECRET_HEADER, Ir as resolveDeviceSettings, J as PipelineRunResultBridge, Jn as assertValidDeclaration, Jr as collectSecretLeaves, Kn as RecordRetentionSchema, Kr as secretViewsOf, L as defineCustomActions, Li as RecordUniqueViolationError, Lr as resolvedValues, Mi as PlaintextSecretError, Mn as PEER_BYTES_STALL_MS, N as CAP_STATE_LEAVES, Ni as RECORDS_ERROR_CODES, Nn as PEER_BYTES_TICKET_TTL_MS, O as HF_REPO, Oi as FilterRequiredError, On as scrubKnownSecrets, P as CALLER_STAMPED_CAPABILITIES, Pi as RecordNotFoundError, Pr as SCOPED_SETTINGS_SCOPES, Q as deviceOpsCapability, Qn as collectZodSecretPaths, Qr as recordSecretCollection, R as describeCustomActions, Ri as RecordsError, Rn as DisposerChain, Si as parseSecretRef, Sn as createSecretsAccess, T as isCommand, Tn as forgetKnownSecret, U as nodePin, Ui as asRecordsError, Un as RecordIndexSchema, Vi as UnindexedFilterError, Vn as EntryDescriptorSchema, W as readCommandOrigin, Wi as recordsErrorFromMessage, Wn as RecordKindDeclarationSchema, X as MIGRATION_API_VERSION, Xn as defineRecordKinds, Xr as parseSecretPath, Y as PipelineStepInputSchema, Yn as declarationsOf, Yr as mapSecretLeaves, Zr as recordArrayItemPath, _a as makeSecretMarker, _i as buildSecretRef, _n as makeInMemoryRecords, ai as RECORD_DEFAULT_MAX_DATA_BYTES, bi as isSecretRef, bn as resolveSecretViewsIn, c as asString, ci as RECORD_MAX_DATA_BYTES, d as parseJsonUnknown, da as SECRET_CLEAR, di as RECORD_QUERY_MAX, ea as createEvent, ei as secretArrayPrefixes, et as adminUiCapability, f as hfModelUrl, fa as classifySecretWrite, fi as RECORD_SECRET_COLLECTION_PREFIX, g as createDeviceProxy, ga as isSecretMarkerLike, gi as arrayItemFieldPath, gn as ruleFireOfClaim, gr as ErrorI18nPayloadSchema, h as isDeviceScopedCap, ha as isSecretMarker, hi as SECRET_REF_SCHEME, hn as RuleFireOriginSchema, ht as ReadinessTimeoutError, ii as RECORD_DATABASES, j as CAP_METHOD_TIMEOUTS_MS, ji as NoCallerError, jn as PEER_BYTES_MAX_OUTSTANDING, ki as ForeignSecretMarkerError, kn as shortSecretRefHash, li as RECORD_MAX_INDEXES, m as DEVICE_SCOPED_CAPS, ma as isSecretFieldView, mi as RECORD_SWEEP_INTERVAL_MS, mn as CommandOriginClaimSchema, mt as ReadinessRegistry, ni as RECORD_BATCH_MAX_BYTES, nt as addonPagesSourceCapability, o as asJsonObject, oi as RECORD_DELETE_BATCH, p as BOOT_RECOVERY_BACKOFF_MS, pa as isSecretClear, pi as RECORD_SETTINGS_MAX_ROWS, pt as MODEL_FORMATS, q as viewerUiCapability, qn as StoredRecordKindDeclarationSchema, qr as REMOVE_LEAF, r as maskUrlCredentials, ri as RECORD_CLASSES, si as RECORD_ID_MAX_LENGTH, sr as expandCapMethods, t as sleep, ta as emitReadiness, ti as RECORD_BATCH_MAX, ui as RECORD_MAX_INDEX_FIELDS, v as addonSliceHandleApi, va as toSecretFieldView, vi as formatSecretScope, vn as createRecordsAccess, vt as scopeKey, wn as clearKnownSecrets, wr as normalizeAddonInitResult, xi as normalizeSecretOwner, xn as REVALIDATE_AFTER_MS, xr as BaseAddon, y as createEventBusSliceSource, yi as globalSecretScope, yn as assertTransactScope, yr as readErrorI18n, zi as RevConflictError, zn as defineEntryKind } from "./sleep-BCWQQG52.mjs";
2
2
  import { t as EventCategory } from "./event-category-Dv-Gcv1f.mjs";
3
3
  import { a as DeviceType, s as errMsg, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-B3wcvtvW.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
@@ -452,7 +452,7 @@ function isCollectionArrayMethodName(capName, method) {
452
452
  * Per capability, the methods declared `optionalMethod` — the ones whose
453
453
  * ABSENCE on a provider is a fact about that provider, not a bug.
454
454
  *
455
- * Coverage: 10 caps, 44 methods.
455
+ * Coverage: 11 caps, 45 methods.
456
456
  */
457
457
  var PROVIDER_OPTIONAL_METHODS = Object.freeze({
458
458
  "climate-control": [
@@ -506,6 +506,7 @@ var PROVIDER_OPTIONAL_METHODS = Object.freeze({
506
506
  "volumeDown",
507
507
  "volumeUp"
508
508
  ],
509
+ "switch": ["toggle"],
509
510
  "valve": ["setPosition"],
510
511
  "videoclips": [
511
512
  "dialClipStream",
@@ -55,6 +55,8 @@ declare const ClusterUpdateFailureReasonSchema: z.ZodEnum<{
55
55
  "server-not-on-target": "server-not-on-target";
56
56
  "server-refused": "server-refused";
57
57
  "status-unreadable": "status-unreadable";
58
+ "timeout-ceiling": "timeout-ceiling";
59
+ "timeout-stall": "timeout-stall";
58
60
  }>;
59
61
  declare const ClusterUpdateStepSchema: z.ZodObject<{
60
62
  kind: z.ZodEnum<{
@@ -82,6 +84,8 @@ declare const ClusterUpdateStepSchema: z.ZodObject<{
82
84
  "server-not-on-target": "server-not-on-target";
83
85
  "server-refused": "server-refused";
84
86
  "status-unreadable": "status-unreadable";
87
+ "timeout-ceiling": "timeout-ceiling";
88
+ "timeout-stall": "timeout-stall";
85
89
  }>>;
86
90
  fromVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
87
91
  packages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
@@ -130,6 +134,8 @@ declare const ClusterUpdateJobSchema: z.ZodObject<{
130
134
  "server-not-on-target": "server-not-on-target";
131
135
  "server-refused": "server-refused";
132
136
  "status-unreadable": "status-unreadable";
137
+ "timeout-ceiling": "timeout-ceiling";
138
+ "timeout-stall": "timeout-stall";
133
139
  }>>;
134
140
  fromVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
141
  packages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
@@ -147,6 +153,8 @@ declare const ClusterUpdateJobSchema: z.ZodObject<{
147
153
  "server-not-on-target": "server-not-on-target";
148
154
  "server-refused": "server-refused";
149
155
  "status-unreadable": "status-unreadable";
156
+ "timeout-ceiling": "timeout-ceiling";
157
+ "timeout-stall": "timeout-stall";
150
158
  }>>;
151
159
  skippedOffline: z.ZodReadonly<z.ZodArray<z.ZodString>>;
152
160
  }, z.core.$strip>;
@@ -191,6 +199,8 @@ declare const ClusterUpdatePlanSchema: z.ZodObject<{
191
199
  "server-not-on-target": "server-not-on-target";
192
200
  "server-refused": "server-refused";
193
201
  "status-unreadable": "status-unreadable";
202
+ "timeout-ceiling": "timeout-ceiling";
203
+ "timeout-stall": "timeout-stall";
194
204
  }>>;
195
205
  fromVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
206
  packages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
@@ -257,6 +267,8 @@ export declare const clusterUpdateCapability: {
257
267
  "server-not-on-target": "server-not-on-target";
258
268
  "server-refused": "server-refused";
259
269
  "status-unreadable": "status-unreadable";
270
+ "timeout-ceiling": "timeout-ceiling";
271
+ "timeout-stall": "timeout-stall";
260
272
  }>>;
261
273
  fromVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
262
274
  packages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
@@ -337,6 +349,8 @@ export declare const clusterUpdateCapability: {
337
349
  "server-not-on-target": "server-not-on-target";
338
350
  "server-refused": "server-refused";
339
351
  "status-unreadable": "status-unreadable";
352
+ "timeout-ceiling": "timeout-ceiling";
353
+ "timeout-stall": "timeout-stall";
340
354
  }>>;
341
355
  fromVersion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
342
356
  packages: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
@@ -354,6 +368,8 @@ export declare const clusterUpdateCapability: {
354
368
  "server-not-on-target": "server-not-on-target";
355
369
  "server-refused": "server-refused";
356
370
  "status-unreadable": "status-unreadable";
371
+ "timeout-ceiling": "timeout-ceiling";
372
+ "timeout-stall": "timeout-stall";
357
373
  }>>;
358
374
  skippedOffline: z.ZodReadonly<z.ZodArray<z.ZodString>>;
359
375
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
@@ -1180,7 +1180,8 @@ export declare const deviceManagerCapability: {
1180
1180
  readonly search: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1181
1181
  text: z.ZodOptional<z.ZodString>;
1182
1182
  requires: z.ZodOptional<z.ZodObject<{
1183
- caps: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1183
+ caps: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1184
+ actions: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
1184
1185
  mode: z.ZodOptional<z.ZodEnum<{
1185
1186
  all: "all";
1186
1187
  any: "any";
@@ -14,7 +14,8 @@ import { DeviceType } from '../device/device-type.js';
14
14
  export declare const DEVICE_SEARCH_DEFAULT_LIMIT = 50;
15
15
  export declare const DEVICE_SEARCH_MAX_LIMIT = 200;
16
16
  export declare const DeviceSearchRequiresSchema: z.ZodObject<{
17
- caps: z.ZodReadonly<z.ZodArray<z.ZodString>>;
17
+ caps: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
18
+ actions: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
18
19
  mode: z.ZodOptional<z.ZodEnum<{
19
20
  all: "all";
20
21
  any: "any";
@@ -30,7 +31,8 @@ export type DeviceSearchFilters = z.infer<typeof DeviceSearchFiltersSchema>;
30
31
  export declare const DeviceSearchInputSchema: z.ZodObject<{
31
32
  text: z.ZodOptional<z.ZodString>;
32
33
  requires: z.ZodOptional<z.ZodObject<{
33
- caps: z.ZodReadonly<z.ZodArray<z.ZodString>>;
34
+ caps: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
35
+ actions: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
34
36
  mode: z.ZodOptional<z.ZodEnum<{
35
37
  all: "all";
36
38
  any: "any";
@@ -3559,6 +3559,8 @@ export declare const NcHistoryEntrySchema: z.ZodObject<{
3559
3559
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3560
3560
  }, z.core.$strip>>;
3561
3561
  }, z.core.$strip>;
3562
+ title: z.ZodOptional<z.ZodString>;
3563
+ body: z.ZodOptional<z.ZodString>;
3562
3564
  artifactIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
3563
3565
  groupedInto: z.ZodOptional<z.ZodString>;
3564
3566
  }, z.core.$strip>;
@@ -8139,6 +8141,8 @@ export declare const notificationRulesCapability: {
8139
8141
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
8140
8142
  }, z.core.$strip>>;
8141
8143
  }, z.core.$strip>;
8144
+ title: z.ZodOptional<z.ZodString>;
8145
+ body: z.ZodOptional<z.ZodString>;
8142
8146
  artifactIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
8143
8147
  groupedInto: z.ZodOptional<z.ZodString>;
8144
8148
  }, z.core.$strip>>;
@@ -10,6 +10,7 @@ declare const SendEmailInputSchema: z.ZodObject<{
10
10
  subject: z.ZodString;
11
11
  text: z.ZodString;
12
12
  html: z.ZodOptional<z.ZodString>;
13
+ images: z.ZodOptional<z.ZodArray<z.ZodType<import("../index.js").EmailImagePart, unknown, z.core.$ZodTypeInternals<import("../index.js").EmailImagePart, unknown>>>>;
13
14
  }, z.core.$strip>;
14
15
  declare const SendEmailResultSchema: z.ZodObject<{
15
16
  messageId: z.ZodString;
@@ -40,6 +41,7 @@ export declare const smtpProviderCapability: {
40
41
  subject: z.ZodString;
41
42
  text: z.ZodString;
42
43
  html: z.ZodOptional<z.ZodString>;
44
+ images: z.ZodOptional<z.ZodArray<z.ZodType<import("../index.js").EmailImagePart, unknown, z.core.$ZodTypeInternals<import("../index.js").EmailImagePart, unknown>>>>;
43
45
  }, z.core.$strip>, z.ZodObject<{
44
46
  messageId: z.ZodString;
45
47
  accepted: z.ZodDefault<z.ZodArray<z.ZodEmail>>;
@@ -24,6 +24,11 @@ export declare const switchCapability: {
24
24
  deviceId: z.ZodNumber;
25
25
  on: z.ZodBoolean;
26
26
  }, z.core.$strip>, z.ZodVoid, "mutation">;
27
+ readonly toggle: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
28
+ deviceId: z.ZodNumber;
29
+ }, z.core.$strip>, z.ZodVoid, "mutation"> & {
30
+ readonly providerOptional: true;
31
+ };
27
32
  };
28
33
  readonly events: {
29
34
  readonly onStateChanged: {
package/dist/client.js CHANGED
@@ -24907,6 +24907,13 @@ var NcHistoryEntrySchema = zod.z.object({
24907
24907
  error: zod.z.string().optional(),
24908
24908
  subject: NcHistorySubjectSchema,
24909
24909
  /**
24910
+ * The title and body actually sent, frozen at delivery. Absent on a row
24911
+ * still pending, a row suppressed before a notification was built, and a
24912
+ * row delivered before this field shipped.
24913
+ */
24914
+ title: zod.z.string().optional(),
24915
+ body: zod.z.string().optional(),
24916
+ /**
24910
24917
  * Ids of the artefacts (still, then gif, then clip) this row's successful
24911
24918
  * delivery indexed in the artefact library — a REFERENCE, never the bytes
24912
24919
  * (an artefact is often megabytes; this row is durable JSON rewritten on
@@ -28027,6 +28034,7 @@ function createDeviceProxy(api, binding, opts) {
28027
28034
  const streamSignalsInterface = { listSignals: (input) => dispatch("stream-signals", "streamSignals", "listSignals", "query", input) };
28028
28035
  const switchInterface = {
28029
28036
  setState: (input) => dispatch("switch", "switch", "setState", "mutation", input),
28037
+ toggle: (input) => dispatch("switch", "switch", "toggle", "mutation", input),
28030
28038
  getStatus: (input) => dispatch("switch", "switch", "getStatus", "query", input)
28031
28039
  };
28032
28040
  const tamperInterface = { getStatus: (input) => dispatch("tamper", "tamper", "getStatus", "query", input) };
@@ -31633,6 +31641,28 @@ var STATE_SUMMARY_VARS = [
31633
31641
  systemEventKinds: [...SUMMARISABLE],
31634
31642
  systemEventDeliveries: ["summary"]
31635
31643
  },
31644
+ {
31645
+ name: "offlineCount",
31646
+ label: "Summary: how many went offline",
31647
+ example: "2",
31648
+ group: "system",
31649
+ families: ["rule"],
31650
+ fields: [...RULE_TEXT],
31651
+ kinds: ["system"],
31652
+ systemEventKinds: [...SUMMARISABLE],
31653
+ systemEventDeliveries: ["summary"]
31654
+ },
31655
+ {
31656
+ name: "onlineCount",
31657
+ label: "Summary: how many came back",
31658
+ example: "5",
31659
+ group: "system",
31660
+ families: ["rule"],
31661
+ fields: [...RULE_TEXT],
31662
+ kinds: ["system"],
31663
+ systemEventKinds: [...SUMMARISABLE],
31664
+ systemEventDeliveries: ["summary"]
31665
+ },
31636
31666
  {
31637
31667
  name: "summaryCount",
31638
31668
  label: "Summary: items reported",
@@ -31723,6 +31753,21 @@ var NC_TEMPLATE_VARS = [
31723
31753
  kinds: ["detection", "system"],
31724
31754
  systemEventKinds: [...COMBINED_ALARM]
31725
31755
  },
31756
+ {
31757
+ name: "headline",
31758
+ label: "Subject and place",
31759
+ description: "The default detection title: the label when one is set, otherwise the translated class, then the zone or the device. The subject alone when neither place is known.",
31760
+ example: "Persona — Uscio",
31761
+ group: "subject",
31762
+ families: ["rule"],
31763
+ fields: [...RULE_TEXT],
31764
+ kinds: [
31765
+ "detection",
31766
+ "occupancy",
31767
+ "sound",
31768
+ "sensor"
31769
+ ]
31770
+ },
31726
31771
  {
31727
31772
  name: "subject",
31728
31773
  label: "Subject sentence",
@@ -32017,7 +32062,7 @@ var NC_TEMPLATE_VARS = [
32017
32062
  families: ["rule"],
32018
32063
  fields: [...RULE_TEXT],
32019
32064
  kinds: ["system"],
32020
- systemEventKinds: ["device-command"]
32065
+ systemEventKinds: ["device-command", "alarm-disarmed"]
32021
32066
  },
32022
32067
  {
32023
32068
  name: "deviceLabel",
package/dist/client.mjs CHANGED
@@ -24906,6 +24906,13 @@ var NcHistoryEntrySchema = z.object({
24906
24906
  error: z.string().optional(),
24907
24907
  subject: NcHistorySubjectSchema,
24908
24908
  /**
24909
+ * The title and body actually sent, frozen at delivery. Absent on a row
24910
+ * still pending, a row suppressed before a notification was built, and a
24911
+ * row delivered before this field shipped.
24912
+ */
24913
+ title: z.string().optional(),
24914
+ body: z.string().optional(),
24915
+ /**
24909
24916
  * Ids of the artefacts (still, then gif, then clip) this row's successful
24910
24917
  * delivery indexed in the artefact library — a REFERENCE, never the bytes
24911
24918
  * (an artefact is often megabytes; this row is durable JSON rewritten on
@@ -28026,6 +28033,7 @@ function createDeviceProxy(api, binding, opts) {
28026
28033
  const streamSignalsInterface = { listSignals: (input) => dispatch("stream-signals", "streamSignals", "listSignals", "query", input) };
28027
28034
  const switchInterface = {
28028
28035
  setState: (input) => dispatch("switch", "switch", "setState", "mutation", input),
28036
+ toggle: (input) => dispatch("switch", "switch", "toggle", "mutation", input),
28029
28037
  getStatus: (input) => dispatch("switch", "switch", "getStatus", "query", input)
28030
28038
  };
28031
28039
  const tamperInterface = { getStatus: (input) => dispatch("tamper", "tamper", "getStatus", "query", input) };
@@ -31632,6 +31640,28 @@ var STATE_SUMMARY_VARS = [
31632
31640
  systemEventKinds: [...SUMMARISABLE],
31633
31641
  systemEventDeliveries: ["summary"]
31634
31642
  },
31643
+ {
31644
+ name: "offlineCount",
31645
+ label: "Summary: how many went offline",
31646
+ example: "2",
31647
+ group: "system",
31648
+ families: ["rule"],
31649
+ fields: [...RULE_TEXT],
31650
+ kinds: ["system"],
31651
+ systemEventKinds: [...SUMMARISABLE],
31652
+ systemEventDeliveries: ["summary"]
31653
+ },
31654
+ {
31655
+ name: "onlineCount",
31656
+ label: "Summary: how many came back",
31657
+ example: "5",
31658
+ group: "system",
31659
+ families: ["rule"],
31660
+ fields: [...RULE_TEXT],
31661
+ kinds: ["system"],
31662
+ systemEventKinds: [...SUMMARISABLE],
31663
+ systemEventDeliveries: ["summary"]
31664
+ },
31635
31665
  {
31636
31666
  name: "summaryCount",
31637
31667
  label: "Summary: items reported",
@@ -31722,6 +31752,21 @@ var NC_TEMPLATE_VARS = [
31722
31752
  kinds: ["detection", "system"],
31723
31753
  systemEventKinds: [...COMBINED_ALARM]
31724
31754
  },
31755
+ {
31756
+ name: "headline",
31757
+ label: "Subject and place",
31758
+ description: "The default detection title: the label when one is set, otherwise the translated class, then the zone or the device. The subject alone when neither place is known.",
31759
+ example: "Persona — Uscio",
31760
+ group: "subject",
31761
+ families: ["rule"],
31762
+ fields: [...RULE_TEXT],
31763
+ kinds: [
31764
+ "detection",
31765
+ "occupancy",
31766
+ "sound",
31767
+ "sensor"
31768
+ ]
31769
+ },
31725
31770
  {
31726
31771
  name: "subject",
31727
31772
  label: "Subject sentence",
@@ -32016,7 +32061,7 @@ var NC_TEMPLATE_VARS = [
32016
32061
  families: ["rule"],
32017
32062
  fields: [...RULE_TEXT],
32018
32063
  kinds: ["system"],
32019
- systemEventKinds: ["device-command"]
32064
+ systemEventKinds: ["device-command", "alarm-disarmed"]
32020
32065
  },
32021
32066
  {
32022
32067
  name: "deviceLabel",
@@ -3,7 +3,7 @@
3
3
  * device and WATCH it for, in one cap-keyed map generated from the caps (D1050).
4
4
  */
5
5
  export type { ResolvedBooleanTrigger, ResolvedEnumTrigger, ResolvedEnumValue, ResolvedEventTrigger, ResolvedNumericTrigger, ResolvedValueTrigger, ResolvedVocabAction, ResolvedVocabTrigger, VocabBindingsInput, } from './resolve.js';
6
- export { actionsForDevice, renderVocabPhrase, triggersForDevice, } from './resolve.js';
6
+ export { actionsForDevice, deviceOffersActions, renderVocabPhrase, triggersForDevice, } from './resolve.js';
7
7
  export type { ActionEffect, IndexedVocabAction, VocabActionRefusal, VocabCall, } from './action-index.js';
8
8
  export { actionEffect, allVocabActions, assertDeviceOffers, findVocabAction, VocabActionError, vocabActionIdFor, vocabCall, } from './action-index.js';
9
9
  export type { CommandEffect } from './command-catalog.js';
@@ -92,6 +92,12 @@ export declare function renderVocabPhrase(phrase: L10n, locale: VocabLocale, val
92
92
  * METHOD_ACCESS_MAP, or a read) is dropped.
93
93
  */
94
94
  export declare function actionsForDevice(bindings: VocabBindingsInput, deviceType?: string, role?: string | null): readonly ResolvedVocabAction[];
95
+ /**
96
+ * Whether a device offers the vocabulary actions, with the same `any` / `all`
97
+ * rule a cap require uses. An empty list passes. This is the one check the
98
+ * device search and the command picker share.
99
+ */
100
+ export declare function deviceOffersActions(bindings: VocabBindingsInput, actionIds: readonly string[], mode?: 'any' | 'all', deviceType?: string): boolean;
95
101
  /**
96
102
  * The triggers a device can be watched for — its state fields, then the bus
97
103
  * events it emits — phrased for its type and role.
@@ -10665,6 +10665,13 @@ export type AppRouter = TrpcCoreRouter<{
10665
10665
  output: z.infer<typeof switchCapability.methods.setState.output>;
10666
10666
  meta: object;
10667
10667
  }>;
10668
+ toggle: TRPCMutationProcedure<{
10669
+ input: {
10670
+ [x: string]: unknown;
10671
+ } & z.input<typeof switchCapability.methods.toggle.input>;
10672
+ output: z.infer<typeof switchCapability.methods.toggle.output>;
10673
+ meta: object;
10674
+ }>;
10668
10675
  }>>;
10669
10676
  system: TRPCBuiltRouter<{
10670
10677
  ctx: TrpcContext;
@@ -21,7 +21,7 @@ export declare function isCollectionArrayMethodName(capName: string, method: str
21
21
  * Per capability, the methods declared `optionalMethod` — the ones whose
22
22
  * ABSENCE on a provider is a fact about that provider, not a bug.
23
23
  *
24
- * Coverage: 10 caps, 44 methods.
24
+ * Coverage: 11 caps, 45 methods.
25
25
  */
26
26
  export declare const PROVIDER_OPTIONAL_METHODS: Readonly<Record<string, readonly string[]>>;
27
27
  /**
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 1486 method paths across 206 capabilities.
9
+ * Coverage: 1487 method paths across 206 capabilities.
10
10
  */
11
11
  import type { MethodRole } from '../auth/viewer-access.js';
12
12
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
@@ -6,8 +6,8 @@
6
6
  * system-scope cap that takes a deviceId was previously never device-filtered
7
7
  * — see the generator header).
8
8
  *
9
- * Coverage: 615 methods carry a device reference, of which
10
- * 195 are on SYSTEM-scope caps.
9
+ * Coverage: 617 methods carry a device reference, of which
10
+ * 196 are on SYSTEM-scope caps.
11
11
  *
12
12
  * Top-level fields, number arrays, and one-level arrays of objects carrying
13
13
  * a numeric device field (targets[].deviceId) are all mapped; the matcher
package/dist/index.d.ts CHANGED
@@ -267,7 +267,7 @@ export { DEVICE_TYPE_CONTROL_KIND, hasMotionTrigger, isNode, MOTION_TRIGGER_FEAT
267
267
  export * from './device/hero/index.js';
268
268
  export { isDoPickerDeviceType } from './device/device-do-actions.js';
269
269
  export type { CapVocabularyEntry, CapVocabularyMap, L10n as VocabL10n, ActionEffect, CommandEffect, IndexedVocabAction, VocabActionRefusal, VocabCall, LooseCapVocabularyEntry, LooseVocabEffect, LooseVocabOffer, LooseVocabOpenArg, ResolvedBooleanTrigger, ResolvedEnumTrigger, ResolvedEnumValue, ResolvedEventTrigger, ResolvedNumericTrigger, ResolvedValueTrigger, ResolvedVocabAction, ResolvedVocabTrigger, VocabBindingsInput, VocabCapName, VocabLocale, CapVocabularyDecl, DeviceCapVocabularyDecl, EventVocabularyDecl, LooseMethodActionDecl, MethodActionArgs, MethodActionDecl, MethodActionEffect, MethodActionOpenArg, SystemCapVocabularyDecl, } from './device/cap-vocabulary/index.js';
270
- export { actionEffect, actionsForDevice as vocabularyActionsForDevice, allVocabActions, auditedFields, CAP_VOCABULARY, CAP_VOCABULARY_BY_NAME, commandEffect, findVocabAction, isCommand, renderVocabPhrase, triggersForDevice as vocabularyTriggersForDevice, VOCAB_TEMPLATES, vocabActionIdFor, vocabCall, VocabActionError, assertDeviceOffers, NOT_A_DEVICE, } from './device/cap-vocabulary/index.js';
270
+ export { actionEffect, actionsForDevice as vocabularyActionsForDevice, deviceOffersActions, allVocabActions, auditedFields, CAP_VOCABULARY, CAP_VOCABULARY_BY_NAME, commandEffect, findVocabAction, isCommand, renderVocabPhrase, triggersForDevice as vocabularyTriggersForDevice, VOCAB_TEMPLATES, vocabActionIdFor, vocabCall, VocabActionError, assertDeviceOffers, NOT_A_DEVICE, } from './device/cap-vocabulary/index.js';
271
271
  export type { ChildLayout, ChildLayoutEntry, CreateDeviceSpec, DeviceCapDisplayOverride, DeviceDiscovery, DeviceDisplayOverride, DeviceManualCreation, DeviceMeta, DiscoveredDevice, InitialDeviceMeta, RoleDisplayDefault, SavedDevice, } from './device/device-management.js';
272
272
  export type { DeviceProfile, DeviceProfileDefaults, DeviceProfileMatch, PipelinePhaseMode, } from './device/device-profile.js';
273
273
  export { BATTERY_DEVICE_PROFILE, DEVICE_PROFILES, deviceMatchesProfile, resolveDeviceProfile, } from './device/device-profile.js';
@@ -363,6 +363,8 @@ export { AUDIO_SCALE_EPOCH_ISO, AUDIO_SCALE_EPOCH_MS, type AudioScaleEra, audioS
363
363
  export { audioIsFailClosed, audioKindId, audioLabelChoices, audioModeOf, audioOrDefaults, isAudioLabelSelected, NC_AUDIO_CONFIRM_HITS_DEFAULT, NC_AUDIO_CONFIRM_HITS_MAX, NC_AUDIO_CONFIRM_HITS_MIN, NC_AUDIO_CONFIRM_WINDOW_MAX_SEC, NC_AUDIO_CONFIRM_WINDOW_MIN_SEC, NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, NC_AUDIO_DB_MAX, NC_AUDIO_DB_MIN, NC_AUDIO_DB_OFFERED, NC_AUDIO_DB_STEP, NC_AUDIO_DEFAULTS, NC_AUDIO_HIT_PERCENT_MAX, NC_AUDIO_HIT_PERCENT_MIN, NC_AUDIO_SAMPLING_MAX_SEC, NC_AUDIO_SAMPLING_MIN_SEC, type NcAudioLabelChoice, type NcAudioMode, type NcAudioPatch, normalizeAudioLabel, patchAudio, toggleAudioLabel, } from './notification/audio-condition.js';
364
364
  export { isAudioClassName, isBaseConditionKey, knownValues, NC_BASE_CONDITION_KEYS, type NcBaseConditionKey, pickerForCondition, pickerForRuleClasses, type TaxonomyGroup, type TaxonomyOption, type TaxonomyPicker, } from './notification/condition-taxonomy.js';
365
365
  export { type PreparedAction, type PreparedAttachment, type PreparedNotification, prepareNotification, type ResolvedLevel, } from './notification/degrade-engine.js';
366
+ export { assembleEmailMime, type EmailImageDropped, type OpenEmailImage, type OutboundEmail, materializeEmailImages, } from './notification/email-image-bytes.js';
367
+ export { EMAIL_IMAGE_MAX_COUNT, EMAIL_IMAGE_MAX_TOTAL_BYTES, EMAIL_IMAGE_SLOT, EmailImagePartSchema, type EmailImagePart, type EmailMimeImage, type RawMimeInput, buildRawMime, } from './notification/email-mime.js';
366
368
  export { isRootRelativeUrl, type PublicEndpointReader, type PublicEndpointReading, type PublicEndpointSource, publicEndpointReaderFrom, type ResolveAttachmentUrlsDeps, resolveAttachmentUrls, } from './notification/attachment-url.js';
367
369
  export { deliveryParamsDeclaredBy, resolveDeliveryParams } from './notification/delivery-params.js';
368
370
  export { attachmentKindsOf, deliverableFields, fieldSupportForTargets, NOTIFICATION_FIELDS, priorityLevelsOf, targetAttachmentAllows, type NotificationFieldSupport, type NotificationFieldTarget, sanitizeTargetOverride, } from './notification/notification-fields.js';