@camstack/types 1.1.18 → 1.1.20
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/capabilities/battery.cap.d.ts +6 -0
- package/dist/capabilities/capability-definition.d.ts +39 -0
- package/dist/capabilities/consumables.cap.d.ts +35 -0
- package/dist/capabilities/device-manager.cap.d.ts +133 -15
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/pipeline-runner.cap.d.ts +40 -0
- package/dist/capabilities/recording.cap.d.ts +10 -0
- package/dist/device/device-binding.d.ts +9 -3
- package/dist/device/device-management.d.ts +27 -5
- package/dist/device/index.d.ts +2 -2
- package/dist/device/schema-fields.d.ts +13 -0
- package/dist/generated/addon-api.d.ts +120 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +160 -15
- package/dist/index.mjs +158 -16
- package/dist/interfaces/agent.d.ts +7 -0
- package/dist/interfaces/pipeline-runner-capability.d.ts +10 -0
- package/dist/interfaces/recording-config.d.ts +20 -0
- package/package.json +1 -1
|
@@ -4100,6 +4100,15 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
4100
4100
|
sourceKey: string;
|
|
4101
4101
|
cap: string;
|
|
4102
4102
|
fieldPath: string;
|
|
4103
|
+
kind?: "field" | undefined;
|
|
4104
|
+
} | {
|
|
4105
|
+
kind: "literal";
|
|
4106
|
+
value: string | number | boolean | null;
|
|
4107
|
+
} | {
|
|
4108
|
+
kind: "global";
|
|
4109
|
+
sourceStableId: string;
|
|
4110
|
+
cap: string;
|
|
4111
|
+
fieldPath: string;
|
|
4103
4112
|
};
|
|
4104
4113
|
target: {
|
|
4105
4114
|
cap: string;
|
|
@@ -4201,6 +4210,15 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
4201
4210
|
sourceKey: string;
|
|
4202
4211
|
cap: string;
|
|
4203
4212
|
fieldPath: string;
|
|
4213
|
+
kind?: "field" | undefined;
|
|
4214
|
+
} | {
|
|
4215
|
+
kind: "literal";
|
|
4216
|
+
value: string | number | boolean | null;
|
|
4217
|
+
} | {
|
|
4218
|
+
kind: "global";
|
|
4219
|
+
sourceStableId: string;
|
|
4220
|
+
cap: string;
|
|
4221
|
+
fieldPath: string;
|
|
4204
4222
|
};
|
|
4205
4223
|
target: {
|
|
4206
4224
|
cap: string;
|
|
@@ -4228,6 +4246,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
4228
4246
|
input: {
|
|
4229
4247
|
[x: string]: unknown;
|
|
4230
4248
|
deviceId: number;
|
|
4249
|
+
includeSynthesizable?: boolean | undefined;
|
|
4231
4250
|
};
|
|
4232
4251
|
output: {
|
|
4233
4252
|
caps: readonly {
|
|
@@ -4236,7 +4255,12 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
4236
4255
|
path: string;
|
|
4237
4256
|
kind: "string" | "number" | "boolean" | "enum";
|
|
4238
4257
|
enumValues?: string[] | undefined;
|
|
4258
|
+
item?: boolean | undefined;
|
|
4239
4259
|
}[];
|
|
4260
|
+
itemArray?: {
|
|
4261
|
+
path: string;
|
|
4262
|
+
keyField: string;
|
|
4263
|
+
} | undefined;
|
|
4240
4264
|
}[];
|
|
4241
4265
|
};
|
|
4242
4266
|
meta: object;
|
|
@@ -4365,6 +4389,15 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
4365
4389
|
sourceKey: string;
|
|
4366
4390
|
cap: string;
|
|
4367
4391
|
fieldPath: string;
|
|
4392
|
+
kind?: "field" | undefined;
|
|
4393
|
+
} | {
|
|
4394
|
+
kind: "literal";
|
|
4395
|
+
value: string | number | boolean | null;
|
|
4396
|
+
} | {
|
|
4397
|
+
kind: "global";
|
|
4398
|
+
sourceStableId: string;
|
|
4399
|
+
cap: string;
|
|
4400
|
+
fieldPath: string;
|
|
4368
4401
|
};
|
|
4369
4402
|
target: {
|
|
4370
4403
|
cap: string;
|
|
@@ -4429,6 +4462,15 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
4429
4462
|
sourceKey: string;
|
|
4430
4463
|
cap: string;
|
|
4431
4464
|
fieldPath: string;
|
|
4465
|
+
kind?: "field" | undefined;
|
|
4466
|
+
} | {
|
|
4467
|
+
kind: "literal";
|
|
4468
|
+
value: string | number | boolean | null;
|
|
4469
|
+
} | {
|
|
4470
|
+
kind: "global";
|
|
4471
|
+
sourceStableId: string;
|
|
4472
|
+
cap: string;
|
|
4473
|
+
fieldPath: string;
|
|
4432
4474
|
};
|
|
4433
4475
|
target: {
|
|
4434
4476
|
cap: string;
|
|
@@ -4493,6 +4535,15 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
4493
4535
|
sourceKey: string;
|
|
4494
4536
|
cap: string;
|
|
4495
4537
|
fieldPath: string;
|
|
4538
|
+
kind?: "field" | undefined;
|
|
4539
|
+
} | {
|
|
4540
|
+
kind: "literal";
|
|
4541
|
+
value: string | number | boolean | null;
|
|
4542
|
+
} | {
|
|
4543
|
+
kind: "global";
|
|
4544
|
+
sourceStableId: string;
|
|
4545
|
+
cap: string;
|
|
4546
|
+
fieldPath: string;
|
|
4496
4547
|
};
|
|
4497
4548
|
target: {
|
|
4498
4549
|
cap: string;
|
|
@@ -4650,7 +4701,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
4650
4701
|
deviceId: number;
|
|
4651
4702
|
entries: {
|
|
4652
4703
|
capName: string;
|
|
4653
|
-
kind: "native" | "wrapped";
|
|
4704
|
+
kind: "linked" | "native" | "wrapped";
|
|
4654
4705
|
providerAddonId: string;
|
|
4655
4706
|
providerNodeId: string;
|
|
4656
4707
|
nativeAddonId: string;
|
|
@@ -4666,7 +4717,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
4666
4717
|
deviceId: number;
|
|
4667
4718
|
entries: {
|
|
4668
4719
|
capName: string;
|
|
4669
|
-
kind: "native" | "wrapped";
|
|
4720
|
+
kind: "linked" | "native" | "wrapped";
|
|
4670
4721
|
providerAddonId: string;
|
|
4671
4722
|
providerNodeId: string;
|
|
4672
4723
|
nativeAddonId: string;
|
|
@@ -10011,6 +10062,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
10011
10062
|
onboardMotionDrivesAnalyzer?: boolean | undefined;
|
|
10012
10063
|
occupancyRecheckSec?: number | undefined;
|
|
10013
10064
|
occupancyRecheckFrames?: number | undefined;
|
|
10065
|
+
frameSource?: {
|
|
10066
|
+
kind: "local-broker";
|
|
10067
|
+
} | {
|
|
10068
|
+
kind: "remote-restream";
|
|
10069
|
+
ownerNodeId: string;
|
|
10070
|
+
hubHostnameOverride?: string | undefined;
|
|
10071
|
+
} | undefined;
|
|
10014
10072
|
};
|
|
10015
10073
|
output: {
|
|
10016
10074
|
success: true;
|
|
@@ -18117,6 +18175,15 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18117
18175
|
sourceKey: string;
|
|
18118
18176
|
cap: string;
|
|
18119
18177
|
fieldPath: string;
|
|
18178
|
+
kind?: "field" | undefined;
|
|
18179
|
+
} | {
|
|
18180
|
+
kind: "literal";
|
|
18181
|
+
value: string | number | boolean | null;
|
|
18182
|
+
} | {
|
|
18183
|
+
kind: "global";
|
|
18184
|
+
sourceStableId: string;
|
|
18185
|
+
cap: string;
|
|
18186
|
+
fieldPath: string;
|
|
18120
18187
|
};
|
|
18121
18188
|
target: {
|
|
18122
18189
|
cap: string;
|
|
@@ -18218,6 +18285,15 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18218
18285
|
sourceKey: string;
|
|
18219
18286
|
cap: string;
|
|
18220
18287
|
fieldPath: string;
|
|
18288
|
+
kind?: "field" | undefined;
|
|
18289
|
+
} | {
|
|
18290
|
+
kind: "literal";
|
|
18291
|
+
value: string | number | boolean | null;
|
|
18292
|
+
} | {
|
|
18293
|
+
kind: "global";
|
|
18294
|
+
sourceStableId: string;
|
|
18295
|
+
cap: string;
|
|
18296
|
+
fieldPath: string;
|
|
18221
18297
|
};
|
|
18222
18298
|
target: {
|
|
18223
18299
|
cap: string;
|
|
@@ -18245,6 +18321,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18245
18321
|
input: {
|
|
18246
18322
|
[x: string]: unknown;
|
|
18247
18323
|
deviceId: number;
|
|
18324
|
+
includeSynthesizable?: boolean | undefined;
|
|
18248
18325
|
};
|
|
18249
18326
|
output: {
|
|
18250
18327
|
caps: readonly {
|
|
@@ -18253,7 +18330,12 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18253
18330
|
path: string;
|
|
18254
18331
|
kind: "string" | "number" | "boolean" | "enum";
|
|
18255
18332
|
enumValues?: string[] | undefined;
|
|
18333
|
+
item?: boolean | undefined;
|
|
18256
18334
|
}[];
|
|
18335
|
+
itemArray?: {
|
|
18336
|
+
path: string;
|
|
18337
|
+
keyField: string;
|
|
18338
|
+
} | undefined;
|
|
18257
18339
|
}[];
|
|
18258
18340
|
};
|
|
18259
18341
|
meta: object;
|
|
@@ -18382,6 +18464,15 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18382
18464
|
sourceKey: string;
|
|
18383
18465
|
cap: string;
|
|
18384
18466
|
fieldPath: string;
|
|
18467
|
+
kind?: "field" | undefined;
|
|
18468
|
+
} | {
|
|
18469
|
+
kind: "literal";
|
|
18470
|
+
value: string | number | boolean | null;
|
|
18471
|
+
} | {
|
|
18472
|
+
kind: "global";
|
|
18473
|
+
sourceStableId: string;
|
|
18474
|
+
cap: string;
|
|
18475
|
+
fieldPath: string;
|
|
18385
18476
|
};
|
|
18386
18477
|
target: {
|
|
18387
18478
|
cap: string;
|
|
@@ -18446,6 +18537,15 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18446
18537
|
sourceKey: string;
|
|
18447
18538
|
cap: string;
|
|
18448
18539
|
fieldPath: string;
|
|
18540
|
+
kind?: "field" | undefined;
|
|
18541
|
+
} | {
|
|
18542
|
+
kind: "literal";
|
|
18543
|
+
value: string | number | boolean | null;
|
|
18544
|
+
} | {
|
|
18545
|
+
kind: "global";
|
|
18546
|
+
sourceStableId: string;
|
|
18547
|
+
cap: string;
|
|
18548
|
+
fieldPath: string;
|
|
18449
18549
|
};
|
|
18450
18550
|
target: {
|
|
18451
18551
|
cap: string;
|
|
@@ -18510,6 +18610,15 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18510
18610
|
sourceKey: string;
|
|
18511
18611
|
cap: string;
|
|
18512
18612
|
fieldPath: string;
|
|
18613
|
+
kind?: "field" | undefined;
|
|
18614
|
+
} | {
|
|
18615
|
+
kind: "literal";
|
|
18616
|
+
value: string | number | boolean | null;
|
|
18617
|
+
} | {
|
|
18618
|
+
kind: "global";
|
|
18619
|
+
sourceStableId: string;
|
|
18620
|
+
cap: string;
|
|
18621
|
+
fieldPath: string;
|
|
18513
18622
|
};
|
|
18514
18623
|
target: {
|
|
18515
18624
|
cap: string;
|
|
@@ -18667,7 +18776,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18667
18776
|
deviceId: number;
|
|
18668
18777
|
entries: {
|
|
18669
18778
|
capName: string;
|
|
18670
|
-
kind: "native" | "wrapped";
|
|
18779
|
+
kind: "linked" | "native" | "wrapped";
|
|
18671
18780
|
providerAddonId: string;
|
|
18672
18781
|
providerNodeId: string;
|
|
18673
18782
|
nativeAddonId: string;
|
|
@@ -18683,7 +18792,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
18683
18792
|
deviceId: number;
|
|
18684
18793
|
entries: {
|
|
18685
18794
|
capName: string;
|
|
18686
|
-
kind: "native" | "wrapped";
|
|
18795
|
+
kind: "linked" | "native" | "wrapped";
|
|
18687
18796
|
providerAddonId: string;
|
|
18688
18797
|
providerNodeId: string;
|
|
18689
18798
|
nativeAddonId: string;
|
|
@@ -24028,6 +24137,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
24028
24137
|
onboardMotionDrivesAnalyzer?: boolean | undefined;
|
|
24029
24138
|
occupancyRecheckSec?: number | undefined;
|
|
24030
24139
|
occupancyRecheckFrames?: number | undefined;
|
|
24140
|
+
frameSource?: {
|
|
24141
|
+
kind: "local-broker";
|
|
24142
|
+
} | {
|
|
24143
|
+
kind: "remote-restream";
|
|
24144
|
+
ownerNodeId: string;
|
|
24145
|
+
hubHostnameOverride?: string | undefined;
|
|
24146
|
+
} | undefined;
|
|
24031
24147
|
};
|
|
24032
24148
|
output: {
|
|
24033
24149
|
success: true;
|
package/dist/index.d.ts
CHANGED
|
@@ -147,12 +147,12 @@ export type { ICameraDevice, StreamSourceEntry } from './device/camera-device.js
|
|
|
147
147
|
export type { StreamQuality } from './interfaces/device-capabilities/camera.js';
|
|
148
148
|
export { STREAM_QUALITY_LABELS, streamQualityLabel, } from './interfaces/device-capabilities/camera.js';
|
|
149
149
|
export type { AudioCodecInfo, AudioDecodeSessionConfig, AudioEncodeSessionConfig, AudioPcmChunk, AudioEncodedChunk, PcmSampleFormat, } from './interfaces/audio-codec.js';
|
|
150
|
-
export type { DeviceManualCreation, DeviceDiscovery, DiscoveredDevice, SavedDevice, DeviceMeta, InitialDeviceMeta, CreateDeviceSpec, ChildLayout, ChildLayoutEntry, DeviceLinkSource, DeviceLinkTarget, DeviceLinkTransform, DeviceLink, DeviceLinks, } from './device/device-management.js';
|
|
150
|
+
export type { DeviceManualCreation, DeviceDiscovery, DiscoveredDevice, SavedDevice, DeviceMeta, InitialDeviceMeta, CreateDeviceSpec, ChildLayout, ChildLayoutEntry, DeviceLinkFieldSource, DeviceLinkLiteralSource, DeviceLinkSource, DeviceLinkTarget, DeviceLinkTransform, DeviceLink, DeviceLinks, } from './device/device-management.js';
|
|
151
151
|
export { zodEntriesToConfigUI } from './device/zod-to-config-ui.js';
|
|
152
152
|
export type { DeviceConfigEntry } from './device/zod-to-config-ui.js';
|
|
153
153
|
export { getByPath, setByPath } from './device/path-util.js';
|
|
154
154
|
export { applyTransform } from './device/device-link-transform.js';
|
|
155
|
-
export { enumerateSchemaFields } from './device/schema-fields.js';
|
|
155
|
+
export { enumerateItemArrayFields, enumerateSchemaFields } from './device/schema-fields.js';
|
|
156
156
|
export type { WireableField } from './device/schema-fields.js';
|
|
157
157
|
export { EventCategory } from './enums/event-category.js';
|
|
158
158
|
export type { AppRouter, AddonApi } from './generated/addon-api.js';
|
package/dist/index.js
CHANGED
|
@@ -534,6 +534,25 @@ function findTimezone(id) {
|
|
|
534
534
|
//#endregion
|
|
535
535
|
//#region src/interfaces/recording-config.ts
|
|
536
536
|
/**
|
|
537
|
+
* THE canonical event-clip pad: the time window a single-timestamp analytics
|
|
538
|
+
* event expands to when joined with footage (clip window = `[timestamp - preMs,
|
|
539
|
+
* timestamp + postMs]`). Matches the admin-ui clip window (−5s/+10s).
|
|
540
|
+
*
|
|
541
|
+
* Every consumer derives from this ONE constant so event↔footage boundaries
|
|
542
|
+
* agree everywhere (C1):
|
|
543
|
+
* - the `videoclips` default provider (addon-post-analysis) pads its clip
|
|
544
|
+
* windows with it;
|
|
545
|
+
* - the recorder's ephemeral in-RAM `EventMap` markers (addon-pipeline) pad
|
|
546
|
+
* their `startMs/endMs` with it.
|
|
547
|
+
*
|
|
548
|
+
* NOTE: this is a UI/JOIN convention, NOT the `events`-band keep/discard gate —
|
|
549
|
+
* that uses the per-device `preBufferSec`/`postBufferSec` config.
|
|
550
|
+
*/
|
|
551
|
+
var EVENT_PAD_MS = {
|
|
552
|
+
preMs: 5e3,
|
|
553
|
+
postMs: 1e4
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
537
556
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
538
557
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
539
558
|
* `Weekday` exported from `interfaces/timezones.ts`.
|
|
@@ -3555,7 +3574,13 @@ onStatusChanged: { data: zod.z.object({
|
|
|
3555
3574
|
}) } },
|
|
3556
3575
|
status: {
|
|
3557
3576
|
schema: BatteryStatusSchema,
|
|
3558
|
-
kind: "push"
|
|
3577
|
+
kind: "push",
|
|
3578
|
+
empty: {
|
|
3579
|
+
percentage: 0,
|
|
3580
|
+
charging: "none",
|
|
3581
|
+
sleeping: false,
|
|
3582
|
+
lastUpdated: 0
|
|
3583
|
+
}
|
|
3559
3584
|
},
|
|
3560
3585
|
/**
|
|
3561
3586
|
* Runtime-state slice — every provider that registers this cap
|
|
@@ -4735,7 +4760,25 @@ reset: require_sleep.method(zod.z.object({
|
|
|
4735
4760
|
}) },
|
|
4736
4761
|
status: {
|
|
4737
4762
|
schema: ConsumablesStatusSchema,
|
|
4738
|
-
kind: "push"
|
|
4763
|
+
kind: "push",
|
|
4764
|
+
empty: {
|
|
4765
|
+
items: [],
|
|
4766
|
+
lastChangedAt: 0
|
|
4767
|
+
},
|
|
4768
|
+
itemArray: {
|
|
4769
|
+
path: "items",
|
|
4770
|
+
keyField: "key",
|
|
4771
|
+
labelField: "label",
|
|
4772
|
+
itemSchema: ConsumableItemSchema,
|
|
4773
|
+
emptyItem: {
|
|
4774
|
+
key: "",
|
|
4775
|
+
label: "",
|
|
4776
|
+
level: null,
|
|
4777
|
+
status: null,
|
|
4778
|
+
lastResetAt: null,
|
|
4779
|
+
resettable: false
|
|
4780
|
+
}
|
|
4781
|
+
}
|
|
4739
4782
|
},
|
|
4740
4783
|
runtimeState: ConsumablesStatusSchema.extend({ lastFetchedAt: zod.z.number() })
|
|
4741
4784
|
};
|
|
@@ -6765,6 +6808,31 @@ var ReportMotionInputSchema = zod.z.object({
|
|
|
6765
6808
|
regions: zod.z.array(MotionRegionSchema).readonly().optional()
|
|
6766
6809
|
});
|
|
6767
6810
|
/**
|
|
6811
|
+
* Where a runner gets a camera's decoded frames (cross-node Phase 2,
|
|
6812
|
+
* restream-owner model — P2c).
|
|
6813
|
+
*
|
|
6814
|
+
* - `local-broker` (DEFAULT): today's path — subscribe to the co-located
|
|
6815
|
+
* stream-broker's shm frame plane. Every pre-P2c attach payload (no
|
|
6816
|
+
* `frameSource` key) parses to this, so the field is additive with zero
|
|
6817
|
+
* behavior change.
|
|
6818
|
+
* - `remote-restream`: the detect node is NOT the camera's source-owner.
|
|
6819
|
+
* The runner acquires the owner's COMPRESSED passthrough restream
|
|
6820
|
+
* (`streamBroker.getStreamWithCodec({video:'copy'})` — refcounted, the
|
|
6821
|
+
* double-pull guard) and decodes LOCALLY via a satellite frame plane +
|
|
6822
|
+
* pull-mode decoder session pinned to its own node. The shm ring stays
|
|
6823
|
+
* node-local; only H.264/H.265 packets cross the wire.
|
|
6824
|
+
* `hubHostnameOverride` mirrors the recorder's `recordingHubHostname`:
|
|
6825
|
+
* when set it overrides the `CAMSTACK_HUB_URL`-derived host the runner
|
|
6826
|
+
* dials for the owner's restream.
|
|
6827
|
+
*/
|
|
6828
|
+
var RunnerFrameSourceSchema = zod.z.discriminatedUnion("kind", [zod.z.object({ kind: zod.z.literal("local-broker") }), zod.z.object({
|
|
6829
|
+
kind: zod.z.literal("remote-restream"),
|
|
6830
|
+
/** The camera's source-owner node (slice 1: always the hub). */
|
|
6831
|
+
ownerNodeId: zod.z.string(),
|
|
6832
|
+
/** Operator override for the owner host the runner dials. */
|
|
6833
|
+
hubHostnameOverride: zod.z.string().optional()
|
|
6834
|
+
})]).describe("Per-camera frame-source mode for the runner (P2c)");
|
|
6835
|
+
/**
|
|
6768
6836
|
* Camera assignment payload sent by `addon-pipeline-orchestrator` to a
|
|
6769
6837
|
* specific runner instance via `attachCamera`. Carries everything the
|
|
6770
6838
|
* runner needs to subscribe to the local broker and execute inference.
|
|
@@ -6862,7 +6930,15 @@ var RunnerCameraConfigSchema = zod.z.object({
|
|
|
6862
6930
|
*/
|
|
6863
6931
|
onboardMotionDrivesAnalyzer: zod.z.boolean().default(true),
|
|
6864
6932
|
occupancyRecheckSec: zod.z.number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
|
|
6865
|
-
occupancyRecheckFrames: zod.z.number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default)
|
|
6933
|
+
occupancyRecheckFrames: zod.z.number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
|
|
6934
|
+
/**
|
|
6935
|
+
* Where this runner gets the camera's decoded frames (P2c). Defaulted so
|
|
6936
|
+
* every existing payload behaves as `local-broker` — the pre-Phase-2 path.
|
|
6937
|
+
* Populated with `remote-restream` by the orchestrator ONLY when the
|
|
6938
|
+
* camera's detect node differs from its source-owner (P2d, gated by the
|
|
6939
|
+
* `remoteSourcingNodes` rollout setting).
|
|
6940
|
+
*/
|
|
6941
|
+
frameSource: RunnerFrameSourceSchema.default({ kind: "local-broker" })
|
|
6866
6942
|
});
|
|
6867
6943
|
/**
|
|
6868
6944
|
* Per-device settings UI fields the runner cap owns. Co-located with
|
|
@@ -10169,6 +10245,17 @@ function enumerateSchemaFields(schema, prefix = "") {
|
|
|
10169
10245
|
}
|
|
10170
10246
|
return out;
|
|
10171
10247
|
}
|
|
10248
|
+
/** Enumerate the per-item wireable fields of an item-array cap (see
|
|
10249
|
+
* `CapabilityStatusItemArray`): the item schema's leaf fields, minus the
|
|
10250
|
+
* `keyField` (the key comes from the link's `itemKey`, never from a wired
|
|
10251
|
+
* source), each tagged `item: true` so the authoring UI collects an
|
|
10252
|
+
* `itemKey` alongside the field. Never throws. */
|
|
10253
|
+
function enumerateItemArrayFields(itemArray) {
|
|
10254
|
+
return enumerateSchemaFields(itemArray.itemSchema).filter((f) => f.path !== itemArray.keyField).map((f) => ({
|
|
10255
|
+
...f,
|
|
10256
|
+
item: true
|
|
10257
|
+
}));
|
|
10258
|
+
}
|
|
10172
10259
|
//#endregion
|
|
10173
10260
|
//#region src/utils/zone-rule-eval.ts
|
|
10174
10261
|
/**
|
|
@@ -13271,14 +13358,36 @@ var ChildLayoutEntrySchema = zod.z.object({
|
|
|
13271
13358
|
collapsed: zod.z.boolean().optional()
|
|
13272
13359
|
});
|
|
13273
13360
|
/** Cap-wire shape of a DeviceLink — structurally mirrors `DeviceLink` in
|
|
13274
|
-
* `device-management.ts`.
|
|
13361
|
+
* `device-management.ts`. Source is a union: a FIELD source copies a sibling
|
|
13362
|
+
* accessory's status field (`kind` optional/absent for wire compat); a
|
|
13363
|
+
* LITERAL source carries a per-device constant (no sibling is read); a
|
|
13364
|
+
* GLOBAL source (P2e) copies ANY device's status field, addressed by the
|
|
13365
|
+
* source device's full re-sync-stable `stableId`. */
|
|
13275
13366
|
var DeviceLinkSchema = zod.z.object({
|
|
13276
13367
|
id: zod.z.string(),
|
|
13277
|
-
source: zod.z.
|
|
13278
|
-
|
|
13279
|
-
|
|
13280
|
-
|
|
13281
|
-
|
|
13368
|
+
source: zod.z.union([
|
|
13369
|
+
zod.z.object({
|
|
13370
|
+
kind: zod.z.literal("field").optional(),
|
|
13371
|
+
sourceKey: zod.z.string(),
|
|
13372
|
+
cap: zod.z.string(),
|
|
13373
|
+
fieldPath: zod.z.string()
|
|
13374
|
+
}),
|
|
13375
|
+
zod.z.object({
|
|
13376
|
+
kind: zod.z.literal("literal"),
|
|
13377
|
+
value: zod.z.union([
|
|
13378
|
+
zod.z.string(),
|
|
13379
|
+
zod.z.number(),
|
|
13380
|
+
zod.z.boolean(),
|
|
13381
|
+
zod.z.null()
|
|
13382
|
+
])
|
|
13383
|
+
}),
|
|
13384
|
+
zod.z.object({
|
|
13385
|
+
kind: zod.z.literal("global"),
|
|
13386
|
+
sourceStableId: zod.z.string(),
|
|
13387
|
+
cap: zod.z.string(),
|
|
13388
|
+
fieldPath: zod.z.string()
|
|
13389
|
+
})
|
|
13390
|
+
]),
|
|
13282
13391
|
target: zod.z.object({
|
|
13283
13392
|
cap: zod.z.string(),
|
|
13284
13393
|
fieldPath: zod.z.string(),
|
|
@@ -13584,8 +13693,18 @@ var deviceManagerCapability = {
|
|
|
13584
13693
|
auth: "admin"
|
|
13585
13694
|
}),
|
|
13586
13695
|
/** List the wireable status-schema fields per cap bound to a device.
|
|
13587
|
-
* Powers the Wiring tab's field pickers. Caps without a status schema are
|
|
13588
|
-
|
|
13696
|
+
* Powers the Wiring tab's field pickers. Caps without a status schema are
|
|
13697
|
+
* omitted. Item-array caps (`status.itemArray`, e.g. consumables) also
|
|
13698
|
+
* emit their per-item fields tagged `item: true` (a link targeting one
|
|
13699
|
+
* must carry a `target.itemKey`) plus the cap-level `itemArray`
|
|
13700
|
+
* descriptor. `includeSynthesizable: true` (TARGET pickers only) unions
|
|
13701
|
+
* in unbound device-scoped caps that declare `status.empty` and match
|
|
13702
|
+
* the device's type — so the FIRST link to a synthesize-only cap
|
|
13703
|
+
* (consumables on an HA vacuum) can be authored. */
|
|
13704
|
+
getWireableFields: require_sleep.method(zod.z.object({
|
|
13705
|
+
deviceId: zod.z.number(),
|
|
13706
|
+
includeSynthesizable: zod.z.boolean().optional()
|
|
13707
|
+
}), zod.z.object({ caps: zod.z.array(zod.z.object({
|
|
13589
13708
|
cap: zod.z.string(),
|
|
13590
13709
|
fields: zod.z.array(zod.z.object({
|
|
13591
13710
|
path: zod.z.string(),
|
|
@@ -13595,8 +13714,13 @@ var deviceManagerCapability = {
|
|
|
13595
13714
|
"boolean",
|
|
13596
13715
|
"enum"
|
|
13597
13716
|
]),
|
|
13598
|
-
enumValues: zod.z.array(zod.z.string()).optional()
|
|
13599
|
-
|
|
13717
|
+
enumValues: zod.z.array(zod.z.string()).optional(),
|
|
13718
|
+
item: zod.z.boolean().optional()
|
|
13719
|
+
})).readonly(),
|
|
13720
|
+
itemArray: zod.z.object({
|
|
13721
|
+
path: zod.z.string(),
|
|
13722
|
+
keyField: zod.z.string()
|
|
13723
|
+
}).optional()
|
|
13600
13724
|
})).readonly() }), { kind: "query" }),
|
|
13601
13725
|
/** Stamp (or update) the semantic role on the device's meta row.
|
|
13602
13726
|
* Called by the kernel's `create()` / `spawnAccessoryChild` pre-seed
|
|
@@ -13747,7 +13871,11 @@ var deviceManagerCapability = {
|
|
|
13747
13871
|
deviceId: zod.z.number(),
|
|
13748
13872
|
entries: zod.z.array(zod.z.object({
|
|
13749
13873
|
capName: zod.z.string(),
|
|
13750
|
-
kind: zod.z.enum([
|
|
13874
|
+
kind: zod.z.enum([
|
|
13875
|
+
"native",
|
|
13876
|
+
"wrapped",
|
|
13877
|
+
"linked"
|
|
13878
|
+
]),
|
|
13751
13879
|
providerAddonId: zod.z.string(),
|
|
13752
13880
|
providerNodeId: zod.z.string(),
|
|
13753
13881
|
nativeAddonId: zod.z.string()
|
|
@@ -13765,7 +13893,11 @@ var deviceManagerCapability = {
|
|
|
13765
13893
|
deviceId: zod.z.number(),
|
|
13766
13894
|
entries: zod.z.array(zod.z.object({
|
|
13767
13895
|
capName: zod.z.string(),
|
|
13768
|
-
kind: zod.z.enum([
|
|
13896
|
+
kind: zod.z.enum([
|
|
13897
|
+
"native",
|
|
13898
|
+
"wrapped",
|
|
13899
|
+
"linked"
|
|
13900
|
+
]),
|
|
13769
13901
|
providerAddonId: zod.z.string(),
|
|
13770
13902
|
providerNodeId: zod.z.string(),
|
|
13771
13903
|
nativeAddonId: zod.z.string()
|
|
@@ -19545,6 +19677,16 @@ var rebootCapability = {
|
|
|
19545
19677
|
};
|
|
19546
19678
|
//#endregion
|
|
19547
19679
|
//#region src/capabilities/recording.cap.ts
|
|
19680
|
+
/**
|
|
19681
|
+
* `recording` cap — footage availability + HLS playback manifests + per-device
|
|
19682
|
+
* recording config. NOTE on events (source of truth, R5/C3): this cap carries
|
|
19683
|
+
* NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
|
|
19684
|
+
* events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
|
|
19685
|
+
* rows); the recorder's internal EventMap markers are ephemeral in-RAM
|
|
19686
|
+
* annotations that are not exposed here and must not be treated as an event
|
|
19687
|
+
* feed. Event<->footage joins are by time, padded with the shared `EVENT_PAD_MS`
|
|
19688
|
+
* (`interfaces/recording-config.ts`).
|
|
19689
|
+
*/
|
|
19548
19690
|
var RecordingStatusSchema = zod.z.object({
|
|
19549
19691
|
deviceId: zod.z.number(),
|
|
19550
19692
|
enabled: zod.z.boolean(),
|
|
@@ -26638,6 +26780,7 @@ exports.DiscoveredTargetSchema = DiscoveredTargetSchema;
|
|
|
26638
26780
|
exports.DisposerChain = require_sleep.DisposerChain;
|
|
26639
26781
|
exports.DoorbellPressEventSchema = DoorbellPressEventSchema;
|
|
26640
26782
|
exports.DoorbellStatusSchema = DoorbellStatusSchema;
|
|
26783
|
+
exports.EVENT_PAD_MS = EVENT_PAD_MS;
|
|
26641
26784
|
exports.ElementConfigStore = ElementConfigStore;
|
|
26642
26785
|
exports.EmbeddingInfoSchema = EmbeddingInfoSchema;
|
|
26643
26786
|
exports.EmbeddingResultSchema = EmbeddingResultSchema;
|
|
@@ -26830,6 +26973,7 @@ exports.RtpSourceSchema = RtpSourceSchema;
|
|
|
26830
26973
|
exports.RtspRestreamEntrySchema = RtspRestreamEntrySchema;
|
|
26831
26974
|
exports.RunnerCameraConfigSchema = RunnerCameraConfigSchema;
|
|
26832
26975
|
exports.RunnerCameraDeviceUIFields = RunnerCameraDeviceUIFields;
|
|
26976
|
+
exports.RunnerFrameSourceSchema = RunnerFrameSourceSchema;
|
|
26833
26977
|
exports.RunnerLocalLoadSchema = RunnerLocalLoadSchema;
|
|
26834
26978
|
exports.RunnerLocalMetricsSchema = RunnerLocalMetricsSchema;
|
|
26835
26979
|
exports.SCOPE_PRESETS = SCOPE_PRESETS;
|
|
@@ -27024,6 +27168,7 @@ exports.emitDownForOwnedCaps = require_sleep.emitDownForOwnedCaps;
|
|
|
27024
27168
|
exports.emitReadiness = require_sleep.emitReadiness;
|
|
27025
27169
|
exports.encodeProfileFromStreamShape = encodeProfileFromStreamShape;
|
|
27026
27170
|
exports.enumSensorCapability = enumSensorCapability;
|
|
27171
|
+
exports.enumerateItemArrayFields = enumerateItemArrayFields;
|
|
27027
27172
|
exports.enumerateSchemaFields = enumerateSchemaFields;
|
|
27028
27173
|
exports.errMsg = require_err_msg.errMsg;
|
|
27029
27174
|
exports.evaluateZoneRules = evaluateZoneRules;
|