@camstack/types 1.2.588 → 1.2.589
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 +7 -0
- package/dist/addon.js +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/capabilities/alarm-panel.cap.d.ts +15 -7
- package/dist/capabilities/capability-definition.d.ts +12 -0
- package/dist/capabilities/lock-control.cap.d.ts +5 -2
- package/dist/client.js +10 -7
- package/dist/client.mjs +10 -7
- package/dist/{composed-stable-id-CVbyajE5.js → composed-stable-id-DDv-Og0u.js} +0 -5
- package/dist/{composed-stable-id-BBL71oUQ.mjs → composed-stable-id-Kt5VKzGZ.mjs} +0 -5
- package/dist/device/device-feature-requirements.d.ts +0 -2
- package/dist/device/device-type.d.ts +0 -5
- package/dist/generated/addon-api.d.ts +76 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/runtime-state-durability.d.ts +5 -0
- package/dist/{implemented-methods-u7ddjc-_.mjs → implemented-methods-BiV3Y-40.mjs} +1 -1
- package/dist/{implemented-methods-ChtdIofW.js → implemented-methods-CbdShcW1.js} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +108 -19
- package/dist/index.mjs +100 -20
- package/dist/node.js +2 -2
- package/dist/node.mjs +2 -2
- package/dist/schemas/api-catalog.d.ts +170 -0
- package/dist/{sleep-D6Pih0Qt.mjs → sleep-CFN40XWx.mjs} +5 -2
- package/dist/{sleep-CsZJsb8n.js → sleep-CICYFVJf.js} +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.589] - 2026-11-17
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Locks and alarm panels report whether a PIN is needed in one state field, codeRequired (unknown = null); the lock-pin-required / alarm-pin-required device features are gone.
|
|
15
|
+
- New API catalogue schemas (ApiCatalogEntry, ApiCatalogListOutput, ApiCatalogInputSchemaOutput) for the API explorer.
|
|
16
|
+
|
|
10
17
|
## [1.2.588] - 2026-11-17
|
|
11
18
|
|
|
12
19
|
### Changed
|
package/dist/addon.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-CICYFVJf.js");
|
|
3
3
|
const require_event_category = require("./event-category-CE_VCE2G.js");
|
|
4
|
-
const require_composed_stable_id = require("./composed-stable-id-
|
|
4
|
+
const require_composed_stable_id = require("./composed-stable-id-DDv-Og0u.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
|
6
6
|
/**
|
|
7
7
|
* AUTO-GENERATED by scripts/generate-cap-input-defaults.ts — DO NOT EDIT.
|
package/dist/addon.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as PipelineStepInputSchema, $n as StoredRecordKindDeclarationSchema, $r as REMOVE_LEAF, A as CAP_ADVANCE_FIELDS, An as clearKnownSecrets, Ar as normalizeAddonInitResult, At as createDebugEmitter, B as describeCustomActions, Bi as RecordNotFoundError, Br as SCOPED_SETTINGS_SCOPES, Ca as makeSecretMarker, Ci as buildSecretRef, Cn as makeInMemoryRecords, Di as normalizeSecretOwner, Dn as REVALIDATE_AFTER_MS, Dr as BaseAddon, Ei as isSecretRef, En as resolveSecretViewsIn, F as isCapMethodAbsent, Fi as ForeignSecretMarkerError, Fn as shortSecretRefHash, G as nodePin, Gi as RevConflictError, Gn as defineEntryKind, Hi as RecordTooLargeError, Hn as DATAPLANE_SECRET_HEADER, Hr as resolveDeviceSettings, I as CALLER_STAMPED_CAPABILITIES, Ii as InvalidRecordError, In as PEER_BYTES_CHUNK_BYTES, Ji as UnknownRecordKindError, Jn as RecordFieldPathSchema, K as readCommandOrigin, Ki as TransactRefusedError, Kn as entryBody, L as withoutCallerStamp, Li as NoCallerError, Ln as PEER_BYTES_MAX_OUTSTANDING, Ma as AddonMigrationsBlockedError, Mi as BatchTooLargeError, Mn as knownSecretCount, N as CAP_STATE_LEAVES, Na as findMigrationsBlocked, Ni as DeclarationRefusedError, Nn as registerKnownSecret, O as HF_REPO, Oi as parseSecretRef, On as createSecretsAccess, P as CAP_METHOD_NOT_IMPLEMENTED, Pi as FilterRequiredError, Pn as scrubKnownSecrets, Q as PipelineRunResultBridge, Qn as RecordRetentionSchema, Qr as secretViewsOf, R as customAction, Ri as PlaintextSecretError, Rn as PEER_BYTES_STALL_MS, Sa as isSecretMarkerLike, Si as arrayItemFieldPath, Sn as ruleFireOfClaim, Sr as ErrorI18nPayloadSchema, St as scopeKey, T as isCommand, Ti as globalSecretScope, Tn as assertTransactScope, Tr as readErrorI18n, Ui as RecordUniqueViolationError, Ur as resolvedValues, Vi as RecordSecretUnavailableError, Vn as CALLER_USERNAME_HEADER, Vr as nodeIdOfScopedKey, W as commandOrigin, Wi as RecordsError, Wn as DisposerChain, X as SWITCH_SETTABLE_GATE, Xi as recordsErrorFromMessage, Xn as RecordKindDeclarationSchema, Y as viewerUiCapability, Yi as asRecordsError, Yn as RecordIndexSchema, Z as switchRefusesSetState, Zn as RecordKindNameSchema, _a as SECRET_CLEAR, _i as RECORD_QUERY_MAX, _t as MODEL_FORMATS, ai as recordSecretRef, ar as isZodSecret, ba as isSecretFieldView, bi as RECORD_SWEEP_INTERVAL_MS, bn as OnBehalfSourceSchema, c as asString, ci as RECORD_BATCH_MAX_BYTES, d as parseJsonUnknown, di as RECORD_DEFAULT_MAX_DATA_BYTES, ei as collectSecretLeaves, er as assertValidDeclaration, et as MIGRATION_API_VERSION, f as hfModelUrl, fi as RECORD_DELETE_BATCH, g as createDeviceProxy, gi as RECORD_MAX_INDEX_FIELDS, h as isDeviceScopedCap, hi as RECORD_MAX_INDEXES, ii as recordSecretCollection, ir as collectZodSecretPaths, it as adminUiCapability, j as CAP_METHOD_TIMEOUTS_MS, jn as forgetKnownSecret, kn as MIN_SCRUBBED_LENGTH, li as RECORD_CLASSES, m as DEVICE_SCOPED_CAPS, mi as RECORD_MAX_DATA_BYTES, ni as parseSecretPath, nr as defineRecordKinds, nt as deviceOpsCapability, o as asJsonObject, oa as createEvent, oi as secretArrayPrefixes, ot as addonPagesSourceCapability, p as BOOT_RECOVERY_BACKOFF_MS, pi as RECORD_ID_MAX_LENGTH, pr as expandCapMethods, q as readNodePin, qi as UnindexedFilterError, qn as EntryDescriptorSchema, r as maskUrlCredentials, ri as recordArrayItemPath, rt as DEVICE_CHILDREN_BATCH_MAX, sa as emitReadiness, si as RECORD_BATCH_MAX, t as sleep, ti as mapSecretLeaves, tr as declarationsOf, ui as RECORD_DATABASES, v as addonSliceHandleApi, va as classifySecretWrite, vi as RECORD_SECRET_COLLECTION_PREFIX, vn as CommandOriginClaimSchema, vt as ReadinessRegistry, wa as toSecretFieldView, wi as formatSecretScope, wn as createRecordsAccess, xa as isSecretMarker, xi as SECRET_REF_SCHEME, xn as RuleFireOriginSchema, y as createEventBusSliceSource, ya as isSecretClear, yi as RECORD_SETTINGS_MAX_ROWS, yn as OnBehalfSchema, yt as ReadinessTimeoutError, z as defineCustomActions, zi as RECORDS_ERROR_CODES, zn as PEER_BYTES_TICKET_TTL_MS } from "./sleep-
|
|
1
|
+
import { $ as PipelineStepInputSchema, $n as StoredRecordKindDeclarationSchema, $r as REMOVE_LEAF, A as CAP_ADVANCE_FIELDS, An as clearKnownSecrets, Ar as normalizeAddonInitResult, At as createDebugEmitter, B as describeCustomActions, Bi as RecordNotFoundError, Br as SCOPED_SETTINGS_SCOPES, Ca as makeSecretMarker, Ci as buildSecretRef, Cn as makeInMemoryRecords, Di as normalizeSecretOwner, Dn as REVALIDATE_AFTER_MS, Dr as BaseAddon, Ei as isSecretRef, En as resolveSecretViewsIn, F as isCapMethodAbsent, Fi as ForeignSecretMarkerError, Fn as shortSecretRefHash, G as nodePin, Gi as RevConflictError, Gn as defineEntryKind, Hi as RecordTooLargeError, Hn as DATAPLANE_SECRET_HEADER, Hr as resolveDeviceSettings, I as CALLER_STAMPED_CAPABILITIES, Ii as InvalidRecordError, In as PEER_BYTES_CHUNK_BYTES, Ji as UnknownRecordKindError, Jn as RecordFieldPathSchema, K as readCommandOrigin, Ki as TransactRefusedError, Kn as entryBody, L as withoutCallerStamp, Li as NoCallerError, Ln as PEER_BYTES_MAX_OUTSTANDING, Ma as AddonMigrationsBlockedError, Mi as BatchTooLargeError, Mn as knownSecretCount, N as CAP_STATE_LEAVES, Na as findMigrationsBlocked, Ni as DeclarationRefusedError, Nn as registerKnownSecret, O as HF_REPO, Oi as parseSecretRef, On as createSecretsAccess, P as CAP_METHOD_NOT_IMPLEMENTED, Pi as FilterRequiredError, Pn as scrubKnownSecrets, Q as PipelineRunResultBridge, Qn as RecordRetentionSchema, Qr as secretViewsOf, R as customAction, Ri as PlaintextSecretError, Rn as PEER_BYTES_STALL_MS, Sa as isSecretMarkerLike, Si as arrayItemFieldPath, Sn as ruleFireOfClaim, Sr as ErrorI18nPayloadSchema, St as scopeKey, T as isCommand, Ti as globalSecretScope, Tn as assertTransactScope, Tr as readErrorI18n, Ui as RecordUniqueViolationError, Ur as resolvedValues, Vi as RecordSecretUnavailableError, Vn as CALLER_USERNAME_HEADER, Vr as nodeIdOfScopedKey, W as commandOrigin, Wi as RecordsError, Wn as DisposerChain, X as SWITCH_SETTABLE_GATE, Xi as recordsErrorFromMessage, Xn as RecordKindDeclarationSchema, Y as viewerUiCapability, Yi as asRecordsError, Yn as RecordIndexSchema, Z as switchRefusesSetState, Zn as RecordKindNameSchema, _a as SECRET_CLEAR, _i as RECORD_QUERY_MAX, _t as MODEL_FORMATS, ai as recordSecretRef, ar as isZodSecret, ba as isSecretFieldView, bi as RECORD_SWEEP_INTERVAL_MS, bn as OnBehalfSourceSchema, c as asString, ci as RECORD_BATCH_MAX_BYTES, d as parseJsonUnknown, di as RECORD_DEFAULT_MAX_DATA_BYTES, ei as collectSecretLeaves, er as assertValidDeclaration, et as MIGRATION_API_VERSION, f as hfModelUrl, fi as RECORD_DELETE_BATCH, g as createDeviceProxy, gi as RECORD_MAX_INDEX_FIELDS, h as isDeviceScopedCap, hi as RECORD_MAX_INDEXES, ii as recordSecretCollection, ir as collectZodSecretPaths, it as adminUiCapability, j as CAP_METHOD_TIMEOUTS_MS, jn as forgetKnownSecret, kn as MIN_SCRUBBED_LENGTH, li as RECORD_CLASSES, m as DEVICE_SCOPED_CAPS, mi as RECORD_MAX_DATA_BYTES, ni as parseSecretPath, nr as defineRecordKinds, nt as deviceOpsCapability, o as asJsonObject, oa as createEvent, oi as secretArrayPrefixes, ot as addonPagesSourceCapability, p as BOOT_RECOVERY_BACKOFF_MS, pi as RECORD_ID_MAX_LENGTH, pr as expandCapMethods, q as readNodePin, qi as UnindexedFilterError, qn as EntryDescriptorSchema, r as maskUrlCredentials, ri as recordArrayItemPath, rt as DEVICE_CHILDREN_BATCH_MAX, sa as emitReadiness, si as RECORD_BATCH_MAX, t as sleep, ti as mapSecretLeaves, tr as declarationsOf, ui as RECORD_DATABASES, v as addonSliceHandleApi, va as classifySecretWrite, vi as RECORD_SECRET_COLLECTION_PREFIX, vn as CommandOriginClaimSchema, vt as ReadinessRegistry, wa as toSecretFieldView, wi as formatSecretScope, wn as createRecordsAccess, xa as isSecretMarker, xi as SECRET_REF_SCHEME, xn as RuleFireOriginSchema, y as createEventBusSliceSource, ya as isSecretClear, yi as RECORD_SETTINGS_MAX_ROWS, yn as OnBehalfSchema, yt as ReadinessTimeoutError, z as defineCustomActions, zi as RECORDS_ERROR_CODES, zn as PEER_BYTES_TICKET_TTL_MS } from "./sleep-CFN40XWx.mjs";
|
|
2
2
|
import { t as EventCategory } from "./event-category-Hwx_JSCU.mjs";
|
|
3
|
-
import { a as DeviceType, s as errMsg, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-
|
|
3
|
+
import { a as DeviceType, s as errMsg, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-Kt5VKzGZ.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
5
5
|
/**
|
|
6
6
|
* AUTO-GENERATED by scripts/generate-cap-input-defaults.ts — DO NOT EDIT.
|
|
@@ -10,9 +10,8 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
10
10
|
* Many panels require a PIN code on arm / disarm — the optional
|
|
11
11
|
* `code` field on the methods passes it through to the upstream
|
|
12
12
|
* service; it's NEVER persisted in the runtime slice or any event
|
|
13
|
-
* payload.
|
|
14
|
-
* `
|
|
15
|
-
* field without a slice fetch.
|
|
13
|
+
* payload. Whether a code is required is the slice's `codeRequired`
|
|
14
|
+
* (#459): `null` when the provider cannot tell (D393).
|
|
16
15
|
*
|
|
17
16
|
* `availableModes` mirrors HA's `supported_features`-derived arm
|
|
18
17
|
* mode list — the UI renders only the buttons the panel accepts.
|
|
@@ -65,7 +64,7 @@ export declare const AlarmPanelStatusSchema: z.ZodObject<{
|
|
|
65
64
|
night: "night";
|
|
66
65
|
vacation: "vacation";
|
|
67
66
|
}>>;
|
|
68
|
-
|
|
67
|
+
codeRequired: z.ZodNullable<z.ZodBoolean>;
|
|
69
68
|
lastChangedAt: z.ZodNumber;
|
|
70
69
|
}, z.core.$strip>;
|
|
71
70
|
export type AlarmPanelStatus = z.infer<typeof AlarmPanelStatusSchema>;
|
|
@@ -130,7 +129,7 @@ export declare const alarmPanelCapability: {
|
|
|
130
129
|
night: "night";
|
|
131
130
|
vacation: "vacation";
|
|
132
131
|
}>>;
|
|
133
|
-
|
|
132
|
+
codeRequired: z.ZodNullable<z.ZodBoolean>;
|
|
134
133
|
lastChangedAt: z.ZodNumber;
|
|
135
134
|
}, z.core.$strip>;
|
|
136
135
|
readonly kind: 'push';
|
|
@@ -138,7 +137,7 @@ export declare const alarmPanelCapability: {
|
|
|
138
137
|
/**
|
|
139
138
|
* Runtime-state slice — mirrored by the kernel. UI panel reads the
|
|
140
139
|
* full slice; renders an arm button per `availableModes` entry and
|
|
141
|
-
* a PIN field iff `
|
|
140
|
+
* a PIN field iff `codeRequired === true`.
|
|
142
141
|
*/
|
|
143
142
|
readonly runtimeState: z.ZodObject<{
|
|
144
143
|
state: z.ZodEnum<{
|
|
@@ -167,7 +166,7 @@ export declare const alarmPanelCapability: {
|
|
|
167
166
|
night: "night";
|
|
168
167
|
vacation: "vacation";
|
|
169
168
|
}>>;
|
|
170
|
-
|
|
169
|
+
codeRequired: z.ZodNullable<z.ZodBoolean>;
|
|
171
170
|
lastChangedAt: z.ZodNumber;
|
|
172
171
|
}, z.core.$strip>;
|
|
173
172
|
/**
|
|
@@ -177,6 +176,15 @@ export declare const alarmPanelCapability: {
|
|
|
177
176
|
* `scripts/check-runtime-state-durability.ts`.
|
|
178
177
|
*/
|
|
179
178
|
readonly durability: 'restored';
|
|
179
|
+
/**
|
|
180
|
+
* A slice persisted before #459 carries `requiresCode`; the boot seed reads it
|
|
181
|
+
* once into `codeRequired` (`restoredPart`), so no reader meets the old key,
|
|
182
|
+
* and rewrites the row once without it (`seedMirrorFromRow`) — so this entry
|
|
183
|
+
* can be dropped after every node has booted once on a release that has it.
|
|
184
|
+
*/
|
|
185
|
+
readonly restoredFieldRenames: {
|
|
186
|
+
readonly requiresCode: 'codeRequired';
|
|
187
|
+
};
|
|
180
188
|
/**
|
|
181
189
|
* History (D850): the panel's lifecycle state as an `enum` series —
|
|
182
190
|
* change-only, no floor, so an `arming -> pending -> triggered` sequence of a
|
|
@@ -738,6 +738,18 @@ export interface CapabilityDefinition<TName extends string = string, TMethods ex
|
|
|
738
738
|
* `runtimeState` (`scripts/check-runtime-state-durability.ts`).
|
|
739
739
|
*/
|
|
740
740
|
readonly restoredStateFields?: readonly string[];
|
|
741
|
+
/**
|
|
742
|
+
* Renamed runtime-state fields of a `durability: 'restored'` cap, `{ old: new }`.
|
|
743
|
+
* A row persisted before the rename still carries the old key: the boot seed
|
|
744
|
+
* reads it ONCE into the new name (when the new one is absent) and drops it, so
|
|
745
|
+
* no reader ever meets the old key, and the worker that loads the row is handed
|
|
746
|
+
* it under the new name too. The upgraded row is then REWRITTEN once
|
|
747
|
+
* (`seedMirrorFromRow`), so the old key leaves the disk: an entry can be
|
|
748
|
+
* retired after every node has booted once on the release that added it.
|
|
749
|
+
* Requires `durability: 'restored'`; every target must be a field of
|
|
750
|
+
* `runtimeState`.
|
|
751
|
+
*/
|
|
752
|
+
readonly restoredFieldRenames?: Readonly<Record<string, string>>;
|
|
741
753
|
/**
|
|
742
754
|
* Which `runtimeState` fields are recorded as long-term history series
|
|
743
755
|
* (D850), or `'none'`. Mandatory for every cap declaring `runtimeState` —
|
|
@@ -12,8 +12,8 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
12
12
|
* (workplace keypad locks, hospitality). The optional `code` field
|
|
13
13
|
* on the methods passes it through to the upstream service — the
|
|
14
14
|
* code is NEVER persisted in the runtime slice or any event payload.
|
|
15
|
-
*
|
|
16
|
-
* the
|
|
15
|
+
* Whether a lock REQUIRES a code is the slice's `codeRequired` (#459):
|
|
16
|
+
* `true` / `false` when the provider knows, `null` when it does not (D393).
|
|
17
17
|
*
|
|
18
18
|
* Locks that support a latch-release ("open door") action advertise
|
|
19
19
|
* `DeviceFeature.LockOpen`. The `open` method triggers the latch
|
|
@@ -48,6 +48,7 @@ export declare const LockControlStatusSchema: z.ZodObject<{
|
|
|
48
48
|
unlocked: "unlocked";
|
|
49
49
|
unlocking: "unlocking";
|
|
50
50
|
}>;
|
|
51
|
+
codeRequired: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
51
52
|
lastChangedAt: z.ZodNumber;
|
|
52
53
|
}, z.core.$strip>;
|
|
53
54
|
export type LockControlStatus = z.infer<typeof LockControlStatusSchema>;
|
|
@@ -83,6 +84,7 @@ export declare const lockControlCapability: {
|
|
|
83
84
|
unlocked: "unlocked";
|
|
84
85
|
unlocking: "unlocking";
|
|
85
86
|
}>;
|
|
87
|
+
codeRequired: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
86
88
|
lastChangedAt: z.ZodNumber;
|
|
87
89
|
}, z.core.$strip>;
|
|
88
90
|
readonly kind: 'push';
|
|
@@ -101,6 +103,7 @@ export declare const lockControlCapability: {
|
|
|
101
103
|
unlocked: "unlocked";
|
|
102
104
|
unlocking: "unlocking";
|
|
103
105
|
}>;
|
|
106
|
+
codeRequired: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
104
107
|
lastChangedAt: z.ZodNumber;
|
|
105
108
|
}, z.core.$strip>;
|
|
106
109
|
readonly customize: {
|
package/dist/client.js
CHANGED
|
@@ -21830,9 +21830,8 @@ function t(en, it) {
|
|
|
21830
21830
|
* Many panels require a PIN code on arm / disarm — the optional
|
|
21831
21831
|
* `code` field on the methods passes it through to the upstream
|
|
21832
21832
|
* service; it's NEVER persisted in the runtime slice or any event
|
|
21833
|
-
* payload.
|
|
21834
|
-
* `
|
|
21835
|
-
* field without a slice fetch.
|
|
21833
|
+
* payload. Whether a code is required is the slice's `codeRequired`
|
|
21834
|
+
* (#459): `null` when the provider cannot tell (D393).
|
|
21836
21835
|
*
|
|
21837
21836
|
* `availableModes` mirrors HA's `supported_features`-derived arm
|
|
21838
21837
|
* mode list — the UI renders only the buttons the panel accepts.
|
|
@@ -21871,9 +21870,13 @@ zod.z.object({
|
|
|
21871
21870
|
/** Subset of arm modes the panel accepts. UI renders one button per
|
|
21872
21871
|
* mode in this list. */
|
|
21873
21872
|
availableModes: zod.z.array(AlarmArmModeSchema),
|
|
21874
|
-
/**
|
|
21875
|
-
*
|
|
21876
|
-
requiresCode
|
|
21873
|
+
/**
|
|
21874
|
+
* Whether the panel requires a PIN on arm / disarm (#459; the field was
|
|
21875
|
+
* `requiresCode`, and the `alarm-pin-required` device feature is gone).
|
|
21876
|
+
* `null` = the provider cannot tell (D393), never `false`. A slice restored
|
|
21877
|
+
* from before the rename is upgraded at boot by `restoredFieldRenames`.
|
|
21878
|
+
*/
|
|
21879
|
+
codeRequired: zod.z.boolean().nullable(),
|
|
21877
21880
|
/** Ms epoch when the slice was last updated. */
|
|
21878
21881
|
lastChangedAt: zod.z.number()
|
|
21879
21882
|
});
|
|
@@ -21914,7 +21917,7 @@ DeviceType.AlarmPanel, method(zod.z.object({ deviceId: zod.z.number().int().nonn
|
|
|
21914
21917
|
}), method(zod.z.object({
|
|
21915
21918
|
deviceId: zod.z.number().int().nonnegative(),
|
|
21916
21919
|
mode: AlarmArmModeSchema,
|
|
21917
|
-
/** Optional PIN code. Required when `
|
|
21920
|
+
/** Optional PIN code. Required when `codeRequired === true`.
|
|
21918
21921
|
* Passed through to the upstream service; never persisted. */
|
|
21919
21922
|
code: zod.z.string().min(1).optional()
|
|
21920
21923
|
}), zod.z.void(), {
|
package/dist/client.mjs
CHANGED
|
@@ -21829,9 +21829,8 @@ function t(en, it) {
|
|
|
21829
21829
|
* Many panels require a PIN code on arm / disarm — the optional
|
|
21830
21830
|
* `code` field on the methods passes it through to the upstream
|
|
21831
21831
|
* service; it's NEVER persisted in the runtime slice or any event
|
|
21832
|
-
* payload.
|
|
21833
|
-
* `
|
|
21834
|
-
* field without a slice fetch.
|
|
21832
|
+
* payload. Whether a code is required is the slice's `codeRequired`
|
|
21833
|
+
* (#459): `null` when the provider cannot tell (D393).
|
|
21835
21834
|
*
|
|
21836
21835
|
* `availableModes` mirrors HA's `supported_features`-derived arm
|
|
21837
21836
|
* mode list — the UI renders only the buttons the panel accepts.
|
|
@@ -21870,9 +21869,13 @@ z.object({
|
|
|
21870
21869
|
/** Subset of arm modes the panel accepts. UI renders one button per
|
|
21871
21870
|
* mode in this list. */
|
|
21872
21871
|
availableModes: z.array(AlarmArmModeSchema),
|
|
21873
|
-
/**
|
|
21874
|
-
*
|
|
21875
|
-
requiresCode
|
|
21872
|
+
/**
|
|
21873
|
+
* Whether the panel requires a PIN on arm / disarm (#459; the field was
|
|
21874
|
+
* `requiresCode`, and the `alarm-pin-required` device feature is gone).
|
|
21875
|
+
* `null` = the provider cannot tell (D393), never `false`. A slice restored
|
|
21876
|
+
* from before the rename is upgraded at boot by `restoredFieldRenames`.
|
|
21877
|
+
*/
|
|
21878
|
+
codeRequired: z.boolean().nullable(),
|
|
21876
21879
|
/** Ms epoch when the slice was last updated. */
|
|
21877
21880
|
lastChangedAt: z.number()
|
|
21878
21881
|
});
|
|
@@ -21913,7 +21916,7 @@ DeviceType.AlarmPanel, method(z.object({ deviceId: z.number().int().nonnegative(
|
|
|
21913
21916
|
}), method(z.object({
|
|
21914
21917
|
deviceId: z.number().int().nonnegative(),
|
|
21915
21918
|
mode: AlarmArmModeSchema,
|
|
21916
|
-
/** Optional PIN code. Required when `
|
|
21919
|
+
/** Optional PIN code. Required when `codeRequired === true`.
|
|
21917
21920
|
* Passed through to the upstream service; never persisted. */
|
|
21918
21921
|
code: z.string().min(1).optional()
|
|
21919
21922
|
}), z.void(), {
|
|
@@ -228,9 +228,6 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
228
228
|
DeviceFeature["FanDirection"] = "fan-direction";
|
|
229
229
|
/** Fan exposes an oscillation toggle. */
|
|
230
230
|
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
231
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
232
|
-
* field on the UI lock-controls panel. */
|
|
233
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
234
231
|
/** Lock supports a latch-release ("open door") action distinct from
|
|
235
232
|
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
236
233
|
* `supported_features`. Gates the Open Door button in the UI. */
|
|
@@ -261,8 +258,6 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
261
258
|
DeviceFeature["MediaPlayerChannelStep"] = "media-player-channel-step";
|
|
262
259
|
/** Media player exposes power on / off. */
|
|
263
260
|
DeviceFeature["MediaPlayerPower"] = "media-player-power";
|
|
264
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
265
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
266
261
|
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
267
262
|
* addition to a textual location. */
|
|
268
263
|
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
@@ -228,9 +228,6 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
228
228
|
DeviceFeature["FanDirection"] = "fan-direction";
|
|
229
229
|
/** Fan exposes an oscillation toggle. */
|
|
230
230
|
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
231
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
232
|
-
* field on the UI lock-controls panel. */
|
|
233
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
234
231
|
/** Lock supports a latch-release ("open door") action distinct from
|
|
235
232
|
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
236
233
|
* `supported_features`. Gates the Open Door button in the UI. */
|
|
@@ -261,8 +258,6 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
|
261
258
|
DeviceFeature["MediaPlayerChannelStep"] = "media-player-channel-step";
|
|
262
259
|
/** Media player exposes power on / off. */
|
|
263
260
|
DeviceFeature["MediaPlayerPower"] = "media-player-power";
|
|
264
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
265
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
266
261
|
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
267
262
|
* addition to a textual location. */
|
|
268
263
|
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
@@ -61,7 +61,6 @@ export declare const DEVICE_FEATURE_REQUIREMENTS: {
|
|
|
61
61
|
readonly "fan-preset": CapBackedFeature;
|
|
62
62
|
readonly "fan-direction": CapBackedFeature;
|
|
63
63
|
readonly "fan-oscillating": CapBackedFeature;
|
|
64
|
-
readonly "lock-pin-required": ReportedFeature;
|
|
65
64
|
readonly "lock-open": CapBackedFeature;
|
|
66
65
|
readonly "media-player-seek": CapBackedFeature;
|
|
67
66
|
readonly "media-player-volume": CapBackedFeature;
|
|
@@ -76,7 +75,6 @@ export declare const DEVICE_FEATURE_REQUIREMENTS: {
|
|
|
76
75
|
readonly "media-player-volume-step": CapBackedFeature;
|
|
77
76
|
readonly "media-player-channel-step": CapBackedFeature;
|
|
78
77
|
readonly "media-player-power": CapBackedFeature;
|
|
79
|
-
readonly "alarm-pin-required": ReportedFeature;
|
|
80
78
|
readonly "presence-gps": ReportedFeature;
|
|
81
79
|
readonly "notifier-image": ReportedFeature;
|
|
82
80
|
readonly "notifier-priority": ReportedFeature;
|
|
@@ -214,9 +214,6 @@ export declare enum DeviceFeature {
|
|
|
214
214
|
FanDirection = "fan-direction",
|
|
215
215
|
/** Fan exposes an oscillation toggle. */
|
|
216
216
|
FanOscillating = "fan-oscillating",
|
|
217
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
218
|
-
* field on the UI lock-controls panel. */
|
|
219
|
-
LockPinRequired = "lock-pin-required",
|
|
220
217
|
/** Lock supports a latch-release ("open door") action distinct from
|
|
221
218
|
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
222
219
|
* `supported_features`. Gates the Open Door button in the UI. */
|
|
@@ -247,8 +244,6 @@ export declare enum DeviceFeature {
|
|
|
247
244
|
MediaPlayerChannelStep = "media-player-channel-step",
|
|
248
245
|
/** Media player exposes power on / off. */
|
|
249
246
|
MediaPlayerPower = "media-player-power",
|
|
250
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
251
|
-
AlarmPinRequired = "alarm-pin-required",
|
|
252
247
|
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
253
248
|
* addition to a textual location. */
|
|
254
249
|
PresenceGps = "presence-gps",
|
|
@@ -13442,6 +13442,82 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
13442
13442
|
meta: object;
|
|
13443
13443
|
}>;
|
|
13444
13444
|
}>;
|
|
13445
|
+
apiCatalog: import("@trpc/server/unstable-core-do-not-import").Router<{
|
|
13446
|
+
ctx: any;
|
|
13447
|
+
meta: object;
|
|
13448
|
+
errorShape: AugmentedErrorShape;
|
|
13449
|
+
transformer: true;
|
|
13450
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
13451
|
+
list: import("@trpc/server").TRPCQueryProcedure<{
|
|
13452
|
+
input: void;
|
|
13453
|
+
output: {
|
|
13454
|
+
methods: {
|
|
13455
|
+
path: string;
|
|
13456
|
+
router: string;
|
|
13457
|
+
method: string;
|
|
13458
|
+
kind: "query" | "mutation" | "subscription";
|
|
13459
|
+
tier: "public" | "protected" | "admin";
|
|
13460
|
+
source: "capability" | "core";
|
|
13461
|
+
scope: {
|
|
13462
|
+
capName: string;
|
|
13463
|
+
capScope: "system" | "device";
|
|
13464
|
+
access: "delete" | "view" | "create";
|
|
13465
|
+
role: string;
|
|
13466
|
+
} | null;
|
|
13467
|
+
hasInput: boolean;
|
|
13468
|
+
callable: "no" | "per-device" | "yes";
|
|
13469
|
+
}[];
|
|
13470
|
+
};
|
|
13471
|
+
meta: object;
|
|
13472
|
+
}>;
|
|
13473
|
+
inputSchema: import("@trpc/server").TRPCQueryProcedure<{
|
|
13474
|
+
input: {
|
|
13475
|
+
path: string;
|
|
13476
|
+
};
|
|
13477
|
+
output: {
|
|
13478
|
+
path: string;
|
|
13479
|
+
hasInput: boolean;
|
|
13480
|
+
schema: Record<string, unknown> | null;
|
|
13481
|
+
error: string | null;
|
|
13482
|
+
};
|
|
13483
|
+
meta: object;
|
|
13484
|
+
}>;
|
|
13485
|
+
}>> & import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
13486
|
+
list: import("@trpc/server").TRPCQueryProcedure<{
|
|
13487
|
+
input: void;
|
|
13488
|
+
output: {
|
|
13489
|
+
methods: {
|
|
13490
|
+
path: string;
|
|
13491
|
+
router: string;
|
|
13492
|
+
method: string;
|
|
13493
|
+
kind: "query" | "mutation" | "subscription";
|
|
13494
|
+
tier: "public" | "protected" | "admin";
|
|
13495
|
+
source: "capability" | "core";
|
|
13496
|
+
scope: {
|
|
13497
|
+
capName: string;
|
|
13498
|
+
capScope: "system" | "device";
|
|
13499
|
+
access: "delete" | "view" | "create";
|
|
13500
|
+
role: string;
|
|
13501
|
+
} | null;
|
|
13502
|
+
hasInput: boolean;
|
|
13503
|
+
callable: "no" | "per-device" | "yes";
|
|
13504
|
+
}[];
|
|
13505
|
+
};
|
|
13506
|
+
meta: object;
|
|
13507
|
+
}>;
|
|
13508
|
+
inputSchema: import("@trpc/server").TRPCQueryProcedure<{
|
|
13509
|
+
input: {
|
|
13510
|
+
path: string;
|
|
13511
|
+
};
|
|
13512
|
+
output: {
|
|
13513
|
+
path: string;
|
|
13514
|
+
hasInput: boolean;
|
|
13515
|
+
schema: Record<string, unknown> | null;
|
|
13516
|
+
error: string | null;
|
|
13517
|
+
};
|
|
13518
|
+
meta: object;
|
|
13519
|
+
}>;
|
|
13520
|
+
}>;
|
|
13445
13521
|
preferences: import("@trpc/server/unstable-core-do-not-import").Router<{
|
|
13446
13522
|
ctx: any;
|
|
13447
13523
|
meta: object;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* `ALL_CAPABILITY_DEFINITIONS` (the whole Zod schema graph, ~+100 MB heap per
|
|
6
6
|
* runner). See docs/decisions/adr-0028.md.
|
|
7
7
|
*
|
|
8
|
-
* Coverage: 1 advance-derived caps, 88 caps with
|
|
8
|
+
* Coverage: 1 advance-derived caps, 88 caps with 472 state leaves, 15 caps with a declared method timeout.
|
|
9
9
|
*/
|
|
10
10
|
/** A bindable scalar in a capability's runtime state. */
|
|
11
11
|
export interface CapStateLeaf {
|
|
@@ -13,6 +13,11 @@ export interface RuntimeStatePolicy {
|
|
|
13
13
|
* back at boot (D1024); the rest stay session values. Absent = the whole slice.
|
|
14
14
|
*/
|
|
15
15
|
readonly restoredFields?: readonly string[];
|
|
16
|
+
/**
|
|
17
|
+
* `{ old: new }` field renames of a `restored` slice: a row persisted
|
|
18
|
+
* before the rename is read once into the new name at boot (`restoredPart`).
|
|
19
|
+
*/
|
|
20
|
+
readonly renamedFields?: Readonly<Record<string, string>>;
|
|
16
21
|
}
|
|
17
22
|
/**
|
|
18
23
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DeviceType, i as DeviceRole, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-
|
|
1
|
+
import { a as DeviceType, i as DeviceRole, t as COMPOSED_DEVICE_STABLE_ID_PREFIX } from "./composed-stable-id-Kt5VKzGZ.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
//#region src/ffmpeg/invocation.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -190,6 +190,7 @@ export { type BearerPayloadShape, type BearerPrincipal, classifyBearerPrincipal,
|
|
|
190
190
|
export { ADMIN_SCOPE, ALL_METHOD_ACCESS, type AddonRoutesScope, AddonRoutesScopeSchema, capabilityScopesOf, CREDENTIAL_TOKEN_AUDIENCE, CREDENTIAL_TOKEN_KIND, isCredentialTokenPayload, type CredentialScope, CredentialScopeSchema, type CredentialTokenClaims, CredentialTokenClaimsSchema, parseCredentialScopes, PREFERENCES_SELF_SCOPE, type PreferencesSelfScope, PreferencesSelfScopeSchema, SHARE_VIEW_MAX_DEVICES, scopesAllowAddonRoutes, scopesAllowOwnPreferences, scopesGrantAdmin, type ShareViewGrant, ShareViewGrantSchema, type ShareViewScope, ShareViewScopeSchema, shareViewGrantOf, } from './auth/credential-scope.js';
|
|
191
191
|
export { DEFAULT_VIEWER_SCOPE, featureOfRole, type MethodRole, type MethodRoleDecl, type MethodRoleSource, methodRoleOf, resolveMethodRole, type ViewerAncestorLookup, viewerAdmitsDevice, type ViewerDeviceAllow, ViewerDeviceAllowSchema, VIEWER_FEATURE_IDS, VIEWER_FEATURES, type ViewerFeatureId, ViewerFeatureIdSchema, type ViewerFeatureSpec, viewerHoldsRole, type ViewerTokenScope, ViewerTokenScopeSchema, } from './auth/viewer-access.js';
|
|
192
192
|
export { type PreferenceNamespace, PreferenceNamespaceSchema, type PreferenceRow, PreferenceRowSchema, type PreferenceValue, PreferenceValueSchema, PreferenceDeviceIdSchema, type PreferencesChangedSinceInput, PreferencesChangedSinceInputSchema, type PreferencesChangedSinceOutput, PreferencesChangedSinceOutputSchema, type PreferencesDeleteInput, PreferencesDeleteInputSchema, type PreferencesDeleteOutput, PreferencesDeleteOutputSchema, type PreferencesGetInput, PreferencesGetInputSchema, type PreferencesGetOutput, PreferencesGetOutputSchema, type PreferencesPutInput, PreferencesPutInputSchema, type PreferencesPutOutput, PreferencesPutOutputSchema, PREFERENCES_MAX_DEVICE_ID_LENGTH, PREFERENCES_MAX_NAMESPACES, PREFERENCES_MAX_VALUE_BYTES, PREFERENCES_NAMESPACE_PATTERN, } from './schemas/user-preferences.js';
|
|
193
|
+
export { type ApiCallable, ApiCallableSchema, type ApiCatalogEntry, ApiCatalogEntrySchema, type ApiCatalogInputSchemaOutput, ApiCatalogInputSchemaOutputSchema, type ApiCatalogListOutput, ApiCatalogListOutputSchema, type ApiCatalogMethod, ApiCatalogMethodSchema, type ApiCatalogScope, ApiCatalogScopeSchema, type ApiProcedureKind, ApiProcedureKindSchema, type ApiProcedureTier, ApiProcedureTierSchema, type JsonSchemaDocument, JsonSchemaDocumentSchema, } from './schemas/api-catalog.js';
|
|
193
194
|
export { APP_AUTH_CALLBACK_MAX_LENGTH, APP_AUTH_CALLBACK_URLS, canonicalizeAppCallback, hasUrlScheme, parseAppAuthCallback, } from './auth/app-callback.js';
|
|
194
195
|
export { APP_FLOW_DEFAULT_REDIRECT, APP_FLOW_REFUSAL_MESSAGES, APP_FLOW_STATE_PREFIX, APP_REFUSED_PATH, APP_START_REFUSAL_MESSAGES, type AppFlowParse, type AppFlowPurpose, AppFlowPurposeSchema, type AppFlowRefusal, type AppFlowRequest, type AppPageLang, AppPageLangSchema, type AppLoginPath, AppLoginPathSchema, type AppStartRefusal, appFlowLocation, isAppStartRefusal, parseAppFlowRequest, parseAppPageLang, } from './auth/app-flow.js';
|
|
195
196
|
export { SSO_STATE_COOKIE, SSO_STATE_COOKIE_MAX_AGE_SEC } from './auth/sso-state.js';
|