@camstack/types 1.2.276 → 1.2.277

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-WOeeZ4FU.js");
2
+ const require_sleep = require("./sleep-DCbD8sdg.js");
3
3
  const require_event_category = require("./event-category-MbnB-6AN.js");
4
4
  const require_composition = require("./composition-DG4jVTfB.js");
5
5
  const require_err_msg = require("./err-msg-Dx2Kor0g.js");
@@ -2002,6 +2002,98 @@ var ArchivedDebugNoteQueryInputSchema = zod.z.object({
2002
2002
  limit: zod.z.number().int().min(1).max(1e3).optional()
2003
2003
  });
2004
2004
  //#endregion
2005
+ //#region src/interfaces/track-relations.ts
2006
+ /**
2007
+ * Ground truth for the tracking bench, as debug marks (D681, spec §4).
2008
+ *
2009
+ * Identity over live tracks, not boxes: "A and B are the same subject",
2010
+ * "A and B are different subjects", and one track's purity ("mixed" — two
2011
+ * subjects, optionally switching at an instant — or "not a subject"). Rows
2012
+ * reference tracks as PROVENANCE: they outlive the tracks by design.
2013
+ *
2014
+ * Bounded by COUNT, never by age (the D405 argument): ground truth is most
2015
+ * valuable when it is old enough for the pattern to have repeated.
2016
+ */
2017
+ var MAX_TRACK_RELATIONS = 2e4;
2018
+ var MAX_TRACK_PURITIES = 5e3;
2019
+ var TRACK_RELATIONS_DEFAULT_LIMIT = 500;
2020
+ var TrackRelationKindSchema = zod.z.enum(["same-subject", "different-subjects"]);
2021
+ var TrackSideSchema = zod.z.enum(["before", "after"]);
2022
+ var TrackPurityValueSchema = zod.z.enum(["mixed", "not-a-subject"]);
2023
+ var TrackRelationSchema = zod.z.object({
2024
+ id: zod.z.string(),
2025
+ deviceId: zod.z.number().int(),
2026
+ leftTrackId: zod.z.string(),
2027
+ rightTrackId: zod.z.string(),
2028
+ leftSide: TrackSideSchema.nullable(),
2029
+ rightSide: TrackSideSchema.nullable(),
2030
+ relation: TrackRelationKindSchema,
2031
+ presence: zod.z.literal("continuous").nullable(),
2032
+ leftStartedAt: zod.z.number().int().nullable(),
2033
+ rightStartedAt: zod.z.number().int().nullable(),
2034
+ createdAt: zod.z.number().int(),
2035
+ updatedAt: zod.z.number().int(),
2036
+ author: zod.z.string().nullable()
2037
+ });
2038
+ var TrackPuritySchema = zod.z.object({
2039
+ id: zod.z.string(),
2040
+ deviceId: zod.z.number().int(),
2041
+ sourceTrackId: zod.z.string(),
2042
+ purity: TrackPurityValueSchema,
2043
+ switchAtMs: zod.z.number().int().nullable(),
2044
+ startedAt: zod.z.number().int().nullable(),
2045
+ createdAt: zod.z.number().int(),
2046
+ updatedAt: zod.z.number().int(),
2047
+ author: zod.z.string().nullable()
2048
+ });
2049
+ var SetTrackRelationInputSchema = zod.z.object({
2050
+ deviceId: zod.z.number().int(),
2051
+ trackId: zod.z.string().min(1),
2052
+ otherTrackId: zod.z.string().min(1),
2053
+ relation: TrackRelationKindSchema,
2054
+ presence: zod.z.literal("continuous").optional(),
2055
+ trackSide: TrackSideSchema.optional(),
2056
+ otherSide: TrackSideSchema.optional()
2057
+ });
2058
+ var ClearTrackRelationInputSchema = zod.z.object({
2059
+ deviceId: zod.z.number().int(),
2060
+ trackId: zod.z.string().min(1),
2061
+ otherTrackId: zod.z.string().min(1)
2062
+ });
2063
+ var ClearTrackRelationResultSchema = zod.z.object({ cleared: zod.z.boolean() });
2064
+ var SetTrackPurityInputSchema = zod.z.object({
2065
+ deviceId: zod.z.number().int(),
2066
+ trackId: zod.z.string().min(1),
2067
+ purity: zod.z.enum([
2068
+ "pure",
2069
+ "mixed",
2070
+ "not-a-subject"
2071
+ ]),
2072
+ switchAtMs: zod.z.number().int().optional()
2073
+ });
2074
+ /** `null` when `pure` cleared the row. */
2075
+ var SetTrackPurityResultSchema = zod.z.object({ purity: TrackPuritySchema.nullable() });
2076
+ var ListTrackRelationsInputSchema = zod.z.object({
2077
+ deviceId: zod.z.number().int(),
2078
+ trackId: zod.z.string().optional(),
2079
+ since: zod.z.number().int().optional(),
2080
+ until: zod.z.number().int().optional(),
2081
+ limit: zod.z.number().int().min(1).max(5e3).optional()
2082
+ });
2083
+ var ListTrackRelationsResultSchema = zod.z.object({
2084
+ relations: zod.z.array(TrackRelationSchema).readonly(),
2085
+ purities: zod.z.array(TrackPuritySchema).readonly(),
2086
+ truncated: zod.z.boolean()
2087
+ });
2088
+ var TrackRelationRefusalSchema = zod.z.enum([
2089
+ "unknown-track",
2090
+ "cross-device",
2091
+ "self-relation",
2092
+ "contradiction",
2093
+ "switch-outside-track",
2094
+ "switch-needs-mixed"
2095
+ ]);
2096
+ //#endregion
2005
2097
  //#region src/interfaces/device-capabilities/camera.ts
2006
2098
  /** Friendly display labels for stream quality IDs. */
2007
2099
  var STREAM_QUALITY_LABELS = {
@@ -24014,6 +24106,25 @@ var pipelineAnalyticsCapability = {
24014
24106
  */
24015
24107
  listArchivedDebugNotes: require_sleep.method(ArchivedDebugNoteQueryInputSchema, zod.z.array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }),
24016
24108
  /**
24109
+ * Tracking-bench ground truth (D681): "this track and that one are the
24110
+ * same subject" / "different subjects". One row per unordered pair —
24111
+ * re-marking replaces it — and a mark that contradicts an existing chain
24112
+ * is REFUSED with the chain named. Writing a mark also sets `debug` on
24113
+ * both tracks. `protected`, matching `setTrackFlags`: marking is done from
24114
+ * the viewer's track detail by an authenticated non-admin session.
24115
+ */
24116
+ setTrackRelation: require_sleep.method(SetTrackRelationInputSchema, TrackRelationSchema, { kind: "mutation" }),
24117
+ /** Remove the mark between two tracks. */
24118
+ clearTrackRelation: require_sleep.method(ClearTrackRelationInputSchema, ClearTrackRelationResultSchema, { kind: "mutation" }),
24119
+ /**
24120
+ * A track that is not ONE subject: `mixed` (two subjects, optionally
24121
+ * switching at `switchAtMs`) or `not-a-subject`. `pure` clears the mark
24122
+ * and answers `{ purity: null }` (D681).
24123
+ */
24124
+ setTrackPurity: require_sleep.method(SetTrackPurityInputSchema, SetTrackPurityResultSchema, { kind: "mutation" }),
24125
+ /** A camera's marks, optionally one track's, windowed by track start. */
24126
+ listTrackRelations: require_sleep.method(ListTrackRelationsInputSchema, ListTrackRelationsResultSchema, { kind: "query" }),
24127
+ /**
24017
24128
  * Birth decisions — one row per resolved confirmation-gate verdict (D409).
24018
24129
  *
24019
24130
  * The READ half of a measurement, and only that: it gates nothing and no
@@ -56317,6 +56428,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
56317
56428
  addonId: null,
56318
56429
  access: "create"
56319
56430
  },
56431
+ "pipelineAnalytics.clearTrackRelation": {
56432
+ capName: "pipeline-analytics",
56433
+ capScope: "device",
56434
+ addonId: null,
56435
+ access: "delete"
56436
+ },
56320
56437
  "pipelineAnalytics.clearTracks": {
56321
56438
  capName: "pipeline-analytics",
56322
56439
  capScope: "device",
@@ -56569,6 +56686,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
56569
56686
  addonId: null,
56570
56687
  access: "view"
56571
56688
  },
56689
+ "pipelineAnalytics.listTrackRelations": {
56690
+ capName: "pipeline-analytics",
56691
+ capScope: "device",
56692
+ addonId: null,
56693
+ access: "view"
56694
+ },
56572
56695
  "pipelineAnalytics.listTracks": {
56573
56696
  capName: "pipeline-analytics",
56574
56697
  capScope: "device",
@@ -56683,6 +56806,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
56683
56806
  addonId: null,
56684
56807
  access: "create"
56685
56808
  },
56809
+ "pipelineAnalytics.setTrackPurity": {
56810
+ capName: "pipeline-analytics",
56811
+ capScope: "device",
56812
+ addonId: null,
56813
+ access: "create"
56814
+ },
56815
+ "pipelineAnalytics.setTrackRelation": {
56816
+ capName: "pipeline-analytics",
56817
+ capScope: "device",
56818
+ addonId: null,
56819
+ access: "create"
56820
+ },
56686
56821
  "pipelineAnalytics.startStorageMigrationMove": {
56687
56822
  capName: "pipeline-analytics",
56688
56823
  capScope: "device",
@@ -60938,6 +61073,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
60938
61073
  form: "single",
60939
61074
  optional: false
60940
61075
  }],
61076
+ "pipelineAnalytics.clearTrackRelation": [{
61077
+ name: "deviceId",
61078
+ form: "single",
61079
+ optional: false
61080
+ }],
60941
61081
  "pipelineAnalytics.clearTracks": [{
60942
61082
  name: "deviceId",
60943
61083
  form: "single",
@@ -61088,6 +61228,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
61088
61228
  form: "single",
61089
61229
  optional: false
61090
61230
  }],
61231
+ "pipelineAnalytics.listTrackRelations": [{
61232
+ name: "deviceId",
61233
+ form: "single",
61234
+ optional: false
61235
+ }],
61091
61236
  "pipelineAnalytics.listTracks": [{
61092
61237
  name: "deviceId",
61093
61238
  form: "single",
@@ -61158,6 +61303,16 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
61158
61303
  form: "single",
61159
61304
  optional: false
61160
61305
  }],
61306
+ "pipelineAnalytics.setTrackPurity": [{
61307
+ name: "deviceId",
61308
+ form: "single",
61309
+ optional: false
61310
+ }],
61311
+ "pipelineAnalytics.setTrackRelation": [{
61312
+ name: "deviceId",
61313
+ form: "single",
61314
+ optional: false
61315
+ }],
61161
61316
  "pipelineAnalytics.wipeAllAnalytics": [{
61162
61317
  name: "deviceId",
61163
61318
  form: "single",
@@ -68769,6 +68924,8 @@ exports.CarbonMonoxideStatusSchema = CarbonMonoxideStatusSchema;
68769
68924
  exports.ChargingStatus = require_err_msg.ChargingStatus;
68770
68925
  exports.ClaimOutcomeSchema = ClaimOutcomeSchema;
68771
68926
  exports.ClaimsListingSchema = ClaimsListingSchema;
68927
+ exports.ClearTrackRelationInputSchema = ClearTrackRelationInputSchema;
68928
+ exports.ClearTrackRelationResultSchema = ClearTrackRelationResultSchema;
68772
68929
  exports.ClientNetworkStatsSchema = ClientNetworkStatsSchema;
68773
68930
  exports.ClimateControlStatusSchema = ClimateControlStatusSchema;
68774
68931
  exports.ClipBytesOfferSchema = ClipBytesOfferSchema;
@@ -69142,6 +69299,8 @@ exports.LegacyStorageLocationDefaultSchema = LegacyStorageLocationDefaultSchema;
69142
69299
  exports.LinkedDeviceSchema = LinkedDeviceSchema;
69143
69300
  exports.LinkedDevicesModeSchema = LinkedDevicesModeSchema;
69144
69301
  exports.LinkedDevicesSlotValueSchema = LinkedDevicesSlotValueSchema;
69302
+ exports.ListTrackRelationsInputSchema = ListTrackRelationsInputSchema;
69303
+ exports.ListTrackRelationsResultSchema = ListTrackRelationsResultSchema;
69145
69304
  exports.LlmDefaultSchema = LlmDefaultSchema;
69146
69305
  exports.LlmDefaultSelectorSchema = LlmDefaultSelectorSchema;
69147
69306
  exports.LlmDownloadProgressSchema = LlmDownloadProgressSchema;
@@ -69217,6 +69376,8 @@ exports.MAX_KEYS = MAX_KEYS;
69217
69376
  exports.MAX_REASONS_PER_KEY = MAX_REASONS_PER_KEY;
69218
69377
  exports.MAX_SENSOR_TRIGGER_DEVICES = MAX_SENSOR_TRIGGER_DEVICES;
69219
69378
  exports.MAX_TRACK_DEBUG_NOTE_LEN = MAX_TRACK_DEBUG_NOTE_LEN;
69379
+ exports.MAX_TRACK_PURITIES = MAX_TRACK_PURITIES;
69380
+ exports.MAX_TRACK_RELATIONS = MAX_TRACK_RELATIONS;
69220
69381
  exports.MEDIA_OWNER_TYPES = MEDIA_OWNER_TYPES;
69221
69382
  exports.MEDIA_PRESENCE_OWNER_KINDS = MEDIA_PRESENCE_OWNER_KINDS;
69222
69383
  exports.METHOD_ACCESS_MAP = METHOD_ACCESS_MAP;
@@ -69731,6 +69892,9 @@ exports.ServerUpdateStateSchema = ServerUpdateStateSchema;
69731
69892
  exports.SetCameraSensorsInputSchema = SetCameraSensorsInputSchema;
69732
69893
  exports.SetLoggingSettingsInputSchema = SetLoggingSettingsInputSchema;
69733
69894
  exports.SetSiteLocationInputSchema = SetSiteLocationInputSchema;
69895
+ exports.SetTrackPurityInputSchema = SetTrackPurityInputSchema;
69896
+ exports.SetTrackPurityResultSchema = SetTrackPurityResultSchema;
69897
+ exports.SetTrackRelationInputSchema = SetTrackRelationInputSchema;
69734
69898
  exports.SettingsPatchSchema = SettingsPatchSchema;
69735
69899
  exports.SettingsRecordSchema = SettingsRecordSchema;
69736
69900
  exports.SettingsSchemaWithValuesSchema = SettingsSchemaWithValuesSchema;
@@ -69815,6 +69979,7 @@ exports.SystemMirror = SystemMirror;
69815
69979
  exports.TAXONOMY_COLORS = TAXONOMY_COLORS;
69816
69980
  exports.TIMELAPSE_DENSE_FLOOR_SEC = TIMELAPSE_DENSE_FLOOR_SEC;
69817
69981
  exports.TIMEZONES = TIMEZONES;
69982
+ exports.TRACK_RELATIONS_DEFAULT_LIMIT = TRACK_RELATIONS_DEFAULT_LIMIT;
69818
69983
  exports.TRANSCODE_DOWN_MAX_BITRATE_KBPS = TRANSCODE_DOWN_MAX_BITRATE_KBPS;
69819
69984
  exports.TRANSCODE_DOWN_MAX_HEIGHT = TRANSCODE_DOWN_MAX_HEIGHT;
69820
69985
  exports.TamperStatusSchema = TamperStatusSchema;
@@ -69847,7 +70012,13 @@ exports.TrackEnvelopeSchema = TrackEnvelopeSchema;
69847
70012
  exports.TrackFlagsPatchSchema = TrackFlagsPatchSchema;
69848
70013
  exports.TrackFlagsSchema = TrackFlagsSchema;
69849
70014
  exports.TrackProjectionSchema = TrackProjectionSchema;
70015
+ exports.TrackPuritySchema = TrackPuritySchema;
70016
+ exports.TrackPurityValueSchema = TrackPurityValueSchema;
70017
+ exports.TrackRelationKindSchema = TrackRelationKindSchema;
70018
+ exports.TrackRelationRefusalSchema = TrackRelationRefusalSchema;
70019
+ exports.TrackRelationSchema = TrackRelationSchema;
69850
70020
  exports.TrackSchema = TrackSchema;
70021
+ exports.TrackSideSchema = TrackSideSchema;
69851
70022
  exports.TrackSourceSchema = TrackSourceSchema;
69852
70023
  exports.TrackStateSchema = TrackStateSchema;
69853
70024
  exports.TrackZoneFilterSchema = TrackZoneFilterSchema;