camstack 1.2.160 → 1.2.161

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/cli.js CHANGED
@@ -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-HOXPTYJH.js");
41
+ await import("./launcher-UIR2WFGG.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-HOXPTYJH.js");
86
+ await import("./launcher-UIR2WFGG.js");
87
87
  }
88
88
 
89
89
  // src/commands/setup.ts
@@ -425770,7 +425770,23 @@ var require_share_token_service = __commonJS({
425770
425770
  exports.SHARE_TOKEN_MAX_DEVICES = 64;
425771
425771
  exports.ShareTokenScopeSchema = zod_1.z.object({
425772
425772
  kind: zod_1.z.enum(types_1.SHARE_VIEW_KINDS),
425773
- deviceIds: zod_1.z.array(zod_1.z.number().int().nonnegative()).min(1).max(exports.SHARE_TOKEN_MAX_DEVICES)
425773
+ deviceIds: zod_1.z.array(zod_1.z.number().int().nonnegative()).min(1).max(exports.SHARE_TOKEN_MAX_DEVICES),
425774
+ /**
425775
+ * TALK-BACK, opt-in at mint time. Absent means OFF, and that is the whole
425776
+ * point: a share link is handed to third parties, so the difference between
425777
+ * "can watch the kitchen" and "can speak into the kitchen" must be a choice
425778
+ * somebody made for THAT link, on the day they made it.
425779
+ *
425780
+ * It rides on the scope rather than widening the grid enumeration because
425781
+ * the enumeration is retroactive: a method added there is granted to every
425782
+ * token ever minted, including the one handed to a neighbour last week.
425783
+ * `share-view-access.ts` says so about event history; the same rule with
425784
+ * actuation into the home on the other end of it is not a smaller matter.
425785
+ *
425786
+ * It widens WHAT may be called, never WHICH cameras — `deviceIds` still
425787
+ * gates every talk call.
425788
+ */
425789
+ talk: zod_1.z.boolean().optional()
425774
425790
  });
425775
425791
  exports.ShareTokenRecordSchema = zod_1.z.object({
425776
425792
  id: zod_1.z.string(),
@@ -427374,6 +427390,11 @@ var require_share_view_access = __commonJS({
427374
427390
  "turnProvider.getTurnServers",
427375
427391
  "live.onEvent"
427376
427392
  ]);
427393
+ var GRID_VIEW_TALK_METHODS = /* @__PURE__ */ new Set([
427394
+ "intercom.startSession",
427395
+ "intercom.handleAnswer",
427396
+ "intercom.stopSession"
427397
+ ]);
427377
427398
  var GRID_VIEW_DEVICE_METHODS = /* @__PURE__ */ new Set([
427378
427399
  "snapshot.getSnapshot",
427379
427400
  "pipelineOrchestrator.getCameraMetrics",
@@ -427448,7 +427469,12 @@ var require_share_view_access = __commonJS({
427448
427469
  if (GRID_VIEW_OPEN_METHODS.has(path)) {
427449
427470
  return { ok: true };
427450
427471
  }
427451
- if (GRID_VIEW_DEVICE_METHODS.has(path)) {
427472
+ if (GRID_VIEW_TALK_METHODS.has(path)) {
427473
+ if (scope.talk !== true) {
427474
+ return { ok: false, reason: `'${path}' needs a share link minted with talk-back` };
427475
+ }
427476
+ }
427477
+ if (GRID_VIEW_TALK_METHODS.has(path) || GRID_VIEW_DEVICE_METHODS.has(path)) {
427452
427478
  const deviceId = extractDeviceId(input);
427453
427479
  if (deviceId === null) {
427454
427480
  return { ok: false, reason: `'${path}' requires a numeric deviceId for share-view access` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.2.160",
3
+ "version": "1.2.161",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",