@camstack/core 0.1.34 → 0.1.35
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/auth/auth-manager.d.ts +8 -0
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +5 -2
- package/dist/builtins/local-auth/local-auth.addon.js.map +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +5 -2
- package/dist/builtins/local-auth/local-auth.addon.mjs.map +1 -1
- package/dist/builtins/platform-probe/hardware-encoder-probe.d.ts +14 -0
- package/dist/builtins/platform-probe/hardware-encoder-probe.d.ts.map +1 -0
- package/dist/builtins/platform-probe/index.d.ts +2 -0
- package/dist/builtins/platform-probe/index.d.ts.map +1 -1
- package/dist/builtins/platform-probe/index.js +198 -5
- package/dist/builtins/platform-probe/index.js.map +1 -1
- package/dist/builtins/platform-probe/index.mjs +198 -6
- package/dist/builtins/platform-probe/index.mjs.map +1 -1
- package/dist/index.js +280 -175
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +280 -175
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37,7 +37,7 @@ let node_vm = require("node:vm");
|
|
|
37
37
|
node_vm = require_chunk.__toESM(node_vm);
|
|
38
38
|
let node_os = require("node:os");
|
|
39
39
|
node_os = require_chunk.__toESM(node_os);
|
|
40
|
-
//#region ../types/dist/index-
|
|
40
|
+
//#region ../types/dist/index-BBVUwOlZ.mjs
|
|
41
41
|
var MODEL_FORMATS = [
|
|
42
42
|
"onnx",
|
|
43
43
|
"coreml",
|
|
@@ -898,7 +898,7 @@ var DecodedFrameSchema = zod.z.object({
|
|
|
898
898
|
]),
|
|
899
899
|
timestamp: zod.z.number()
|
|
900
900
|
});
|
|
901
|
-
var BrokerStatusSchema = zod.z.enum([
|
|
901
|
+
var BrokerStatusSchema$1 = zod.z.enum([
|
|
902
902
|
"idle",
|
|
903
903
|
"connecting",
|
|
904
904
|
"streaming",
|
|
@@ -906,7 +906,7 @@ var BrokerStatusSchema = zod.z.enum([
|
|
|
906
906
|
"stopped"
|
|
907
907
|
]);
|
|
908
908
|
var BrokerStatsSchema = zod.z.object({
|
|
909
|
-
status: BrokerStatusSchema,
|
|
909
|
+
status: BrokerStatusSchema$1,
|
|
910
910
|
inputFps: zod.z.number(),
|
|
911
911
|
decodeFps: zod.z.number(),
|
|
912
912
|
encodedSubscribers: zod.z.number(),
|
|
@@ -1006,6 +1006,37 @@ zod.z.enum([
|
|
|
1006
1006
|
"disabled",
|
|
1007
1007
|
"waking"
|
|
1008
1008
|
]);
|
|
1009
|
+
var VideoCodecTargetSchema = zod.z.enum([
|
|
1010
|
+
"H264",
|
|
1011
|
+
"H265",
|
|
1012
|
+
"auto"
|
|
1013
|
+
]);
|
|
1014
|
+
var AudioCodecTargetSchema = zod.z.enum([
|
|
1015
|
+
"AAC",
|
|
1016
|
+
"Opus",
|
|
1017
|
+
"PCMU",
|
|
1018
|
+
"none"
|
|
1019
|
+
]);
|
|
1020
|
+
var MaxResolutionSchema = zod.z.object({
|
|
1021
|
+
width: zod.z.number().int().positive(),
|
|
1022
|
+
height: zod.z.number().int().positive()
|
|
1023
|
+
});
|
|
1024
|
+
var GetStreamWithCodecInputSchema = zod.z.object({
|
|
1025
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
1026
|
+
videoCodec: VideoCodecTargetSchema,
|
|
1027
|
+
audioCodec: AudioCodecTargetSchema.optional(),
|
|
1028
|
+
maxResolution: MaxResolutionSchema.optional(),
|
|
1029
|
+
tag: zod.z.string().optional()
|
|
1030
|
+
});
|
|
1031
|
+
var RtpSourceSchema = zod.z.object({
|
|
1032
|
+
url: zod.z.string(),
|
|
1033
|
+
videoCodec: zod.z.enum(["H264", "H265"]),
|
|
1034
|
+
audioCodec: zod.z.string(),
|
|
1035
|
+
resolution: MaxResolutionSchema,
|
|
1036
|
+
transcoded: zod.z.boolean(),
|
|
1037
|
+
encoder: zod.z.string(),
|
|
1038
|
+
pipelineKey: zod.z.string()
|
|
1039
|
+
});
|
|
1009
1040
|
method(zod.z.object({
|
|
1010
1041
|
deviceId: zod.z.number().int().nonnegative(),
|
|
1011
1042
|
camStreamId: zod.z.string().min(1),
|
|
@@ -1015,28 +1046,8 @@ method(zod.z.object({
|
|
|
1015
1046
|
resolution: CamStreamResolutionSchema.optional(),
|
|
1016
1047
|
fps: zod.z.number().positive().optional(),
|
|
1017
1048
|
label: zod.z.string().optional(),
|
|
1018
|
-
/**
|
|
1019
|
-
* Device-level features that the broker / manager / snapshot
|
|
1020
|
-
* orchestrator consult to derive per-stream policy (e.g.
|
|
1021
|
-
* `BatteryOperated` → relax stall watchdog, default pre-buffer
|
|
1022
|
-
* to off, raise snapshot rate-limit). Single source of truth —
|
|
1023
|
-
* publishers no longer set per-stream flags like `allowStall`.
|
|
1024
|
-
*/
|
|
1025
1049
|
deviceFeatures: zod.z.array(zod.z.string()).optional(),
|
|
1026
|
-
/**
|
|
1027
|
-
* Whether this stream participates in the broker's automatic
|
|
1028
|
-
* profile assignment. Defaults `true`. Publishers set `false` for
|
|
1029
|
-
* streams that should be SELECTABLE but not auto-picked — e.g.
|
|
1030
|
-
* Reolink publishes native Baichuan as eligible and RTSP/RTMP
|
|
1031
|
-
* mirrors as ineligible (still assignable manually via
|
|
1032
|
-
* `assignProfile`).
|
|
1033
|
-
*/
|
|
1034
1050
|
autoEligible: zod.z.boolean().optional(),
|
|
1035
|
-
/**
|
|
1036
|
-
* Transport-specific opaque metadata stashed alongside the stream
|
|
1037
|
-
* record. `pull-rfc4571` publishers put the SDP here so the broker
|
|
1038
|
-
* reader can route packets without an in-band DESCRIBE phase.
|
|
1039
|
-
*/
|
|
1040
1051
|
metadata: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
1041
1052
|
}), zod.z.object({ success: zod.z.literal(true) }), {
|
|
1042
1053
|
kind: "mutation",
|
|
@@ -1080,7 +1091,16 @@ method(zod.z.object({
|
|
|
1080
1091
|
}), method(zod.z.object({
|
|
1081
1092
|
streamId: zod.z.string(),
|
|
1082
1093
|
format: StreamFormatSchema
|
|
1083
|
-
}), zod.z.object({ url: zod.z.string() })), method(
|
|
1094
|
+
}), zod.z.object({ url: zod.z.string() })), method(GetStreamWithCodecInputSchema, RtpSourceSchema, {
|
|
1095
|
+
kind: "mutation",
|
|
1096
|
+
auth: "admin"
|
|
1097
|
+
}), method(zod.z.object({ pipelineKey: zod.z.string() }), zod.z.object({
|
|
1098
|
+
released: zod.z.boolean(),
|
|
1099
|
+
refcount: zod.z.number().int().nonnegative()
|
|
1100
|
+
}), {
|
|
1101
|
+
kind: "mutation",
|
|
1102
|
+
auth: "admin"
|
|
1103
|
+
}), method(zod.z.object({ brokerId: zod.z.string() }), zod.z.custom()), method(zod.z.object({
|
|
1084
1104
|
brokerId: zod.z.string(),
|
|
1085
1105
|
seconds: zod.z.number().min(0).max(30)
|
|
1086
1106
|
}), zod.z.void(), {
|
|
@@ -2451,14 +2471,25 @@ method(LogEntrySchema, zod.z.void(), { kind: "mutation" }), method(zod.z.object(
|
|
|
2451
2471
|
limit: zod.z.number().optional(),
|
|
2452
2472
|
tags: zod.z.record(zod.z.string(), zod.z.string()).optional()
|
|
2453
2473
|
}), zod.z.array(LogEntrySchema).readonly());
|
|
2454
|
-
|
|
2474
|
+
var StaticDirOutputSchema = zod.z.object({ staticDir: zod.z.string() });
|
|
2475
|
+
var VersionOutputSchema = zod.z.object({ version: zod.z.string() });
|
|
2476
|
+
method(zod.z.void(), StaticDirOutputSchema), method(zod.z.void(), VersionOutputSchema);
|
|
2455
2477
|
var SsoBridgeClaimsSchema = zod.z.object({
|
|
2456
2478
|
userId: zod.z.string(),
|
|
2457
2479
|
username: zod.z.string(),
|
|
2458
2480
|
isAdmin: zod.z.boolean(),
|
|
2459
2481
|
provider: zod.z.string(),
|
|
2460
2482
|
email: zod.z.string().optional(),
|
|
2461
|
-
displayName: zod.z.string().optional()
|
|
2483
|
+
displayName: zod.z.string().optional(),
|
|
2484
|
+
/**
|
|
2485
|
+
* Public HTTPS URL of the hub that issued this token. Used by
|
|
2486
|
+
* cloud-mode OAuth proxies (Alexa Smart Home Lambda, future Google
|
|
2487
|
+
* Home Lambda) to route a request back to the originating hub
|
|
2488
|
+
* without holding routing state of their own. The Lambda decodes the
|
|
2489
|
+
* JWT WITHOUT verifying the signature — the hub re-verifies on every
|
|
2490
|
+
* inbound call so trust still rests with the signing hub.
|
|
2491
|
+
*/
|
|
2492
|
+
hubUrl: zod.z.string().optional()
|
|
2462
2493
|
});
|
|
2463
2494
|
method(zod.z.object({
|
|
2464
2495
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -2510,7 +2541,7 @@ method(zod.z.object({
|
|
|
2510
2541
|
auth: "admin",
|
|
2511
2542
|
access: "delete"
|
|
2512
2543
|
});
|
|
2513
|
-
var EmailAddressSchema = zod.z.
|
|
2544
|
+
var EmailAddressSchema = zod.z.email();
|
|
2514
2545
|
var SendEmailInputSchema = zod.z.object({
|
|
2515
2546
|
to: zod.z.union([EmailAddressSchema, zod.z.array(EmailAddressSchema).min(1)]),
|
|
2516
2547
|
cc: zod.z.array(EmailAddressSchema).optional(),
|
|
@@ -2552,133 +2583,94 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
|
|
|
2552
2583
|
auth: "admin",
|
|
2553
2584
|
access: "view"
|
|
2554
2585
|
}), method(zod.z.void(), SmtpStatusSchema, { auth: "admin" });
|
|
2555
|
-
var
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2586
|
+
var BrokerKindSchema = zod.z.enum(["external", "embedded"]);
|
|
2587
|
+
var BrokerStatusSchema = zod.z.enum([
|
|
2588
|
+
"connected",
|
|
2589
|
+
"disconnected",
|
|
2590
|
+
"auth-failed",
|
|
2591
|
+
"unreachable",
|
|
2592
|
+
"tls-error"
|
|
2559
2593
|
]);
|
|
2560
|
-
var
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
/**
|
|
2569
|
-
|
|
2570
|
-
|
|
2594
|
+
var BrokerInfoSchema = zod.z.object({
|
|
2595
|
+
id: zod.z.string(),
|
|
2596
|
+
name: zod.z.string(),
|
|
2597
|
+
url: zod.z.string(),
|
|
2598
|
+
kind: BrokerKindSchema,
|
|
2599
|
+
status: BrokerStatusSchema,
|
|
2600
|
+
latencyMs: zod.z.number().nullable(),
|
|
2601
|
+
error: zod.z.string().optional(),
|
|
2602
|
+
/** Embedded brokers only: number of MQTT clients currently connected. */
|
|
2603
|
+
connectedClients: zod.z.number().int().nonnegative().optional(),
|
|
2604
|
+
/** Epoch ms of the last live probe (external) or aedes snapshot (embedded). */
|
|
2605
|
+
lastCheckedAt: zod.z.number().optional()
|
|
2606
|
+
});
|
|
2607
|
+
var BrokerConnectionDetailsSchema = zod.z.object({
|
|
2608
|
+
url: zod.z.string(),
|
|
2609
|
+
username: zod.z.string().optional(),
|
|
2610
|
+
password: zod.z.string().optional(),
|
|
2571
2611
|
/**
|
|
2572
|
-
*
|
|
2573
|
-
*
|
|
2574
|
-
*
|
|
2612
|
+
* Suggested prefix for `clientId`. Each consumer should suffix this
|
|
2613
|
+
* with its own discriminator (addon id, instance id) so reconnects
|
|
2614
|
+
* don't kick each other off (MQTT spec: clientId must be unique per
|
|
2615
|
+
* broker).
|
|
2575
2616
|
*/
|
|
2576
|
-
|
|
2617
|
+
clientIdPrefix: zod.z.string().optional()
|
|
2577
2618
|
});
|
|
2578
|
-
var
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
/** Subscription id from `subscribe`. */
|
|
2585
|
-
subscriptionId: zod.z.string() });
|
|
2586
|
-
var MqttStatusSchema = zod.z.object({
|
|
2587
|
-
/** True iff the addon has an active connection to the broker. */
|
|
2588
|
-
connected: zod.z.boolean(),
|
|
2589
|
-
/** Operator-visible host string (e.g. `mqtt://broker.example:1883`). */
|
|
2590
|
-
brokerUrl: zod.z.string(),
|
|
2591
|
-
/** Active subscription count (per-owner, NOT broker-side topic count). */
|
|
2592
|
-
subscriptionCount: zod.z.number().int(),
|
|
2593
|
-
/** Last error reported by the broker. */
|
|
2594
|
-
error: zod.z.string().optional(),
|
|
2595
|
-
/** Last successful connection timestamp (unix ms). */
|
|
2596
|
-
connectedAt: zod.z.number().optional()
|
|
2597
|
-
});
|
|
2598
|
-
var SubscriptionInfoSchema = zod.z.object({
|
|
2599
|
-
subscriptionId: zod.z.string(),
|
|
2600
|
-
topic: zod.z.string(),
|
|
2601
|
-
qos: QosSchema,
|
|
2602
|
-
owner: zod.z.string(),
|
|
2603
|
-
/** When this individual subscription was created. */
|
|
2604
|
-
createdAt: zod.z.number()
|
|
2619
|
+
var AddBrokerInputSchema = zod.z.object({
|
|
2620
|
+
name: zod.z.string().min(1),
|
|
2621
|
+
url: zod.z.string().regex(/^(mqtt|mqtts|ws|wss):\/\//, "URL must start with mqtt(s):// or ws(s)://"),
|
|
2622
|
+
username: zod.z.string().optional(),
|
|
2623
|
+
password: zod.z.string().optional(),
|
|
2624
|
+
clientIdPrefix: zod.z.string().optional()
|
|
2605
2625
|
});
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
})
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
/** HA service (e.g. `turn_on`, `toggle`). */
|
|
2623
|
-
service: zod.z.string(),
|
|
2624
|
-
/** Service-specific data payload (e.g. `{entity_id: 'light.kitchen', brightness: 200}`). */
|
|
2625
|
-
serviceData: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
|
|
2626
|
-
/** Optional target spec (entity_id / device_id / area_id). */
|
|
2627
|
-
target: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
2628
|
-
});
|
|
2629
|
-
var HaStateSchema = zod.z.object({
|
|
2630
|
-
entity_id: zod.z.string(),
|
|
2631
|
-
state: zod.z.string(),
|
|
2632
|
-
attributes: zod.z.record(zod.z.string(), zod.z.unknown()).default({}),
|
|
2633
|
-
last_changed: zod.z.string().optional(),
|
|
2634
|
-
last_updated: zod.z.string().optional()
|
|
2626
|
+
var AddBrokerResultSchema = zod.z.object({ id: zod.z.string() });
|
|
2627
|
+
var IdInputSchema = zod.z.object({ id: zod.z.string() });
|
|
2628
|
+
var TestResultSchema = zod.z.discriminatedUnion("ok", [zod.z.object({
|
|
2629
|
+
ok: zod.z.literal(true),
|
|
2630
|
+
latencyMs: zod.z.number()
|
|
2631
|
+
}), zod.z.object({
|
|
2632
|
+
ok: zod.z.literal(false),
|
|
2633
|
+
error: zod.z.string()
|
|
2634
|
+
})]);
|
|
2635
|
+
var StartEmbeddedInputSchema = zod.z.object({
|
|
2636
|
+
port: zod.z.number().int().min(1).max(65535).default(1883),
|
|
2637
|
+
/** Allow anonymous connect (no username/password). Default: false. */
|
|
2638
|
+
allowAnonymous: zod.z.boolean().default(false),
|
|
2639
|
+
/** Optional shared username/password for clients. */
|
|
2640
|
+
username: zod.z.string().optional(),
|
|
2641
|
+
password: zod.z.string().optional()
|
|
2635
2642
|
});
|
|
2636
|
-
var
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
/** Active per-owner subscription count. */
|
|
2640
|
-
subscriptionCount: zod.z.number().int(),
|
|
2641
|
-
/** Last error reported by the WebSocket. */
|
|
2642
|
-
error: zod.z.string().optional(),
|
|
2643
|
-
/** HA version reported during the auth handshake, when reachable. */
|
|
2644
|
-
haVersion: zod.z.string().optional(),
|
|
2645
|
-
connectedAt: zod.z.number().optional()
|
|
2643
|
+
var StartEmbeddedResultSchema = zod.z.object({
|
|
2644
|
+
id: zod.z.string(),
|
|
2645
|
+
url: zod.z.string()
|
|
2646
2646
|
});
|
|
2647
|
-
var
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
* `service_called`, etc.). Empty string = all events (firehose —
|
|
2651
|
-
* only for debugging).
|
|
2652
|
-
*/
|
|
2653
|
-
eventType: zod.z.string().optional(),
|
|
2654
|
-
/** Caller-supplied tag for listSubscriptions debugging. */
|
|
2655
|
-
owner: zod.z.string().optional()
|
|
2647
|
+
var StatusSchema = zod.z.object({
|
|
2648
|
+
brokerCount: zod.z.number(),
|
|
2649
|
+
embeddedRunning: zod.z.boolean()
|
|
2656
2650
|
});
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
createdAt: zod.z.number()
|
|
2651
|
+
method(zod.z.void(), zod.z.array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema), method(AddBrokerInputSchema, AddBrokerResultSchema, { kind: "mutation" }), method(IdInputSchema, zod.z.void(), { kind: "mutation" }), method(IdInputSchema, TestResultSchema, { kind: "mutation" }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, { kind: "mutation" }), method(IdInputSchema, zod.z.void(), { kind: "mutation" }), method(zod.z.void(), StatusSchema);
|
|
2652
|
+
var LinkStateSchema = zod.z.enum([
|
|
2653
|
+
"unlinked",
|
|
2654
|
+
"linked",
|
|
2655
|
+
"error"
|
|
2656
|
+
]);
|
|
2657
|
+
var DeviceExportStatusSchema = zod.z.object({
|
|
2658
|
+
linkState: LinkStateSchema,
|
|
2659
|
+
exposedDeviceCount: zod.z.number(),
|
|
2660
|
+
error: zod.z.string().optional()
|
|
2668
2661
|
});
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
}), method(zod.z.void(), zod.z.array(HaStateSchema).readonly(), { auth: "admin" }), method(zod.z.object({ entityId: zod.z.string() }), HaStateSchema.nullable(), { auth: "admin" }), method(zod.z.void(), zod.z.array(HaSubscriptionInfoSchema).readonly(), { auth: "admin" }), method(zod.z.void(), HaStatusSchema, { auth: "admin" });
|
|
2662
|
+
var DeviceKindSchema = zod.z.string();
|
|
2663
|
+
var ExposedDeviceSchema = zod.z.object({
|
|
2664
|
+
deviceId: zod.z.string(),
|
|
2665
|
+
exposedAs: zod.z.string().optional(),
|
|
2666
|
+
capabilities: zod.z.array(zod.z.string()).optional()
|
|
2667
|
+
});
|
|
2668
|
+
var ExposeInputSchema = zod.z.object({
|
|
2669
|
+
deviceId: zod.z.string(),
|
|
2670
|
+
capabilities: zod.z.array(zod.z.string()).optional()
|
|
2671
|
+
});
|
|
2672
|
+
var UnexposeInputSchema = zod.z.object({ deviceId: zod.z.string() });
|
|
2673
|
+
method(zod.z.void(), DeviceExportStatusSchema), method(zod.z.void(), zod.z.array(DeviceKindSchema)), method(zod.z.void(), zod.z.array(ExposedDeviceSchema)), method(ExposeInputSchema, zod.z.void(), { kind: "mutation" }), method(UnexposeInputSchema, zod.z.void(), { kind: "mutation" });
|
|
2682
2674
|
var AddonPageDeclarationSchema$1 = zod.z.object({
|
|
2683
2675
|
id: zod.z.string(),
|
|
2684
2676
|
label: zod.z.string(),
|
|
@@ -2934,6 +2926,14 @@ DeviceType.Camera, method(zod.z.object({ deviceId: zod.z.number().int().nonnegat
|
|
|
2934
2926
|
}), zod.z.object({
|
|
2935
2927
|
sessionId: zod.z.string(),
|
|
2936
2928
|
sdpOffer: zod.z.string()
|
|
2929
|
+
}), { kind: "mutation" }), method(zod.z.object({
|
|
2930
|
+
deviceId: zod.z.number().int().nonnegative(),
|
|
2931
|
+
target: WebrtcStreamTargetSchema.optional(),
|
|
2932
|
+
sdpOffer: zod.z.string(),
|
|
2933
|
+
sessionId: zod.z.string().optional()
|
|
2934
|
+
}), zod.z.object({
|
|
2935
|
+
sessionId: zod.z.string(),
|
|
2936
|
+
sdpAnswer: zod.z.string()
|
|
2937
2937
|
}), { kind: "mutation" }), method(zod.z.object({
|
|
2938
2938
|
deviceId: zod.z.number().int().nonnegative(),
|
|
2939
2939
|
sessionId: zod.z.string(),
|
|
@@ -3272,12 +3272,12 @@ method(zod.z.void(), zod.z.array(AudioCodecInfoSchema).readonly()), method(zod.z
|
|
|
3272
3272
|
}), zod.z.array(AudioEncodedChunkSchema), { kind: "mutation" }), method(zod.z.void(), zod.z.array(SessionInventoryEntrySchema).readonly());
|
|
3273
3273
|
var EmbeddingResultSchema = zod.z.object({
|
|
3274
3274
|
embedding: zod.z.array(zod.z.number()),
|
|
3275
|
-
|
|
3275
|
+
inferenceMs: zod.z.number()
|
|
3276
3276
|
});
|
|
3277
3277
|
var EmbeddingInfoSchema = zod.z.object({
|
|
3278
3278
|
modelId: zod.z.string(),
|
|
3279
|
-
|
|
3280
|
-
|
|
3279
|
+
embeddingDim: zod.z.number(),
|
|
3280
|
+
ready: zod.z.boolean()
|
|
3281
3281
|
});
|
|
3282
3282
|
method(zod.z.object({
|
|
3283
3283
|
crop: zod.z.instanceof(Uint8Array),
|
|
@@ -3618,7 +3618,20 @@ var NetworkAccessStatusSchema = zod.z.object({
|
|
|
3618
3618
|
endpoint: NetworkEndpointSchema.nullable(),
|
|
3619
3619
|
error: zod.z.string().optional()
|
|
3620
3620
|
});
|
|
3621
|
-
|
|
3621
|
+
var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
|
|
3622
|
+
/**
|
|
3623
|
+
* Stable id within the provider — typically `<mode>-<sourcePort>` so
|
|
3624
|
+
* the orchestrator can dedupe across `listEndpoints` polls.
|
|
3625
|
+
*/
|
|
3626
|
+
id: zod.z.string(),
|
|
3627
|
+
/** Operator-facing label (mirrors `MeshEndpoint.label`). */
|
|
3628
|
+
label: zod.z.string(),
|
|
3629
|
+
/** Optional provider-specific mode tag, used for icon/colour in admin UI. */
|
|
3630
|
+
mode: zod.z.string().optional(),
|
|
3631
|
+
/** Originating local port the ingress fronts (informational). */
|
|
3632
|
+
sourcePort: zod.z.number().optional()
|
|
3633
|
+
});
|
|
3634
|
+
method(zod.z.void(), NetworkEndpointSchema, { kind: "mutation" }), method(zod.z.void(), zod.z.void(), { kind: "mutation" }), method(zod.z.void(), NetworkEndpointSchema.nullable()), method(zod.z.void(), NetworkAccessStatusSchema), method(zod.z.void(), zod.z.array(NetworkEndpointEntrySchema).readonly());
|
|
3622
3635
|
var RemoteAccessEndpointSchema = zod.z.object({
|
|
3623
3636
|
url: zod.z.string(),
|
|
3624
3637
|
hostname: zod.z.string(),
|
|
@@ -3731,28 +3744,78 @@ method(zod.z.object({
|
|
|
3731
3744
|
success: zod.z.boolean(),
|
|
3732
3745
|
error: zod.z.string().optional()
|
|
3733
3746
|
}), { kind: "mutation" });
|
|
3747
|
+
var NotificationRuleConditionsSchema = zod.z.object({
|
|
3748
|
+
deviceIds: zod.z.array(zod.z.number()).readonly().optional(),
|
|
3749
|
+
classNames: zod.z.array(zod.z.string()).readonly().optional(),
|
|
3750
|
+
zoneIds: zod.z.array(zod.z.string()).readonly().optional(),
|
|
3751
|
+
minConfidence: zod.z.number().optional(),
|
|
3752
|
+
source: zod.z.enum([
|
|
3753
|
+
"pipeline",
|
|
3754
|
+
"onboard",
|
|
3755
|
+
"any"
|
|
3756
|
+
]).optional(),
|
|
3757
|
+
schedule: zod.z.object({
|
|
3758
|
+
days: zod.z.array(zod.z.number()).readonly(),
|
|
3759
|
+
startHour: zod.z.number(),
|
|
3760
|
+
endHour: zod.z.number()
|
|
3761
|
+
}).optional(),
|
|
3762
|
+
cooldownSeconds: zod.z.number().optional(),
|
|
3763
|
+
minDwellSeconds: zod.z.number().optional()
|
|
3764
|
+
});
|
|
3765
|
+
var NotificationRuleTemplateSchema = zod.z.object({
|
|
3766
|
+
title: zod.z.string(),
|
|
3767
|
+
body: zod.z.string(),
|
|
3768
|
+
imageMode: zod.z.enum([
|
|
3769
|
+
"crop",
|
|
3770
|
+
"annotated",
|
|
3771
|
+
"full",
|
|
3772
|
+
"none"
|
|
3773
|
+
])
|
|
3774
|
+
});
|
|
3734
3775
|
var NotificationRuleSchema = zod.z.object({
|
|
3735
3776
|
id: zod.z.string(),
|
|
3736
3777
|
name: zod.z.string(),
|
|
3737
3778
|
enabled: zod.z.boolean(),
|
|
3738
|
-
|
|
3739
|
-
|
|
3779
|
+
eventTypes: zod.z.array(zod.z.string()).readonly(),
|
|
3780
|
+
conditions: NotificationRuleConditionsSchema,
|
|
3781
|
+
outputs: zod.z.array(zod.z.string()).readonly(),
|
|
3782
|
+
template: NotificationRuleTemplateSchema.optional(),
|
|
3783
|
+
priority: zod.z.enum([
|
|
3784
|
+
"low",
|
|
3785
|
+
"normal",
|
|
3786
|
+
"high",
|
|
3787
|
+
"critical"
|
|
3788
|
+
])
|
|
3789
|
+
});
|
|
3790
|
+
var NotificationTestResultSchema = zod.z.object({
|
|
3791
|
+
ruleId: zod.z.string(),
|
|
3792
|
+
eventId: zod.z.string(),
|
|
3793
|
+
timestamp: zod.z.number(),
|
|
3794
|
+
wouldFire: zod.z.boolean(),
|
|
3795
|
+
reason: zod.z.string().optional()
|
|
3740
3796
|
});
|
|
3741
3797
|
var NotificationHistoryEntrySchema = zod.z.object({
|
|
3742
3798
|
id: zod.z.string(),
|
|
3743
3799
|
ruleId: zod.z.string(),
|
|
3800
|
+
ruleName: zod.z.string(),
|
|
3801
|
+
eventId: zod.z.string(),
|
|
3744
3802
|
timestamp: zod.z.number(),
|
|
3745
|
-
|
|
3803
|
+
outputs: zod.z.array(zod.z.string()).readonly(),
|
|
3746
3804
|
success: zod.z.boolean(),
|
|
3747
|
-
error: zod.z.string().optional()
|
|
3805
|
+
error: zod.z.string().optional(),
|
|
3806
|
+
deviceId: zod.z.number().optional()
|
|
3748
3807
|
});
|
|
3749
|
-
|
|
3750
|
-
ruleId: zod.z.string(),
|
|
3751
|
-
lookbackMinutes: zod.z.number()
|
|
3752
|
-
}), zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())), { kind: "mutation" }), method(zod.z.object({
|
|
3808
|
+
var NotificationHistoryFilterSchema = zod.z.object({
|
|
3753
3809
|
ruleId: zod.z.string().optional(),
|
|
3810
|
+
deviceId: zod.z.number().optional(),
|
|
3811
|
+
from: zod.z.number().optional(),
|
|
3812
|
+
to: zod.z.number().optional(),
|
|
3754
3813
|
limit: zod.z.number().optional()
|
|
3755
|
-
})
|
|
3814
|
+
});
|
|
3815
|
+
method(zod.z.void(), zod.z.object({ rules: zod.z.array(NotificationRuleSchema).readonly() })), method(zod.z.object({ rule: NotificationRuleSchema }), zod.z.object({ success: zod.z.literal(true) }), { kind: "mutation" }), method(zod.z.object({ ruleId: zod.z.string() }), zod.z.object({ success: zod.z.literal(true) }), { kind: "mutation" }), method(zod.z.object({
|
|
3816
|
+
ruleId: zod.z.string(),
|
|
3817
|
+
lookbackMinutes: zod.z.number()
|
|
3818
|
+
}), zod.z.object({ results: zod.z.array(NotificationTestResultSchema).readonly() }), { kind: "mutation" }), method(zod.z.object({ filter: NotificationHistoryFilterSchema.optional() }), zod.z.object({ entries: zod.z.array(NotificationHistoryEntrySchema).readonly() }));
|
|
3756
3819
|
var RecordingModeSchema = zod.z.enum([
|
|
3757
3820
|
"continuous",
|
|
3758
3821
|
"motion",
|
|
@@ -4440,6 +4503,22 @@ DeviceType.Camera, method(zod.z.object({ deviceId: zod.z.number() }), zod.z.obje
|
|
|
4440
4503
|
}), zod.z.void(), {
|
|
4441
4504
|
kind: "mutation",
|
|
4442
4505
|
auth: "admin"
|
|
4506
|
+
}), method(zod.z.object({ deviceId: zod.z.number() }), zod.z.object({ sessionId: zod.z.string() }), {
|
|
4507
|
+
kind: "mutation",
|
|
4508
|
+
auth: "admin"
|
|
4509
|
+
}), method(zod.z.object({
|
|
4510
|
+
deviceId: zod.z.number(),
|
|
4511
|
+
/** PCM frames as little-endian s16, mono. Base64-encoded so
|
|
4512
|
+
* the payload survives tRPC JSON serialization. */
|
|
4513
|
+
pcmBase64: zod.z.string(),
|
|
4514
|
+
/** Sequence number for ordering / dropping out-of-order frames. */
|
|
4515
|
+
sequenceNumber: zod.z.number().int()
|
|
4516
|
+
}), zod.z.object({ accepted: zod.z.boolean() }), {
|
|
4517
|
+
kind: "mutation",
|
|
4518
|
+
auth: "admin"
|
|
4519
|
+
}), method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
|
|
4520
|
+
kind: "mutation",
|
|
4521
|
+
auth: "admin"
|
|
4443
4522
|
}), zod.z.object({
|
|
4444
4523
|
deviceId: zod.z.number(),
|
|
4445
4524
|
status: IntercomStatusSchema
|
|
@@ -4491,6 +4570,40 @@ var HwAccelBackendInputSchema = zod.z.enum([
|
|
|
4491
4570
|
"none"
|
|
4492
4571
|
]).nullable().optional();
|
|
4493
4572
|
var HwAccelResolutionSchema = zod.z.object({ preferred: zod.z.array(zod.z.string()).readonly() });
|
|
4573
|
+
var HardwareEncoderIdSchema = zod.z.enum([
|
|
4574
|
+
"h264_videotoolbox",
|
|
4575
|
+
"hevc_videotoolbox",
|
|
4576
|
+
"h264_vaapi",
|
|
4577
|
+
"hevc_vaapi",
|
|
4578
|
+
"h264_nvenc",
|
|
4579
|
+
"hevc_nvenc",
|
|
4580
|
+
"h264_qsv",
|
|
4581
|
+
"hevc_qsv",
|
|
4582
|
+
"h264_amf",
|
|
4583
|
+
"hevc_amf",
|
|
4584
|
+
"libx264",
|
|
4585
|
+
"libx265"
|
|
4586
|
+
]);
|
|
4587
|
+
var HardwareEncoderProbeSchema = zod.z.object({
|
|
4588
|
+
encoder: HardwareEncoderIdSchema,
|
|
4589
|
+
codec: zod.z.enum(["H264", "H265"]),
|
|
4590
|
+
family: zod.z.enum([
|
|
4591
|
+
"videotoolbox",
|
|
4592
|
+
"vaapi",
|
|
4593
|
+
"nvenc",
|
|
4594
|
+
"qsv",
|
|
4595
|
+
"amf",
|
|
4596
|
+
"software"
|
|
4597
|
+
]),
|
|
4598
|
+
available: zod.z.boolean(),
|
|
4599
|
+
reason: zod.z.string().optional()
|
|
4600
|
+
});
|
|
4601
|
+
var HardwareEncodersSchema = zod.z.object({
|
|
4602
|
+
encoders: zod.z.array(HardwareEncoderProbeSchema).readonly(),
|
|
4603
|
+
defaultH264: HardwareEncoderIdSchema,
|
|
4604
|
+
defaultH265: HardwareEncoderIdSchema,
|
|
4605
|
+
probedAt: zod.z.number()
|
|
4606
|
+
});
|
|
4494
4607
|
var HardwarePlatformSchema = zod.z.enum([
|
|
4495
4608
|
"darwin",
|
|
4496
4609
|
"linux",
|
|
@@ -4553,7 +4666,10 @@ var ResolvedInferenceConfigSchema = zod.z.object({
|
|
|
4553
4666
|
method(zod.z.void(), PlatformCapabilitiesSchema), method(zod.z.void(), HardwareInfoSchema), method(zod.z.object({ requirements: zod.z.array(ModelRequirementSchema).readonly() }), ResolvedInferenceConfigSchema), method(zod.z.object({
|
|
4554
4667
|
prefer: HwAccelBackendInputSchema,
|
|
4555
4668
|
nodeId: zod.z.string().optional()
|
|
4556
|
-
}), HwAccelResolutionSchema)
|
|
4669
|
+
}), HwAccelResolutionSchema), method(zod.z.void(), HardwareEncodersSchema), method(zod.z.void(), HardwareEncodersSchema, {
|
|
4670
|
+
kind: "mutation",
|
|
4671
|
+
auth: "admin"
|
|
4672
|
+
});
|
|
4557
4673
|
var InterfaceKindEnum = zod.z.enum([
|
|
4558
4674
|
"lan",
|
|
4559
4675
|
"wifi",
|
|
@@ -4723,28 +4839,17 @@ var MeshStatusSchema = zod.z.object({
|
|
|
4723
4839
|
/** Last error from the daemon, when not joined. */
|
|
4724
4840
|
error: zod.z.string().optional()
|
|
4725
4841
|
});
|
|
4726
|
-
var PublicIngressConfigSchema = zod.z.object({
|
|
4727
|
-
/** Whether the provider should expose CamStack via its public
|
|
4728
|
-
* ingress (Tailscale Funnel, etc.). */
|
|
4729
|
-
enabled: zod.z.boolean(),
|
|
4730
|
-
/** Local port to forward. Auto-detected from the hub HTTP port
|
|
4731
|
-
* when omitted. */
|
|
4732
|
-
port: zod.z.number().int().min(1).max(65535).optional()
|
|
4733
|
-
});
|
|
4734
|
-
var MeshIngressConfigSchema = zod.z.object({
|
|
4735
|
-
/** Whether the provider should expose CamStack inside the mesh
|
|
4736
|
-
* via HTTPS (Tailscale Serve, etc.) instead of just raw IP. */
|
|
4737
|
-
enabled: zod.z.boolean(),
|
|
4738
|
-
/** Local port to forward. Auto-detected when omitted. */
|
|
4739
|
-
port: zod.z.number().int().min(1).max(65535).optional()
|
|
4740
|
-
});
|
|
4741
4842
|
method(zod.z.void(), MeshStatusSchema), method(zod.z.object({
|
|
4742
4843
|
/** Provider-specific auth key. For Tailscale this is the
|
|
4743
4844
|
* `tskey-auth-*` token from admin.tailscale.com. */
|
|
4744
4845
|
authKey: zod.z.string().min(8),
|
|
4745
4846
|
/** Optional hostname override the host should advertise. */
|
|
4746
4847
|
hostname: zod.z.string().optional()
|
|
4747
|
-
}), zod.z.object({ joined: zod.z.literal(true) }), { kind: "mutation" }), method(zod.z.
|
|
4848
|
+
}), zod.z.object({ joined: zod.z.literal(true) }), { kind: "mutation" }), method(zod.z.object({
|
|
4849
|
+
/** Optional hostname override the host should advertise once joined. */
|
|
4850
|
+
hostname: zod.z.string().optional() }), zod.z.object({
|
|
4851
|
+
/** Authentication URL the operator should open in a browser. */
|
|
4852
|
+
loginUrl: zod.z.string() }), { kind: "mutation" }), method(zod.z.void(), zod.z.object({ left: zod.z.literal(true) }), { kind: "mutation" }), method(zod.z.void(), zod.z.object({ peers: zod.z.array(MeshPeerSchema).readonly() })), method(zod.z.object({
|
|
4748
4853
|
/** Optional auth key — when provided, probes the key validity
|
|
4749
4854
|
* against the provider's API. Omit when already joined to
|
|
4750
4855
|
* just ping the daemon. */
|