@camstack/types 1.2.80 → 1.2.81
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/snapshot.cap.d.ts +33 -0
- package/dist/generated/addon-api.d.ts +7 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/index.js +45 -1
- package/dist/index.mjs +45 -1
- package/dist/{sleep-DlC2kJYf.mjs → sleep-BxO5xNe6.mjs} +1 -0
- package/dist/{sleep-CoL-9qhR.js → sleep-EYtyUX0L.js} +1 -0
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-D3gG7oil.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-EYtyUX0L.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
//#region src/generated/cap-input-defaults.ts
|
|
6
6
|
/**
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-Bxo5yJjt.mjs";
|
|
2
|
-
import { A as expandCapMethods, B as ReadinessTimeoutError, I as nodePin, L as readNodePin, T as adminUiCapability, U as scopeKey, _t as BaseAddon, a as asJsonObject, b as viewerUiCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DisposerChain, ht as DATAPLANE_SECRET_HEADER, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as normalizeAddonInitResult, w as DeviceType, xt as emitReadiness, y as deviceOpsCapability, z as ReadinessRegistry } from "./sleep-
|
|
2
|
+
import { A as expandCapMethods, B as ReadinessTimeoutError, I as nodePin, L as readNodePin, T as adminUiCapability, U as scopeKey, _t as BaseAddon, a as asJsonObject, b as viewerUiCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DisposerChain, ht as DATAPLANE_SECRET_HEADER, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as normalizeAddonInitResult, w as DeviceType, xt as emitReadiness, y as deviceOpsCapability, z as ReadinessRegistry } from "./sleep-BxO5xNe6.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
//#region src/generated/cap-input-defaults.ts
|
|
5
5
|
/**
|
|
@@ -82,6 +82,39 @@ export declare const snapshotCapability: {
|
|
|
82
82
|
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind> & {
|
|
83
83
|
readonly systemOnly: true;
|
|
84
84
|
};
|
|
85
|
+
/**
|
|
86
|
+
* The full decision chain for ONE device, for the viewer's debug readout —
|
|
87
|
+
* the answer to "why does this tile show what it shows" in a single poll:
|
|
88
|
+
* the battery slice the state was derived from, the resolved state + its
|
|
89
|
+
* reason, the cached frame's identity/age, whether a wake window is open,
|
|
90
|
+
* and whether a fresh capture is in flight. Cache-only and capture-free:
|
|
91
|
+
* a debug read must never wake a battery camera.
|
|
92
|
+
*/
|
|
93
|
+
readonly getDebugState: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
94
|
+
deviceId: z.ZodNumber;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
battery: z.ZodNullable<z.ZodObject<{
|
|
97
|
+
sleeping: z.ZodBoolean;
|
|
98
|
+
lastUpdated: z.ZodNumber;
|
|
99
|
+
lastContactAt: z.ZodOptional<z.ZodNumber>;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
state: z.ZodObject<{
|
|
102
|
+
isBattery: z.ZodBoolean;
|
|
103
|
+
reason: z.ZodNullable<z.ZodEnum<{
|
|
104
|
+
sleeping: "sleeping";
|
|
105
|
+
unreachable: "unreachable";
|
|
106
|
+
disabled: "disabled";
|
|
107
|
+
waking: "waking";
|
|
108
|
+
}>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
frame: z.ZodObject<{
|
|
111
|
+
capturedAt: z.ZodNullable<z.ZodNumber>;
|
|
112
|
+
ageMs: z.ZodNullable<z.ZodNumber>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
waking: z.ZodBoolean;
|
|
115
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind> & {
|
|
116
|
+
readonly systemOnly: true;
|
|
117
|
+
};
|
|
85
118
|
/**
|
|
86
119
|
* Signed, expiring links to a CLIENT-SIZED frame — and the demand signal
|
|
87
120
|
* that makes those frames current.
|
|
@@ -6746,6 +6746,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
6746
6746
|
output: z.infer<typeof snapshotCapability.methods.getSnapshotOverview.output>;
|
|
6747
6747
|
meta: object;
|
|
6748
6748
|
}>;
|
|
6749
|
+
getDebugState: TRPCQueryProcedure<{
|
|
6750
|
+
input: {
|
|
6751
|
+
[x: string]: unknown;
|
|
6752
|
+
} & z.input<typeof snapshotCapability.methods.getDebugState.input>;
|
|
6753
|
+
output: z.infer<typeof snapshotCapability.methods.getDebugState.output>;
|
|
6754
|
+
meta: object;
|
|
6755
|
+
}>;
|
|
6749
6756
|
getSnapshotLinks: TRPCQueryProcedure<{
|
|
6750
6757
|
input: {
|
|
6751
6758
|
[x: string]: unknown;
|
|
@@ -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:
|
|
9
|
+
* Coverage: 940 method paths across 123 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* system-scope cap that takes a deviceId was previously never device-filtered
|
|
7
7
|
* — see the generator header).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 336 methods carry a device reference, of which
|
|
10
10
|
* 124 are on SYSTEM-scope caps.
|
|
11
11
|
*
|
|
12
12
|
* Top-level fields, number arrays, and one-level arrays of objects carrying
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-D3gG7oil.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-EYtyUX0L.js");
|
|
4
4
|
const require_canonical_hash = require("./canonical-hash-DNV8S5ET.js");
|
|
5
5
|
const require_enums = require("./enums.js");
|
|
6
6
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
@@ -19040,6 +19040,39 @@ var snapshotCapability = {
|
|
|
19040
19040
|
etag: zod.z.string().nullable()
|
|
19041
19041
|
}))),
|
|
19042
19042
|
/**
|
|
19043
|
+
* The full decision chain for ONE device, for the viewer's debug readout —
|
|
19044
|
+
* the answer to "why does this tile show what it shows" in a single poll:
|
|
19045
|
+
* the battery slice the state was derived from, the resolved state + its
|
|
19046
|
+
* reason, the cached frame's identity/age, whether a wake window is open,
|
|
19047
|
+
* and whether a fresh capture is in flight. Cache-only and capture-free:
|
|
19048
|
+
* a debug read must never wake a battery camera.
|
|
19049
|
+
*/
|
|
19050
|
+
getDebugState: require_sleep.systemMethod(zod.z.object({ deviceId: zod.z.number() }), zod.z.object({
|
|
19051
|
+
/** The battery slice as read, or null when the device has none. */
|
|
19052
|
+
battery: zod.z.object({
|
|
19053
|
+
sleeping: zod.z.boolean(),
|
|
19054
|
+
lastUpdated: zod.z.number(),
|
|
19055
|
+
lastContactAt: zod.z.number().optional()
|
|
19056
|
+
}).nullable(),
|
|
19057
|
+
/** The resolved snapshot state (what the overlay decision used). */
|
|
19058
|
+
state: zod.z.object({
|
|
19059
|
+
isBattery: zod.z.boolean(),
|
|
19060
|
+
reason: zod.z.enum([
|
|
19061
|
+
"disabled",
|
|
19062
|
+
"sleeping",
|
|
19063
|
+
"unreachable",
|
|
19064
|
+
"waking"
|
|
19065
|
+
]).nullable()
|
|
19066
|
+
}),
|
|
19067
|
+
/** The cached frame behind the next paint. */
|
|
19068
|
+
frame: zod.z.object({
|
|
19069
|
+
capturedAt: zod.z.number().nullable(),
|
|
19070
|
+
ageMs: zod.z.number().nullable()
|
|
19071
|
+
}),
|
|
19072
|
+
/** A wake window is currently open (the Waking overlay's source). */
|
|
19073
|
+
waking: zod.z.boolean()
|
|
19074
|
+
})),
|
|
19075
|
+
/**
|
|
19043
19076
|
* Signed, expiring links to a CLIENT-SIZED frame — and the demand signal
|
|
19044
19077
|
* that makes those frames current.
|
|
19045
19078
|
*
|
|
@@ -38430,6 +38463,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
38430
38463
|
addonId: null,
|
|
38431
38464
|
access: "view"
|
|
38432
38465
|
},
|
|
38466
|
+
"snapshot.getDebugState": {
|
|
38467
|
+
capName: "snapshot",
|
|
38468
|
+
capScope: "device",
|
|
38469
|
+
addonId: null,
|
|
38470
|
+
access: "view"
|
|
38471
|
+
},
|
|
38433
38472
|
"snapshot.getSnapshot": {
|
|
38434
38473
|
capName: "snapshot",
|
|
38435
38474
|
capScope: "device",
|
|
@@ -41284,6 +41323,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
41284
41323
|
form: "single",
|
|
41285
41324
|
optional: false
|
|
41286
41325
|
}],
|
|
41326
|
+
"snapshot.getDebugState": [{
|
|
41327
|
+
name: "deviceId",
|
|
41328
|
+
form: "single",
|
|
41329
|
+
optional: false
|
|
41330
|
+
}],
|
|
41287
41331
|
"snapshot.getSnapshot": [{
|
|
41288
41332
|
name: "deviceId",
|
|
41289
41333
|
form: "single",
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as EventCategory } from "./event-category-Bxo5yJjt.mjs";
|
|
2
|
-
import { $ as EncodedPacketSchema, A as expandCapMethods, B as ReadinessTimeoutError, C as DeviceRole, Ct as WELL_KNOWN_TABS, D as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Dt as hydrateSchema, E as DEFAULT_RUNTIME_STATE_DURABILITY, Et as collectHydratedFieldValues, F as CAP_NODE_PIN_CONTEXT_KEY, G as BrokerStatusSchema, H as readinessKey, I as nodePin, J as CamStreamKindSchema, K as CAM_PROFILE_ORDER, L as readNodePin, M as method, N as resolveCapMount, O as DEVICE_STATUS_METHOD, Ot as resolveHydratedFieldValue, P as systemMethod, Q as DecodedFrameSchema, R as toNodeId, S as DeviceFeature, St as isEvent, T as adminUiCapability, Tt as collectHydratedFieldEntries, U as scopeKey, V as emitDownForOwnedCaps, W as BrokerStatsSchema, X as CameraStreamSchema, Y as CamStreamResolutionSchema, Z as DecodedAudioChunkSchema, _ as createSliceHandle, _t as BaseAddon, a as asJsonObject, at as StreamSourceEntrySchema, b as viewerUiCapability, bt as createEvent, c as parseJsonArray, ct as SubscribeAudioChunksResultSchema, d as BOOT_RECOVERY_BACKOFF_MS, dt as makeProfileBrokerId, et as FrameHandleFormatSchema, f as DEVICE_SCOPED_CAPS, ft as makeSourceBrokerId, g as createMirrorSource, gt as DisposerChain, h as createLazyTrpcSource, ht as DATAPLANE_SECRET_HEADER, i as asJsonArray, it as ProfileSlotStatusSchema, j as isDeviceConfigCap, k as event, l as parseJsonObject, lt as SubscribeFramesInputSchema, m as createDeviceProxy, mt as selectAssignedProfileSlots, n as sleepCancellable, nt as ProfileRtspEntrySchema, o as asNumber, ot as StreamSourceSchema, p as isDeviceScopedCap, pt as parseProfileBrokerId, q as CamProfileSchema, r as asBoolean, rt as ProfileSlotSchema, s as asString, st as SubscribeAudioChunksInputSchema, t as sleep, tt as FrameHandleSchema, u as parseJsonUnknown, ut as SubscribeFramesResultSchema, v as RawStateResultSchema, vt as normalizeAddonInitResult, w as DeviceType, wt as WELL_KNOWN_TAB_MAP, x as ChargingStatus, xt as emitReadiness, y as deviceOpsCapability, yt as createDurableState, z as ReadinessRegistry } from "./sleep-
|
|
2
|
+
import { $ as EncodedPacketSchema, A as expandCapMethods, B as ReadinessTimeoutError, C as DeviceRole, Ct as WELL_KNOWN_TABS, D as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Dt as hydrateSchema, E as DEFAULT_RUNTIME_STATE_DURABILITY, Et as collectHydratedFieldValues, F as CAP_NODE_PIN_CONTEXT_KEY, G as BrokerStatusSchema, H as readinessKey, I as nodePin, J as CamStreamKindSchema, K as CAM_PROFILE_ORDER, L as readNodePin, M as method, N as resolveCapMount, O as DEVICE_STATUS_METHOD, Ot as resolveHydratedFieldValue, P as systemMethod, Q as DecodedFrameSchema, R as toNodeId, S as DeviceFeature, St as isEvent, T as adminUiCapability, Tt as collectHydratedFieldEntries, U as scopeKey, V as emitDownForOwnedCaps, W as BrokerStatsSchema, X as CameraStreamSchema, Y as CamStreamResolutionSchema, Z as DecodedAudioChunkSchema, _ as createSliceHandle, _t as BaseAddon, a as asJsonObject, at as StreamSourceEntrySchema, b as viewerUiCapability, bt as createEvent, c as parseJsonArray, ct as SubscribeAudioChunksResultSchema, d as BOOT_RECOVERY_BACKOFF_MS, dt as makeProfileBrokerId, et as FrameHandleFormatSchema, f as DEVICE_SCOPED_CAPS, ft as makeSourceBrokerId, g as createMirrorSource, gt as DisposerChain, h as createLazyTrpcSource, ht as DATAPLANE_SECRET_HEADER, i as asJsonArray, it as ProfileSlotStatusSchema, j as isDeviceConfigCap, k as event, l as parseJsonObject, lt as SubscribeFramesInputSchema, m as createDeviceProxy, mt as selectAssignedProfileSlots, n as sleepCancellable, nt as ProfileRtspEntrySchema, o as asNumber, ot as StreamSourceSchema, p as isDeviceScopedCap, pt as parseProfileBrokerId, q as CamProfileSchema, r as asBoolean, rt as ProfileSlotSchema, s as asString, st as SubscribeAudioChunksInputSchema, t as sleep, tt as FrameHandleSchema, u as parseJsonUnknown, ut as SubscribeFramesResultSchema, v as RawStateResultSchema, vt as normalizeAddonInitResult, w as DeviceType, wt as WELL_KNOWN_TAB_MAP, x as ChargingStatus, xt as emitReadiness, y as deviceOpsCapability, yt as createDurableState, z as ReadinessRegistry } from "./sleep-BxO5xNe6.mjs";
|
|
3
3
|
import { a as buildAudioArgs, c as buildVideoArgs, d as logBannerArgs, f as pickVideoEncoder, i as audioPlanFromEncodeProfile, l as invocationFromEncodeProfile, n as Fmp4BoxSplitter, o as buildFfmpegArgs, r as AUDIO_PRESETS, s as buildInputArgs, t as canonicalHash, u as isSoftwareDecode } from "./canonical-hash-rO1sRmEK.mjs";
|
|
4
4
|
import { EventSourceType } from "./enums.mjs";
|
|
5
5
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
@@ -19039,6 +19039,39 @@ var snapshotCapability = {
|
|
|
19039
19039
|
etag: z.string().nullable()
|
|
19040
19040
|
}))),
|
|
19041
19041
|
/**
|
|
19042
|
+
* The full decision chain for ONE device, for the viewer's debug readout —
|
|
19043
|
+
* the answer to "why does this tile show what it shows" in a single poll:
|
|
19044
|
+
* the battery slice the state was derived from, the resolved state + its
|
|
19045
|
+
* reason, the cached frame's identity/age, whether a wake window is open,
|
|
19046
|
+
* and whether a fresh capture is in flight. Cache-only and capture-free:
|
|
19047
|
+
* a debug read must never wake a battery camera.
|
|
19048
|
+
*/
|
|
19049
|
+
getDebugState: systemMethod(z.object({ deviceId: z.number() }), z.object({
|
|
19050
|
+
/** The battery slice as read, or null when the device has none. */
|
|
19051
|
+
battery: z.object({
|
|
19052
|
+
sleeping: z.boolean(),
|
|
19053
|
+
lastUpdated: z.number(),
|
|
19054
|
+
lastContactAt: z.number().optional()
|
|
19055
|
+
}).nullable(),
|
|
19056
|
+
/** The resolved snapshot state (what the overlay decision used). */
|
|
19057
|
+
state: z.object({
|
|
19058
|
+
isBattery: z.boolean(),
|
|
19059
|
+
reason: z.enum([
|
|
19060
|
+
"disabled",
|
|
19061
|
+
"sleeping",
|
|
19062
|
+
"unreachable",
|
|
19063
|
+
"waking"
|
|
19064
|
+
]).nullable()
|
|
19065
|
+
}),
|
|
19066
|
+
/** The cached frame behind the next paint. */
|
|
19067
|
+
frame: z.object({
|
|
19068
|
+
capturedAt: z.number().nullable(),
|
|
19069
|
+
ageMs: z.number().nullable()
|
|
19070
|
+
}),
|
|
19071
|
+
/** A wake window is currently open (the Waking overlay's source). */
|
|
19072
|
+
waking: z.boolean()
|
|
19073
|
+
})),
|
|
19074
|
+
/**
|
|
19042
19075
|
* Signed, expiring links to a CLIENT-SIZED frame — and the demand signal
|
|
19043
19076
|
* that makes those frames current.
|
|
19044
19077
|
*
|
|
@@ -38429,6 +38462,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
38429
38462
|
addonId: null,
|
|
38430
38463
|
access: "view"
|
|
38431
38464
|
},
|
|
38465
|
+
"snapshot.getDebugState": {
|
|
38466
|
+
capName: "snapshot",
|
|
38467
|
+
capScope: "device",
|
|
38468
|
+
addonId: null,
|
|
38469
|
+
access: "view"
|
|
38470
|
+
},
|
|
38432
38471
|
"snapshot.getSnapshot": {
|
|
38433
38472
|
capName: "snapshot",
|
|
38434
38473
|
capScope: "device",
|
|
@@ -41283,6 +41322,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
41283
41322
|
form: "single",
|
|
41284
41323
|
optional: false
|
|
41285
41324
|
}],
|
|
41325
|
+
"snapshot.getDebugState": [{
|
|
41326
|
+
name: "deviceId",
|
|
41327
|
+
form: "single",
|
|
41328
|
+
optional: false
|
|
41329
|
+
}],
|
|
41286
41330
|
"snapshot.getSnapshot": [{
|
|
41287
41331
|
name: "deviceId",
|
|
41288
41332
|
form: "single",
|
|
@@ -3287,6 +3287,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
3287
3287
|
getSnapshot: (input) => dispatch("snapshot", "snapshot", "getSnapshot", "query", input),
|
|
3288
3288
|
invalidateCache: (input) => dispatch("snapshot", "snapshot", "invalidateCache", "mutation", input),
|
|
3289
3289
|
getSnapshotOverview: (input) => dispatch("snapshot", "snapshot", "getSnapshotOverview", "query", input),
|
|
3290
|
+
getDebugState: (input) => dispatch("snapshot", "snapshot", "getDebugState", "query", input),
|
|
3290
3291
|
getSnapshotLinks: (input) => dispatch("snapshot", "snapshot", "getSnapshotLinks", "query", input),
|
|
3291
3292
|
getStatus: (input) => dispatch("snapshot", "snapshot", "getStatus", "query", input),
|
|
3292
3293
|
getDeviceSettingsContribution: (input) => dispatch("snapshot", "snapshot", "getDeviceSettingsContribution", "query", input),
|
|
@@ -3287,6 +3287,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
3287
3287
|
getSnapshot: (input) => dispatch("snapshot", "snapshot", "getSnapshot", "query", input),
|
|
3288
3288
|
invalidateCache: (input) => dispatch("snapshot", "snapshot", "invalidateCache", "mutation", input),
|
|
3289
3289
|
getSnapshotOverview: (input) => dispatch("snapshot", "snapshot", "getSnapshotOverview", "query", input),
|
|
3290
|
+
getDebugState: (input) => dispatch("snapshot", "snapshot", "getDebugState", "query", input),
|
|
3290
3291
|
getSnapshotLinks: (input) => dispatch("snapshot", "snapshot", "getSnapshotLinks", "query", input),
|
|
3291
3292
|
getStatus: (input) => dispatch("snapshot", "snapshot", "getStatus", "query", input),
|
|
3292
3293
|
getDeviceSettingsContribution: (input) => dispatch("snapshot", "snapshot", "getDeviceSettingsContribution", "query", input),
|