@camstack/types 1.2.55 → 1.2.57

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.
@@ -122,6 +122,21 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
122
122
  delivered: "delivered";
123
123
  "picked-up": "picked-up";
124
124
  }>>;
125
+ systemEvent: z.ZodOptional<z.ZodObject<{
126
+ kinds: z.ZodArray<z.ZodEnum<{
127
+ "camera-online": "camera-online";
128
+ "camera-offline": "camera-offline";
129
+ "stream-online": "stream-online";
130
+ "stream-offline": "stream-offline";
131
+ "node-online": "node-online";
132
+ "node-offline": "node-offline";
133
+ "addon-update-available": "addon-update-available";
134
+ "server-update-available": "server-update-available";
135
+ }>>;
136
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
137
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
138
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
139
+ }, z.core.$strip>>;
125
140
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
126
141
  kind: z.ZodLiteral<"polygon">;
127
142
  points: z.ZodArray<z.ZodObject<{
@@ -231,6 +246,21 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
231
246
  delivered: "delivered";
232
247
  "picked-up": "picked-up";
233
248
  }>>;
249
+ systemEvent: z.ZodOptional<z.ZodObject<{
250
+ kinds: z.ZodArray<z.ZodEnum<{
251
+ "camera-online": "camera-online";
252
+ "camera-offline": "camera-offline";
253
+ "stream-online": "stream-online";
254
+ "stream-offline": "stream-offline";
255
+ "node-online": "node-online";
256
+ "node-offline": "node-offline";
257
+ "addon-update-available": "addon-update-available";
258
+ "server-update-available": "server-update-available";
259
+ }>>;
260
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
261
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
262
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
263
+ }, z.core.$strip>>;
234
264
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
235
265
  kind: z.ZodLiteral<"polygon">;
236
266
  points: z.ZodArray<z.ZodObject<{
@@ -412,6 +442,21 @@ export declare const osdManagerCapability: {
412
442
  delivered: "delivered";
413
443
  "picked-up": "picked-up";
414
444
  }>>;
445
+ systemEvent: z.ZodOptional<z.ZodObject<{
446
+ kinds: z.ZodArray<z.ZodEnum<{
447
+ "camera-online": "camera-online";
448
+ "camera-offline": "camera-offline";
449
+ "stream-online": "stream-online";
450
+ "stream-offline": "stream-offline";
451
+ "node-online": "node-online";
452
+ "node-offline": "node-offline";
453
+ "addon-update-available": "addon-update-available";
454
+ "server-update-available": "server-update-available";
455
+ }>>;
456
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
457
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
458
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
459
+ }, z.core.$strip>>;
415
460
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
416
461
  kind: z.ZodLiteral<"polygon">;
417
462
  points: z.ZodArray<z.ZodObject<{
@@ -470,6 +515,7 @@ export declare const osdManagerCapability: {
470
515
  catalog: z.ZodArray<z.ZodObject<{
471
516
  id: z.ZodString;
472
517
  group: z.ZodEnum<{
518
+ system: "system";
473
519
  device: "device";
474
520
  label: "label";
475
521
  scope: "scope";
@@ -486,6 +532,7 @@ export declare const osdManagerCapability: {
486
532
  deviceState: "deviceState";
487
533
  schedule: "schedule";
488
534
  packagePhase: "packagePhase";
535
+ systemEvent: "systemEvent";
489
536
  occupancy: "occupancy";
490
537
  deviceIdList: "deviceIdList";
491
538
  stringList: "stringList";
@@ -511,6 +558,7 @@ export declare const osdManagerCapability: {
511
558
  immediate: "immediate";
512
559
  "track-end": "track-end";
513
560
  "package-event": "package-event";
561
+ "system-event": "system-event";
514
562
  }>>;
515
563
  phase: z.ZodString;
516
564
  description: z.ZodOptional<z.ZodString>;
@@ -604,6 +652,21 @@ export declare const osdManagerCapability: {
604
652
  delivered: "delivered";
605
653
  "picked-up": "picked-up";
606
654
  }>>;
655
+ systemEvent: z.ZodOptional<z.ZodObject<{
656
+ kinds: z.ZodArray<z.ZodEnum<{
657
+ "camera-online": "camera-online";
658
+ "camera-offline": "camera-offline";
659
+ "stream-online": "stream-online";
660
+ "stream-offline": "stream-offline";
661
+ "node-online": "node-online";
662
+ "node-offline": "node-offline";
663
+ "addon-update-available": "addon-update-available";
664
+ "server-update-available": "server-update-available";
665
+ }>>;
666
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
667
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
668
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
669
+ }, z.core.$strip>>;
607
670
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
608
671
  kind: z.ZodLiteral<"polygon">;
609
672
  points: z.ZodArray<z.ZodObject<{
@@ -712,6 +775,21 @@ export declare const osdManagerCapability: {
712
775
  delivered: "delivered";
713
776
  "picked-up": "picked-up";
714
777
  }>>;
778
+ systemEvent: z.ZodOptional<z.ZodObject<{
779
+ kinds: z.ZodArray<z.ZodEnum<{
780
+ "camera-online": "camera-online";
781
+ "camera-offline": "camera-offline";
782
+ "stream-online": "stream-online";
783
+ "stream-offline": "stream-offline";
784
+ "node-online": "node-online";
785
+ "node-offline": "node-offline";
786
+ "addon-update-available": "addon-update-available";
787
+ "server-update-available": "server-update-available";
788
+ }>>;
789
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
790
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
791
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
792
+ }, z.core.$strip>>;
715
793
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
716
794
  kind: z.ZodLiteral<"polygon">;
717
795
  points: z.ZodArray<z.ZodObject<{
@@ -840,6 +918,21 @@ export declare const osdManagerCapability: {
840
918
  delivered: "delivered";
841
919
  "picked-up": "picked-up";
842
920
  }>>;
921
+ systemEvent: z.ZodOptional<z.ZodObject<{
922
+ kinds: z.ZodArray<z.ZodEnum<{
923
+ "camera-online": "camera-online";
924
+ "camera-offline": "camera-offline";
925
+ "stream-online": "stream-online";
926
+ "stream-offline": "stream-offline";
927
+ "node-online": "node-online";
928
+ "node-offline": "node-offline";
929
+ "addon-update-available": "addon-update-available";
930
+ "server-update-available": "server-update-available";
931
+ }>>;
932
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
933
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
934
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
935
+ }, z.core.$strip>>;
843
936
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
844
937
  kind: z.ZodLiteral<"polygon">;
845
938
  points: z.ZodArray<z.ZodObject<{
@@ -27,6 +27,31 @@ declare const TerminalProfileInfoSchema: z.ZodObject<{
27
27
  label: z.ZodString;
28
28
  description: z.ZodOptional<z.ZodString>;
29
29
  }, z.core.$strip>;
30
+ declare const TerminalOutputEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
31
+ seq: z.ZodNumber;
32
+ kind: z.ZodLiteral<"data">;
33
+ data: z.ZodString;
34
+ }, z.core.$strip>, z.ZodObject<{
35
+ seq: z.ZodNumber;
36
+ kind: z.ZodLiteral<"exit">;
37
+ exitCode: z.ZodNumber;
38
+ signal: z.ZodOptional<z.ZodNumber>;
39
+ }, z.core.$strip>], "kind">;
40
+ declare const TerminalOutputBatchSchema: z.ZodObject<{
41
+ cursor: z.ZodNumber;
42
+ reset: z.ZodBoolean;
43
+ snapshot: z.ZodOptional<z.ZodString>;
44
+ events: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
45
+ seq: z.ZodNumber;
46
+ kind: z.ZodLiteral<"data">;
47
+ data: z.ZodString;
48
+ }, z.core.$strip>, z.ZodObject<{
49
+ seq: z.ZodNumber;
50
+ kind: z.ZodLiteral<"exit">;
51
+ exitCode: z.ZodNumber;
52
+ signal: z.ZodOptional<z.ZodNumber>;
53
+ }, z.core.$strip>], "kind">>>;
54
+ }, z.core.$strip>;
30
55
  /**
31
56
  * terminal-session — singleton system capability for interactive TTY sessions.
32
57
  *
@@ -77,6 +102,35 @@ export declare const terminalSessionCapability: {
77
102
  cols: z.ZodNumber;
78
103
  rows: z.ZodNumber;
79
104
  }, z.core.$strip>, z.ZodVoid, "mutation">;
105
+ /**
106
+ * Pull ordered output after a cursor. This capability transport is what
107
+ * makes remote-agent terminals possible; `reset + snapshot` repairs a
108
+ * caller that fell behind the bounded replay window.
109
+ */
110
+ readonly pullOutput: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
111
+ sessionId: z.ZodString;
112
+ afterSeq: z.ZodNumber;
113
+ waitMs: z.ZodDefault<z.ZodNumber>;
114
+ }, z.core.$strip>, z.ZodObject<{
115
+ cursor: z.ZodNumber;
116
+ reset: z.ZodBoolean;
117
+ snapshot: z.ZodOptional<z.ZodString>;
118
+ events: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
119
+ seq: z.ZodNumber;
120
+ kind: z.ZodLiteral<"data">;
121
+ data: z.ZodString;
122
+ }, z.core.$strip>, z.ZodObject<{
123
+ seq: z.ZodNumber;
124
+ kind: z.ZodLiteral<"exit">;
125
+ exitCode: z.ZodNumber;
126
+ signal: z.ZodOptional<z.ZodNumber>;
127
+ }, z.core.$strip>], "kind">>>;
128
+ }, z.core.$strip>, "mutation">;
129
+ /** Write terminal input through the node-routable capability plane. */
130
+ readonly writeInput: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
131
+ sessionId: z.ZodString;
132
+ data: z.ZodString;
133
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
80
134
  /** Terminate a live session and release its pty. */
81
135
  readonly close: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
82
136
  sessionId: z.ZodString;
@@ -86,4 +140,6 @@ export declare const terminalSessionCapability: {
86
140
  export type ITerminalSessionProvider = InferProvider<typeof terminalSessionCapability>;
87
141
  export type TerminalSessionInfo = z.infer<typeof TerminalSessionInfoSchema>;
88
142
  export type TerminalProfileInfo = z.infer<typeof TerminalProfileInfoSchema>;
89
- export { TerminalSessionInfoSchema, TerminalProfileInfoSchema };
143
+ export type TerminalOutputEvent = z.infer<typeof TerminalOutputEventSchema>;
144
+ export type TerminalOutputBatch = z.infer<typeof TerminalOutputBatchSchema>;
145
+ export { TerminalSessionInfoSchema, TerminalProfileInfoSchema, TerminalOutputEventSchema, TerminalOutputBatchSchema, };
@@ -12,6 +12,13 @@ export declare enum EventCategory {
12
12
  * Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
13
13
  */
14
14
  SystemRestartCompleted = "system.restart-completed",
15
+ /**
16
+ * A newer addon or server-root package version was found by the
17
+ * authoritative registry check. Emitted once per
18
+ * `(target, packageName, currentVersion, latestVersion)` transition; repeated
19
+ * polling of the same result is deduplicated by the checker.
20
+ */
21
+ UpdateAvailable = "update.available",
15
22
  /**
16
23
  * Readiness transition for a capability provider. Every producer emits
17
24
  * this event on `onInitialize` completion, `onDestroy`, and
package/dist/enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-BE4PDZ_3.js");
2
+ const require_event_category = require("./event-category-DxZbWydC.js");
3
3
  //#region src/enums/event-source-type.ts
4
4
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
5
5
  EventSourceType["Addon"] = "addon";
package/dist/enums.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-41fKf-q9.mjs";
1
+ import { t as EventCategory } from "./event-category-Cv9dO26A.mjs";
2
2
  //#region src/enums/event-source-type.ts
3
3
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
4
4
  EventSourceType["Addon"] = "addon";
@@ -14,6 +14,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  */
15
15
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
16
16
  /**
17
+ * A newer addon or server-root package version was found by the
18
+ * authoritative registry check. Emitted once per
19
+ * `(target, packageName, currentVersion, latestVersion)` transition; repeated
20
+ * polling of the same result is deduplicated by the checker.
21
+ */
22
+ EventCategory["UpdateAvailable"] = "update.available";
23
+ /**
17
24
  * Readiness transition for a capability provider. Every producer emits
18
25
  * this event on `onInitialize` completion, `onDestroy`, and
19
26
  * `$node.reconnect`; every consumer that needs to gate on a cross-process
@@ -14,6 +14,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  */
15
15
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
16
16
  /**
17
+ * A newer addon or server-root package version was found by the
18
+ * authoritative registry check. Emitted once per
19
+ * `(target, packageName, currentVersion, latestVersion)` transition; repeated
20
+ * polling of the same result is deduplicated by the checker.
21
+ */
22
+ EventCategory["UpdateAvailable"] = "update.available";
23
+ /**
17
24
  * Readiness transition for a capability provider. Every producer emits
18
25
  * this event on `onInitialize` completion, `onDestroy`, and
19
26
  * `$node.reconnect`; every consumer that needs to gate on a cross-process
@@ -7409,6 +7409,20 @@ export type AppRouter = TrpcCoreRouter<{
7409
7409
  output: z.infer<typeof terminalSessionCapability.methods.resize.output>;
7410
7410
  meta: object;
7411
7411
  }>;
7412
+ pullOutput: TRPCMutationProcedure<{
7413
+ input: {
7414
+ [x: string]: unknown;
7415
+ } & z.input<typeof terminalSessionCapability.methods.pullOutput.input>;
7416
+ output: z.infer<typeof terminalSessionCapability.methods.pullOutput.output>;
7417
+ meta: object;
7418
+ }>;
7419
+ writeInput: TRPCMutationProcedure<{
7420
+ input: {
7421
+ [x: string]: unknown;
7422
+ } & z.input<typeof terminalSessionCapability.methods.writeInput.input>;
7423
+ output: z.infer<typeof terminalSessionCapability.methods.writeInput.output>;
7424
+ meta: object;
7425
+ }>;
7412
7426
  close: TRPCMutationProcedure<{
7413
7427
  input: {
7414
7428
  [x: string]: unknown;
@@ -11,7 +11,7 @@
11
11
  * Plain data, zero Zod: a forked runner must not import the schema barrel
12
12
  * (~144MB RSS per runner — D28).
13
13
  *
14
- * Coverage: 23 caps, 51 methods with defaults.
14
+ * Coverage: 24 caps, 52 methods with defaults.
15
15
  */
16
16
  export declare const CAP_INPUT_DEFAULTS: Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
17
17
  /**
@@ -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: 906 method paths across 122 capabilities.
9
+ * Coverage: 908 method paths across 122 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -93,7 +93,7 @@ export interface SystemProxy {
93
93
  readonly storage: Pick<InferProvider<typeof storageCapability>, 'resolve' | 'write' | 'read' | 'exists' | 'list' | 'delete' | 'getAvailableSpace' | 'beginUpload' | 'writeChunk' | 'finalizeUpload' | 'abortUpload' | 'beginDownload' | 'readChunk' | 'endDownload' | 'listLocations' | 'getDefaultLocation' | 'listLocationDeclarations' | 'upsertLocation' | 'deleteLocation' | 'testLocation' | 'listProviders' | 'testConfig'>;
94
94
  readonly streamBroker: Pick<InferProvider<typeof streamBrokerCapability>, 'fetchEventMedia' | 'listAllCameraStreams' | 'listAllProfileSlots' | 'getBrokerStats' | 'probeStream' | 'listClients' | 'killClient' | 'getStreamUrl' | 'getStreamWithCodec' | 'releaseStreamWithCodec' | 'acquireEgressTranscode' | 'releaseEgressTranscode' | 'subscribeAudioChunks' | 'pullAudioChunks' | 'unsubscribeAudioChunks' | 'subscribeFrames' | 'pullFrameHandles' | 'unsubscribeFrames' | 'setPreBufferDuration' | 'getPreBufferInfo' | 'getRtspPort' | 'getAllRtspEntries' | 'getRtspEntry' | 'regenerateRtspToken' | 'setRtspEnabled' | 'isRtspEnabled'>;
95
95
  readonly system: Pick<InferProvider<typeof systemCapability>, 'info' | 'health' | 'featureFlags' | 'networkAddresses' | 'getRetentionConfig' | 'setRetentionConfig' | 'forceRetentionCleanup'>;
96
- readonly terminalSession: Pick<InferProvider<typeof terminalSessionCapability>, 'listProfiles' | 'listSessions' | 'openSession' | 'resize' | 'close'>;
96
+ readonly terminalSession: Pick<InferProvider<typeof terminalSessionCapability>, 'listProfiles' | 'listSessions' | 'openSession' | 'resize' | 'pullOutput' | 'writeInput' | 'close'>;
97
97
  readonly toast: Pick<InferProvider<typeof toastCapability>, 'onToast'>;
98
98
  readonly turnProvider: Pick<InferProvider<typeof turnProviderCapability>, 'getTurnServers'>;
99
99
  readonly userManagement: Pick<InferProvider<typeof userManagementCapability>, 'listUsers' | 'createUser' | 'updateUser' | 'deleteUser' | 'resetPassword' | 'setUserScopes' | 'validateCredentials' | 'listApiKeys' | 'createApiKey' | 'revokeApiKey' | 'validateApiKey' | 'createScopedToken' | 'revokeScopedToken' | 'validateScopedToken' | 'listScopedTokens' | 'setupTotp' | 'confirmTotp' | 'disableTotp' | 'getTotpStatus' | 'verifyTotp' | 'oauthIssueCode' | 'oauthExchangeCode' | 'oauthRefresh' | 'oauthVerifyAccessToken' | 'listOauthSessions' | 'revokeOauthSession'>;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-BE4PDZ_3.js");
3
- const require_sleep = require("./sleep-DfF6vKCf.js");
2
+ const require_event_category = require("./event-category-DxZbWydC.js");
3
+ const require_sleep = require("./sleep-EX1-qUVR.js");
4
4
  const require_canonical_hash = require("./canonical-hash-DNV8S5ET.js");
5
5
  const require_enums = require("./enums.js");
6
6
  const require_err_msg = require("./err-msg-COpsHMw2.js");
@@ -11659,9 +11659,36 @@ var NcDeliverySchema = zod.z.enum([
11659
11659
  "immediate",
11660
11660
  "track-end",
11661
11661
  "device-event",
11662
- "package-event"
11662
+ "package-event",
11663
+ "system-event"
11663
11664
  ]);
11664
11665
  /**
11666
+ * Stable Notification Center vocabulary over infrastructure/liveness events.
11667
+ * Bus categories are normalized into these intent-level kinds so rules do not
11668
+ * depend on a provider's raw event name or payload shape.
11669
+ */
11670
+ var NcSystemEventKindSchema = zod.z.enum([
11671
+ "camera-online",
11672
+ "camera-offline",
11673
+ "stream-online",
11674
+ "stream-offline",
11675
+ "node-online",
11676
+ "node-offline",
11677
+ "addon-update-available",
11678
+ "server-update-available"
11679
+ ]);
11680
+ /**
11681
+ * One coherent system-event condition. `kinds` is the required opt-in safety
11682
+ * gate; the remaining lists are optional narrowing filters relevant to the
11683
+ * selected kinds.
11684
+ */
11685
+ var NcSystemEventConditionSchema = zod.z.object({
11686
+ kinds: zod.z.array(NcSystemEventKindSchema).min(1),
11687
+ deviceIds: zod.z.array(zod.z.number().int()).min(1).optional(),
11688
+ nodeIds: zod.z.array(zod.z.string().min(1)).min(1).optional(),
11689
+ packageNames: zod.z.array(zod.z.string().min(1)).min(1).optional()
11690
+ });
11691
+ /**
11665
11692
  * `maxPerTrack` for `immediate` rules is FIXED at 1 (D-3): a single track
11666
11693
  * fires an immediate rule at most once, enforced durably by the outbox
11667
11694
  * unique key `(ruleId, trackId, targetId)`. Not a rule field in P1.
@@ -11984,6 +12011,8 @@ var NcConditionsSchema = zod.z.object({
11984
12011
  "picked-up",
11985
12012
  "both"
11986
12013
  ]).optional(),
12014
+ /** Infrastructure/liveness/update event matcher (`system-event` delivery). */
12015
+ systemEvent: NcSystemEventConditionSchema.optional(),
11987
12016
  /**
11988
12017
  * PERSONAL-RULE custom zones (viewer-drawn). Inline normalized polygons
11989
12018
  * (MaskShape vocabulary). A record passes when its bbox overlaps ANY
@@ -12203,7 +12232,8 @@ var NcTestResultSchema = zod.z.object({
12203
12232
  "object-event",
12204
12233
  "track",
12205
12234
  "device-event",
12206
- "package-event"
12235
+ "package-event",
12236
+ "system-event"
12207
12237
  ]),
12208
12238
  deviceId: zod.z.number(),
12209
12239
  timestamp: zod.z.number(),
@@ -12225,7 +12255,8 @@ var NcConditionDescriptorSchema = zod.z.object({
12225
12255
  "schedule",
12226
12256
  "device",
12227
12257
  "package",
12228
- "occupancy"
12258
+ "occupancy",
12259
+ "system"
12229
12260
  ]),
12230
12261
  label: zod.z.string(),
12231
12262
  /** Editor widget the UI renders — never hardcode per-condition forms. */
@@ -12243,7 +12274,8 @@ var NcConditionDescriptorSchema = zod.z.object({
12243
12274
  "crossingSelect",
12244
12275
  "polygonDraw",
12245
12276
  "occupancy",
12246
- "deviceState"
12277
+ "deviceState",
12278
+ "systemEvent"
12247
12279
  ]),
12248
12280
  operator: zod.z.enum([
12249
12281
  "in",
@@ -12285,6 +12317,50 @@ var NcConditionDescriptorSchema = zod.z.object({
12285
12317
  * rule editors render from the catalog, not hardcoded forms (spec §4.2).
12286
12318
  */
12287
12319
  var NC_CONDITION_CATALOG = [
12320
+ {
12321
+ id: "systemEvent",
12322
+ group: "system",
12323
+ label: "System event",
12324
+ valueType: "systemEvent",
12325
+ options: [
12326
+ {
12327
+ value: "camera-online",
12328
+ label: "Camera online"
12329
+ },
12330
+ {
12331
+ value: "camera-offline",
12332
+ label: "Camera offline"
12333
+ },
12334
+ {
12335
+ value: "stream-online",
12336
+ label: "Stream online"
12337
+ },
12338
+ {
12339
+ value: "stream-offline",
12340
+ label: "Stream offline"
12341
+ },
12342
+ {
12343
+ value: "node-online",
12344
+ label: "Node online"
12345
+ },
12346
+ {
12347
+ value: "node-offline",
12348
+ label: "Node offline"
12349
+ },
12350
+ {
12351
+ value: "addon-update-available",
12352
+ label: "Addon update available"
12353
+ },
12354
+ {
12355
+ value: "server-update-available",
12356
+ label: "Server update available"
12357
+ }
12358
+ ],
12359
+ operator: "in",
12360
+ appliesTo: ["system-event"],
12361
+ phase: "P1",
12362
+ description: "Infrastructure and update events. Optionally narrow camera/stream events by device, node events by node id, and addon updates by package name."
12363
+ },
12288
12364
  {
12289
12365
  id: "devices",
12290
12366
  group: "scope",
@@ -12599,7 +12675,8 @@ var NC_CONDITION_CATALOG = [
12599
12675
  "immediate",
12600
12676
  "track-end",
12601
12677
  "device-event",
12602
- "package-event"
12678
+ "package-event",
12679
+ "system-event"
12603
12680
  ],
12604
12681
  phase: "P1",
12605
12682
  description: "Weekly activation windows (invertible); absent = always active."
@@ -12627,7 +12704,8 @@ var NcHistoryRecordKindSchema = zod.z.enum([
12627
12704
  "object-event",
12628
12705
  "track-end",
12629
12706
  "device-event",
12630
- "package-event"
12707
+ "package-event",
12708
+ "system-event"
12631
12709
  ]);
12632
12710
  /** Subject summary frozen on the row at fire time (survives rule/record edits). */
12633
12711
  var NcHistorySubjectSchema = zod.z.object({
@@ -12635,7 +12713,14 @@ var NcHistorySubjectSchema = zod.z.object({
12635
12713
  label: zod.z.string().optional(),
12636
12714
  confidence: zod.z.number().optional(),
12637
12715
  zones: zod.z.array(zod.z.string()),
12638
- timestamp: zod.z.number()
12716
+ timestamp: zod.z.number(),
12717
+ systemEvent: zod.z.object({
12718
+ kind: NcSystemEventKindSchema,
12719
+ subject: zod.z.string(),
12720
+ title: zod.z.string(),
12721
+ body: zod.z.string(),
12722
+ data: zod.z.record(zod.z.string(), zod.z.unknown())
12723
+ }).optional()
12639
12724
  });
12640
12725
  /**
12641
12726
  * One delivery-history row. This is a read-only VIEW over the durable
@@ -18094,6 +18179,22 @@ var TerminalProfileInfoSchema = zod.z.object({
18094
18179
  label: zod.z.string(),
18095
18180
  description: zod.z.string().optional()
18096
18181
  });
18182
+ var TerminalOutputEventSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
18183
+ seq: zod.z.number().int().positive(),
18184
+ kind: zod.z.literal("data"),
18185
+ data: zod.z.string()
18186
+ }), zod.z.object({
18187
+ seq: zod.z.number().int().positive(),
18188
+ kind: zod.z.literal("exit"),
18189
+ exitCode: zod.z.number().int(),
18190
+ signal: zod.z.number().int().optional()
18191
+ })]);
18192
+ var TerminalOutputBatchSchema = zod.z.object({
18193
+ cursor: zod.z.number().int().nonnegative(),
18194
+ reset: zod.z.boolean(),
18195
+ snapshot: zod.z.string().optional(),
18196
+ events: zod.z.array(TerminalOutputEventSchema).readonly()
18197
+ });
18097
18198
  /**
18098
18199
  * terminal-session — singleton system capability for interactive TTY sessions.
18099
18200
  *
@@ -18132,6 +18233,28 @@ var terminalSessionCapability = {
18132
18233
  kind: "mutation",
18133
18234
  auth: "admin"
18134
18235
  }),
18236
+ /**
18237
+ * Pull ordered output after a cursor. This capability transport is what
18238
+ * makes remote-agent terminals possible; `reset + snapshot` repairs a
18239
+ * caller that fell behind the bounded replay window.
18240
+ */
18241
+ pullOutput: require_sleep.method(zod.z.object({
18242
+ sessionId: zod.z.string(),
18243
+ afterSeq: zod.z.number().int().nonnegative(),
18244
+ waitMs: zod.z.number().int().min(0).max(2e3).default(0)
18245
+ }), TerminalOutputBatchSchema, {
18246
+ kind: "mutation",
18247
+ auth: "admin",
18248
+ timeoutMs: 15e3
18249
+ }),
18250
+ /** Write terminal input through the node-routable capability plane. */
18251
+ writeInput: require_sleep.method(zod.z.object({
18252
+ sessionId: zod.z.string(),
18253
+ data: zod.z.string().max(64 * 1024)
18254
+ }), zod.z.void(), {
18255
+ kind: "mutation",
18256
+ auth: "admin"
18257
+ }),
18135
18258
  /** Terminate a live session and release its pty. */
18136
18259
  close: require_sleep.method(zod.z.object({ sessionId: zod.z.string() }), zod.z.void(), {
18137
18260
  kind: "mutation",
@@ -36138,12 +36261,24 @@ var METHOD_ACCESS_MAP = Object.freeze({
36138
36261
  addonId: null,
36139
36262
  access: "create"
36140
36263
  },
36264
+ "terminalSession.pullOutput": {
36265
+ capName: "terminal-session",
36266
+ capScope: "system",
36267
+ addonId: null,
36268
+ access: "create"
36269
+ },
36141
36270
  "terminalSession.resize": {
36142
36271
  capName: "terminal-session",
36143
36272
  capScope: "system",
36144
36273
  addonId: null,
36145
36274
  access: "create"
36146
36275
  },
36276
+ "terminalSession.writeInput": {
36277
+ capName: "terminal-session",
36278
+ capScope: "system",
36279
+ addonId: null,
36280
+ access: "create"
36281
+ },
36147
36282
  "toast.onToast": {
36148
36283
  capName: "toast",
36149
36284
  capScope: "system",
@@ -37521,6 +37656,8 @@ function createSystemProxy(api) {
37521
37656
  listSessions: (input) => dispatch("terminalSession", "listSessions", "query", input),
37522
37657
  openSession: (input) => dispatch("terminalSession", "openSession", "mutation", input),
37523
37658
  resize: (input) => dispatch("terminalSession", "resize", "mutation", input),
37659
+ pullOutput: (input) => dispatch("terminalSession", "pullOutput", "mutation", input),
37660
+ writeInput: (input) => dispatch("terminalSession", "writeInput", "mutation", input),
37524
37661
  close: (input) => dispatch("terminalSession", "close", "mutation", input)
37525
37662
  },
37526
37663
  toast: { onToast: (input, push) => dispatch("toast", "onToast", "subscription", input, push) },
@@ -40283,6 +40420,8 @@ exports.NcSnoozeInputSchema = NcSnoozeInputSchema;
40283
40420
  exports.NcSnoozeSchema = NcSnoozeSchema;
40284
40421
  exports.NcSnoozeScopeSchema = NcSnoozeScopeSchema;
40285
40422
  exports.NcSnoozeSuppressedSchema = NcSnoozeSuppressedSchema;
40423
+ exports.NcSystemEventConditionSchema = NcSystemEventConditionSchema;
40424
+ exports.NcSystemEventKindSchema = NcSystemEventKindSchema;
40286
40425
  exports.NcTaxonomyEntrySchema = NcTaxonomyEntrySchema;
40287
40426
  exports.NcTaxonomySchema = NcTaxonomySchema;
40288
40427
  exports.NcTestResultSchema = NcTestResultSchema;
@@ -40521,6 +40660,8 @@ exports.TargetKindLevelSchema = TargetKindLevelSchema;
40521
40660
  exports.TargetKindSchema = TargetKindSchema;
40522
40661
  exports.TargetSchema = TargetSchema;
40523
40662
  exports.TemperatureSensorStatusSchema = TemperatureSensorStatusSchema;
40663
+ exports.TerminalOutputBatchSchema = TerminalOutputBatchSchema;
40664
+ exports.TerminalOutputEventSchema = TerminalOutputEventSchema;
40524
40665
  exports.TerminalProfileInfoSchema = TerminalProfileInfoSchema;
40525
40666
  exports.TerminalSessionInfoSchema = TerminalSessionInfoSchema;
40526
40667
  exports.TestConnectionResultSchema = TestConnectionResultSchema$1;