@camstack/addon-provider-gree 0.2.41 → 0.2.42

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.
Files changed (3) hide show
  1. package/dist/addon.js +121 -13
  2. package/dist/addon.mjs +121 -13
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -8042,18 +8042,61 @@ var RelocateFootageInputSchema = object({
8042
8042
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8043
8043
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8044
8044
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8045
+ /**
8046
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8047
+ * mover (the engine already walks both collections with a timestamp cursor and
8048
+ * already has a stamp-without-copy path).
8049
+ *
8050
+ * - `move` — the default and the historical behaviour: event-media and
8051
+ * retrain blobs move to `toLocationId` and their rows are
8052
+ * stamped. The enrolled gallery is skipped (D197).
8053
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8054
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8055
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8056
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8057
+ * instant a repoint moves that pointer the row reads from the
8058
+ * new disk while its bytes are on the old one.
8059
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8060
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8061
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8062
+ * never run beside a live second location: it is stop-the-world
8063
+ * by construction, which is acceptable only because the gallery
8064
+ * is a few KB per enrolled sample.
8065
+ */
8066
+ var MediaRelocateModeSchema = _enum([
8067
+ "move",
8068
+ "seal",
8069
+ "gallery"
8070
+ ]);
8045
8071
  var RelocateMediaInputSchema = object({
8046
8072
  toLocationId: string(),
8047
- throttleMbps: number().min(1).max(1e3).optional()
8073
+ throttleMbps: number().min(1).max(1e3).optional(),
8074
+ /** Omitted = `move`, the pre-existing behaviour. */
8075
+ mode: MediaRelocateModeSchema.optional()
8076
+ });
8077
+ /** How many rows still carry NO `locationId` — the population a repoint would
8078
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8079
+ * value that permits a non-blocking `eventMedia` cutover. */
8080
+ var UnstampedEventMediaCountSchema = object({
8081
+ media: number().int().nonnegative(),
8082
+ retrainFrames: number().int().nonnegative(),
8083
+ total: number().int().nonnegative()
8048
8084
  });
8049
8085
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8050
- /** The independently selectable logical storage classes. `recordings`
8051
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8052
- * segments; `eventMedia` is post-analysis blobs. */
8086
+ /** The independently selectable logical storage classes — every class
8087
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8088
+ * Zod enum error where they should meet an explanation.
8089
+ *
8090
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8091
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8092
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8093
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8053
8094
  var StorageMigrationClassSchema = _enum([
8054
8095
  "recordings",
8055
8096
  "recordingsLow",
8056
- "eventMedia"
8097
+ "eventMedia",
8098
+ "backups",
8099
+ "galleryMedia"
8057
8100
  ]);
8058
8101
  /** A destination is always an existing, fully-qualified location id. The
8059
8102
  * migration API intentionally never changes a source location's `basePath`:
@@ -8061,20 +8104,56 @@ var StorageMigrationClassSchema = _enum([
8061
8104
  var StorageMigrationDestinationsSchema = object({
8062
8105
  recordings: string().min(1).optional(),
8063
8106
  recordingsLow: string().min(1).optional(),
8064
- eventMedia: string().min(1).optional()
8107
+ eventMedia: string().min(1).optional(),
8108
+ backups: string().min(1).optional(),
8109
+ galleryMedia: string().min(1).optional()
8065
8110
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8111
+ /**
8112
+ * How a migration sequences the cutover against the byte move.
8113
+ *
8114
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8115
+ * resume. Recording is stopped for the whole move. Right
8116
+ * for a small or a cold class, and the only legal mode for
8117
+ * a `cardinality: 'single'` class.
8118
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8119
+ * refresh, resume, then move the past with everything
8120
+ * running. The pause is three bounded instants (a detach +
8121
+ * attach round, a write-gate drain, a lease) instead of one
8122
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8123
+ * stopped recording under `blocking`; the same move is
8124
+ * seconds of stopped recording under `nonBlocking`.
8125
+ *
8126
+ * The mode is on the JOB, not only on the input, because `status` is where an
8127
+ * operator finds out which one is running.
8128
+ */
8129
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8066
8130
  /** Shared input for planning and starting an orchestrated storage migration. */
8067
8131
  var StorageMigrationInputSchema = object({
8068
8132
  destinations: StorageMigrationDestinationsSchema,
8069
- throttleMbps: number().min(1).max(1e3).optional()
8133
+ throttleMbps: number().min(1).max(1e3).optional(),
8134
+ /** Omitted = `blocking`, which stays the default. */
8135
+ mode: StorageMigrationModeSchema.optional()
8070
8136
  });
8071
- /** The durable coordinator state machine. The only phase that changes default
8072
- * locations is `repointing`, after every selected mover has completed and been
8073
- * verified. */
8137
+ /**
8138
+ * The durable coordinator state machine.
8139
+ *
8140
+ * `blocking`:
8141
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8142
+ *
8143
+ * `nonBlocking`:
8144
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8145
+ *
8146
+ * Same phases, different order plus two new ones — not a second mover.
8147
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8148
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8149
+ * `repointing` is still the only phase that changes a default location.
8150
+ */
8074
8151
  var StorageMigrationPhaseSchema = _enum([
8075
8152
  "planning",
8153
+ "sealing",
8076
8154
  "pausing",
8077
8155
  "moving",
8156
+ "draining",
8078
8157
  "verifying",
8079
8158
  "repointing",
8080
8159
  "refreshing",
@@ -8099,6 +8178,9 @@ var StorageMigrationMoveSchema = object({
8099
8178
  var StorageMigrationJobSchema = object({
8100
8179
  jobId: string(),
8101
8180
  phase: StorageMigrationPhaseSchema,
8181
+ /** Which order this job is running. `status` is the only place an operator
8182
+ * can tell a seconds-long cutover from a thirty-hour one. */
8183
+ mode: StorageMigrationModeSchema,
8102
8184
  destinations: StorageMigrationDestinationsSchema,
8103
8185
  throttleMbps: number(),
8104
8186
  moves: array(StorageMigrationMoveSchema),
@@ -8111,13 +8193,30 @@ var StorageMigrationJobSchema = object({
8111
8193
  finishedAt: number().nullable(),
8112
8194
  error: string().nullable()
8113
8195
  });
8196
+ var StorageMigrationFindingSchema = object({
8197
+ code: _enum([
8198
+ "sharesDeviceWithSource",
8199
+ "deviceIdentityUnknown",
8200
+ "unstampedEventMediaRows",
8201
+ "blockingOnly",
8202
+ "noMover"
8203
+ ]),
8204
+ storageClass: StorageMigrationClassSchema,
8205
+ /** Human-readable, already carrying the ids and counts. */
8206
+ message: string()
8207
+ });
8114
8208
  var StorageMigrationPlanSchema = object({
8115
8209
  destinations: StorageMigrationDestinationsSchema,
8210
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8211
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8212
+ * it. */
8213
+ mode: StorageMigrationModeSchema,
8116
8214
  moves: array(object({
8117
8215
  storageClass: StorageMigrationClassSchema,
8118
8216
  fromLocationId: string(),
8119
8217
  toLocationId: string()
8120
- }))
8218
+ })),
8219
+ findings: array(StorageMigrationFindingSchema)
8121
8220
  });
8122
8221
  /**
8123
8222
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -18970,7 +19069,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18970
19069
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
18971
19070
  kind: "mutation",
18972
19071
  auth: "admin"
18973
- }), method(object({}), array(RelocateJobSchema).readonly(), {
19072
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
18974
19073
  kind: "query",
18975
19074
  auth: "admin"
18976
19075
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -20877,7 +20976,10 @@ method(object({
20877
20976
  }), StorageLocationSchema, {
20878
20977
  kind: "mutation",
20879
20978
  auth: "admin"
20880
- }), method(object({ id: string() }), _void(), {
20979
+ }), method(object({
20980
+ id: string(),
20981
+ force: boolean().optional()
20982
+ }), _void(), {
20881
20983
  kind: "mutation",
20882
20984
  auth: "admin"
20883
20985
  }), method(object({ id: string() }), object({
@@ -34734,6 +34836,12 @@ Object.freeze({
34734
34836
  addonId: null,
34735
34837
  access: "create"
34736
34838
  },
34839
+ "pipelineAnalytics.countUnstampedEventMedia": {
34840
+ capName: "pipeline-analytics",
34841
+ capScope: "device",
34842
+ addonId: null,
34843
+ access: "view"
34844
+ },
34737
34845
  "pipelineAnalytics.deleteDeviceEvents": {
34738
34846
  capName: "pipeline-analytics",
34739
34847
  capScope: "device",
package/dist/addon.mjs CHANGED
@@ -8041,18 +8041,61 @@ var RelocateFootageInputSchema = object({
8041
8041
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8042
8042
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8043
8043
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8044
+ /**
8045
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8046
+ * mover (the engine already walks both collections with a timestamp cursor and
8047
+ * already has a stamp-without-copy path).
8048
+ *
8049
+ * - `move` — the default and the historical behaviour: event-media and
8050
+ * retrain blobs move to `toLocationId` and their rows are
8051
+ * stamped. The enrolled gallery is skipped (D197).
8052
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8053
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8054
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8055
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8056
+ * instant a repoint moves that pointer the row reads from the
8057
+ * new disk while its bytes are on the old one.
8058
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8059
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8060
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8061
+ * never run beside a live second location: it is stop-the-world
8062
+ * by construction, which is acceptable only because the gallery
8063
+ * is a few KB per enrolled sample.
8064
+ */
8065
+ var MediaRelocateModeSchema = _enum([
8066
+ "move",
8067
+ "seal",
8068
+ "gallery"
8069
+ ]);
8044
8070
  var RelocateMediaInputSchema = object({
8045
8071
  toLocationId: string(),
8046
- throttleMbps: number().min(1).max(1e3).optional()
8072
+ throttleMbps: number().min(1).max(1e3).optional(),
8073
+ /** Omitted = `move`, the pre-existing behaviour. */
8074
+ mode: MediaRelocateModeSchema.optional()
8075
+ });
8076
+ /** How many rows still carry NO `locationId` — the population a repoint would
8077
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8078
+ * value that permits a non-blocking `eventMedia` cutover. */
8079
+ var UnstampedEventMediaCountSchema = object({
8080
+ media: number().int().nonnegative(),
8081
+ retrainFrames: number().int().nonnegative(),
8082
+ total: number().int().nonnegative()
8047
8083
  });
8048
8084
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8049
- /** The independently selectable logical storage classes. `recordings`
8050
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8051
- * segments; `eventMedia` is post-analysis blobs. */
8085
+ /** The independently selectable logical storage classes — every class
8086
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8087
+ * Zod enum error where they should meet an explanation.
8088
+ *
8089
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8090
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8091
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8092
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8052
8093
  var StorageMigrationClassSchema = _enum([
8053
8094
  "recordings",
8054
8095
  "recordingsLow",
8055
- "eventMedia"
8096
+ "eventMedia",
8097
+ "backups",
8098
+ "galleryMedia"
8056
8099
  ]);
8057
8100
  /** A destination is always an existing, fully-qualified location id. The
8058
8101
  * migration API intentionally never changes a source location's `basePath`:
@@ -8060,20 +8103,56 @@ var StorageMigrationClassSchema = _enum([
8060
8103
  var StorageMigrationDestinationsSchema = object({
8061
8104
  recordings: string().min(1).optional(),
8062
8105
  recordingsLow: string().min(1).optional(),
8063
- eventMedia: string().min(1).optional()
8106
+ eventMedia: string().min(1).optional(),
8107
+ backups: string().min(1).optional(),
8108
+ galleryMedia: string().min(1).optional()
8064
8109
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8110
+ /**
8111
+ * How a migration sequences the cutover against the byte move.
8112
+ *
8113
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8114
+ * resume. Recording is stopped for the whole move. Right
8115
+ * for a small or a cold class, and the only legal mode for
8116
+ * a `cardinality: 'single'` class.
8117
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8118
+ * refresh, resume, then move the past with everything
8119
+ * running. The pause is three bounded instants (a detach +
8120
+ * attach round, a write-gate drain, a lease) instead of one
8121
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8122
+ * stopped recording under `blocking`; the same move is
8123
+ * seconds of stopped recording under `nonBlocking`.
8124
+ *
8125
+ * The mode is on the JOB, not only on the input, because `status` is where an
8126
+ * operator finds out which one is running.
8127
+ */
8128
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8065
8129
  /** Shared input for planning and starting an orchestrated storage migration. */
8066
8130
  var StorageMigrationInputSchema = object({
8067
8131
  destinations: StorageMigrationDestinationsSchema,
8068
- throttleMbps: number().min(1).max(1e3).optional()
8132
+ throttleMbps: number().min(1).max(1e3).optional(),
8133
+ /** Omitted = `blocking`, which stays the default. */
8134
+ mode: StorageMigrationModeSchema.optional()
8069
8135
  });
8070
- /** The durable coordinator state machine. The only phase that changes default
8071
- * locations is `repointing`, after every selected mover has completed and been
8072
- * verified. */
8136
+ /**
8137
+ * The durable coordinator state machine.
8138
+ *
8139
+ * `blocking`:
8140
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8141
+ *
8142
+ * `nonBlocking`:
8143
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8144
+ *
8145
+ * Same phases, different order plus two new ones — not a second mover.
8146
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8147
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8148
+ * `repointing` is still the only phase that changes a default location.
8149
+ */
8073
8150
  var StorageMigrationPhaseSchema = _enum([
8074
8151
  "planning",
8152
+ "sealing",
8075
8153
  "pausing",
8076
8154
  "moving",
8155
+ "draining",
8077
8156
  "verifying",
8078
8157
  "repointing",
8079
8158
  "refreshing",
@@ -8098,6 +8177,9 @@ var StorageMigrationMoveSchema = object({
8098
8177
  var StorageMigrationJobSchema = object({
8099
8178
  jobId: string(),
8100
8179
  phase: StorageMigrationPhaseSchema,
8180
+ /** Which order this job is running. `status` is the only place an operator
8181
+ * can tell a seconds-long cutover from a thirty-hour one. */
8182
+ mode: StorageMigrationModeSchema,
8101
8183
  destinations: StorageMigrationDestinationsSchema,
8102
8184
  throttleMbps: number(),
8103
8185
  moves: array(StorageMigrationMoveSchema),
@@ -8110,13 +8192,30 @@ var StorageMigrationJobSchema = object({
8110
8192
  finishedAt: number().nullable(),
8111
8193
  error: string().nullable()
8112
8194
  });
8195
+ var StorageMigrationFindingSchema = object({
8196
+ code: _enum([
8197
+ "sharesDeviceWithSource",
8198
+ "deviceIdentityUnknown",
8199
+ "unstampedEventMediaRows",
8200
+ "blockingOnly",
8201
+ "noMover"
8202
+ ]),
8203
+ storageClass: StorageMigrationClassSchema,
8204
+ /** Human-readable, already carrying the ids and counts. */
8205
+ message: string()
8206
+ });
8113
8207
  var StorageMigrationPlanSchema = object({
8114
8208
  destinations: StorageMigrationDestinationsSchema,
8209
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8210
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8211
+ * it. */
8212
+ mode: StorageMigrationModeSchema,
8115
8213
  moves: array(object({
8116
8214
  storageClass: StorageMigrationClassSchema,
8117
8215
  fromLocationId: string(),
8118
8216
  toLocationId: string()
8119
- }))
8217
+ })),
8218
+ findings: array(StorageMigrationFindingSchema)
8120
8219
  });
8121
8220
  /**
8122
8221
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -18969,7 +19068,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18969
19068
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
18970
19069
  kind: "mutation",
18971
19070
  auth: "admin"
18972
- }), method(object({}), array(RelocateJobSchema).readonly(), {
19071
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
18973
19072
  kind: "query",
18974
19073
  auth: "admin"
18975
19074
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -20876,7 +20975,10 @@ method(object({
20876
20975
  }), StorageLocationSchema, {
20877
20976
  kind: "mutation",
20878
20977
  auth: "admin"
20879
- }), method(object({ id: string() }), _void(), {
20978
+ }), method(object({
20979
+ id: string(),
20980
+ force: boolean().optional()
20981
+ }), _void(), {
20880
20982
  kind: "mutation",
20881
20983
  auth: "admin"
20882
20984
  }), method(object({ id: string() }), object({
@@ -34733,6 +34835,12 @@ Object.freeze({
34733
34835
  addonId: null,
34734
34836
  access: "create"
34735
34837
  },
34838
+ "pipelineAnalytics.countUnstampedEventMedia": {
34839
+ capName: "pipeline-analytics",
34840
+ capScope: "device",
34841
+ addonId: null,
34842
+ access: "view"
34843
+ },
34736
34844
  "pipelineAnalytics.deleteDeviceEvents": {
34737
34845
  capName: "pipeline-analytics",
34738
34846
  capScope: "device",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-gree",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
5
5
  "keywords": [
6
6
  "camstack",