camstack 1.2.66 → 1.2.67

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.
@@ -14522,7 +14522,7 @@ function date4(params) {
14522
14522
  // ../../node_modules/zod/v4/classic/external.js
14523
14523
  config(en_default());
14524
14524
 
14525
- // ../types/dist/sleep-bm0x6zZF.mjs
14525
+ // ../types/dist/sleep-ot6dTHCA.mjs
14526
14526
  var WELL_KNOWN_TABS = [
14527
14527
  {
14528
14528
  id: "overview",
@@ -21237,6 +21237,80 @@ var embeddingEncoderCapability = {
21237
21237
  getInfo: method(external_exports.void(), EmbeddingInfoSchema, { auth: "admin" })
21238
21238
  }
21239
21239
  };
21240
+ var FailureReasonCountSchema = external_exports.object({
21241
+ /**
21242
+ * Why the attempt did not land, in the contributor's own vocabulary —
21243
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
21244
+ * strings that already appear in this repo's logs and, where one exists, the
21245
+ * same string the per-track `previewMissReason` records (D276): a second
21246
+ * vocabulary for the same loss would make the row and the counter
21247
+ * un-joinable.
21248
+ */
21249
+ reason: external_exports.string(),
21250
+ count: external_exports.number().int().nonnegative()
21251
+ });
21252
+ var FailureContributionSchema = external_exports.object({
21253
+ /**
21254
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
21255
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
21256
+ * `unit` free: the families are owned by different addons and a shared enum
21257
+ * is a central list that rots invisibly.
21258
+ */
21259
+ family: external_exports.string(),
21260
+ /**
21261
+ * The NUMERIC device id — the same value every log line carries as
21262
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
21263
+ * cannot name the camera must not emit the entry, because a fleet total
21264
+ * cannot answer the only question anybody asks of this surface.
21265
+ */
21266
+ deviceId: external_exports.number().int().positive(),
21267
+ /**
21268
+ * A second dimension inside the family: the model / step id for an inference
21269
+ * timeout, so "which camera AND which model" is one read. Absent when the
21270
+ * family has a single variant.
21271
+ */
21272
+ variant: external_exports.string().optional(),
21273
+ /**
21274
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
21275
+ * differencing two reads must drop the interval when it changes, because the
21276
+ * counter restarted from zero in a respawned runner. Same discipline as
21277
+ * `LoadContribution.startedAtMs`.
21278
+ */
21279
+ sinceMs: external_exports.number(),
21280
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
21281
+ atMs: external_exports.number(),
21282
+ /**
21283
+ * THE DENOMINATOR — every attempt on this path for this camera in the
21284
+ * window. A failure count published without it is the mistake this schema
21285
+ * exists to make impossible.
21286
+ */
21287
+ attempts: external_exports.number().int().nonnegative(),
21288
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
21289
+ succeeded: external_exports.number().int().nonnegative(),
21290
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
21291
+ reasons: external_exports.array(FailureReasonCountSchema).readonly()
21292
+ });
21293
+ var failureContributionCapability = {
21294
+ name: "failure-contribution",
21295
+ scope: "system",
21296
+ mode: "collection",
21297
+ internal: true,
21298
+ methods: {
21299
+ /**
21300
+ * This addon's per-camera failure counters, read live from bounded in-RAM
21301
+ * state it already keeps. Inert: no persistence, no sampling, no timer.
21302
+ *
21303
+ * READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
21304
+ * consumer that wants a rate differences two reads. A draining read would
21305
+ * make two operators with the page open each destroy half of the other's
21306
+ * numbers, and `load-contribution` already settled the same question the
21307
+ * same way for `cpuSeconds`.
21308
+ */
21309
+ list: method(external_exports.void(), external_exports.array(FailureContributionSchema).readonly())
21310
+ },
21311
+ /** In-process only — enumerated through `addons.listCapabilityProviders`. */
21312
+ mount: { kind: "skip" }
21313
+ };
21240
21314
  var DirEntrySchema = external_exports.object({
21241
21315
  name: external_exports.string(),
21242
21316
  path: external_exports.string()
@@ -21775,145 +21849,6 @@ var llmCapability = {
21775
21849
  })
21776
21850
  }
21777
21851
  };
21778
- var LogChannelApplyResultSchema = external_exports.object({
21779
- /** How many declared channels are armed in this process after the call. */
21780
- armed: external_exports.number().int().min(0),
21781
- /**
21782
- * Names the document armed that this process does not declare. Reported
21783
- * rather than swallowed: a name here is either a typo or an addon that has
21784
- * not booted, and both deserve a line instead of silence.
21785
- */
21786
- unknown: external_exports.array(external_exports.string()).readonly()
21787
- });
21788
- var logChannelsCapability = {
21789
- name: "log-channels",
21790
- scope: "system",
21791
- mode: "collection",
21792
- internal: true,
21793
- methods: {
21794
- /** The channels this addon declares. Inert: no value, no state. */
21795
- list: method(external_exports.void(), external_exports.array(LogChannelDescriptorSchema).readonly()),
21796
- /**
21797
- * Refresh this process's mirror from the document's FULL set of armed
21798
- * windows.
21799
- *
21800
- * Full and not incremental on purpose: the document is the authority, so a
21801
- * channel it does not name is disarmed here. An incremental apply would
21802
- * let a disarm get lost in transit and leave a channel running that
21803
- * nobody can see is running.
21804
- */
21805
- apply: method(external_exports.object({ windows: external_exports.array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" })
21806
- },
21807
- /** In-process only — enumerated through `addons.listCapabilityProviders`. */
21808
- mount: { kind: "skip" }
21809
- };
21810
- var LogLevelSchema = external_exports.enum([
21811
- "debug",
21812
- "info",
21813
- "warn",
21814
- "error"
21815
- ]);
21816
- var LogEntrySchema = external_exports.object({
21817
- timestamp: external_exports.date(),
21818
- level: LogLevelSchema,
21819
- scope: external_exports.array(external_exports.string()),
21820
- message: external_exports.string(),
21821
- meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
21822
- tags: external_exports.record(external_exports.string(), external_exports.string()).optional()
21823
- });
21824
- var logDestinationCapability = {
21825
- name: "log-destination",
21826
- scope: "system",
21827
- mode: "collection",
21828
- internal: true,
21829
- methods: {
21830
- write: method(LogEntrySchema, external_exports.void(), { kind: "mutation" }),
21831
- query: method(external_exports.object({
21832
- scope: external_exports.array(external_exports.string()).optional(),
21833
- level: LogLevelSchema.optional(),
21834
- since: external_exports.date().optional(),
21835
- until: external_exports.date().optional(),
21836
- limit: external_exports.number().optional(),
21837
- tags: external_exports.record(external_exports.string(), external_exports.string()).optional()
21838
- }), external_exports.array(LogEntrySchema).readonly())
21839
- },
21840
- /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
21841
- mount: { kind: "skip" }
21842
- };
21843
- var FailureReasonCountSchema = external_exports.object({
21844
- /**
21845
- * Why the attempt did not land, in the contributor's own vocabulary —
21846
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
21847
- * strings that already appear in this repo's logs and, where one exists, the
21848
- * same string the per-track `previewMissReason` records (D276): a second
21849
- * vocabulary for the same loss would make the row and the counter
21850
- * un-joinable.
21851
- */
21852
- reason: external_exports.string(),
21853
- count: external_exports.number().int().nonnegative()
21854
- });
21855
- var FailureContributionSchema = external_exports.object({
21856
- /**
21857
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
21858
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
21859
- * `unit` free: the families are owned by different addons and a shared enum
21860
- * is a central list that rots invisibly.
21861
- */
21862
- family: external_exports.string(),
21863
- /**
21864
- * The NUMERIC device id — the same value every log line carries as
21865
- * `tags.deviceId`. Never nullable and never absent: a contributor that
21866
- * cannot name the camera must not emit the entry, because a fleet total
21867
- * cannot answer the only question anybody asks of this surface.
21868
- */
21869
- deviceId: external_exports.number().int().positive(),
21870
- /**
21871
- * A second dimension inside the family: the model / step id for an inference
21872
- * timeout, so "which camera AND which model" is one read. Absent when the
21873
- * family has a single variant.
21874
- */
21875
- variant: external_exports.string().optional(),
21876
- /**
21877
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
21878
- * differencing two reads must drop the interval when it changes, because the
21879
- * counter restarted from zero in a respawned runner. Same discipline as
21880
- * `LoadContribution.startedAtMs`.
21881
- */
21882
- sinceMs: external_exports.number(),
21883
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
21884
- atMs: external_exports.number(),
21885
- /**
21886
- * THE DENOMINATOR — every attempt on this path for this camera in the
21887
- * window. A failure count published without it is the mistake this schema
21888
- * exists to make impossible.
21889
- */
21890
- attempts: external_exports.number().int().nonnegative(),
21891
- /** Attempts that landed. `attempts - succeeded` is the loss. */
21892
- succeeded: external_exports.number().int().nonnegative(),
21893
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
21894
- reasons: external_exports.array(FailureReasonCountSchema).readonly()
21895
- });
21896
- var failureContributionCapability = {
21897
- name: "failure-contribution",
21898
- scope: "system",
21899
- mode: "collection",
21900
- internal: true,
21901
- methods: {
21902
- /**
21903
- * This addon's per-camera failure counters, read live from bounded in-RAM
21904
- * state it already keeps. Inert: no persistence, no sampling, no timer.
21905
- *
21906
- * READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
21907
- * consumer that wants a rate differences two reads. A draining read would
21908
- * make two operators with the page open each destroy half of the other's
21909
- * numbers, and `load-contribution` already settled the same question the
21910
- * same way for `cpuSeconds`.
21911
- */
21912
- list: method(external_exports.void(), external_exports.array(FailureContributionSchema).readonly())
21913
- },
21914
- /** In-process only — enumerated through `addons.listCapabilityProviders`. */
21915
- mount: { kind: "skip" }
21916
- };
21917
21852
  var LOAD_CONTRIBUTION_ROLES = [
21918
21853
  "decode",
21919
21854
  "transcode",
@@ -21993,6 +21928,71 @@ var loadContributionCapability = {
21993
21928
  /** In-process only — enumerated through `addons.listCapabilityProviders`. */
21994
21929
  mount: { kind: "skip" }
21995
21930
  };
21931
+ var LogChannelApplyResultSchema = external_exports.object({
21932
+ /** How many declared channels are armed in this process after the call. */
21933
+ armed: external_exports.number().int().min(0),
21934
+ /**
21935
+ * Names the document armed that this process does not declare. Reported
21936
+ * rather than swallowed: a name here is either a typo or an addon that has
21937
+ * not booted, and both deserve a line instead of silence.
21938
+ */
21939
+ unknown: external_exports.array(external_exports.string()).readonly()
21940
+ });
21941
+ var logChannelsCapability = {
21942
+ name: "log-channels",
21943
+ scope: "system",
21944
+ mode: "collection",
21945
+ internal: true,
21946
+ methods: {
21947
+ /** The channels this addon declares. Inert: no value, no state. */
21948
+ list: method(external_exports.void(), external_exports.array(LogChannelDescriptorSchema).readonly()),
21949
+ /**
21950
+ * Refresh this process's mirror from the document's FULL set of armed
21951
+ * windows.
21952
+ *
21953
+ * Full and not incremental on purpose: the document is the authority, so a
21954
+ * channel it does not name is disarmed here. An incremental apply would
21955
+ * let a disarm get lost in transit and leave a channel running that
21956
+ * nobody can see is running.
21957
+ */
21958
+ apply: method(external_exports.object({ windows: external_exports.array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" })
21959
+ },
21960
+ /** In-process only — enumerated through `addons.listCapabilityProviders`. */
21961
+ mount: { kind: "skip" }
21962
+ };
21963
+ var LogLevelSchema = external_exports.enum([
21964
+ "debug",
21965
+ "info",
21966
+ "warn",
21967
+ "error"
21968
+ ]);
21969
+ var LogEntrySchema = external_exports.object({
21970
+ timestamp: external_exports.date(),
21971
+ level: LogLevelSchema,
21972
+ scope: external_exports.array(external_exports.string()),
21973
+ message: external_exports.string(),
21974
+ meta: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
21975
+ tags: external_exports.record(external_exports.string(), external_exports.string()).optional()
21976
+ });
21977
+ var logDestinationCapability = {
21978
+ name: "log-destination",
21979
+ scope: "system",
21980
+ mode: "collection",
21981
+ internal: true,
21982
+ methods: {
21983
+ write: method(LogEntrySchema, external_exports.void(), { kind: "mutation" }),
21984
+ query: method(external_exports.object({
21985
+ scope: external_exports.array(external_exports.string()).optional(),
21986
+ level: LogLevelSchema.optional(),
21987
+ since: external_exports.date().optional(),
21988
+ until: external_exports.date().optional(),
21989
+ limit: external_exports.number().optional(),
21990
+ tags: external_exports.record(external_exports.string(), external_exports.string()).optional()
21991
+ }), external_exports.array(LogEntrySchema).readonly())
21992
+ },
21993
+ /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
21994
+ mount: { kind: "skip" }
21995
+ };
21996
21996
  var LoginStageEnum = external_exports.enum(["primary", "second-factor"]);
21997
21997
  var RedirectLoginMethodSchema = external_exports.object({
21998
21998
  kind: external_exports.literal("redirect"),
@@ -26081,13 +26081,18 @@ var MediaFileKindEnum = external_exports.enum([
26081
26081
  "keyFrameSmall",
26082
26082
  "thumbnailSmall"
26083
26083
  ]);
26084
- var MediaFileSchema = external_exports.object({
26084
+ var MediaFileRefSchema = external_exports.object({
26085
26085
  key: external_exports.string(),
26086
26086
  kind: MediaFileKindEnum,
26087
- base64: external_exports.string(),
26088
26087
  sizeBytes: external_exports.number(),
26089
26088
  timestamp: external_exports.number()
26090
26089
  });
26090
+ var MediaFileSchema = MediaFileRefSchema.extend({
26091
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
26092
+ url: external_exports.string(),
26093
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
26094
+ base64: external_exports.string()
26095
+ });
26091
26096
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
26092
26097
  var RetrainMacroClassSchema = external_exports.enum([
26093
26098
  "person",
@@ -27153,6 +27158,26 @@ var pipelineAnalyticsCapability = {
27153
27158
  deviceId: external_exports.number()
27154
27159
  }), external_exports.array(MediaFileInfoSchema).readonly()),
27155
27160
  /**
27161
+ * What media an EVENT has, without any of it — the twin `getEventMedia`
27162
+ * never had.
27163
+ *
27164
+ * `listTrackMedia` above got this treatment because a track's media is
27165
+ * 5-8 MB. An event's is worse per row, not better: an old-style event owns
27166
+ * a `crop` AND a native-resolution `fullFrameBoxed`, and the track DETAIL
27167
+ * modal — the one surface that legitimately shows the big kinds — unions
27168
+ * both listings to build its filmstrip. It then renders every tile from
27169
+ * the `event-media` plane by key and throws the bytes away. Measured on
27170
+ * the live hub: one event's `fullFrameBoxed` is 2 824 077 B, base64'd to
27171
+ * ~3.8 MB, allocated whole in hub-main's heap, for a list of keys.
27172
+ *
27173
+ * Same `deviceId` authorization subject as `getEventMedia`, and the same
27174
+ * rows — this is a projection of that method, never a different question.
27175
+ */
27176
+ listEventMedia: method(external_exports.object({
27177
+ eventId: external_exports.string(),
27178
+ deviceId: external_exports.number()
27179
+ }), external_exports.array(MediaFileInfoSchema).readonly()),
27180
+ /**
27156
27181
  * Search object events by text query using CLIP cosine similarity.
27157
27182
  * Encodes `text` via the `embedding-encoder` cap, queries the
27158
27183
  * `ObjectEmbeddingStore` with optional prefilters, ranks all matching
@@ -32593,7 +32618,7 @@ var FaceClusterSchema = external_exports.object({
32593
32618
  var MediaFileLiteSchema$1 = external_exports.object({
32594
32619
  key: external_exports.string(),
32595
32620
  kind: external_exports.string(),
32596
- base64: external_exports.string(),
32621
+ url: external_exports.string(),
32597
32622
  sizeBytes: external_exports.number(),
32598
32623
  timestamp: external_exports.number()
32599
32624
  });
@@ -35486,7 +35511,7 @@ var PlateInfoSchema = external_exports.object({
35486
35511
  var MediaFileLiteSchema = external_exports.object({
35487
35512
  key: external_exports.string(),
35488
35513
  kind: external_exports.string(),
35489
- base64: external_exports.string(),
35514
+ url: external_exports.string(),
35490
35515
  sizeBytes: external_exports.number(),
35491
35516
  timestamp: external_exports.number()
35492
35517
  });
@@ -42028,6 +42053,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
42028
42053
  addonId: null,
42029
42054
  access: "view"
42030
42055
  },
42056
+ "pipelineAnalytics.listEventMedia": {
42057
+ capName: "pipeline-analytics",
42058
+ capScope: "device",
42059
+ addonId: null,
42060
+ access: "view"
42061
+ },
42031
42062
  "pipelineAnalytics.listGroups": {
42032
42063
  capName: "pipeline-analytics",
42033
42064
  capScope: "device",
@@ -45651,6 +45682,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
45651
45682
  form: "array",
45652
45683
  optional: false
45653
45684
  }],
45685
+ "pipelineAnalytics.listEventMedia": [{
45686
+ name: "deviceId",
45687
+ form: "single",
45688
+ optional: false
45689
+ }],
45654
45690
  "pipelineAnalytics.listGroups": [{
45655
45691
  name: "deviceIds",
45656
45692
  form: "array",
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runDiscover
4
- } from "./chunk-EJO2K6FH.js";
4
+ } from "./chunk-MYPVHFJL.js";
5
5
  import "./chunk-LMMQX4CK.js";
6
6
 
7
7
  // src/cli.ts
@@ -38,7 +38,7 @@ async function runServe(args) {
38
38
  ...typeof values.data === "string" ? { data: values.data } : {}
39
39
  };
40
40
  Object.assign(process.env, buildServeEnv(opts));
41
- await import("./launcher-EJVL74UN.js");
41
+ await import("./launcher-5FCVBL5M.js");
42
42
  }
43
43
 
44
44
  // src/commands/agent.ts
@@ -83,7 +83,7 @@ async function runAgent(args) {
83
83
  ...typeof values.port === "string" ? { port: values.port } : {}
84
84
  };
85
85
  Object.assign(process.env, buildAgentEnv(opts));
86
- await import("./launcher-EJVL74UN.js");
86
+ await import("./launcher-5FCVBL5M.js");
87
87
  }
88
88
 
89
89
  // src/commands/setup.ts
@@ -1130,7 +1130,7 @@ function isUnknown(_value) {
1130
1130
  return true;
1131
1131
  }
1132
1132
  async function resolveServerInteractive(presetNamespace) {
1133
- const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-4BY6AQ3K.js");
1133
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-PJINOUDH.js");
1134
1134
  if (presetNamespace) {
1135
1135
  const spinner4 = clack.spinner();
1136
1136
  spinner4.start(`Discovering hub on LAN (namespace "${presetNamespace}")`);
@@ -5,7 +5,7 @@ import {
5
5
  filterHubNodes,
6
6
  resolveHubFromDiscovered,
7
7
  runDiscover
8
- } from "./chunk-EJO2K6FH.js";
8
+ } from "./chunk-MYPVHFJL.js";
9
9
  import "./chunk-LMMQX4CK.js";
10
10
  export {
11
11
  DEFAULT_HUB_HTTPS_PORT,