@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.mjs
CHANGED
|
@@ -31,7 +31,7 @@ import { promisify } from "node:util";
|
|
|
31
31
|
import { errMsg, parseJsonObject } from "@camstack/types";
|
|
32
32
|
import * as vm from "node:vm";
|
|
33
33
|
import * as os from "node:os";
|
|
34
|
-
//#region ../types/dist/index-
|
|
34
|
+
//#region ../types/dist/index-BBVUwOlZ.mjs
|
|
35
35
|
var MODEL_FORMATS = [
|
|
36
36
|
"onnx",
|
|
37
37
|
"coreml",
|
|
@@ -892,7 +892,7 @@ var DecodedFrameSchema = z.object({
|
|
|
892
892
|
]),
|
|
893
893
|
timestamp: z.number()
|
|
894
894
|
});
|
|
895
|
-
var BrokerStatusSchema = z.enum([
|
|
895
|
+
var BrokerStatusSchema$1 = z.enum([
|
|
896
896
|
"idle",
|
|
897
897
|
"connecting",
|
|
898
898
|
"streaming",
|
|
@@ -900,7 +900,7 @@ var BrokerStatusSchema = z.enum([
|
|
|
900
900
|
"stopped"
|
|
901
901
|
]);
|
|
902
902
|
var BrokerStatsSchema = z.object({
|
|
903
|
-
status: BrokerStatusSchema,
|
|
903
|
+
status: BrokerStatusSchema$1,
|
|
904
904
|
inputFps: z.number(),
|
|
905
905
|
decodeFps: z.number(),
|
|
906
906
|
encodedSubscribers: z.number(),
|
|
@@ -1000,6 +1000,37 @@ z.enum([
|
|
|
1000
1000
|
"disabled",
|
|
1001
1001
|
"waking"
|
|
1002
1002
|
]);
|
|
1003
|
+
var VideoCodecTargetSchema = z.enum([
|
|
1004
|
+
"H264",
|
|
1005
|
+
"H265",
|
|
1006
|
+
"auto"
|
|
1007
|
+
]);
|
|
1008
|
+
var AudioCodecTargetSchema = z.enum([
|
|
1009
|
+
"AAC",
|
|
1010
|
+
"Opus",
|
|
1011
|
+
"PCMU",
|
|
1012
|
+
"none"
|
|
1013
|
+
]);
|
|
1014
|
+
var MaxResolutionSchema = z.object({
|
|
1015
|
+
width: z.number().int().positive(),
|
|
1016
|
+
height: z.number().int().positive()
|
|
1017
|
+
});
|
|
1018
|
+
var GetStreamWithCodecInputSchema = z.object({
|
|
1019
|
+
deviceId: z.number().int().nonnegative(),
|
|
1020
|
+
videoCodec: VideoCodecTargetSchema,
|
|
1021
|
+
audioCodec: AudioCodecTargetSchema.optional(),
|
|
1022
|
+
maxResolution: MaxResolutionSchema.optional(),
|
|
1023
|
+
tag: z.string().optional()
|
|
1024
|
+
});
|
|
1025
|
+
var RtpSourceSchema = z.object({
|
|
1026
|
+
url: z.string(),
|
|
1027
|
+
videoCodec: z.enum(["H264", "H265"]),
|
|
1028
|
+
audioCodec: z.string(),
|
|
1029
|
+
resolution: MaxResolutionSchema,
|
|
1030
|
+
transcoded: z.boolean(),
|
|
1031
|
+
encoder: z.string(),
|
|
1032
|
+
pipelineKey: z.string()
|
|
1033
|
+
});
|
|
1003
1034
|
method(z.object({
|
|
1004
1035
|
deviceId: z.number().int().nonnegative(),
|
|
1005
1036
|
camStreamId: z.string().min(1),
|
|
@@ -1009,28 +1040,8 @@ method(z.object({
|
|
|
1009
1040
|
resolution: CamStreamResolutionSchema.optional(),
|
|
1010
1041
|
fps: z.number().positive().optional(),
|
|
1011
1042
|
label: z.string().optional(),
|
|
1012
|
-
/**
|
|
1013
|
-
* Device-level features that the broker / manager / snapshot
|
|
1014
|
-
* orchestrator consult to derive per-stream policy (e.g.
|
|
1015
|
-
* `BatteryOperated` → relax stall watchdog, default pre-buffer
|
|
1016
|
-
* to off, raise snapshot rate-limit). Single source of truth —
|
|
1017
|
-
* publishers no longer set per-stream flags like `allowStall`.
|
|
1018
|
-
*/
|
|
1019
1043
|
deviceFeatures: z.array(z.string()).optional(),
|
|
1020
|
-
/**
|
|
1021
|
-
* Whether this stream participates in the broker's automatic
|
|
1022
|
-
* profile assignment. Defaults `true`. Publishers set `false` for
|
|
1023
|
-
* streams that should be SELECTABLE but not auto-picked — e.g.
|
|
1024
|
-
* Reolink publishes native Baichuan as eligible and RTSP/RTMP
|
|
1025
|
-
* mirrors as ineligible (still assignable manually via
|
|
1026
|
-
* `assignProfile`).
|
|
1027
|
-
*/
|
|
1028
1044
|
autoEligible: z.boolean().optional(),
|
|
1029
|
-
/**
|
|
1030
|
-
* Transport-specific opaque metadata stashed alongside the stream
|
|
1031
|
-
* record. `pull-rfc4571` publishers put the SDP here so the broker
|
|
1032
|
-
* reader can route packets without an in-band DESCRIBE phase.
|
|
1033
|
-
*/
|
|
1034
1045
|
metadata: z.record(z.string(), z.unknown()).optional()
|
|
1035
1046
|
}), z.object({ success: z.literal(true) }), {
|
|
1036
1047
|
kind: "mutation",
|
|
@@ -1074,7 +1085,16 @@ method(z.object({
|
|
|
1074
1085
|
}), method(z.object({
|
|
1075
1086
|
streamId: z.string(),
|
|
1076
1087
|
format: StreamFormatSchema
|
|
1077
|
-
}), z.object({ url: z.string() })), method(
|
|
1088
|
+
}), z.object({ url: z.string() })), method(GetStreamWithCodecInputSchema, RtpSourceSchema, {
|
|
1089
|
+
kind: "mutation",
|
|
1090
|
+
auth: "admin"
|
|
1091
|
+
}), method(z.object({ pipelineKey: z.string() }), z.object({
|
|
1092
|
+
released: z.boolean(),
|
|
1093
|
+
refcount: z.number().int().nonnegative()
|
|
1094
|
+
}), {
|
|
1095
|
+
kind: "mutation",
|
|
1096
|
+
auth: "admin"
|
|
1097
|
+
}), method(z.object({ brokerId: z.string() }), z.custom()), method(z.object({
|
|
1078
1098
|
brokerId: z.string(),
|
|
1079
1099
|
seconds: z.number().min(0).max(30)
|
|
1080
1100
|
}), z.void(), {
|
|
@@ -2445,14 +2465,25 @@ method(LogEntrySchema, z.void(), { kind: "mutation" }), method(z.object({
|
|
|
2445
2465
|
limit: z.number().optional(),
|
|
2446
2466
|
tags: z.record(z.string(), z.string()).optional()
|
|
2447
2467
|
}), z.array(LogEntrySchema).readonly());
|
|
2448
|
-
|
|
2468
|
+
var StaticDirOutputSchema = z.object({ staticDir: z.string() });
|
|
2469
|
+
var VersionOutputSchema = z.object({ version: z.string() });
|
|
2470
|
+
method(z.void(), StaticDirOutputSchema), method(z.void(), VersionOutputSchema);
|
|
2449
2471
|
var SsoBridgeClaimsSchema = z.object({
|
|
2450
2472
|
userId: z.string(),
|
|
2451
2473
|
username: z.string(),
|
|
2452
2474
|
isAdmin: z.boolean(),
|
|
2453
2475
|
provider: z.string(),
|
|
2454
2476
|
email: z.string().optional(),
|
|
2455
|
-
displayName: z.string().optional()
|
|
2477
|
+
displayName: z.string().optional(),
|
|
2478
|
+
/**
|
|
2479
|
+
* Public HTTPS URL of the hub that issued this token. Used by
|
|
2480
|
+
* cloud-mode OAuth proxies (Alexa Smart Home Lambda, future Google
|
|
2481
|
+
* Home Lambda) to route a request back to the originating hub
|
|
2482
|
+
* without holding routing state of their own. The Lambda decodes the
|
|
2483
|
+
* JWT WITHOUT verifying the signature — the hub re-verifies on every
|
|
2484
|
+
* inbound call so trust still rests with the signing hub.
|
|
2485
|
+
*/
|
|
2486
|
+
hubUrl: z.string().optional()
|
|
2456
2487
|
});
|
|
2457
2488
|
method(z.object({
|
|
2458
2489
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -2504,7 +2535,7 @@ method(z.object({
|
|
|
2504
2535
|
auth: "admin",
|
|
2505
2536
|
access: "delete"
|
|
2506
2537
|
});
|
|
2507
|
-
var EmailAddressSchema = z.
|
|
2538
|
+
var EmailAddressSchema = z.email();
|
|
2508
2539
|
var SendEmailInputSchema = z.object({
|
|
2509
2540
|
to: z.union([EmailAddressSchema, z.array(EmailAddressSchema).min(1)]),
|
|
2510
2541
|
cc: z.array(EmailAddressSchema).optional(),
|
|
@@ -2546,133 +2577,94 @@ method(SendEmailInputSchema, SendEmailResultSchema, {
|
|
|
2546
2577
|
auth: "admin",
|
|
2547
2578
|
access: "view"
|
|
2548
2579
|
}), method(z.void(), SmtpStatusSchema, { auth: "admin" });
|
|
2549
|
-
var
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2580
|
+
var BrokerKindSchema = z.enum(["external", "embedded"]);
|
|
2581
|
+
var BrokerStatusSchema = z.enum([
|
|
2582
|
+
"connected",
|
|
2583
|
+
"disconnected",
|
|
2584
|
+
"auth-failed",
|
|
2585
|
+
"unreachable",
|
|
2586
|
+
"tls-error"
|
|
2553
2587
|
]);
|
|
2554
|
-
var
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
/**
|
|
2563
|
-
|
|
2564
|
-
|
|
2588
|
+
var BrokerInfoSchema = z.object({
|
|
2589
|
+
id: z.string(),
|
|
2590
|
+
name: z.string(),
|
|
2591
|
+
url: z.string(),
|
|
2592
|
+
kind: BrokerKindSchema,
|
|
2593
|
+
status: BrokerStatusSchema,
|
|
2594
|
+
latencyMs: z.number().nullable(),
|
|
2595
|
+
error: z.string().optional(),
|
|
2596
|
+
/** Embedded brokers only: number of MQTT clients currently connected. */
|
|
2597
|
+
connectedClients: z.number().int().nonnegative().optional(),
|
|
2598
|
+
/** Epoch ms of the last live probe (external) or aedes snapshot (embedded). */
|
|
2599
|
+
lastCheckedAt: z.number().optional()
|
|
2600
|
+
});
|
|
2601
|
+
var BrokerConnectionDetailsSchema = z.object({
|
|
2602
|
+
url: z.string(),
|
|
2603
|
+
username: z.string().optional(),
|
|
2604
|
+
password: z.string().optional(),
|
|
2565
2605
|
/**
|
|
2566
|
-
*
|
|
2567
|
-
*
|
|
2568
|
-
*
|
|
2606
|
+
* Suggested prefix for `clientId`. Each consumer should suffix this
|
|
2607
|
+
* with its own discriminator (addon id, instance id) so reconnects
|
|
2608
|
+
* don't kick each other off (MQTT spec: clientId must be unique per
|
|
2609
|
+
* broker).
|
|
2569
2610
|
*/
|
|
2570
|
-
|
|
2611
|
+
clientIdPrefix: z.string().optional()
|
|
2571
2612
|
});
|
|
2572
|
-
var
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
/** Subscription id from `subscribe`. */
|
|
2579
|
-
subscriptionId: z.string() });
|
|
2580
|
-
var MqttStatusSchema = z.object({
|
|
2581
|
-
/** True iff the addon has an active connection to the broker. */
|
|
2582
|
-
connected: z.boolean(),
|
|
2583
|
-
/** Operator-visible host string (e.g. `mqtt://broker.example:1883`). */
|
|
2584
|
-
brokerUrl: z.string(),
|
|
2585
|
-
/** Active subscription count (per-owner, NOT broker-side topic count). */
|
|
2586
|
-
subscriptionCount: z.number().int(),
|
|
2587
|
-
/** Last error reported by the broker. */
|
|
2588
|
-
error: z.string().optional(),
|
|
2589
|
-
/** Last successful connection timestamp (unix ms). */
|
|
2590
|
-
connectedAt: z.number().optional()
|
|
2591
|
-
});
|
|
2592
|
-
var SubscriptionInfoSchema = z.object({
|
|
2593
|
-
subscriptionId: z.string(),
|
|
2594
|
-
topic: z.string(),
|
|
2595
|
-
qos: QosSchema,
|
|
2596
|
-
owner: z.string(),
|
|
2597
|
-
/** When this individual subscription was created. */
|
|
2598
|
-
createdAt: z.number()
|
|
2613
|
+
var AddBrokerInputSchema = z.object({
|
|
2614
|
+
name: z.string().min(1),
|
|
2615
|
+
url: z.string().regex(/^(mqtt|mqtts|ws|wss):\/\//, "URL must start with mqtt(s):// or ws(s)://"),
|
|
2616
|
+
username: z.string().optional(),
|
|
2617
|
+
password: z.string().optional(),
|
|
2618
|
+
clientIdPrefix: z.string().optional()
|
|
2599
2619
|
});
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
})
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
/** HA service (e.g. `turn_on`, `toggle`). */
|
|
2617
|
-
service: z.string(),
|
|
2618
|
-
/** Service-specific data payload (e.g. `{entity_id: 'light.kitchen', brightness: 200}`). */
|
|
2619
|
-
serviceData: z.record(z.string(), z.unknown()).optional(),
|
|
2620
|
-
/** Optional target spec (entity_id / device_id / area_id). */
|
|
2621
|
-
target: z.record(z.string(), z.unknown()).optional()
|
|
2622
|
-
});
|
|
2623
|
-
var HaStateSchema = z.object({
|
|
2624
|
-
entity_id: z.string(),
|
|
2625
|
-
state: z.string(),
|
|
2626
|
-
attributes: z.record(z.string(), z.unknown()).default({}),
|
|
2627
|
-
last_changed: z.string().optional(),
|
|
2628
|
-
last_updated: z.string().optional()
|
|
2620
|
+
var AddBrokerResultSchema = z.object({ id: z.string() });
|
|
2621
|
+
var IdInputSchema = z.object({ id: z.string() });
|
|
2622
|
+
var TestResultSchema = z.discriminatedUnion("ok", [z.object({
|
|
2623
|
+
ok: z.literal(true),
|
|
2624
|
+
latencyMs: z.number()
|
|
2625
|
+
}), z.object({
|
|
2626
|
+
ok: z.literal(false),
|
|
2627
|
+
error: z.string()
|
|
2628
|
+
})]);
|
|
2629
|
+
var StartEmbeddedInputSchema = z.object({
|
|
2630
|
+
port: z.number().int().min(1).max(65535).default(1883),
|
|
2631
|
+
/** Allow anonymous connect (no username/password). Default: false. */
|
|
2632
|
+
allowAnonymous: z.boolean().default(false),
|
|
2633
|
+
/** Optional shared username/password for clients. */
|
|
2634
|
+
username: z.string().optional(),
|
|
2635
|
+
password: z.string().optional()
|
|
2629
2636
|
});
|
|
2630
|
-
var
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
/** Active per-owner subscription count. */
|
|
2634
|
-
subscriptionCount: z.number().int(),
|
|
2635
|
-
/** Last error reported by the WebSocket. */
|
|
2636
|
-
error: z.string().optional(),
|
|
2637
|
-
/** HA version reported during the auth handshake, when reachable. */
|
|
2638
|
-
haVersion: z.string().optional(),
|
|
2639
|
-
connectedAt: z.number().optional()
|
|
2637
|
+
var StartEmbeddedResultSchema = z.object({
|
|
2638
|
+
id: z.string(),
|
|
2639
|
+
url: z.string()
|
|
2640
2640
|
});
|
|
2641
|
-
var
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
* `service_called`, etc.). Empty string = all events (firehose —
|
|
2645
|
-
* only for debugging).
|
|
2646
|
-
*/
|
|
2647
|
-
eventType: z.string().optional(),
|
|
2648
|
-
/** Caller-supplied tag for listSubscriptions debugging. */
|
|
2649
|
-
owner: z.string().optional()
|
|
2641
|
+
var StatusSchema = z.object({
|
|
2642
|
+
brokerCount: z.number(),
|
|
2643
|
+
embeddedRunning: z.boolean()
|
|
2650
2644
|
});
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
createdAt: z.number()
|
|
2645
|
+
method(z.void(), z.array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema), method(AddBrokerInputSchema, AddBrokerResultSchema, { kind: "mutation" }), method(IdInputSchema, z.void(), { kind: "mutation" }), method(IdInputSchema, TestResultSchema, { kind: "mutation" }), method(StartEmbeddedInputSchema, StartEmbeddedResultSchema, { kind: "mutation" }), method(IdInputSchema, z.void(), { kind: "mutation" }), method(z.void(), StatusSchema);
|
|
2646
|
+
var LinkStateSchema = z.enum([
|
|
2647
|
+
"unlinked",
|
|
2648
|
+
"linked",
|
|
2649
|
+
"error"
|
|
2650
|
+
]);
|
|
2651
|
+
var DeviceExportStatusSchema = z.object({
|
|
2652
|
+
linkState: LinkStateSchema,
|
|
2653
|
+
exposedDeviceCount: z.number(),
|
|
2654
|
+
error: z.string().optional()
|
|
2662
2655
|
});
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
}), method(z.void(), z.array(HaStateSchema).readonly(), { auth: "admin" }), method(z.object({ entityId: z.string() }), HaStateSchema.nullable(), { auth: "admin" }), method(z.void(), z.array(HaSubscriptionInfoSchema).readonly(), { auth: "admin" }), method(z.void(), HaStatusSchema, { auth: "admin" });
|
|
2656
|
+
var DeviceKindSchema = z.string();
|
|
2657
|
+
var ExposedDeviceSchema = z.object({
|
|
2658
|
+
deviceId: z.string(),
|
|
2659
|
+
exposedAs: z.string().optional(),
|
|
2660
|
+
capabilities: z.array(z.string()).optional()
|
|
2661
|
+
});
|
|
2662
|
+
var ExposeInputSchema = z.object({
|
|
2663
|
+
deviceId: z.string(),
|
|
2664
|
+
capabilities: z.array(z.string()).optional()
|
|
2665
|
+
});
|
|
2666
|
+
var UnexposeInputSchema = z.object({ deviceId: z.string() });
|
|
2667
|
+
method(z.void(), DeviceExportStatusSchema), method(z.void(), z.array(DeviceKindSchema)), method(z.void(), z.array(ExposedDeviceSchema)), method(ExposeInputSchema, z.void(), { kind: "mutation" }), method(UnexposeInputSchema, z.void(), { kind: "mutation" });
|
|
2676
2668
|
var AddonPageDeclarationSchema$1 = z.object({
|
|
2677
2669
|
id: z.string(),
|
|
2678
2670
|
label: z.string(),
|
|
@@ -2928,6 +2920,14 @@ DeviceType$1.Camera, method(z.object({ deviceId: z.number().int().nonnegative()
|
|
|
2928
2920
|
}), z.object({
|
|
2929
2921
|
sessionId: z.string(),
|
|
2930
2922
|
sdpOffer: z.string()
|
|
2923
|
+
}), { kind: "mutation" }), method(z.object({
|
|
2924
|
+
deviceId: z.number().int().nonnegative(),
|
|
2925
|
+
target: WebrtcStreamTargetSchema.optional(),
|
|
2926
|
+
sdpOffer: z.string(),
|
|
2927
|
+
sessionId: z.string().optional()
|
|
2928
|
+
}), z.object({
|
|
2929
|
+
sessionId: z.string(),
|
|
2930
|
+
sdpAnswer: z.string()
|
|
2931
2931
|
}), { kind: "mutation" }), method(z.object({
|
|
2932
2932
|
deviceId: z.number().int().nonnegative(),
|
|
2933
2933
|
sessionId: z.string(),
|
|
@@ -3266,12 +3266,12 @@ method(z.void(), z.array(AudioCodecInfoSchema).readonly()), method(z.object({
|
|
|
3266
3266
|
}), z.array(AudioEncodedChunkSchema), { kind: "mutation" }), method(z.void(), z.array(SessionInventoryEntrySchema).readonly());
|
|
3267
3267
|
var EmbeddingResultSchema = z.object({
|
|
3268
3268
|
embedding: z.array(z.number()),
|
|
3269
|
-
|
|
3269
|
+
inferenceMs: z.number()
|
|
3270
3270
|
});
|
|
3271
3271
|
var EmbeddingInfoSchema = z.object({
|
|
3272
3272
|
modelId: z.string(),
|
|
3273
|
-
|
|
3274
|
-
|
|
3273
|
+
embeddingDim: z.number(),
|
|
3274
|
+
ready: z.boolean()
|
|
3275
3275
|
});
|
|
3276
3276
|
method(z.object({
|
|
3277
3277
|
crop: z.instanceof(Uint8Array),
|
|
@@ -3612,7 +3612,20 @@ var NetworkAccessStatusSchema = z.object({
|
|
|
3612
3612
|
endpoint: NetworkEndpointSchema.nullable(),
|
|
3613
3613
|
error: z.string().optional()
|
|
3614
3614
|
});
|
|
3615
|
-
|
|
3615
|
+
var NetworkEndpointEntrySchema = NetworkEndpointSchema.extend({
|
|
3616
|
+
/**
|
|
3617
|
+
* Stable id within the provider — typically `<mode>-<sourcePort>` so
|
|
3618
|
+
* the orchestrator can dedupe across `listEndpoints` polls.
|
|
3619
|
+
*/
|
|
3620
|
+
id: z.string(),
|
|
3621
|
+
/** Operator-facing label (mirrors `MeshEndpoint.label`). */
|
|
3622
|
+
label: z.string(),
|
|
3623
|
+
/** Optional provider-specific mode tag, used for icon/colour in admin UI. */
|
|
3624
|
+
mode: z.string().optional(),
|
|
3625
|
+
/** Originating local port the ingress fronts (informational). */
|
|
3626
|
+
sourcePort: z.number().optional()
|
|
3627
|
+
});
|
|
3628
|
+
method(z.void(), NetworkEndpointSchema, { kind: "mutation" }), method(z.void(), z.void(), { kind: "mutation" }), method(z.void(), NetworkEndpointSchema.nullable()), method(z.void(), NetworkAccessStatusSchema), method(z.void(), z.array(NetworkEndpointEntrySchema).readonly());
|
|
3616
3629
|
var RemoteAccessEndpointSchema = z.object({
|
|
3617
3630
|
url: z.string(),
|
|
3618
3631
|
hostname: z.string(),
|
|
@@ -3725,28 +3738,78 @@ method(z.object({
|
|
|
3725
3738
|
success: z.boolean(),
|
|
3726
3739
|
error: z.string().optional()
|
|
3727
3740
|
}), { kind: "mutation" });
|
|
3741
|
+
var NotificationRuleConditionsSchema = z.object({
|
|
3742
|
+
deviceIds: z.array(z.number()).readonly().optional(),
|
|
3743
|
+
classNames: z.array(z.string()).readonly().optional(),
|
|
3744
|
+
zoneIds: z.array(z.string()).readonly().optional(),
|
|
3745
|
+
minConfidence: z.number().optional(),
|
|
3746
|
+
source: z.enum([
|
|
3747
|
+
"pipeline",
|
|
3748
|
+
"onboard",
|
|
3749
|
+
"any"
|
|
3750
|
+
]).optional(),
|
|
3751
|
+
schedule: z.object({
|
|
3752
|
+
days: z.array(z.number()).readonly(),
|
|
3753
|
+
startHour: z.number(),
|
|
3754
|
+
endHour: z.number()
|
|
3755
|
+
}).optional(),
|
|
3756
|
+
cooldownSeconds: z.number().optional(),
|
|
3757
|
+
minDwellSeconds: z.number().optional()
|
|
3758
|
+
});
|
|
3759
|
+
var NotificationRuleTemplateSchema = z.object({
|
|
3760
|
+
title: z.string(),
|
|
3761
|
+
body: z.string(),
|
|
3762
|
+
imageMode: z.enum([
|
|
3763
|
+
"crop",
|
|
3764
|
+
"annotated",
|
|
3765
|
+
"full",
|
|
3766
|
+
"none"
|
|
3767
|
+
])
|
|
3768
|
+
});
|
|
3728
3769
|
var NotificationRuleSchema = z.object({
|
|
3729
3770
|
id: z.string(),
|
|
3730
3771
|
name: z.string(),
|
|
3731
3772
|
enabled: z.boolean(),
|
|
3732
|
-
|
|
3733
|
-
|
|
3773
|
+
eventTypes: z.array(z.string()).readonly(),
|
|
3774
|
+
conditions: NotificationRuleConditionsSchema,
|
|
3775
|
+
outputs: z.array(z.string()).readonly(),
|
|
3776
|
+
template: NotificationRuleTemplateSchema.optional(),
|
|
3777
|
+
priority: z.enum([
|
|
3778
|
+
"low",
|
|
3779
|
+
"normal",
|
|
3780
|
+
"high",
|
|
3781
|
+
"critical"
|
|
3782
|
+
])
|
|
3783
|
+
});
|
|
3784
|
+
var NotificationTestResultSchema = z.object({
|
|
3785
|
+
ruleId: z.string(),
|
|
3786
|
+
eventId: z.string(),
|
|
3787
|
+
timestamp: z.number(),
|
|
3788
|
+
wouldFire: z.boolean(),
|
|
3789
|
+
reason: z.string().optional()
|
|
3734
3790
|
});
|
|
3735
3791
|
var NotificationHistoryEntrySchema = z.object({
|
|
3736
3792
|
id: z.string(),
|
|
3737
3793
|
ruleId: z.string(),
|
|
3794
|
+
ruleName: z.string(),
|
|
3795
|
+
eventId: z.string(),
|
|
3738
3796
|
timestamp: z.number(),
|
|
3739
|
-
|
|
3797
|
+
outputs: z.array(z.string()).readonly(),
|
|
3740
3798
|
success: z.boolean(),
|
|
3741
|
-
error: z.string().optional()
|
|
3799
|
+
error: z.string().optional(),
|
|
3800
|
+
deviceId: z.number().optional()
|
|
3742
3801
|
});
|
|
3743
|
-
|
|
3744
|
-
ruleId: z.string(),
|
|
3745
|
-
lookbackMinutes: z.number()
|
|
3746
|
-
}), z.array(z.record(z.string(), z.unknown())), { kind: "mutation" }), method(z.object({
|
|
3802
|
+
var NotificationHistoryFilterSchema = z.object({
|
|
3747
3803
|
ruleId: z.string().optional(),
|
|
3804
|
+
deviceId: z.number().optional(),
|
|
3805
|
+
from: z.number().optional(),
|
|
3806
|
+
to: z.number().optional(),
|
|
3748
3807
|
limit: z.number().optional()
|
|
3749
|
-
})
|
|
3808
|
+
});
|
|
3809
|
+
method(z.void(), z.object({ rules: z.array(NotificationRuleSchema).readonly() })), method(z.object({ rule: NotificationRuleSchema }), z.object({ success: z.literal(true) }), { kind: "mutation" }), method(z.object({ ruleId: z.string() }), z.object({ success: z.literal(true) }), { kind: "mutation" }), method(z.object({
|
|
3810
|
+
ruleId: z.string(),
|
|
3811
|
+
lookbackMinutes: z.number()
|
|
3812
|
+
}), z.object({ results: z.array(NotificationTestResultSchema).readonly() }), { kind: "mutation" }), method(z.object({ filter: NotificationHistoryFilterSchema.optional() }), z.object({ entries: z.array(NotificationHistoryEntrySchema).readonly() }));
|
|
3750
3813
|
var RecordingModeSchema = z.enum([
|
|
3751
3814
|
"continuous",
|
|
3752
3815
|
"motion",
|
|
@@ -4434,6 +4497,22 @@ DeviceType$1.Camera, method(z.object({ deviceId: z.number() }), z.object({
|
|
|
4434
4497
|
}), z.void(), {
|
|
4435
4498
|
kind: "mutation",
|
|
4436
4499
|
auth: "admin"
|
|
4500
|
+
}), method(z.object({ deviceId: z.number() }), z.object({ sessionId: z.string() }), {
|
|
4501
|
+
kind: "mutation",
|
|
4502
|
+
auth: "admin"
|
|
4503
|
+
}), method(z.object({
|
|
4504
|
+
deviceId: z.number(),
|
|
4505
|
+
/** PCM frames as little-endian s16, mono. Base64-encoded so
|
|
4506
|
+
* the payload survives tRPC JSON serialization. */
|
|
4507
|
+
pcmBase64: z.string(),
|
|
4508
|
+
/** Sequence number for ordering / dropping out-of-order frames. */
|
|
4509
|
+
sequenceNumber: z.number().int()
|
|
4510
|
+
}), z.object({ accepted: z.boolean() }), {
|
|
4511
|
+
kind: "mutation",
|
|
4512
|
+
auth: "admin"
|
|
4513
|
+
}), method(z.object({ deviceId: z.number() }), z.void(), {
|
|
4514
|
+
kind: "mutation",
|
|
4515
|
+
auth: "admin"
|
|
4437
4516
|
}), z.object({
|
|
4438
4517
|
deviceId: z.number(),
|
|
4439
4518
|
status: IntercomStatusSchema
|
|
@@ -4485,6 +4564,40 @@ var HwAccelBackendInputSchema = z.enum([
|
|
|
4485
4564
|
"none"
|
|
4486
4565
|
]).nullable().optional();
|
|
4487
4566
|
var HwAccelResolutionSchema = z.object({ preferred: z.array(z.string()).readonly() });
|
|
4567
|
+
var HardwareEncoderIdSchema = z.enum([
|
|
4568
|
+
"h264_videotoolbox",
|
|
4569
|
+
"hevc_videotoolbox",
|
|
4570
|
+
"h264_vaapi",
|
|
4571
|
+
"hevc_vaapi",
|
|
4572
|
+
"h264_nvenc",
|
|
4573
|
+
"hevc_nvenc",
|
|
4574
|
+
"h264_qsv",
|
|
4575
|
+
"hevc_qsv",
|
|
4576
|
+
"h264_amf",
|
|
4577
|
+
"hevc_amf",
|
|
4578
|
+
"libx264",
|
|
4579
|
+
"libx265"
|
|
4580
|
+
]);
|
|
4581
|
+
var HardwareEncoderProbeSchema = z.object({
|
|
4582
|
+
encoder: HardwareEncoderIdSchema,
|
|
4583
|
+
codec: z.enum(["H264", "H265"]),
|
|
4584
|
+
family: z.enum([
|
|
4585
|
+
"videotoolbox",
|
|
4586
|
+
"vaapi",
|
|
4587
|
+
"nvenc",
|
|
4588
|
+
"qsv",
|
|
4589
|
+
"amf",
|
|
4590
|
+
"software"
|
|
4591
|
+
]),
|
|
4592
|
+
available: z.boolean(),
|
|
4593
|
+
reason: z.string().optional()
|
|
4594
|
+
});
|
|
4595
|
+
var HardwareEncodersSchema = z.object({
|
|
4596
|
+
encoders: z.array(HardwareEncoderProbeSchema).readonly(),
|
|
4597
|
+
defaultH264: HardwareEncoderIdSchema,
|
|
4598
|
+
defaultH265: HardwareEncoderIdSchema,
|
|
4599
|
+
probedAt: z.number()
|
|
4600
|
+
});
|
|
4488
4601
|
var HardwarePlatformSchema = z.enum([
|
|
4489
4602
|
"darwin",
|
|
4490
4603
|
"linux",
|
|
@@ -4547,7 +4660,10 @@ var ResolvedInferenceConfigSchema = z.object({
|
|
|
4547
4660
|
method(z.void(), PlatformCapabilitiesSchema), method(z.void(), HardwareInfoSchema), method(z.object({ requirements: z.array(ModelRequirementSchema).readonly() }), ResolvedInferenceConfigSchema), method(z.object({
|
|
4548
4661
|
prefer: HwAccelBackendInputSchema,
|
|
4549
4662
|
nodeId: z.string().optional()
|
|
4550
|
-
}), HwAccelResolutionSchema)
|
|
4663
|
+
}), HwAccelResolutionSchema), method(z.void(), HardwareEncodersSchema), method(z.void(), HardwareEncodersSchema, {
|
|
4664
|
+
kind: "mutation",
|
|
4665
|
+
auth: "admin"
|
|
4666
|
+
});
|
|
4551
4667
|
var InterfaceKindEnum = z.enum([
|
|
4552
4668
|
"lan",
|
|
4553
4669
|
"wifi",
|
|
@@ -4717,28 +4833,17 @@ var MeshStatusSchema = z.object({
|
|
|
4717
4833
|
/** Last error from the daemon, when not joined. */
|
|
4718
4834
|
error: z.string().optional()
|
|
4719
4835
|
});
|
|
4720
|
-
var PublicIngressConfigSchema = z.object({
|
|
4721
|
-
/** Whether the provider should expose CamStack via its public
|
|
4722
|
-
* ingress (Tailscale Funnel, etc.). */
|
|
4723
|
-
enabled: z.boolean(),
|
|
4724
|
-
/** Local port to forward. Auto-detected from the hub HTTP port
|
|
4725
|
-
* when omitted. */
|
|
4726
|
-
port: z.number().int().min(1).max(65535).optional()
|
|
4727
|
-
});
|
|
4728
|
-
var MeshIngressConfigSchema = z.object({
|
|
4729
|
-
/** Whether the provider should expose CamStack inside the mesh
|
|
4730
|
-
* via HTTPS (Tailscale Serve, etc.) instead of just raw IP. */
|
|
4731
|
-
enabled: z.boolean(),
|
|
4732
|
-
/** Local port to forward. Auto-detected when omitted. */
|
|
4733
|
-
port: z.number().int().min(1).max(65535).optional()
|
|
4734
|
-
});
|
|
4735
4836
|
method(z.void(), MeshStatusSchema), method(z.object({
|
|
4736
4837
|
/** Provider-specific auth key. For Tailscale this is the
|
|
4737
4838
|
* `tskey-auth-*` token from admin.tailscale.com. */
|
|
4738
4839
|
authKey: z.string().min(8),
|
|
4739
4840
|
/** Optional hostname override the host should advertise. */
|
|
4740
4841
|
hostname: z.string().optional()
|
|
4741
|
-
}), z.object({ joined: z.literal(true) }), { kind: "mutation" }), method(z.
|
|
4842
|
+
}), z.object({ joined: z.literal(true) }), { kind: "mutation" }), method(z.object({
|
|
4843
|
+
/** Optional hostname override the host should advertise once joined. */
|
|
4844
|
+
hostname: z.string().optional() }), z.object({
|
|
4845
|
+
/** Authentication URL the operator should open in a browser. */
|
|
4846
|
+
loginUrl: z.string() }), { kind: "mutation" }), method(z.void(), z.object({ left: z.literal(true) }), { kind: "mutation" }), method(z.void(), z.object({ peers: z.array(MeshPeerSchema).readonly() })), method(z.object({
|
|
4742
4847
|
/** Optional auth key — when provided, probes the key validity
|
|
4743
4848
|
* against the provider's API. Omit when already joined to
|
|
4744
4849
|
* just ping the daemon. */
|