@camstack/types 1.2.570 → 1.2.571

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/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.571] - 2026-11-15
11
+
12
+ ### Added
13
+
14
+ - terminal-session reports whether a node's server shell is enabled, and why it is refused.
15
+ - Notification templates can use {{sensorState}}, the sensor, button or lock state in the notification language.
16
+
10
17
  ## [1.2.570] - 2026-11-14
11
18
 
12
19
  ### Changed
@@ -69,6 +69,19 @@ declare const TerminalOutputEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
69
69
  exitCode: z.ZodNumber;
70
70
  signal: z.ZodOptional<z.ZodNumber>;
71
71
  }, z.core.$strip>], "kind">;
72
+ interface ServerShellRefusalShape {
73
+ readonly code: 'server-shell-disabled';
74
+ readonly nodeId: string;
75
+ readonly message: string;
76
+ }
77
+ interface ServerShellStatusShape {
78
+ readonly nodeId: string;
79
+ readonly enabled: boolean;
80
+ readonly idleMinutes: number;
81
+ readonly refusal: ServerShellRefusalShape | null;
82
+ }
83
+ declare const ServerShellRefusalSchema: z.ZodType<ServerShellRefusalShape>;
84
+ declare const ServerShellStatusSchema: z.ZodType<ServerShellStatusShape>;
72
85
  declare const TerminalOutputBatchSchema: z.ZodObject<{
73
86
  cursor: z.ZodNumber;
74
87
  reset: z.ZodBoolean;
@@ -144,6 +157,11 @@ export declare const terminalSessionCapability: {
144
157
  rows: z.ZodNumber;
145
158
  startedAt: z.ZodNumber;
146
159
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
160
+ /**
161
+ * Whether this node has opted in to the server shell. The refusal names
162
+ * the node when the opt-in is off. The boolean is decided in the provider.
163
+ */
164
+ readonly serverShellStatus: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodType<ServerShellStatusShape, unknown, z.core.$ZodTypeInternals<ServerShellStatusShape, unknown>>, import("./capability-definition.js").CapabilityMethodKind>;
147
165
  /**
148
166
  * Spawn a pty for an allowlisted profile at the given grid size and return
149
167
  * its session id. Output/input then flow over the data plane by that id.
@@ -163,7 +181,9 @@ export declare const terminalSessionCapability: {
163
181
  cols: z.ZodNumber;
164
182
  rows: z.ZodNumber;
165
183
  startedAt: z.ZodNumber;
166
- }, z.core.$strip>, "mutation">;
184
+ }, z.core.$strip>, "mutation"> & {
185
+ readonly caller: 'required';
186
+ };
167
187
  /** Resize a live session's pty (reflows the running program). */
168
188
  readonly resize: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
169
189
  sessionId: z.ZodString;
@@ -194,7 +214,9 @@ export declare const terminalSessionCapability: {
194
214
  exitCode: z.ZodNumber;
195
215
  signal: z.ZodOptional<z.ZodNumber>;
196
216
  }, z.core.$strip>], "kind">>>;
197
- }, z.core.$strip>, "mutation">;
217
+ }, z.core.$strip>, "mutation"> & {
218
+ readonly caller: 'required';
219
+ };
198
220
  /** Write terminal input through the node-routable capability plane. */
199
221
  readonly writeInput: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
200
222
  sessionId: z.ZodString;
@@ -203,7 +225,9 @@ export declare const terminalSessionCapability: {
203
225
  /** Terminate a live session and release its pty. */
204
226
  readonly close: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
205
227
  sessionId: z.ZodString;
206
- }, z.core.$strip>, z.ZodVoid, "mutation">;
228
+ }, z.core.$strip>, z.ZodVoid, "mutation"> & {
229
+ readonly caller: 'required';
230
+ };
207
231
  };
208
232
  readonly vocabulary: {
209
233
  readonly notOperatorFacing: "cluster administration — nodes, server package, metrics";
@@ -216,4 +240,6 @@ export type TerminalInstanceInfo = z.infer<typeof TerminalInstanceInfoSchema>;
216
240
  export type TerminalLegacyCamera = z.infer<typeof TerminalLegacyCameraSchema>;
217
241
  export type TerminalOutputEvent = z.infer<typeof TerminalOutputEventSchema>;
218
242
  export type TerminalOutputBatch = z.infer<typeof TerminalOutputBatchSchema>;
219
- export { TerminalInstanceInfoSchema, TerminalLegacyCameraSchema, TerminalOutputBatchSchema, TerminalOutputEventSchema, TerminalProfileInfoSchema, TerminalSessionInfoSchema, };
243
+ export type ServerShellStatus = z.infer<typeof ServerShellStatusSchema>;
244
+ export type ServerShellRefusal = z.infer<typeof ServerShellRefusalSchema>;
245
+ export { TerminalInstanceInfoSchema, TerminalLegacyCameraSchema, TerminalOutputBatchSchema, TerminalOutputEventSchema, TerminalProfileInfoSchema, ServerShellRefusalSchema, ServerShellStatusSchema, TerminalSessionInfoSchema, };
package/dist/client.js CHANGED
@@ -29974,6 +29974,7 @@ function createSystemProxy(api) {
29974
29974
  listLegacyCameras: (input) => dispatch("terminalSession", "listLegacyCameras", "query", input),
29975
29975
  adoptLegacyMonitor: (input) => dispatch("terminalSession", "adoptLegacyMonitor", "mutation", input),
29976
29976
  listSessions: (input) => dispatch("terminalSession", "listSessions", "query", input),
29977
+ serverShellStatus: (input) => dispatch("terminalSession", "serverShellStatus", "query", input),
29977
29978
  openSession: (input) => dispatch("terminalSession", "openSession", "mutation", input),
29978
29979
  resize: (input) => dispatch("terminalSession", "resize", "mutation", input),
29979
29980
  pullOutput: (input) => dispatch("terminalSession", "pullOutput", "mutation", input),
@@ -31998,6 +31999,16 @@ var NC_TEMPLATE_VARS = [
31998
31999
  fields: [...RULE_TEXT],
31999
32000
  kinds: ["sensor"]
32000
32001
  },
32002
+ {
32003
+ name: "sensorState",
32004
+ label: "Sensor state",
32005
+ description: "The state a sensor, button or lock moved to, in the notification language (unlocked, open, pressed); empty when the event has no state.",
32006
+ example: "unlocked",
32007
+ group: "sensor",
32008
+ families: ["rule"],
32009
+ fields: [...RULE_TEXT],
32010
+ kinds: ["sensor"]
32011
+ },
32001
32012
  {
32002
32013
  name: "duration",
32003
32014
  label: "Cycle duration",
package/dist/client.mjs CHANGED
@@ -29973,6 +29973,7 @@ function createSystemProxy(api) {
29973
29973
  listLegacyCameras: (input) => dispatch("terminalSession", "listLegacyCameras", "query", input),
29974
29974
  adoptLegacyMonitor: (input) => dispatch("terminalSession", "adoptLegacyMonitor", "mutation", input),
29975
29975
  listSessions: (input) => dispatch("terminalSession", "listSessions", "query", input),
29976
+ serverShellStatus: (input) => dispatch("terminalSession", "serverShellStatus", "query", input),
29976
29977
  openSession: (input) => dispatch("terminalSession", "openSession", "mutation", input),
29977
29978
  resize: (input) => dispatch("terminalSession", "resize", "mutation", input),
29978
29979
  pullOutput: (input) => dispatch("terminalSession", "pullOutput", "mutation", input),
@@ -31997,6 +31998,16 @@ var NC_TEMPLATE_VARS = [
31997
31998
  fields: [...RULE_TEXT],
31998
31999
  kinds: ["sensor"]
31999
32000
  },
32001
+ {
32002
+ name: "sensorState",
32003
+ label: "Sensor state",
32004
+ description: "The state a sensor, button or lock moved to, in the notification language (unlocked, open, pressed); empty when the event has no state.",
32005
+ example: "unlocked",
32006
+ group: "sensor",
32007
+ families: ["rule"],
32008
+ fields: [...RULE_TEXT],
32009
+ kinds: ["sensor"]
32010
+ },
32000
32011
  {
32001
32012
  name: "duration",
32002
32013
  label: "Cycle duration",
@@ -10934,6 +10934,13 @@ export type AppRouter = TrpcCoreRouter<{
10934
10934
  output: z.infer<typeof terminalSessionCapability.methods.listSessions.output>;
10935
10935
  meta: object;
10936
10936
  }>;
10937
+ serverShellStatus: TRPCQueryProcedure<{
10938
+ input: {
10939
+ nodeId?: string | undefined;
10940
+ } | undefined;
10941
+ output: z.infer<typeof terminalSessionCapability.methods.serverShellStatus.output>;
10942
+ meta: object;
10943
+ }>;
10937
10944
  openSession: TRPCMutationProcedure<{
10938
10945
  input: {
10939
10946
  [x: string]: unknown;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 1493 method paths across 208 capabilities.
9
+ * Coverage: 1494 method paths across 208 capabilities.
10
10
  */
11
11
  import type { MethodRole } from '../auth/viewer-access.js';
12
12
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
@@ -132,7 +132,7 @@ export interface SystemProxy {
132
132
  readonly streamBroker: Pick<InferProvider<typeof streamBrokerCapability>, 'fetchEventMedia' | 'listAllCameraStreams' | 'listAllProfileSlots' | 'getBrokerStats' | 'probeStream' | 'listClients' | 'getLiveViewerCounts' | 'killClient' | 'getStreamUrl' | 'getStreamWithCodec' | 'releaseStreamWithCodec' | 'acquireEgressTranscode' | 'releaseEgressTranscode' | 'subscribeAudioChunks' | 'pullAudioChunks' | 'unsubscribeAudioChunks' | 'setPreBufferDuration' | 'getPreBufferInfo' | 'getRtspPort' | 'getAllRtspEntries' | 'getRtspEntry' | 'regenerateRtspToken' | 'setRtspEnabled' | 'isRtspEnabled'>;
133
133
  readonly system: Pick<InferProvider<typeof systemCapability>, 'info' | 'health' | 'featureFlags' | 'networkAddresses' | 'getRetentionConfig' | 'setRetentionConfig' | 'forceRetentionCleanup' | 'getSiteLocation' | 'setSiteLocation' | 'detectSiteLocation' | 'getRequestCensus' | 'getLoadContributions' | 'getFailureContributions' | 'getLoggingSettings' | 'setLoggingSettings' | 'debugWatch'>;
134
134
  readonly template: Pick<InferProvider<typeof templateCapability>, 'list' | 'get' | 'create' | 'update' | 'delete'>;
135
- readonly terminalSession: Pick<InferProvider<typeof terminalSessionCapability>, 'listProfiles' | 'listLegacyCameras' | 'adoptLegacyMonitor' | 'listSessions' | 'openSession' | 'resize' | 'pullOutput' | 'writeInput' | 'close'>;
135
+ readonly terminalSession: Pick<InferProvider<typeof terminalSessionCapability>, 'listProfiles' | 'listLegacyCameras' | 'adoptLegacyMonitor' | 'listSessions' | 'serverShellStatus' | 'openSession' | 'resize' | 'pullOutput' | 'writeInput' | 'close'>;
136
136
  readonly toast: Pick<InferProvider<typeof toastCapability>, 'onToast'>;
137
137
  readonly training: Pick<InferProvider<typeof trainingCapability>, 'listBaseModels' | 'planJob' | 'startJob' | 'startJobBatch' | 'listJobs' | 'getJob' | 'cancelJob' | 'getJobResult' | 'listCanaryTargets' | 'registerResult' | 'canaryResult' | 'rollbackCanary' | 'discardResult'>;
138
138
  readonly turnProvider: Pick<InferProvider<typeof turnProviderCapability>, 'getTurnServers'>;
package/dist/index.js CHANGED
@@ -97870,6 +97870,17 @@ var TerminalOutputEventSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
97870
97870
  exitCode: zod.z.number().int(),
97871
97871
  signal: zod.z.number().int().optional()
97872
97872
  })]);
97873
+ var ServerShellRefusalSchema = zod.z.object({
97874
+ code: zod.z.literal("server-shell-disabled"),
97875
+ nodeId: zod.z.string(),
97876
+ message: zod.z.string()
97877
+ });
97878
+ var ServerShellStatusSchema = zod.z.object({
97879
+ nodeId: zod.z.string(),
97880
+ enabled: zod.z.boolean(),
97881
+ idleMinutes: zod.z.number().int().positive(),
97882
+ refusal: ServerShellRefusalSchema.nullable()
97883
+ });
97873
97884
  var TerminalOutputBatchSchema = zod.z.object({
97874
97885
  cursor: zod.z.number().int().nonnegative(),
97875
97886
  reset: zod.z.boolean(),
@@ -97903,6 +97914,11 @@ var terminalSessionCapability = {
97903
97914
  /** Live sessions currently hosted by the provider. */
97904
97915
  listSessions: require_sleep.method(zod.z.void(), zod.z.array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }),
97905
97916
  /**
97917
+ * Whether this node has opted in to the server shell. The refusal names
97918
+ * the node when the opt-in is off. The boolean is decided in the provider.
97919
+ */
97920
+ serverShellStatus: require_sleep.method(zod.z.void(), ServerShellStatusSchema, { auth: "admin" }),
97921
+ /**
97906
97922
  * Spawn a pty for an allowlisted profile at the given grid size and return
97907
97923
  * its session id. Output/input then flow over the data plane by that id.
97908
97924
  */
@@ -97916,7 +97932,8 @@ var terminalSessionCapability = {
97916
97932
  environment: zod.z.array(zod.z.string().max(4096)).max(64).optional()
97917
97933
  }), TerminalSessionInfoSchema, {
97918
97934
  kind: "mutation",
97919
- auth: "admin"
97935
+ auth: "admin",
97936
+ caller: "required"
97920
97937
  }),
97921
97938
  /** Resize a live session's pty (reflows the running program). */
97922
97939
  resize: require_sleep.method(zod.z.object({
@@ -97945,6 +97962,7 @@ var terminalSessionCapability = {
97945
97962
  }), TerminalOutputBatchSchema, {
97946
97963
  kind: "mutation",
97947
97964
  auth: "admin",
97965
+ caller: "required",
97948
97966
  timeoutMs: 15e3
97949
97967
  }),
97950
97968
  /** Write terminal input through the node-routable capability plane. */
@@ -97958,7 +97976,8 @@ var terminalSessionCapability = {
97958
97976
  /** Terminate a live session and release its pty. */
97959
97977
  close: require_sleep.method(zod.z.object({ sessionId: zod.z.string() }), zod.z.void(), {
97960
97978
  kind: "mutation",
97961
- auth: "admin"
97979
+ auth: "admin",
97980
+ caller: "required"
97962
97981
  })
97963
97982
  },
97964
97983
  vocabulary: { notOperatorFacing: require_sleep.NOT_A_DEVICE.CLUSTER }
@@ -126263,6 +126282,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
126263
126282
  access: "create",
126264
126283
  role: "admin"
126265
126284
  },
126285
+ "terminalSession.serverShellStatus": {
126286
+ capName: "terminal-session",
126287
+ capScope: "system",
126288
+ addonId: null,
126289
+ access: "view",
126290
+ role: "admin"
126291
+ },
126266
126292
  "terminalSession.writeInput": {
126267
126293
  capName: "terminal-session",
126268
126294
  capScope: "system",
@@ -134738,6 +134764,7 @@ function createSystemProxy(api) {
134738
134764
  listLegacyCameras: (input) => dispatch("terminalSession", "listLegacyCameras", "query", input),
134739
134765
  adoptLegacyMonitor: (input) => dispatch("terminalSession", "adoptLegacyMonitor", "mutation", input),
134740
134766
  listSessions: (input) => dispatch("terminalSession", "listSessions", "query", input),
134767
+ serverShellStatus: (input) => dispatch("terminalSession", "serverShellStatus", "query", input),
134741
134768
  openSession: (input) => dispatch("terminalSession", "openSession", "mutation", input),
134742
134769
  resize: (input) => dispatch("terminalSession", "resize", "mutation", input),
134743
134770
  pullOutput: (input) => dispatch("terminalSession", "pullOutput", "mutation", input),
@@ -138630,6 +138657,16 @@ var NC_TEMPLATE_VARS = [
138630
138657
  fields: [...RULE_TEXT],
138631
138658
  kinds: ["sensor"]
138632
138659
  },
138660
+ {
138661
+ name: "sensorState",
138662
+ label: "Sensor state",
138663
+ description: "The state a sensor, button or lock moved to, in the notification language (unlocked, open, pressed); empty when the event has no state.",
138664
+ example: "unlocked",
138665
+ group: "sensor",
138666
+ families: ["rule"],
138667
+ fields: [...RULE_TEXT],
138668
+ kinds: ["sensor"]
138669
+ },
138633
138670
  {
138634
138671
  name: "duration",
138635
138672
  label: "Cycle duration",
package/dist/index.mjs CHANGED
@@ -97869,6 +97869,17 @@ var TerminalOutputEventSchema = z.discriminatedUnion("kind", [z.object({
97869
97869
  exitCode: z.number().int(),
97870
97870
  signal: z.number().int().optional()
97871
97871
  })]);
97872
+ var ServerShellRefusalSchema = z.object({
97873
+ code: z.literal("server-shell-disabled"),
97874
+ nodeId: z.string(),
97875
+ message: z.string()
97876
+ });
97877
+ var ServerShellStatusSchema = z.object({
97878
+ nodeId: z.string(),
97879
+ enabled: z.boolean(),
97880
+ idleMinutes: z.number().int().positive(),
97881
+ refusal: ServerShellRefusalSchema.nullable()
97882
+ });
97872
97883
  var TerminalOutputBatchSchema = z.object({
97873
97884
  cursor: z.number().int().nonnegative(),
97874
97885
  reset: z.boolean(),
@@ -97902,6 +97913,11 @@ var terminalSessionCapability = {
97902
97913
  /** Live sessions currently hosted by the provider. */
97903
97914
  listSessions: method(z.void(), z.array(TerminalSessionInfoSchema).readonly(), { auth: "admin" }),
97904
97915
  /**
97916
+ * Whether this node has opted in to the server shell. The refusal names
97917
+ * the node when the opt-in is off. The boolean is decided in the provider.
97918
+ */
97919
+ serverShellStatus: method(z.void(), ServerShellStatusSchema, { auth: "admin" }),
97920
+ /**
97905
97921
  * Spawn a pty for an allowlisted profile at the given grid size and return
97906
97922
  * its session id. Output/input then flow over the data plane by that id.
97907
97923
  */
@@ -97915,7 +97931,8 @@ var terminalSessionCapability = {
97915
97931
  environment: z.array(z.string().max(4096)).max(64).optional()
97916
97932
  }), TerminalSessionInfoSchema, {
97917
97933
  kind: "mutation",
97918
- auth: "admin"
97934
+ auth: "admin",
97935
+ caller: "required"
97919
97936
  }),
97920
97937
  /** Resize a live session's pty (reflows the running program). */
97921
97938
  resize: method(z.object({
@@ -97944,6 +97961,7 @@ var terminalSessionCapability = {
97944
97961
  }), TerminalOutputBatchSchema, {
97945
97962
  kind: "mutation",
97946
97963
  auth: "admin",
97964
+ caller: "required",
97947
97965
  timeoutMs: 15e3
97948
97966
  }),
97949
97967
  /** Write terminal input through the node-routable capability plane. */
@@ -97957,7 +97975,8 @@ var terminalSessionCapability = {
97957
97975
  /** Terminate a live session and release its pty. */
97958
97976
  close: method(z.object({ sessionId: z.string() }), z.void(), {
97959
97977
  kind: "mutation",
97960
- auth: "admin"
97978
+ auth: "admin",
97979
+ caller: "required"
97961
97980
  })
97962
97981
  },
97963
97982
  vocabulary: { notOperatorFacing: NOT_A_DEVICE.CLUSTER }
@@ -126262,6 +126281,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
126262
126281
  access: "create",
126263
126282
  role: "admin"
126264
126283
  },
126284
+ "terminalSession.serverShellStatus": {
126285
+ capName: "terminal-session",
126286
+ capScope: "system",
126287
+ addonId: null,
126288
+ access: "view",
126289
+ role: "admin"
126290
+ },
126265
126291
  "terminalSession.writeInput": {
126266
126292
  capName: "terminal-session",
126267
126293
  capScope: "system",
@@ -134737,6 +134763,7 @@ function createSystemProxy(api) {
134737
134763
  listLegacyCameras: (input) => dispatch("terminalSession", "listLegacyCameras", "query", input),
134738
134764
  adoptLegacyMonitor: (input) => dispatch("terminalSession", "adoptLegacyMonitor", "mutation", input),
134739
134765
  listSessions: (input) => dispatch("terminalSession", "listSessions", "query", input),
134766
+ serverShellStatus: (input) => dispatch("terminalSession", "serverShellStatus", "query", input),
134740
134767
  openSession: (input) => dispatch("terminalSession", "openSession", "mutation", input),
134741
134768
  resize: (input) => dispatch("terminalSession", "resize", "mutation", input),
134742
134769
  pullOutput: (input) => dispatch("terminalSession", "pullOutput", "mutation", input),
@@ -138629,6 +138656,16 @@ var NC_TEMPLATE_VARS = [
138629
138656
  fields: [...RULE_TEXT],
138630
138657
  kinds: ["sensor"]
138631
138658
  },
138659
+ {
138660
+ name: "sensorState",
138661
+ label: "Sensor state",
138662
+ description: "The state a sensor, button or lock moved to, in the notification language (unlocked, open, pressed); empty when the event has no state.",
138663
+ example: "unlocked",
138664
+ group: "sensor",
138665
+ families: ["rule"],
138666
+ fields: [...RULE_TEXT],
138667
+ kinds: ["sensor"]
138668
+ },
138632
138669
  {
138633
138670
  name: "duration",
138634
138671
  label: "Cycle duration",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.570",
3
+ "version": "1.2.571",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",