@camstack/types 1.2.451 → 1.2.453

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/addon/base-addon.d.ts +27 -0
  3. package/dist/addon.js +8 -3
  4. package/dist/addon.mjs +8 -3
  5. package/dist/automation/condition-eval.d.ts +20 -5
  6. package/dist/automation/detection-subject.d.ts +154 -0
  7. package/dist/automation/detection-trigger.d.ts +16 -6
  8. package/dist/automation/index.d.ts +10 -4
  9. package/dist/automation/legacy-recipe.d.ts +130 -0
  10. package/dist/automation/normalize-units.d.ts +4 -3
  11. package/dist/automation/recipe.d.ts +286 -142
  12. package/dist/automation/stationary-trigger.d.ts +4 -4
  13. package/dist/automation/step-runner.d.ts +3 -1
  14. package/dist/automation/trace.d.ts +51 -6
  15. package/dist/automation/when.d.ts +295 -0
  16. package/dist/capabilities/actions.cap.d.ts +10 -0
  17. package/dist/capabilities/addon-settings.cap.d.ts +18 -0
  18. package/dist/capabilities/core-blocks.cap.d.ts +2546 -51
  19. package/dist/capabilities/device-discovery.cap.d.ts +2 -0
  20. package/dist/capabilities/device-manager.cap.d.ts +16 -1
  21. package/dist/capabilities/device-provider.cap.d.ts +165 -0
  22. package/dist/capabilities/index.d.ts +3 -3
  23. package/dist/capabilities/integrations.cap.d.ts +1 -0
  24. package/dist/capabilities/keychain.cap.d.ts +12 -0
  25. package/dist/capabilities/local-network.cap.d.ts +198 -0
  26. package/dist/capabilities/storage-admin.cap.d.ts +155 -0
  27. package/dist/capabilities/terminal-session.cap.d.ts +7 -0
  28. package/dist/client.js +8 -1
  29. package/dist/client.mjs +8 -1
  30. package/dist/device/base-device-provider.d.ts +17 -0
  31. package/dist/generated/addon-api.d.ts +84 -0
  32. package/dist/generated/collection-array-methods.d.ts +1 -1
  33. package/dist/generated/method-access-map.d.ts +1 -1
  34. package/dist/generated/system-proxy.d.ts +3 -3
  35. package/dist/index.d.ts +2 -2
  36. package/dist/index.js +1969 -706
  37. package/dist/index.mjs +1934 -703
  38. package/dist/interfaces/addon.d.ts +16 -0
  39. package/dist/interfaces/config-ui-secrets.d.ts +5 -3
  40. package/dist/interfaces/config-ui.d.ts +34 -1
  41. package/dist/{sleep-BSPhInRm.js → sleep-CewR0zRz.js} +125 -6
  42. package/dist/{sleep-63gM_1JR.mjs → sleep-CeyhrcOk.mjs} +125 -6
  43. package/dist/vendor-login-proxy/cookie-jar.d.ts +30 -0
  44. package/dist/vendor-login-proxy/index.d.ts +1 -0
  45. package/dist/vendor-login-proxy/login-proxy.d.ts +6 -0
  46. package/dist/vendor-login-proxy/url-rewrite.d.ts +9 -2
  47. package/package.json +1 -1
@@ -23,6 +23,7 @@ export declare const StorageKindSchema: z.ZodObject<{
23
23
  dropped: "dropped";
24
24
  orphaned: "orphaned";
25
25
  }>;
26
+ declaredThisBoot: z.ZodBoolean;
26
27
  rows: z.ZodNullable<z.ZodNumber>;
27
28
  bytesEstimate: z.ZodNullable<z.ZodNumber>;
28
29
  writeTrigger: z.ZodString;
@@ -100,6 +101,68 @@ export declare const StorageKindSchema: z.ZodObject<{
100
101
  }, z.core.$strict>;
101
102
  }, z.core.$strip>;
102
103
  export type StorageKind = z.infer<typeof StorageKindSchema>;
104
+ /** Why an addon's data is suspected of being left behind. */
105
+ export declare const StaleVerdictSchema: z.ZodEnum<{
106
+ orphaned: "orphaned";
107
+ stale: "stale";
108
+ unknown: "unknown";
109
+ }>;
110
+ export type StaleVerdict = z.infer<typeof StaleVerdictSchema>;
111
+ /** A record kind nobody declared since its owner started, or whose owner is gone. */
112
+ export declare const StaleKindFindingSchema: z.ZodObject<{
113
+ owner: z.ZodString;
114
+ kind: z.ZodString;
115
+ verdict: z.ZodEnum<{
116
+ orphaned: "orphaned";
117
+ unknown: "unknown";
118
+ }>;
119
+ reason: z.ZodString;
120
+ rows: z.ZodNullable<z.ZodNumber>;
121
+ protected: z.ZodBoolean;
122
+ }, z.core.$strip>;
123
+ export type StaleKindFinding = z.infer<typeof StaleKindFindingSchema>;
124
+ /** A stored global-settings key the running addon no longer declares. */
125
+ export declare const StaleSettingsKeyFindingSchema: z.ZodObject<{
126
+ addonId: z.ZodString;
127
+ key: z.ZodString;
128
+ secretRefs: z.ZodArray<z.ZodString>;
129
+ }, z.core.$strip>;
130
+ export type StaleSettingsKeyFinding = z.infer<typeof StaleSettingsKeyFindingSchema>;
131
+ /** An addon the audit could not judge, with the reason. Never reported as stale. */
132
+ export declare const StaleUnknownSchema: z.ZodObject<{
133
+ subject: z.ZodString;
134
+ reason: z.ZodString;
135
+ }, z.core.$strip>;
136
+ export declare const StaleDataReportSchema: z.ZodObject<{
137
+ scannedAt: z.ZodNullable<z.ZodNumber>;
138
+ scanning: z.ZodBoolean;
139
+ trigger: z.ZodNullable<z.ZodEnum<{
140
+ boot: "boot";
141
+ interval: "interval";
142
+ manual: "manual";
143
+ }>>;
144
+ kinds: z.ZodArray<z.ZodObject<{
145
+ owner: z.ZodString;
146
+ kind: z.ZodString;
147
+ verdict: z.ZodEnum<{
148
+ orphaned: "orphaned";
149
+ unknown: "unknown";
150
+ }>;
151
+ reason: z.ZodString;
152
+ rows: z.ZodNullable<z.ZodNumber>;
153
+ protected: z.ZodBoolean;
154
+ }, z.core.$strip>>;
155
+ settingsKeys: z.ZodArray<z.ZodObject<{
156
+ addonId: z.ZodString;
157
+ key: z.ZodString;
158
+ secretRefs: z.ZodArray<z.ZodString>;
159
+ }, z.core.$strip>>;
160
+ unknown: z.ZodArray<z.ZodObject<{
161
+ subject: z.ZodString;
162
+ reason: z.ZodString;
163
+ }, z.core.$strip>>;
164
+ }, z.core.$strip>;
165
+ export type StaleDataReport = z.infer<typeof StaleDataReportSchema>;
103
166
  /**
104
167
  * storage-admin - the operator's maintenance reach into the databases: list
105
168
  * their tables and record kinds, read a kind for diagnosis. Read-only: a table
@@ -151,6 +214,7 @@ export declare const storageAdminCapability: {
151
214
  dropped: "dropped";
152
215
  orphaned: "orphaned";
153
216
  }>;
217
+ declaredThisBoot: z.ZodBoolean;
154
218
  rows: z.ZodNullable<z.ZodNumber>;
155
219
  bytesEstimate: z.ZodNullable<z.ZodNumber>;
156
220
  writeTrigger: z.ZodString;
@@ -265,6 +329,97 @@ export declare const storageAdminCapability: {
265
329
  }, z.core.$strip>>;
266
330
  nextCursor: z.ZodNullable<z.ZodString>;
267
331
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
332
+ /**
333
+ * The last stale-data scan (read-only detection): record kinds left behind
334
+ * and settings keys no running addon declares. Held in memory; a scan runs
335
+ * at hub boot, every 24 h and on `scanStaleData`.
336
+ */
337
+ readonly staleDataReport: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
338
+ scannedAt: z.ZodNullable<z.ZodNumber>;
339
+ scanning: z.ZodBoolean;
340
+ trigger: z.ZodNullable<z.ZodEnum<{
341
+ boot: "boot";
342
+ interval: "interval";
343
+ manual: "manual";
344
+ }>>;
345
+ kinds: z.ZodArray<z.ZodObject<{
346
+ owner: z.ZodString;
347
+ kind: z.ZodString;
348
+ verdict: z.ZodEnum<{
349
+ orphaned: "orphaned";
350
+ unknown: "unknown";
351
+ }>;
352
+ reason: z.ZodString;
353
+ rows: z.ZodNullable<z.ZodNumber>;
354
+ protected: z.ZodBoolean;
355
+ }, z.core.$strip>>;
356
+ settingsKeys: z.ZodArray<z.ZodObject<{
357
+ addonId: z.ZodString;
358
+ key: z.ZodString;
359
+ secretRefs: z.ZodArray<z.ZodString>;
360
+ }, z.core.$strip>>;
361
+ unknown: z.ZodArray<z.ZodObject<{
362
+ subject: z.ZodString;
363
+ reason: z.ZodString;
364
+ }, z.core.$strip>>;
365
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
366
+ /** Scan now. Detection only: it logs findings (owner and key, never values) and changes nothing. */
367
+ readonly scanStaleData: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
368
+ scannedAt: z.ZodNullable<z.ZodNumber>;
369
+ scanning: z.ZodBoolean;
370
+ trigger: z.ZodNullable<z.ZodEnum<{
371
+ boot: "boot";
372
+ interval: "interval";
373
+ manual: "manual";
374
+ }>>;
375
+ kinds: z.ZodArray<z.ZodObject<{
376
+ owner: z.ZodString;
377
+ kind: z.ZodString;
378
+ verdict: z.ZodEnum<{
379
+ orphaned: "orphaned";
380
+ unknown: "unknown";
381
+ }>;
382
+ reason: z.ZodString;
383
+ rows: z.ZodNullable<z.ZodNumber>;
384
+ protected: z.ZodBoolean;
385
+ }, z.core.$strip>>;
386
+ settingsKeys: z.ZodArray<z.ZodObject<{
387
+ addonId: z.ZodString;
388
+ key: z.ZodString;
389
+ secretRefs: z.ZodArray<z.ZodString>;
390
+ }, z.core.$strip>>;
391
+ unknown: z.ZodArray<z.ZodObject<{
392
+ subject: z.ZodString;
393
+ reason: z.ZodString;
394
+ }, z.core.$strip>>;
395
+ }, z.core.$strip>, "mutation">;
396
+ /**
397
+ * Drop an ORPHANED kind: its rows, their keychain values, then mark it
398
+ * dropped. The verdict is re-checked at call time; anything not still
399
+ * orphaned (or a protected owner) is refused.
400
+ */
401
+ readonly dropOrphanedKind: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
402
+ owner: z.ZodString;
403
+ kind: z.ZodString;
404
+ }, z.core.$strip>, z.ZodObject<{
405
+ deleted: z.ZodNumber;
406
+ secretsReleased: z.ZodNumber;
407
+ }, z.core.$strip>, "mutation"> & {
408
+ readonly caller: 'required';
409
+ };
410
+ /**
411
+ * Unset one stale settings key on a running addon (an owner-side write that
412
+ * also clears the keychain values the key held). Re-checked at call time.
413
+ */
414
+ readonly unsetStaleSettingsKey: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
415
+ addonId: z.ZodString;
416
+ key: z.ZodString;
417
+ }, z.core.$strip>, z.ZodObject<{
418
+ removed: z.ZodBoolean;
419
+ secretsCleared: z.ZodNumber;
420
+ }, z.core.$strip>, "mutation"> & {
421
+ readonly caller: 'required';
422
+ };
268
423
  };
269
424
  };
270
425
  export type IStorageAdminProvider = InferProvider<typeof storageAdminCapability>;
@@ -40,6 +40,7 @@ declare const TerminalInstanceInfoSchema: z.ZodObject<{
40
40
  instanceId: z.ZodString;
41
41
  cameraStableId: z.ZodString;
42
42
  nodeId: z.ZodString;
43
+ nodeInCluster: z.ZodBoolean;
43
44
  profileId: z.ZodString;
44
45
  profileLabel: z.ZodString;
45
46
  name: z.ZodString;
@@ -111,6 +112,7 @@ export declare const terminalSessionCapability: {
111
112
  instanceId: z.ZodString;
112
113
  cameraStableId: z.ZodString;
113
114
  nodeId: z.ZodString;
115
+ nodeInCluster: z.ZodBoolean;
114
116
  profileId: z.ZodString;
115
117
  profileLabel: z.ZodString;
116
118
  name: z.ZodString;
@@ -134,6 +136,7 @@ export declare const terminalSessionCapability: {
134
136
  instanceId: z.ZodString;
135
137
  cameraStableId: z.ZodString;
136
138
  nodeId: z.ZodString;
139
+ nodeInCluster: z.ZodBoolean;
137
140
  profileId: z.ZodString;
138
141
  profileLabel: z.ZodString;
139
142
  name: z.ZodString;
@@ -146,6 +149,7 @@ export declare const terminalSessionCapability: {
146
149
  }, z.core.$strip>, "mutation">;
147
150
  readonly updateInstance: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
148
151
  instanceId: z.ZodString;
152
+ targetNodeId: z.ZodOptional<z.ZodString>;
149
153
  name: z.ZodOptional<z.ZodString>;
150
154
  executable: z.ZodOptional<z.ZodString>;
151
155
  args: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -156,6 +160,7 @@ export declare const terminalSessionCapability: {
156
160
  instanceId: z.ZodString;
157
161
  cameraStableId: z.ZodString;
158
162
  nodeId: z.ZodString;
163
+ nodeInCluster: z.ZodBoolean;
159
164
  profileId: z.ZodString;
160
165
  profileLabel: z.ZodString;
161
166
  name: z.ZodString;
@@ -176,6 +181,7 @@ export declare const terminalSessionCapability: {
176
181
  instanceId: z.ZodString;
177
182
  cameraStableId: z.ZodString;
178
183
  nodeId: z.ZodString;
184
+ nodeInCluster: z.ZodBoolean;
179
185
  profileId: z.ZodString;
180
186
  profileLabel: z.ZodString;
181
187
  name: z.ZodString;
@@ -203,6 +209,7 @@ export declare const terminalSessionCapability: {
203
209
  instanceId: z.ZodString;
204
210
  cameraStableId: z.ZodString;
205
211
  nodeId: z.ZodString;
212
+ nodeInCluster: z.ZodBoolean;
206
213
  profileId: z.ZodString;
207
214
  profileLabel: z.ZodString;
208
215
  name: z.ZodString;
package/dist/client.js CHANGED
@@ -28387,7 +28387,9 @@ function createSystemProxy(api) {
28387
28387
  addonSettings: {
28388
28388
  getGlobalSettings: (input) => dispatch("addonSettings", "getGlobalSettings", "query", input),
28389
28389
  updateGlobalSettings: (input) => dispatch("addonSettings", "updateGlobalSettings", "mutation", input),
28390
- getIntegrationSettings: (input) => dispatch("addonSettings", "getIntegrationSettings", "query", input)
28390
+ getIntegrationSettings: (input) => dispatch("addonSettings", "getIntegrationSettings", "query", input),
28391
+ getDeclaredSettingsKeys: (input) => dispatch("addonSettings", "getDeclaredSettingsKeys", "query", input),
28392
+ unsetStoredSettingsKeys: (input) => dispatch("addonSettings", "unsetStoredSettingsKeys", "mutation", input)
28391
28393
  },
28392
28394
  addonWidgets: { listWidgets: (input) => dispatch("addonWidgets", "listWidgets", "query", input) },
28393
28395
  alerts: {
@@ -28602,6 +28604,8 @@ function createSystemProxy(api) {
28602
28604
  reloadDevice: (input) => dispatch("deviceProvider", "reloadDevice", "mutation", input),
28603
28605
  supportsDiscovery: (input) => dispatch("deviceProvider", "supportsDiscovery", "query", input),
28604
28606
  discoverDevices: (input) => dispatch("deviceProvider", "discoverDevices", "mutation", input),
28607
+ getDiscoveryModes: (input) => dispatch("deviceProvider", "getDiscoveryModes", "query", input),
28608
+ classifyDiscoveryHits: (input) => dispatch("deviceProvider", "classifyDiscoveryHits", "mutation", input),
28605
28609
  getDiscoveryParamsSchema: (input) => dispatch("deviceProvider", "getDiscoveryParamsSchema", "query", input),
28606
28610
  getManualCreationType: (input) => dispatch("deviceProvider", "getManualCreationType", "query", input),
28607
28611
  adoptDiscoveredDevice: (input) => dispatch("deviceProvider", "adoptDiscoveredDevice", "mutation", input),
@@ -28707,6 +28711,9 @@ function createSystemProxy(api) {
28707
28711
  uploadCertificate: (input) => dispatch("localNetwork", "uploadCertificate", "mutation", input),
28708
28712
  downloadCa: (input) => dispatch("localNetwork", "downloadCa", "query", input),
28709
28713
  useStoredUploadedCertificate: (input) => dispatch("localNetwork", "useStoredUploadedCertificate", "mutation", input),
28714
+ scanNetwork: (input) => dispatch("localNetwork", "scanNetwork", "mutation", input),
28715
+ getScanSubnets: (input) => dispatch("localNetwork", "getScanSubnets", "query", input),
28716
+ setScanSubnets: (input) => dispatch("localNetwork", "setScanSubnets", "mutation", input),
28710
28717
  revertToGeneratedCertificate: (input) => dispatch("localNetwork", "revertToGeneratedCertificate", "mutation", input)
28711
28718
  },
28712
28719
  meshNetwork: {
package/dist/client.mjs CHANGED
@@ -28386,7 +28386,9 @@ function createSystemProxy(api) {
28386
28386
  addonSettings: {
28387
28387
  getGlobalSettings: (input) => dispatch("addonSettings", "getGlobalSettings", "query", input),
28388
28388
  updateGlobalSettings: (input) => dispatch("addonSettings", "updateGlobalSettings", "mutation", input),
28389
- getIntegrationSettings: (input) => dispatch("addonSettings", "getIntegrationSettings", "query", input)
28389
+ getIntegrationSettings: (input) => dispatch("addonSettings", "getIntegrationSettings", "query", input),
28390
+ getDeclaredSettingsKeys: (input) => dispatch("addonSettings", "getDeclaredSettingsKeys", "query", input),
28391
+ unsetStoredSettingsKeys: (input) => dispatch("addonSettings", "unsetStoredSettingsKeys", "mutation", input)
28390
28392
  },
28391
28393
  addonWidgets: { listWidgets: (input) => dispatch("addonWidgets", "listWidgets", "query", input) },
28392
28394
  alerts: {
@@ -28601,6 +28603,8 @@ function createSystemProxy(api) {
28601
28603
  reloadDevice: (input) => dispatch("deviceProvider", "reloadDevice", "mutation", input),
28602
28604
  supportsDiscovery: (input) => dispatch("deviceProvider", "supportsDiscovery", "query", input),
28603
28605
  discoverDevices: (input) => dispatch("deviceProvider", "discoverDevices", "mutation", input),
28606
+ getDiscoveryModes: (input) => dispatch("deviceProvider", "getDiscoveryModes", "query", input),
28607
+ classifyDiscoveryHits: (input) => dispatch("deviceProvider", "classifyDiscoveryHits", "mutation", input),
28604
28608
  getDiscoveryParamsSchema: (input) => dispatch("deviceProvider", "getDiscoveryParamsSchema", "query", input),
28605
28609
  getManualCreationType: (input) => dispatch("deviceProvider", "getManualCreationType", "query", input),
28606
28610
  adoptDiscoveredDevice: (input) => dispatch("deviceProvider", "adoptDiscoveredDevice", "mutation", input),
@@ -28706,6 +28710,9 @@ function createSystemProxy(api) {
28706
28710
  uploadCertificate: (input) => dispatch("localNetwork", "uploadCertificate", "mutation", input),
28707
28711
  downloadCa: (input) => dispatch("localNetwork", "downloadCa", "query", input),
28708
28712
  useStoredUploadedCertificate: (input) => dispatch("localNetwork", "useStoredUploadedCertificate", "mutation", input),
28713
+ scanNetwork: (input) => dispatch("localNetwork", "scanNetwork", "mutation", input),
28714
+ getScanSubnets: (input) => dispatch("localNetwork", "getScanSubnets", "query", input),
28715
+ setScanSubnets: (input) => dispatch("localNetwork", "setScanSubnets", "mutation", input),
28709
28716
  revertToGeneratedCertificate: (input) => dispatch("localNetwork", "revertToGeneratedCertificate", "mutation", input)
28710
28717
  },
28711
28718
  meshNetwork: {
@@ -1,4 +1,5 @@
1
1
  import { BaseAddon } from '../addon/base-addon.js';
2
+ import { type DiscoveryHit, type DiscoveryMode } from '../capabilities/device-provider.cap.js';
2
3
  import type { AddonInitResult, ProviderRegistration } from '../interfaces/addon.js';
3
4
  import type { ConfigUISchema } from '../interfaces/config-ui.js';
4
5
  import type { IDevice } from './device.js';
@@ -27,6 +28,12 @@ export interface DiscoveryCandidate {
27
28
  readonly onboardedDeviceId?: number;
28
29
  /** Operator-facing name of the matched device, so the UI can say WHICH one it is. */
29
30
  readonly onboardedName?: string;
31
+ /** The candidate is an integration to set up, not a device to adopt. */
32
+ readonly setupIntegration?: boolean;
33
+ /** `stableId` of the gateway candidate this device was found behind. */
34
+ readonly parentStableId?: string;
35
+ /** `false` = shown for context, not pickable. Default true. */
36
+ readonly selectable?: boolean;
30
37
  }
31
38
  export interface DeviceSummary {
32
39
  readonly id: number;
@@ -123,6 +130,16 @@ export declare abstract class BaseDeviceProvider<TConfig extends object = Record
123
130
  discoverDevices(_input?: {
124
131
  params?: Record<string, unknown>;
125
132
  }): Promise<readonly DiscoveryCandidate[]>;
133
+ /**
134
+ * How the scan engine finds this provider. Default `[]`: the provider is
135
+ * not migrated and keeps answering `discoverDevices` itself.
136
+ */
137
+ getDiscoveryModes(): Promise<readonly DiscoveryMode[]>;
138
+ /** Turn the scan engine's raw hits into candidates. Default: none. */
139
+ classifyDiscoveryHits(_input: {
140
+ hits: readonly DiscoveryHit[];
141
+ params?: Record<string, unknown>;
142
+ }): Promise<readonly DiscoveryCandidate[]>;
126
143
  /** Extra per-scan input form (e.g. a broadcast address for another subnet).
127
144
  * Null = no extra params. Override in providers that support scoped scans. */
128
145
  getDiscoveryParamsSchema(): Promise<ConfigUISchema | null>;
@@ -363,6 +363,20 @@ export type AppRouter = TrpcCoreRouter<{
363
363
  output: z.infer<typeof addonSettingsCapability.methods.getIntegrationSettings.output>;
364
364
  meta: object;
365
365
  }>;
366
+ getDeclaredSettingsKeys: TRPCQueryProcedure<{
367
+ input: {
368
+ [x: string]: unknown;
369
+ } & z.input<typeof addonSettingsCapability.methods.getDeclaredSettingsKeys.input>;
370
+ output: z.infer<typeof addonSettingsCapability.methods.getDeclaredSettingsKeys.output>;
371
+ meta: object;
372
+ }>;
373
+ unsetStoredSettingsKeys: TRPCMutationProcedure<{
374
+ input: {
375
+ [x: string]: unknown;
376
+ } & z.input<typeof addonSettingsCapability.methods.unsetStoredSettingsKeys.input>;
377
+ output: z.infer<typeof addonSettingsCapability.methods.unsetStoredSettingsKeys.output>;
378
+ meta: object;
379
+ }>;
366
380
  getDeviceSettings: TRPCQueryProcedure<{
367
381
  input: {
368
382
  [x: string]: unknown;
@@ -3409,6 +3423,20 @@ export type AppRouter = TrpcCoreRouter<{
3409
3423
  output: z.infer<typeof deviceProviderCapability.methods.discoverDevices.output>;
3410
3424
  meta: object;
3411
3425
  }>;
3426
+ getDiscoveryModes: TRPCQueryProcedure<{
3427
+ input: {
3428
+ [x: string]: unknown;
3429
+ } & z.input<typeof deviceProviderCapability.methods.getDiscoveryModes.input>;
3430
+ output: z.infer<typeof deviceProviderCapability.methods.getDiscoveryModes.output>;
3431
+ meta: object;
3432
+ }>;
3433
+ classifyDiscoveryHits: TRPCMutationProcedure<{
3434
+ input: {
3435
+ [x: string]: unknown;
3436
+ } & z.input<typeof deviceProviderCapability.methods.classifyDiscoveryHits.input>;
3437
+ output: z.infer<typeof deviceProviderCapability.methods.classifyDiscoveryHits.output>;
3438
+ meta: object;
3439
+ }>;
3412
3440
  getDiscoveryParamsSchema: TRPCQueryProcedure<{
3413
3441
  input: {
3414
3442
  [x: string]: unknown;
@@ -4356,6 +4384,13 @@ export type AppRouter = TrpcCoreRouter<{
4356
4384
  output: z.infer<typeof keychainCapability.methods.deleteDeviceScope.output>;
4357
4385
  meta: object;
4358
4386
  }>;
4387
+ releaseRecordRefs: TRPCMutationProcedure<{
4388
+ input: {
4389
+ [x: string]: unknown;
4390
+ } & z.input<typeof keychainCapability.methods.releaseRecordRefs.input>;
4391
+ output: z.infer<typeof keychainCapability.methods.releaseRecordRefs.output>;
4392
+ meta: object;
4393
+ }>;
4359
4394
  listMeta: TRPCQueryProcedure<{
4360
4395
  input: {
4361
4396
  [x: string]: unknown;
@@ -4908,6 +4943,27 @@ export type AppRouter = TrpcCoreRouter<{
4908
4943
  output: z.infer<typeof localNetworkCapability.methods.useStoredUploadedCertificate.output>;
4909
4944
  meta: object;
4910
4945
  }>;
4946
+ scanNetwork: TRPCMutationProcedure<{
4947
+ input: {
4948
+ [x: string]: unknown;
4949
+ } & z.input<typeof localNetworkCapability.methods.scanNetwork.input>;
4950
+ output: z.infer<typeof localNetworkCapability.methods.scanNetwork.output>;
4951
+ meta: object;
4952
+ }>;
4953
+ getScanSubnets: TRPCQueryProcedure<{
4954
+ input: {
4955
+ nodeId?: string | undefined;
4956
+ } | undefined;
4957
+ output: z.infer<typeof localNetworkCapability.methods.getScanSubnets.output>;
4958
+ meta: object;
4959
+ }>;
4960
+ setScanSubnets: TRPCMutationProcedure<{
4961
+ input: {
4962
+ [x: string]: unknown;
4963
+ } & z.input<typeof localNetworkCapability.methods.setScanSubnets.input>;
4964
+ output: z.infer<typeof localNetworkCapability.methods.setScanSubnets.output>;
4965
+ meta: object;
4966
+ }>;
4911
4967
  revertToGeneratedCertificate: TRPCMutationProcedure<{
4912
4968
  input: {
4913
4969
  nodeId?: string | undefined;
@@ -9573,6 +9629,34 @@ export type AppRouter = TrpcCoreRouter<{
9573
9629
  output: z.infer<typeof storageAdminCapability.methods.readRecords.output>;
9574
9630
  meta: object;
9575
9631
  }>;
9632
+ staleDataReport: TRPCQueryProcedure<{
9633
+ input: {
9634
+ [x: string]: unknown;
9635
+ } & z.input<typeof storageAdminCapability.methods.staleDataReport.input>;
9636
+ output: z.infer<typeof storageAdminCapability.methods.staleDataReport.output>;
9637
+ meta: object;
9638
+ }>;
9639
+ scanStaleData: TRPCMutationProcedure<{
9640
+ input: {
9641
+ [x: string]: unknown;
9642
+ } & z.input<typeof storageAdminCapability.methods.scanStaleData.input>;
9643
+ output: z.infer<typeof storageAdminCapability.methods.scanStaleData.output>;
9644
+ meta: object;
9645
+ }>;
9646
+ dropOrphanedKind: TRPCMutationProcedure<{
9647
+ input: {
9648
+ [x: string]: unknown;
9649
+ } & z.input<typeof storageAdminCapability.methods.dropOrphanedKind.input>;
9650
+ output: z.infer<typeof storageAdminCapability.methods.dropOrphanedKind.output>;
9651
+ meta: object;
9652
+ }>;
9653
+ unsetStaleSettingsKey: TRPCMutationProcedure<{
9654
+ input: {
9655
+ [x: string]: unknown;
9656
+ } & z.input<typeof storageAdminCapability.methods.unsetStaleSettingsKey.input>;
9657
+ output: z.infer<typeof storageAdminCapability.methods.unsetStaleSettingsKey.output>;
9658
+ meta: object;
9659
+ }>;
9576
9660
  }>>;
9577
9661
  storageEvictable: TRPCBuiltRouter<{
9578
9662
  ctx: TrpcContext;
@@ -8,7 +8,7 @@
8
8
  * barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
9
9
  * forked runner. See docs/decisions/adr-0028.md.
10
10
  *
11
- * Coverage: 29 collection caps, 49 array methods.
11
+ * Coverage: 29 collection caps, 51 array methods.
12
12
  */
13
13
  export declare const COLLECTION_ARRAY_METHODS: Readonly<Record<string, readonly string[]>>;
14
14
  /**
@@ -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: 1431 method paths across 193 capabilities.
9
+ * Coverage: 1443 method paths across 193 capabilities.
10
10
  */
11
11
  import type { MethodRole } from '../auth/viewer-access.js';
12
12
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
@@ -73,7 +73,7 @@ export interface SystemProxy {
73
73
  readonly actionSource: Pick<InferProvider<typeof actionSourceCapability>, 'listActions' | 'runAction' | 'stopAction'>;
74
74
  readonly addonPages: Pick<InferProvider<typeof addonPagesCapability>, 'listPages'>;
75
75
  readonly addons: Pick<InferProvider<typeof addonsCapability>, 'list' | 'getLogs' | 'listPackages' | 'installPackage' | 'installFromWorkspace' | 'isWorkspaceAvailable' | 'listWorkspacePackages' | 'uninstallPackage' | 'listInstallations' | 'reloadPackages' | 'searchAvailable' | 'listUpdates' | 'updatePackage' | 'rollbackPackage' | 'forceRefresh' | 'restartServer' | 'getLastRestart' | 'listFrameworkPackages' | 'listCapabilityProviders' | 'setCapabilityProviderEnabled' | 'getVersions' | 'getPackageDocs' | 'restartAddon' | 'retryLoad' | 'getAutoUpdateSettings' | 'setAutoUpdateSettings' | 'getAddonAutoUpdate' | 'setAddonAutoUpdate' | 'applyAutoUpdateToAll' | 'custom' | 'startJob' | 'getJob' | 'listJobs' | 'cancelJob' | 'onAddonLogs'>;
76
- readonly addonSettings: Pick<InferProvider<typeof addonSettingsCapability>, 'getGlobalSettings' | 'updateGlobalSettings' | 'getIntegrationSettings'>;
76
+ readonly addonSettings: Pick<InferProvider<typeof addonSettingsCapability>, 'getGlobalSettings' | 'updateGlobalSettings' | 'getIntegrationSettings' | 'getDeclaredSettingsKeys' | 'unsetStoredSettingsKeys'>;
77
77
  readonly addonWidgets: Pick<InferProvider<typeof addonWidgetsCapability>, 'listWidgets'>;
78
78
  readonly alerts: Pick<InferProvider<typeof alertsCapability>, 'emit' | 'update' | 'list' | 'getUnreadCount' | 'markRead' | 'markAllRead' | 'dismiss'>;
79
79
  readonly audioAnalyzer: Pick<InferProvider<typeof audioAnalyzerCapability>, 'analyseChunk' | 'classify' | 'attachDevice' | 'isReady' | 'dispose' | 'reprobeAudioEngine'>;
@@ -89,14 +89,14 @@ export interface SystemProxy {
89
89
  readonly deviceExport: Pick<InferProvider<typeof deviceExportCapability>, 'getStatus' | 'listSupportedDeviceKinds' | 'listExposedDevices' | 'exposeDevice' | 'unexposeDevice' | 'listSupportedEntityKinds' | 'listExposedEntities' | 'exposeEntity' | 'unexposeEntity'>;
90
90
  readonly deviceHistory: Pick<InferProvider<typeof deviceHistoryCapability>, 'listNodeSeries' | 'queryNode' | 'queryMany' | 'declareSeries' | 'record' | 'recordBuckets' | 'getStatus' | 'listOrphanSeries' | 'deleteOrphanSeries'>;
91
91
  readonly deviceManager: Pick<InferProvider<typeof deviceManagerCapability>, 'allocateDeviceId' | 'migrateDevice' | 'registerDevice' | 'removeDevice' | 'persistConfig' | 'getRoleDisplayDefaults' | 'setRoleDisplayDefaults' | 'listLocations' | 'addLocation' | 'removeLocation' | 'renameLocation' | 'listLocationIcons' | 'setLocationIcon' | 'listLocationDescriptions' | 'setLocationDescription' | 'listSiteZones' | 'setSiteZone' | 'removeSiteZone' | 'renameSiteZone' | 'setLocationZone' | 'listPersistedByAddon' | 'listAll' | 'getChildren' | 'getChildrenBatch' | 'getLinkedDevicesBatch' | 'listDeletedSince' | 'cleanupDeletedDevicesData' | 'removeByIntegration' | 'getBindingsBatch' | 'getAllBindings' | 'listDeviceIdsByCaps' | 'listWrappersForCap' | 'listBindableCapsForDeviceType' | 'discoverDevices' | 'adoptDevice' | 'getCreationSchema' | 'createDevice' | 'testCreationField' | 'adoptionListCandidateFilters' | 'adoptionListCandidates' | 'adoptionRefresh' | 'adoptionAdopt' | 'adoptionRelease' | 'adoptionStartJob' | 'adoptionListJobs' | 'adoptionCancelJob' | 'adoptionResync' | 'discoveryProviders' | 'discoverAllProviders' | 'discoverProvider' | 'providerCreationType' | 'providerDiscoveryParamsSchema' | 'getDeviceStatusAggregateBatch'>;
92
- readonly deviceProvider: Pick<InferProvider<typeof deviceProviderCapability>, 'start' | 'stop' | 'getStatus' | 'getDevices' | 'reloadDevice' | 'supportsDiscovery' | 'discoverDevices' | 'getDiscoveryParamsSchema' | 'getManualCreationType' | 'adoptDiscoveredDevice' | 'supportsManualCreation' | 'getChildCreationSchema' | 'createDevice' | 'testCreationField'>;
92
+ readonly deviceProvider: Pick<InferProvider<typeof deviceProviderCapability>, 'start' | 'stop' | 'getStatus' | 'getDevices' | 'reloadDevice' | 'supportsDiscovery' | 'discoverDevices' | 'getDiscoveryModes' | 'classifyDiscoveryHits' | 'getDiscoveryParamsSchema' | 'getManualCreationType' | 'adoptDiscoveredDevice' | 'supportsManualCreation' | 'getChildCreationSchema' | 'createDevice' | 'testCreationField'>;
93
93
  readonly deviceState: Pick<InferProvider<typeof deviceStateCapability>, 'getAllSnapshots' | 'listClaims'>;
94
94
  readonly displayPalette: Pick<InferProvider<typeof displayPaletteCapability>, 'getPalette' | 'listPresets' | 'setPalette'>;
95
95
  readonly faceGallery: Pick<InferProvider<typeof faceGalleryCapability>, 'listIdentities' | 'createIdentity' | 'renameIdentity' | 'deleteIdentity' | 'listIdentitySamples' | 'auditIdentitySamples' | 'removeSample' | 'getFaceMedia' | 'assignFace' | 'unassignFace' | 'deleteFace' | 'assignFaces' | 'unassignFaces' | 'suggestFaceClusters'>;
96
96
  readonly integrations: Pick<InferProvider<typeof integrationsCapability>, 'list' | 'get' | 'getByAddonId' | 'create' | 'update' | 'delete' | 'getSettings' | 'setSettings' | 'getAvailableTypes' | 'testConnection'>;
97
97
  readonly keychainAdmin: Pick<InferProvider<typeof keychainAdminCapability>, 'status' | 'listSecrets' | 'listAudit' | 'reveal' | 'setSystemSecret' | 'importSecret' | 'deleteOrphans' | 'rotateMasterKey' | 'purgeRetiredKeys' | 'downloadRecoveryKey' | 'resetKeychain' | 'resetReport' | 'acknowledgeReset'>;
98
98
  readonly llm: Pick<InferProvider<typeof llmCapability>, 'generate' | 'generateVision' | 'cancel' | 'listProfileKinds' | 'listProfiles' | 'upsertProfile' | 'migrateRawSecrets' | 'deleteProfile' | 'testProfile' | 'listModels' | 'getDefaults' | 'setDefault' | 'getUsage' | 'listModelCatalog' | 'listRuntimeNodes' | 'listNodeModels' | 'resolveModelRef' | 'installModel' | 'deleteModel' | 'getRuntimeStatus' | 'startRuntime' | 'stopRuntime'>;
99
- readonly localNetwork: Pick<InferProvider<typeof localNetworkCapability>, 'list' | 'getPreferred' | 'getConnectionEndpoints' | 'getNotificationEndpoint' | 'setNotificationEndpoint' | 'getViewerEndpoints' | 'setViewerEndpoints' | 'getAddresses' | 'addCustomAddress' | 'removeCustomAddress' | 'setAddressRole' | 'getHubAddresses' | 'getAllowedAddresses' | 'setAllowedAddresses' | 'resetAllowlistToBestMatch' | 'getTlsStatus' | 'regenerateCertificate' | 'uploadCertificate' | 'downloadCa' | 'useStoredUploadedCertificate' | 'revertToGeneratedCertificate'>;
99
+ readonly localNetwork: Pick<InferProvider<typeof localNetworkCapability>, 'list' | 'getPreferred' | 'getConnectionEndpoints' | 'getNotificationEndpoint' | 'setNotificationEndpoint' | 'getViewerEndpoints' | 'setViewerEndpoints' | 'getAddresses' | 'addCustomAddress' | 'removeCustomAddress' | 'setAddressRole' | 'getHubAddresses' | 'getAllowedAddresses' | 'setAllowedAddresses' | 'resetAllowlistToBestMatch' | 'getTlsStatus' | 'regenerateCertificate' | 'uploadCertificate' | 'downloadCa' | 'useStoredUploadedCertificate' | 'scanNetwork' | 'getScanSubnets' | 'setScanSubnets' | 'revertToGeneratedCertificate'>;
100
100
  readonly meshNetwork: Pick<InferProvider<typeof meshNetworkCapability>, 'getStatus' | 'join' | 'startLogin' | 'leave' | 'logout' | 'listPeers' | 'testConnection'>;
101
101
  readonly metricsProvider: Pick<InferProvider<typeof metricsProviderCapability>, 'collectSnapshot' | 'getCached' | 'getCurrent' | 'getDiskSpace' | 'getGpuInfo' | 'getCpuTemperature' | 'getProcessStats' | 'listAddonInstances' | 'getAddonStats' | 'listNodeProcesses' | 'getLoadSeries'>;
102
102
  readonly mqttBroker: Pick<InferProvider<typeof mqttBrokerCapability>, 'listBrokers' | 'getBrokerConfig' | 'addBroker' | 'removeBroker' | 'testConnection' | 'startEmbeddedBroker' | 'stopEmbeddedBroker' | 'getStatus'>;
package/dist/index.d.ts CHANGED
@@ -163,8 +163,8 @@ export { APP_FLOW_DEFAULT_REDIRECT, APP_FLOW_REFUSAL_MESSAGES, APP_FLOW_STATE_PR
163
163
  export { SSO_STATE_COOKIE, SSO_STATE_COOKIE_MAX_AGE_SEC } from './auth/sso-state.js';
164
164
  export { buildDeviceEnrollmentLink, buildDeviceSignatureMessage, type CompleteEnrollmentInput, CompleteEnrollmentInputSchema, type CompleteEnrollmentOutput, CompleteEnrollmentOutputSchema, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_CERT_SIGNATURE, DEVICE_CERT_VALIDITY_DAYS, DEVICE_ENROLLMENT_TTL_MS, DEVICE_NONCE_TTL_MS, DEVICE_SAN_CREDENTIAL_PREFIX, DEVICE_SAN_USER_PREFIX, DEVICE_SIGNATURE_MESSAGE_VERSION, type DeviceCertificateLoginMethod, DeviceCertificateLoginMethodSchema, type DeviceChallenge, DeviceChallengeSchema, type DeviceCredential, DeviceCredentialSchema, type DeviceCredentialStatus, DeviceCredentialStatusSchema, type DevicePlatform, DevicePlatformSchema, type DeviceProofInput, DeviceProofInputSchema, type CompleteEnrollmentResult, CompleteEnrollmentResultSchema, DEFINITIVE_DEVICE_REFUSALS, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, deviceRefusalFromMessage, type DeviceChallengeResult, DeviceChallengeResultSchema, DeviceEnrollProofSchema, type DeviceRefusal, type DeviceRefusalReason, DeviceRefusalReasonSchema, DeviceRefusalSchema, type DeviceRevoker, type EnrollSelfInput, EnrollSelfInputSchema, formatDeviceRevoker, isDefinitiveDeviceRefusal, type RenewDeviceCertificateResult, RenewDeviceCertificateResultSchema, type RevokeOwnDeviceCertificateResult, RevokeOwnDeviceCertificateResultSchema, type DeviceSignaturePurpose, DeviceSignaturePurposeSchema, type RenewDeviceCertificateOutput, RenewDeviceCertificateOutputSchema, type StartEnrollmentOutput, StartEnrollmentOutputSchema, parseDeviceEnrollmentLink, } from './auth/device-certificate.js';
165
165
  export { advertisedHubOrigins, claimedRequestOrigins, normalizeOrigin, pickRequestOrigin, type RequestHeaders, requestMountPrefix, } from './auth/request-origin.js';
166
- export type { ActionStep, AutomationAction, AutomationCapStep, AutomationCondition, AutomationConditionAll, AutomationConditionAny, AutomationConditionExpression, AutomationConditionLeaf, AutomationConditionStationaryPresent, AutomationConditionNot, AutomationConditionOperator, AutomationConditionTraceNode, AutomationRecipe, AutomationRunMode, AutomationRunOutcome, AutomationRunTrace, AutomationRunVerdict, AutomationStateDoc, AutomationStepTrace, AutomationTrigger, AutomationTriggerTrace, ConditionEvaluation, ConditionReader, DetectionDecision, DetectionTrigger, DetectionVars, GenerateAutomationBlockInput, MirrorRefreshFetchers, MirrorRefreshReport, MirrorSource, StationaryChangedInput, StationaryDecision, StationaryTrigger, StationaryVars, TraceNodeOutcome, TraceValue, TrackLifecycleInput, } from './automation/index.js';
167
- export { ActionStepSchema, AutomationActionSchema, AutomationCapStepSchema, AutomationWaitStepSchema, EMPTY_AUTOMATION_STATE, mergeSkipTraces, AutomationConditionOperatorSchema, AutomationConditionSchema, AutomationConditionTraceNodeSchema, AutomationRecipeSchema, AutomationRunModeSchema, AutomationRunOutcomeSchema, AutomationRunTraceSchema, AutomationRunVerdictSchema, AutomationStateDocSchema, AutomationStepTraceSchema, AutomationTriggerSchema, AutomationTriggerTraceSchema, appendTrace, buildTriggerTrace, collectMirrorSources, ConditionMirror, conditionDepth, countConditionLeaves, DEFAULT_TRACE_KEEP, DetectionTriggerFilter, detectionClassMatches, evaluateConditionTree, evaluateStationaryTrigger, generateAutomationBlock, isSkippedTrace, MAX_CONDITION_DEPTH, MAX_CONDITION_LEAVES, MAX_TRACE_KEEP, RunGate, skipSignature, TraceNodeOutcomeSchema, TraceValueSchema, validateRecipeBounds, } from './automation/index.js';
166
+ export type { ActionStep, AutomationAction, AutomationAll, AutomationAny, AutomationCapStep, AutomationConditionOperator, AutomationConditionTraceNode, AutomationEventLeaf, AutomationLeaf, AutomationNot, AutomationStateLeaf, AutomationWhen, DetectionLabelSource, DetectionLeaf, DetectionSubject, DeviceBecomesLeaf, DeviceIsLeaf, ExpressionLeaf, IdentityLabel, LegacyAutomationRecipe, LegacyCondition, LegacyTrigger, PlateLabel, StationaryLeaf, StationaryPresentLeaf, SubClassLabel, SubjectObservation, SubjectVerdict, AutomationRecipe, AutomationRunMode, AutomationRunOutcome, AutomationRunTrace, AutomationRunVerdict, AutomationStateDoc, AutomationStepTrace, AutomationTriggerTrace, ConditionEvaluation, ConditionReader, DetectionDecision, DetectionTrigger, DetectionVars, GenerateAutomationBlockInput, MirrorRefreshFetchers, MirrorRefreshReport, MirrorSource, StationaryChangedInput, StationaryDecision, StationaryTrigger, StationaryVars, TraceNodeOutcome, TraceValue, TrackLifecycleInput, } from './automation/index.js';
167
+ export { ActionStepSchema, AutomationActionSchema, AutomationCapStepSchema, AutomationWaitStepSchema, EMPTY_AUTOMATION_STATE, mergeSkipTraces, AutomationConditionOperatorSchema, AutomationConditionTraceNodeSchema, AutomationRecipeSchema, AutomationWhenSchema, CurrentAutomationRecipeSchema, DETECTION_LABEL_SOURCES, DetectionSubjectSchema, LegacyAutomationRecipeSchema, LegacyConditionSchema, LegacyTriggerSchema, MAX_TRACE_ARG_LENGTH, MAX_TRACE_ARGS, MAX_WHEN_DEPTH, MAX_WHEN_LEAVES, REDACTED_ARG, StationarySubjectSchema, anySubjectMatches, buildStepArgsTrace, collectWhenMirrorSources, convertLegacyCondition, convertLegacyRecipe, convertLegacyWhen, countWhenLeaves, describeSubject, evaluateWhenTree, forEachLeaf, hasEventLeaves, isEventLeaf, isLeaf, subClassesOf, subjectFromClassName, subjectMatches, validateWhenTree, whenDepth, AutomationRunModeSchema, AutomationRunOutcomeSchema, AutomationRunTraceSchema, AutomationRunVerdictSchema, AutomationStateDocSchema, AutomationStepTraceSchema, AutomationTriggerTraceSchema, appendTrace, buildTriggerTrace, collectMirrorSources, ConditionMirror, DEFAULT_TRACE_KEEP, DetectionTriggerFilter, detectionClassMatches, evaluateConditionTree, evaluateStationaryTrigger, generateAutomationBlock, isSkippedTrace, MAX_CONDITION_DEPTH, MAX_CONDITION_LEAVES, MAX_TRACE_KEEP, RunGate, skipSignature, TraceNodeOutcomeSchema, TraceValueSchema, validateRecipeBounds, } from './automation/index.js';
168
168
  export { UnitWarningSchema, capUnitResolver, normalizeActionUnits, normalizeConditionUnits, normalizeRecipeUnits, prepareRecipeUnits, } from './automation/index.js';
169
169
  export type { PreparedRecipe, UnitResolver, UnitWarning, UnitsNormalized, } from './automation/index.js';
170
170
  export * from './automation/action.js';