@camstack/types 1.2.579 → 1.2.581
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/addon/session-health.d.ts +7 -2
- package/dist/capabilities/webrtc-session.cap.d.ts +12 -0
- package/dist/index.js +11 -2
- package/dist/index.mjs +11 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.581] - 2026-11-15
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- The WebRTC session hints accept an optional intent (live or clip).
|
|
15
|
+
|
|
16
|
+
## [1.2.580] - 2026-11-15
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- A session-lost alert always opens the providing addon's integration page on the instance: addonId is required on SessionHealthTracker and IntegrationSessionReporter.bind
|
|
21
|
+
|
|
10
22
|
## [1.2.579] - 2026-11-15
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -69,8 +69,11 @@ export interface SessionHealthTrackerOptions {
|
|
|
69
69
|
/** Read lazily: `ctx.api.alerts` may be absent early in boot. */
|
|
70
70
|
readonly getAlerts: () => SessionHealthAlertsPort | undefined;
|
|
71
71
|
readonly debounceMs?: number;
|
|
72
|
-
/**
|
|
73
|
-
|
|
72
|
+
/**
|
|
73
|
+
* The providing addon: the default "Open integration" action opens its page on the instance
|
|
74
|
+
* (`integrationPageHref`). Required, so no tracker falls back to the integrations list.
|
|
75
|
+
*/
|
|
76
|
+
readonly addonId: string;
|
|
74
77
|
/** Defaults to `error`. A session that only a person can restore is `critical`. */
|
|
75
78
|
readonly severity?: AlertSeverity;
|
|
76
79
|
}
|
|
@@ -93,6 +96,8 @@ export declare class SessionHealthTracker {
|
|
|
93
96
|
dispose(): void;
|
|
94
97
|
}
|
|
95
98
|
export interface IntegrationSessionBinding {
|
|
99
|
+
/** The addon that binds the reporter (`ctx.id`): its page is the alert's default action. */
|
|
100
|
+
readonly addonId: string;
|
|
96
101
|
readonly logger: IScopedLogger;
|
|
97
102
|
readonly getAlerts: () => SessionHealthAlertsPort | undefined;
|
|
98
103
|
readonly debounceMs?: number;
|
|
@@ -13,6 +13,10 @@ export declare const webrtcClientHintsSchema: z.ZodObject<{
|
|
|
13
13
|
devicePixelRatio: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
14
14
|
downlinkMbps: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
15
15
|
prefersTier: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
16
|
+
intent: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
17
|
+
clip: "clip";
|
|
18
|
+
live: "live";
|
|
19
|
+
}>>>;
|
|
16
20
|
}, z.core.$strip>;
|
|
17
21
|
export type WebrtcClientHints = z.infer<typeof webrtcClientHintsSchema>;
|
|
18
22
|
/**
|
|
@@ -365,6 +369,10 @@ export declare const webrtcSessionCapability: {
|
|
|
365
369
|
devicePixelRatio: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
366
370
|
downlinkMbps: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
367
371
|
prefersTier: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
372
|
+
intent: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
373
|
+
clip: "clip";
|
|
374
|
+
live: "live";
|
|
375
|
+
}>>>;
|
|
368
376
|
}, z.core.$strip>>;
|
|
369
377
|
relayOnly: z.ZodOptional<z.ZodBoolean>;
|
|
370
378
|
consumerAttribution: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
@@ -477,6 +485,10 @@ export declare const webrtcSessionCapability: {
|
|
|
477
485
|
devicePixelRatio: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
478
486
|
downlinkMbps: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
|
|
479
487
|
prefersTier: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
488
|
+
intent: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
489
|
+
clip: "clip";
|
|
490
|
+
live: "live";
|
|
491
|
+
}>>>;
|
|
480
492
|
}, z.core.$strip>>;
|
|
481
493
|
talkback: z.ZodOptional<z.ZodBoolean>;
|
|
482
494
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/index.js
CHANGED
|
@@ -719,7 +719,7 @@ var SessionHealthTracker = class {
|
|
|
719
719
|
integrationId,
|
|
720
720
|
integrationName: entry.info.integrationName,
|
|
721
721
|
reason: entry.info.reason,
|
|
722
|
-
|
|
722
|
+
addonId: this.#opts.addonId,
|
|
723
723
|
...this.#opts.severity !== void 0 ? { severity: this.#opts.severity } : {},
|
|
724
724
|
...entry.info.action !== void 0 ? { action: entry.info.action } : {}
|
|
725
725
|
}));
|
|
@@ -792,6 +792,7 @@ var IntegrationSessionReporter = class {
|
|
|
792
792
|
providerName: this.#opts.providerName,
|
|
793
793
|
logger: binding.logger,
|
|
794
794
|
getAlerts: binding.getAlerts,
|
|
795
|
+
addonId: binding.addonId,
|
|
795
796
|
...binding.debounceMs !== void 0 ? { debounceMs: binding.debounceMs } : {}
|
|
796
797
|
});
|
|
797
798
|
}
|
|
@@ -101543,7 +101544,15 @@ var webrtcClientHintsSchema = zod.z.object({
|
|
|
101543
101544
|
/** navigator.connection.downlink — Mbps the browser estimates. */
|
|
101544
101545
|
downlinkMbps: zod.z.number().nonnegative().optional(),
|
|
101545
101546
|
/** Hard tier override; takes precedence over scoring when registered. */
|
|
101546
|
-
prefersTier: zod.z.string().optional()
|
|
101547
|
+
prefersTier: zod.z.string().optional(),
|
|
101548
|
+
/**
|
|
101549
|
+
* What the session is opened FOR. `clip` = the client opens it to play a
|
|
101550
|
+
* stored clip (`playClip` on the control channel): the server negotiates
|
|
101551
|
+
* without dialling the camera and attaches live only when the client
|
|
101552
|
+
* sends `goLive` — a sleeping battery camera is never woken to watch our
|
|
101553
|
+
* own footage (#566). Absent or `live` = today's live-first session.
|
|
101554
|
+
*/
|
|
101555
|
+
intent: zod.z.enum(["live", "clip"]).optional()
|
|
101547
101556
|
}).partial();
|
|
101548
101557
|
/**
|
|
101549
101558
|
* Discriminated target for a WebRTC session. The client sends this
|
package/dist/index.mjs
CHANGED
|
@@ -718,7 +718,7 @@ var SessionHealthTracker = class {
|
|
|
718
718
|
integrationId,
|
|
719
719
|
integrationName: entry.info.integrationName,
|
|
720
720
|
reason: entry.info.reason,
|
|
721
|
-
|
|
721
|
+
addonId: this.#opts.addonId,
|
|
722
722
|
...this.#opts.severity !== void 0 ? { severity: this.#opts.severity } : {},
|
|
723
723
|
...entry.info.action !== void 0 ? { action: entry.info.action } : {}
|
|
724
724
|
}));
|
|
@@ -791,6 +791,7 @@ var IntegrationSessionReporter = class {
|
|
|
791
791
|
providerName: this.#opts.providerName,
|
|
792
792
|
logger: binding.logger,
|
|
793
793
|
getAlerts: binding.getAlerts,
|
|
794
|
+
addonId: binding.addonId,
|
|
794
795
|
...binding.debounceMs !== void 0 ? { debounceMs: binding.debounceMs } : {}
|
|
795
796
|
});
|
|
796
797
|
}
|
|
@@ -101542,7 +101543,15 @@ var webrtcClientHintsSchema = z.object({
|
|
|
101542
101543
|
/** navigator.connection.downlink — Mbps the browser estimates. */
|
|
101543
101544
|
downlinkMbps: z.number().nonnegative().optional(),
|
|
101544
101545
|
/** Hard tier override; takes precedence over scoring when registered. */
|
|
101545
|
-
prefersTier: z.string().optional()
|
|
101546
|
+
prefersTier: z.string().optional(),
|
|
101547
|
+
/**
|
|
101548
|
+
* What the session is opened FOR. `clip` = the client opens it to play a
|
|
101549
|
+
* stored clip (`playClip` on the control channel): the server negotiates
|
|
101550
|
+
* without dialling the camera and attaches live only when the client
|
|
101551
|
+
* sends `goLive` — a sleeping battery camera is never woken to watch our
|
|
101552
|
+
* own footage (#566). Absent or `live` = today's live-first session.
|
|
101553
|
+
*/
|
|
101554
|
+
intent: z.enum(["live", "clip"]).optional()
|
|
101546
101555
|
}).partial();
|
|
101547
101556
|
/**
|
|
101548
101557
|
* Discriminated target for a WebRTC session. The client sends this
|