@camstack/types 1.2.285 → 1.2.286

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.
@@ -5,6 +5,7 @@ declare const ProviderStatusSchema: z.ZodObject<{
5
5
  connected: z.ZodBoolean;
6
6
  deviceCount: z.ZodNumber;
7
7
  error: z.ZodOptional<z.ZodString>;
8
+ motionSliceWriter: z.ZodOptional<z.ZodLiteral<"orchestrator">>;
8
9
  }, z.core.$strip>;
9
10
  declare const DiscoveredDeviceSchema: z.ZodObject<{
10
11
  externalId: z.ZodString;
@@ -79,6 +80,7 @@ export declare const deviceProviderCapability: {
79
80
  connected: z.ZodBoolean;
80
81
  deviceCount: z.ZodNumber;
81
82
  error: z.ZodOptional<z.ZodString>;
83
+ motionSliceWriter: z.ZodOptional<z.ZodLiteral<"orchestrator">>;
82
84
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
83
85
  readonly getDevices: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodArray<z.ZodObject<{
84
86
  id: z.ZodString;
@@ -48,6 +48,8 @@ export interface ProviderStatus {
48
48
  readonly connected: boolean;
49
49
  readonly deviceCount: number;
50
50
  readonly error?: string;
51
+ /** This provider writes no camera's `motion` slice (D696); see `device-provider.cap.ts`. */
52
+ readonly motionSliceWriter?: 'orchestrator';
51
53
  }
52
54
  /**
53
55
  * Outcome of an `onRestoreDevices` pass. Optional for back-compat:
package/dist/index.js CHANGED
@@ -13327,7 +13327,17 @@ function siteZoneKey(label) {
13327
13327
  var ProviderStatusSchema = zod.z.object({
13328
13328
  connected: zod.z.boolean(),
13329
13329
  deviceCount: zod.z.number(),
13330
- error: zod.z.string().optional()
13330
+ error: zod.z.string().optional(),
13331
+ /**
13332
+ * `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
13333
+ * — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
13334
+ * which every provider bundles, so only a provider BUILT from D696-amended
13335
+ * code says it. ABSENT means an older provider that may still write it (raw
13336
+ * VMD writes, a boot seed), and the orchestrator's provider gate keeps that
13337
+ * provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
13338
+ * — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
13339
+ */
13340
+ motionSliceWriter: zod.z.literal("orchestrator").optional()
13331
13341
  });
13332
13342
  var DiscoveredDeviceSchema = zod.z.object({
13333
13343
  externalId: zod.z.string(),
@@ -48058,13 +48068,14 @@ var BaseDeviceProvider = class extends require_sleep.BaseAddon {
48058
48068
  async getStatus() {
48059
48069
  const all = await this.ctx.kernel.devices?.getAll() ?? [];
48060
48070
  const summary = this.restoreFailureSummary();
48061
- if (summary === null) return {
48071
+ const base = {
48062
48072
  connected: true,
48063
- deviceCount: all.length
48073
+ deviceCount: all.length,
48074
+ motionSliceWriter: "orchestrator"
48064
48075
  };
48076
+ if (summary === null) return base;
48065
48077
  return {
48066
- connected: true,
48067
- deviceCount: all.length,
48078
+ ...base,
48068
48079
  error: summary
48069
48080
  };
48070
48081
  }
package/dist/index.mjs CHANGED
@@ -13326,7 +13326,17 @@ function siteZoneKey(label) {
13326
13326
  var ProviderStatusSchema = z.object({
13327
13327
  connected: z.boolean(),
13328
13328
  deviceCount: z.number(),
13329
- error: z.string().optional()
13329
+ error: z.string().optional(),
13330
+ /**
13331
+ * `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
13332
+ * — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
13333
+ * which every provider bundles, so only a provider BUILT from D696-amended
13334
+ * code says it. ABSENT means an older provider that may still write it (raw
13335
+ * VMD writes, a boot seed), and the orchestrator's provider gate keeps that
13336
+ * provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
13337
+ * — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
13338
+ */
13339
+ motionSliceWriter: z.literal("orchestrator").optional()
13330
13340
  });
13331
13341
  var DiscoveredDeviceSchema = z.object({
13332
13342
  externalId: z.string(),
@@ -48057,13 +48067,14 @@ var BaseDeviceProvider = class extends BaseAddon {
48057
48067
  async getStatus() {
48058
48068
  const all = await this.ctx.kernel.devices?.getAll() ?? [];
48059
48069
  const summary = this.restoreFailureSummary();
48060
- if (summary === null) return {
48070
+ const base = {
48061
48071
  connected: true,
48062
- deviceCount: all.length
48072
+ deviceCount: all.length,
48073
+ motionSliceWriter: "orchestrator"
48063
48074
  };
48075
+ if (summary === null) return base;
48064
48076
  return {
48065
- connected: true,
48066
- deviceCount: all.length,
48077
+ ...base,
48067
48078
  error: summary
48068
48079
  };
48069
48080
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.285",
3
+ "version": "1.2.286",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",