@camstack/types 1.1.34 → 1.1.36

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 (32) hide show
  1. package/dist/addon.d.ts +2 -0
  2. package/dist/addon.js +2 -1
  3. package/dist/addon.mjs +2 -2
  4. package/dist/capabilities/addon-pages-source.cap.d.ts +4 -0
  5. package/dist/capabilities/addon-pages.cap.d.ts +4 -0
  6. package/dist/capabilities/addon-widgets-source.cap.d.ts +2 -0
  7. package/dist/capabilities/addon-widgets.cap.d.ts +2 -0
  8. package/dist/capabilities/index.d.ts +11 -3
  9. package/dist/capabilities/login-method.cap.d.ts +146 -0
  10. package/dist/capabilities/nodes.cap.d.ts +19 -1
  11. package/dist/capabilities/pipeline-executor.cap.d.ts +15 -61
  12. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +31 -69
  13. package/dist/capabilities/server-management.cap.d.ts +194 -0
  14. package/dist/capabilities/viewer-ui.cap.d.ts +24 -0
  15. package/dist/generated/addon-api.d.ts +516 -170
  16. package/dist/generated/capability-router-map.d.ts +13 -4
  17. package/dist/generated/device-proxy.d.ts +1 -1
  18. package/dist/generated/method-access-map.d.ts +1 -1
  19. package/dist/generated/system-proxy.d.ts +4 -2
  20. package/dist/index.d.ts +2 -1
  21. package/dist/index.js +430 -124
  22. package/dist/index.mjs +415 -123
  23. package/dist/interfaces/addon.d.ts +12 -2
  24. package/dist/interfaces/capability.d.ts +3 -0
  25. package/dist/interfaces/config-ui.d.ts +40 -0
  26. package/dist/interfaces/event-bus.d.ts +11 -0
  27. package/dist/interfaces/pipeline-executor-capability.d.ts +2 -8
  28. package/dist/interfaces/pipeline-orchestrator-capability.d.ts +0 -14
  29. package/dist/{sleep-DmP-uxoe.js → sleep-BtS3xMHv.js} +109 -9
  30. package/dist/{sleep-Cc14_yxc.mjs → sleep-DJaTV2D7.mjs} +86 -10
  31. package/dist/types/agent-pipeline-settings.d.ts +8 -0
  32. package/package.json +1 -1
@@ -694,8 +694,8 @@ export interface CapabilitiesAccess {
694
694
  * `addonId` for cap-routed remote providers is `<addonName>@<workerNodeId>`
695
695
  * (e.g. `decoder-nodeav@dev-agent-1/decoder-nodeav`); local providers
696
696
  * are just `<addonName>` (no `@`). Used by stream-broker to filter the
697
- * decoder collection by the orchestrator's per-camera placement
698
- * decision (`getDecoderAssignment.decoderNodeId`).
697
+ * decoder collection to node-local providers (decode is always
698
+ * co-located with its frame consumer).
699
699
  */
700
700
  getCollectionEntries<T = unknown>(name: string): readonly (readonly [string, T])[] | undefined;
701
701
  /** The active provider of a singleton capability (by cap name). */
@@ -797,6 +797,16 @@ export interface AddonPageDeclaration {
797
797
  * is always `'remoteEntry.js'`.
798
798
  */
799
799
  readonly bundle: string;
800
+ /**
801
+ * Sidebar section this page docks into. Well-known ids: `'detection'`,
802
+ * `'cluster'`, `'administration'` — the page renders inside that group.
803
+ * Any OTHER string creates (or joins) a custom section rendered after
804
+ * the built-in groups; label from `sectionLabel` (first declaration
805
+ * wins), falling back to the id. Absent → the "Addon Pages" group.
806
+ */
807
+ readonly section?: string;
808
+ /** Display label for a CUSTOM `section` id (ignored for well-known ids). */
809
+ readonly sectionLabel?: string;
800
810
  }
801
811
  /** Provider interface for addons that expose UI pages */
802
812
  export interface IAddonPageProvider {
@@ -1,4 +1,5 @@
1
1
  import type { IAuthProvider } from '../capabilities/auth-provider.cap.js';
2
+ import type { ILoginMethodProvider } from '../capabilities/login-method.cap.js';
2
3
  import type { InferProvider } from '../capabilities/capability-definition.js';
3
4
  import type { ISnapshotOrchestrator } from '../capabilities/snapshot.cap.js';
4
5
  import type { streamBrokerCapability } from '../capabilities/stream-broker.cap.js';
@@ -122,7 +123,9 @@ export interface CapabilityProviderMap {
122
123
  'addon-widgets': InferProvider<typeof import('../capabilities/addon-widgets.cap.js').addonWidgetsCapability>;
123
124
  'addon-widgets-source': InferProvider<typeof import('../capabilities/addon-widgets-source.cap.js').addonWidgetsSourceCapability>;
124
125
  'admin-ui': InferProvider<typeof import('../capabilities/admin-ui.cap.js').adminUiCapability>;
126
+ 'viewer-ui': InferProvider<typeof import('../capabilities/viewer-ui.cap.js').viewerUiCapability>;
125
127
  'auth-provider': IAuthProvider;
128
+ 'login-method': ILoginMethodProvider;
126
129
  'notification-output': InferProvider<typeof import('../capabilities/notification-output.cap.js').notificationOutputCapability>;
127
130
  'addon-routes': IAddonRouteProvider;
128
131
  'pipeline-analytics': InferProvider<typeof import('../capabilities/pipeline-analytics.cap.js').pipelineAnalyticsCapability>;
@@ -841,6 +841,46 @@ export interface ConfigUISchemaWithValues {
841
841
  tabs?: ConfigTabDeclaration[];
842
842
  sections: ConfigSectionWithValues[];
843
843
  }
844
+ /**
845
+ * The read-side inverse of `hydrateSchema`: flatten a hydrated
846
+ * `ConfigUISchemaWithValues` (what `addonSettings.getDeviceSettings` /
847
+ * every `get*Settings` endpoint returns) into a `key → effective value`
848
+ * map, recursing through `group` and `sub-tabs` layout fields exactly as
849
+ * `hydrateSchema` nested them. "Effective" = the field's `value`, falling
850
+ * back to its `default`.
851
+ *
852
+ * Structural over `unknown` (the cap wire shape is loose) so any consumer
853
+ * — an addon widget, an admin-ui card — can read a settings payload it
854
+ * received over tRPC without re-implementing the walk. Malformed input
855
+ * yields an empty map, never throws.
856
+ */
857
+ /** A hydrated field's raw stored `value` and its schema `default`. */
858
+ export interface HydratedFieldEntry {
859
+ readonly value: unknown;
860
+ readonly default: unknown;
861
+ }
862
+ /**
863
+ * Base collector: flatten a hydrated `ConfigUISchemaWithValues` into
864
+ * `key → { value, default }`, recursing through `group` and `sub-tabs`
865
+ * layout fields. Keeping `value` and `default` SEPARATE (rather than
866
+ * pre-resolving) lets callers both read the effective value AND detect
867
+ * overrides (`value` differs from `default`). Structural over `unknown`;
868
+ * malformed input yields an empty map, never throws.
869
+ */
870
+ export declare function collectHydratedFieldEntries(schema: unknown): Map<string, HydratedFieldEntry>;
871
+ /**
872
+ * Flatten a hydrated settings payload into `key → EFFECTIVE value`
873
+ * (`value ?? default`). The read-side inverse of `hydrateSchema` for the
874
+ * common "just give me the resolved values" case. Built on
875
+ * {@link collectHydratedFieldEntries}.
876
+ */
877
+ export declare function collectHydratedFieldValues(schema: unknown): Map<string, unknown>;
878
+ /**
879
+ * Read one field's effective value out of a hydrated settings payload —
880
+ * convenience wrapper over {@link collectHydratedFieldValues} for the
881
+ * single-field case. Returns `undefined` when the field is absent.
882
+ */
883
+ export declare function resolveHydratedFieldValue(schema: unknown, key: string): unknown;
844
884
  /**
845
885
  * Merge a `ConfigUISchema` with a raw `values` record into a
846
886
  * `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
@@ -345,6 +345,17 @@ export interface TopologyNode {
345
345
  }>;
346
346
  readonly processes: readonly TopologyProcess[];
347
347
  readonly categories: readonly TopologyCategory[];
348
+ /**
349
+ * The node's runtime-updatable ROOT package (`@camstack/server` /
350
+ * `@camstack/agent`) from its `registerNode` manifest — version
351
+ * visibility for the Server management surface. Null for offline rows
352
+ * and nodes that never reported one. Mirrors `TopologyRootPackageSchema`
353
+ * in `nodes.cap.ts`.
354
+ */
355
+ readonly rootPackage: {
356
+ readonly name: string;
357
+ readonly version: string;
358
+ } | null;
348
359
  }
349
360
  /** All known event categories with their typed payloads */
350
361
  export interface EventCatalog {
@@ -3,7 +3,7 @@ import type { PipelineSchema, PipelineDefaultStep, PipelineTemplateStep, Pipelin
3
3
  import type { ModelFormat } from '../types/models.js';
4
4
  import type { FrameInput } from '../types/io.js';
5
5
  import type { FrameHandle } from './frame-handle.js';
6
- import type { FrameResult, DetectorOutput } from '../types/detection.js';
6
+ import type { FrameResult } from '../types/detection.js';
7
7
  import type { ConfigUISchema } from './config-ui.js';
8
8
  import type { InferenceCapabilities } from './inference-capabilities.js';
9
9
  import type { IAddonResolver } from './pipeline-runner.js';
@@ -77,7 +77,7 @@ export interface IPipelineExecutorProvider {
77
77
  getAvailableEngines(): Promise<PipelineEngineChoice[]>;
78
78
  /** Build default step tree for an engine */
79
79
  getDefaultSteps(engine: PipelineEngineChoice): Promise<PipelineDefaultStep[]>;
80
- /** Get persisted global steps (null if not yet configured). Kept read-only for benchmark fallback. */
80
+ /** Compute this node's hardware-aware default step tree (null when the catalog yields no steps). */
81
81
  getGlobalSteps(): Promise<PipelineDefaultStep[] | null>;
82
82
  /** Get the runner-ready pipeline config */
83
83
  getGlobalPipelineConfig(): Promise<PipelineConfig | null>;
@@ -151,12 +151,6 @@ export interface IPipelineExecutorProvider {
151
151
  }): Promise<{
152
152
  readonly results: readonly FrameResult[];
153
153
  }>;
154
- /** Run single-addon detection on a frame */
155
- detect(input: {
156
- addonId: string;
157
- frame: FrameInput;
158
- config?: Record<string, unknown>;
159
- }): Promise<DetectorOutput>;
160
154
  listReferenceImages(): Promise<Array<{
161
155
  id: string;
162
156
  filename: string;
@@ -30,20 +30,6 @@ export interface PipelineAssignment {
30
30
  /** Unix timestamp (ms) when the assignment was last updated. */
31
31
  readonly assignedAt: number;
32
32
  }
33
- /**
34
- * Decoder placement record. Symmetric to `PipelineAssignment` but for the
35
- * decoder-node placement domain (`balanceDecoder` decision: manual pin →
36
- * co-located with pipeline → capacity).
37
- */
38
- export interface DecoderAssignment {
39
- readonly deviceId: number;
40
- /** Moleculer node id of the decoder provider currently responsible for this camera. */
41
- readonly decoderNodeId: string;
42
- /** True when the assignment was set manually via `assignDecoder`, false when chosen by the balancer. */
43
- readonly pinned: boolean;
44
- /** Why this assignment was made — useful for debugging the decoder balancer. */
45
- readonly reason: 'manual' | 'co-located' | 'capacity' | 'hardware-affinity';
46
- }
47
33
  /**
48
34
  * Per-agent load summary surfaced to the load balancer + dashboards.
49
35
  * Aggregated from each runner's `getLocalLoad` cap call.
@@ -739,6 +739,68 @@ function isValuelessField(field) {
739
739
  return field.type === "separator" || field.type === "info" || field.type === "qr-code" || field.type === "button" || field.type === "object-array" || field.type === "widget" || field.type === "addon-action-button" || field.type === "device-action-button";
740
740
  }
741
741
  /**
742
+ * Base collector: flatten a hydrated `ConfigUISchemaWithValues` into
743
+ * `key → { value, default }`, recursing through `group` and `sub-tabs`
744
+ * layout fields. Keeping `value` and `default` SEPARATE (rather than
745
+ * pre-resolving) lets callers both read the effective value AND detect
746
+ * overrides (`value` differs from `default`). Structural over `unknown`;
747
+ * malformed input yields an empty map, never throws.
748
+ */
749
+ function collectHydratedFieldEntries(schema) {
750
+ const out = /* @__PURE__ */ new Map();
751
+ if (typeof schema !== "object" || schema === null) return out;
752
+ const sections = schema.sections;
753
+ if (!Array.isArray(sections)) return out;
754
+ for (const section of sections) if (typeof section === "object" && section !== null) collectFieldEntriesInto(section.fields, out);
755
+ return out;
756
+ }
757
+ /** Recursive field walker for {@link collectHydratedFieldEntries}. */
758
+ function collectFieldEntriesInto(fields, into) {
759
+ if (!Array.isArray(fields)) return;
760
+ for (const field of fields) {
761
+ if (typeof field !== "object" || field === null) continue;
762
+ const type = field.type;
763
+ if (type === "group") {
764
+ collectFieldEntriesInto(field.fields, into);
765
+ continue;
766
+ }
767
+ if (type === "sub-tabs") {
768
+ const tabs = field.tabs;
769
+ if (Array.isArray(tabs)) {
770
+ for (const tab of tabs) if (typeof tab === "object" && tab !== null) collectFieldEntriesInto(tab.fields, into);
771
+ }
772
+ continue;
773
+ }
774
+ const key = field.key;
775
+ if (typeof key !== "string" || key.length === 0) continue;
776
+ if (!("value" in field)) continue;
777
+ into.set(key, {
778
+ value: field.value,
779
+ default: field.default
780
+ });
781
+ }
782
+ }
783
+ /**
784
+ * Flatten a hydrated settings payload into `key → EFFECTIVE value`
785
+ * (`value ?? default`). The read-side inverse of `hydrateSchema` for the
786
+ * common "just give me the resolved values" case. Built on
787
+ * {@link collectHydratedFieldEntries}.
788
+ */
789
+ function collectHydratedFieldValues(schema) {
790
+ const out = /* @__PURE__ */ new Map();
791
+ for (const [key, entry] of collectHydratedFieldEntries(schema)) out.set(key, entry.value ?? entry.default);
792
+ return out;
793
+ }
794
+ /**
795
+ * Read one field's effective value out of a hydrated settings payload —
796
+ * convenience wrapper over {@link collectHydratedFieldValues} for the
797
+ * single-field case. Returns `undefined` when the field is absent.
798
+ */
799
+ function resolveHydratedFieldValue(schema, key) {
800
+ const entry = collectHydratedFieldEntries(schema).get(key);
801
+ return entry === void 0 ? void 0 : entry.value ?? entry.default;
802
+ }
803
+ /**
742
804
  * Merge a `ConfigUISchema` with a raw `values` record into a
743
805
  * `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
744
806
  * before returning to the admin UI. Groups are walked recursively.
@@ -795,10 +857,6 @@ function hydrateField(field, values) {
795
857
  };
796
858
  }
797
859
  const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
798
- if (field.type === "password") return {
799
- ...field,
800
- value: ""
801
- };
802
860
  const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
803
861
  return {
804
862
  ...field,
@@ -3537,13 +3595,10 @@ function createDeviceProxy(api, binding, opts) {
3537
3595
  unassignPipeline: (input) => dispatchSystem("pipelineOrchestrator", "unassignPipeline", "mutation", input),
3538
3596
  getPipelineAssignment: (input) => dispatchSystem("pipelineOrchestrator", "getPipelineAssignment", "query", input),
3539
3597
  getCameraMetrics: (input) => dispatchSystem("pipelineOrchestrator", "getCameraMetrics", "query", input),
3540
- assignDecoder: (input) => dispatchSystem("pipelineOrchestrator", "assignDecoder", "mutation", input),
3541
- unassignDecoder: (input) => dispatchSystem("pipelineOrchestrator", "unassignDecoder", "mutation", input),
3542
3598
  assignAudio: (input) => dispatchSystem("pipelineOrchestrator", "assignAudio", "mutation", input),
3543
3599
  unassignAudio: (input) => dispatchSystem("pipelineOrchestrator", "unassignAudio", "mutation", input),
3544
3600
  getAudioAssignment: (input) => dispatchSystem("pipelineOrchestrator", "getAudioAssignment", "query", input),
3545
3601
  getAudioAssignments: (input) => dispatchSystem("pipelineOrchestrator", "getAudioAssignments", "query", input),
3546
- getDecoderAssignment: (input) => dispatchSystem("pipelineOrchestrator", "getDecoderAssignment", "query", input),
3547
3602
  getCameraSettings: (input) => dispatchSystem("pipelineOrchestrator", "getCameraSettings", "query", input),
3548
3603
  setCameraStepToggle: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepToggle", "mutation", input),
3549
3604
  getCameraStepOverrides: (input) => dispatchSystem("pipelineOrchestrator", "getCameraStepOverrides", "query", input),
@@ -3592,13 +3647,34 @@ function createDeviceProxy(api, binding, opts) {
3592
3647
  }
3593
3648
  //#endregion
3594
3649
  //#region src/capabilities/admin-ui.cap.ts
3595
- var StaticDirOutputSchema = zod.z.object({ staticDir: zod.z.string() });
3596
- var VersionOutputSchema = zod.z.object({ version: zod.z.string() });
3650
+ var StaticDirOutputSchema$1 = zod.z.object({ staticDir: zod.z.string() });
3651
+ var VersionOutputSchema$1 = zod.z.object({ version: zod.z.string() });
3597
3652
  var adminUiCapability = {
3598
3653
  name: "admin-ui",
3599
3654
  scope: "system",
3600
3655
  mode: "singleton",
3601
3656
  internal: true,
3657
+ methods: {
3658
+ getStaticDir: method(zod.z.void(), StaticDirOutputSchema$1),
3659
+ getVersion: method(zod.z.void(), VersionOutputSchema$1)
3660
+ }
3661
+ };
3662
+ //#endregion
3663
+ //#region src/capabilities/viewer-ui.cap.ts
3664
+ var StaticDirOutputSchema = zod.z.object({ staticDir: zod.z.string() });
3665
+ var VersionOutputSchema = zod.z.object({ version: zod.z.string() });
3666
+ /**
3667
+ * viewer-ui — serves the CamStack VIEWER web build (the Expo/React-Native
3668
+ * universal client's PWA export) from the hub, alongside admin-ui. Mirrors
3669
+ * `admin-ui` exactly: a singleton, server-internal cap exposing the static
3670
+ * dist directory + build version so `main.ts` can mount the SPA under a
3671
+ * dedicated prefix.
3672
+ */
3673
+ var viewerUiCapability = {
3674
+ name: "viewer-ui",
3675
+ scope: "system",
3676
+ mode: "singleton",
3677
+ internal: true,
3602
3678
  methods: {
3603
3679
  getStaticDir: method(zod.z.void(), StaticDirOutputSchema),
3604
3680
  getVersion: method(zod.z.void(), VersionOutputSchema)
@@ -4028,6 +4104,18 @@ Object.defineProperty(exports, "asString", {
4028
4104
  return asString;
4029
4105
  }
4030
4106
  });
4107
+ Object.defineProperty(exports, "collectHydratedFieldEntries", {
4108
+ enumerable: true,
4109
+ get: function() {
4110
+ return collectHydratedFieldEntries;
4111
+ }
4112
+ });
4113
+ Object.defineProperty(exports, "collectHydratedFieldValues", {
4114
+ enumerable: true,
4115
+ get: function() {
4116
+ return collectHydratedFieldValues;
4117
+ }
4118
+ });
4031
4119
  Object.defineProperty(exports, "createDeviceProxy", {
4032
4120
  enumerable: true,
4033
4121
  get: function() {
@@ -4172,6 +4260,12 @@ Object.defineProperty(exports, "resolveCapMount", {
4172
4260
  return resolveCapMount;
4173
4261
  }
4174
4262
  });
4263
+ Object.defineProperty(exports, "resolveHydratedFieldValue", {
4264
+ enumerable: true,
4265
+ get: function() {
4266
+ return resolveHydratedFieldValue;
4267
+ }
4268
+ });
4175
4269
  Object.defineProperty(exports, "scopeKey", {
4176
4270
  enumerable: true,
4177
4271
  get: function() {
@@ -4196,3 +4290,9 @@ Object.defineProperty(exports, "sleepCancellable", {
4196
4290
  return sleepCancellable;
4197
4291
  }
4198
4292
  });
4293
+ Object.defineProperty(exports, "viewerUiCapability", {
4294
+ enumerable: true,
4295
+ get: function() {
4296
+ return viewerUiCapability;
4297
+ }
4298
+ });
@@ -739,6 +739,68 @@ function isValuelessField(field) {
739
739
  return field.type === "separator" || field.type === "info" || field.type === "qr-code" || field.type === "button" || field.type === "object-array" || field.type === "widget" || field.type === "addon-action-button" || field.type === "device-action-button";
740
740
  }
741
741
  /**
742
+ * Base collector: flatten a hydrated `ConfigUISchemaWithValues` into
743
+ * `key → { value, default }`, recursing through `group` and `sub-tabs`
744
+ * layout fields. Keeping `value` and `default` SEPARATE (rather than
745
+ * pre-resolving) lets callers both read the effective value AND detect
746
+ * overrides (`value` differs from `default`). Structural over `unknown`;
747
+ * malformed input yields an empty map, never throws.
748
+ */
749
+ function collectHydratedFieldEntries(schema) {
750
+ const out = /* @__PURE__ */ new Map();
751
+ if (typeof schema !== "object" || schema === null) return out;
752
+ const sections = schema.sections;
753
+ if (!Array.isArray(sections)) return out;
754
+ for (const section of sections) if (typeof section === "object" && section !== null) collectFieldEntriesInto(section.fields, out);
755
+ return out;
756
+ }
757
+ /** Recursive field walker for {@link collectHydratedFieldEntries}. */
758
+ function collectFieldEntriesInto(fields, into) {
759
+ if (!Array.isArray(fields)) return;
760
+ for (const field of fields) {
761
+ if (typeof field !== "object" || field === null) continue;
762
+ const type = field.type;
763
+ if (type === "group") {
764
+ collectFieldEntriesInto(field.fields, into);
765
+ continue;
766
+ }
767
+ if (type === "sub-tabs") {
768
+ const tabs = field.tabs;
769
+ if (Array.isArray(tabs)) {
770
+ for (const tab of tabs) if (typeof tab === "object" && tab !== null) collectFieldEntriesInto(tab.fields, into);
771
+ }
772
+ continue;
773
+ }
774
+ const key = field.key;
775
+ if (typeof key !== "string" || key.length === 0) continue;
776
+ if (!("value" in field)) continue;
777
+ into.set(key, {
778
+ value: field.value,
779
+ default: field.default
780
+ });
781
+ }
782
+ }
783
+ /**
784
+ * Flatten a hydrated settings payload into `key → EFFECTIVE value`
785
+ * (`value ?? default`). The read-side inverse of `hydrateSchema` for the
786
+ * common "just give me the resolved values" case. Built on
787
+ * {@link collectHydratedFieldEntries}.
788
+ */
789
+ function collectHydratedFieldValues(schema) {
790
+ const out = /* @__PURE__ */ new Map();
791
+ for (const [key, entry] of collectHydratedFieldEntries(schema)) out.set(key, entry.value ?? entry.default);
792
+ return out;
793
+ }
794
+ /**
795
+ * Read one field's effective value out of a hydrated settings payload —
796
+ * convenience wrapper over {@link collectHydratedFieldValues} for the
797
+ * single-field case. Returns `undefined` when the field is absent.
798
+ */
799
+ function resolveHydratedFieldValue(schema, key) {
800
+ const entry = collectHydratedFieldEntries(schema).get(key);
801
+ return entry === void 0 ? void 0 : entry.value ?? entry.default;
802
+ }
803
+ /**
742
804
  * Merge a `ConfigUISchema` with a raw `values` record into a
743
805
  * `ConfigUISchemaWithValues`. Used by every `get*Settings` backend endpoint
744
806
  * before returning to the admin UI. Groups are walked recursively.
@@ -795,10 +857,6 @@ function hydrateField(field, values) {
795
857
  };
796
858
  }
797
859
  const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
798
- if (field.type === "password") return {
799
- ...field,
800
- value: ""
801
- };
802
860
  const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
803
861
  return {
804
862
  ...field,
@@ -3537,13 +3595,10 @@ function createDeviceProxy(api, binding, opts) {
3537
3595
  unassignPipeline: (input) => dispatchSystem("pipelineOrchestrator", "unassignPipeline", "mutation", input),
3538
3596
  getPipelineAssignment: (input) => dispatchSystem("pipelineOrchestrator", "getPipelineAssignment", "query", input),
3539
3597
  getCameraMetrics: (input) => dispatchSystem("pipelineOrchestrator", "getCameraMetrics", "query", input),
3540
- assignDecoder: (input) => dispatchSystem("pipelineOrchestrator", "assignDecoder", "mutation", input),
3541
- unassignDecoder: (input) => dispatchSystem("pipelineOrchestrator", "unassignDecoder", "mutation", input),
3542
3598
  assignAudio: (input) => dispatchSystem("pipelineOrchestrator", "assignAudio", "mutation", input),
3543
3599
  unassignAudio: (input) => dispatchSystem("pipelineOrchestrator", "unassignAudio", "mutation", input),
3544
3600
  getAudioAssignment: (input) => dispatchSystem("pipelineOrchestrator", "getAudioAssignment", "query", input),
3545
3601
  getAudioAssignments: (input) => dispatchSystem("pipelineOrchestrator", "getAudioAssignments", "query", input),
3546
- getDecoderAssignment: (input) => dispatchSystem("pipelineOrchestrator", "getDecoderAssignment", "query", input),
3547
3602
  getCameraSettings: (input) => dispatchSystem("pipelineOrchestrator", "getCameraSettings", "query", input),
3548
3603
  setCameraStepToggle: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepToggle", "mutation", input),
3549
3604
  getCameraStepOverrides: (input) => dispatchSystem("pipelineOrchestrator", "getCameraStepOverrides", "query", input),
@@ -3592,13 +3647,34 @@ function createDeviceProxy(api, binding, opts) {
3592
3647
  }
3593
3648
  //#endregion
3594
3649
  //#region src/capabilities/admin-ui.cap.ts
3595
- var StaticDirOutputSchema = z.object({ staticDir: z.string() });
3596
- var VersionOutputSchema = z.object({ version: z.string() });
3650
+ var StaticDirOutputSchema$1 = z.object({ staticDir: z.string() });
3651
+ var VersionOutputSchema$1 = z.object({ version: z.string() });
3597
3652
  var adminUiCapability = {
3598
3653
  name: "admin-ui",
3599
3654
  scope: "system",
3600
3655
  mode: "singleton",
3601
3656
  internal: true,
3657
+ methods: {
3658
+ getStaticDir: method(z.void(), StaticDirOutputSchema$1),
3659
+ getVersion: method(z.void(), VersionOutputSchema$1)
3660
+ }
3661
+ };
3662
+ //#endregion
3663
+ //#region src/capabilities/viewer-ui.cap.ts
3664
+ var StaticDirOutputSchema = z.object({ staticDir: z.string() });
3665
+ var VersionOutputSchema = z.object({ version: z.string() });
3666
+ /**
3667
+ * viewer-ui — serves the CamStack VIEWER web build (the Expo/React-Native
3668
+ * universal client's PWA export) from the hub, alongside admin-ui. Mirrors
3669
+ * `admin-ui` exactly: a singleton, server-internal cap exposing the static
3670
+ * dist directory + build version so `main.ts` can mount the SPA under a
3671
+ * dedicated prefix.
3672
+ */
3673
+ var viewerUiCapability = {
3674
+ name: "viewer-ui",
3675
+ scope: "system",
3676
+ mode: "singleton",
3677
+ internal: true,
3602
3678
  methods: {
3603
3679
  getStaticDir: method(z.void(), StaticDirOutputSchema),
3604
3680
  getVersion: method(z.void(), VersionOutputSchema)
@@ -3776,4 +3852,4 @@ function sleepCancellable(ms, signal) {
3776
3852
  });
3777
3853
  }
3778
3854
  //#endregion
3779
- export { SubscribeAudioChunksResultSchema as $, ReadinessRegistry as A, CamStreamResolutionSchema as B, asJsonObject as C, parseJsonObject as D, parseJsonArray as E, BrokerStatsSchema as F, FrameHandleFormatSchema as G, DecodedAudioChunkSchema as H, BrokerStatusSchema as I, ProfileSlotSchema as J, FrameHandleSchema as K, CAM_PROFILE_ORDER as L, emitDownForOwnedCaps as M, readinessKey as N, parseJsonUnknown as O, scopeKey as P, SubscribeAudioChunksInputSchema as Q, CamProfileSchema as R, asJsonArray as S, asString as T, DecodedFrameSchema as U, CameraStreamSchema as V, EncodedPacketSchema as W, StreamSourceEntrySchema$1 as X, ProfileSlotStatusSchema as Y, StreamSourceSchema as Z, ChargingStatus as _, adminUiCapability as a, selectAssignedProfileSlots as at, DeviceType as b, createMirrorSource as c, createDurableState as ct, DEVICE_STATUS_METHOD as d, isEvent as dt, SubscribeFramesInputSchema as et, event as f, WELL_KNOWN_TABS as ft, resolveCapMount as g, DisposerChain as gt, method as h, EventCategory as ht, deviceOpsCapability as i, parseProfileBrokerId as it, ReadinessTimeoutError as j, DATAPLANE_SECRET_HEADER as k, createSliceHandle as l, createEvent as lt, isDeviceConfigCap as m, hydrateSchema as mt, sleepCancellable as n, makeProfileBrokerId as nt, createDeviceProxy as o, BaseAddon as ot, expandCapMethods as p, WELL_KNOWN_TAB_MAP as pt, ProfileRtspEntrySchema as q, RawStateResultSchema as r, makeSourceBrokerId as rt, createLazyTrpcSource as s, normalizeAddonInitResult as st, sleep as t, SubscribeFramesResultSchema as tt, DEVICE_SETTINGS_CONTRIBUTION_METHODS as u, emitReadiness as ut, DeviceFeature as v, asNumber as w, asBoolean as x, DeviceRole as y, CamStreamKindSchema as z };
3855
+ export { SubscribeAudioChunksInputSchema as $, DATAPLANE_SECRET_HEADER as A, CamStreamKindSchema as B, asJsonArray as C, parseJsonArray as D, asString as E, scopeKey as F, EncodedPacketSchema as G, CameraStreamSchema as H, BrokerStatsSchema as I, ProfileRtspEntrySchema as J, FrameHandleFormatSchema as K, BrokerStatusSchema as L, ReadinessTimeoutError as M, emitDownForOwnedCaps as N, parseJsonObject as O, readinessKey as P, StreamSourceSchema as Q, CAM_PROFILE_ORDER as R, asBoolean as S, asNumber as T, DecodedAudioChunkSchema as U, CamStreamResolutionSchema as V, DecodedFrameSchema as W, ProfileSlotStatusSchema as X, ProfileSlotSchema as Y, StreamSourceEntrySchema$1 as Z, resolveCapMount as _, hydrateSchema as _t, viewerUiCapability as a, parseProfileBrokerId as at, DeviceRole as b, DisposerChain as bt, createLazyTrpcSource as c, normalizeAddonInitResult as ct, DEVICE_SETTINGS_CONTRIBUTION_METHODS as d, emitReadiness as dt, SubscribeAudioChunksResultSchema as et, DEVICE_STATUS_METHOD as f, isEvent as ft, method as g, collectHydratedFieldValues as gt, isDeviceConfigCap as h, collectHydratedFieldEntries as ht, deviceOpsCapability as i, makeSourceBrokerId as it, ReadinessRegistry as j, parseJsonUnknown as k, createMirrorSource as l, createDurableState as lt, expandCapMethods as m, WELL_KNOWN_TAB_MAP as mt, sleepCancellable as n, SubscribeFramesResultSchema as nt, adminUiCapability as o, selectAssignedProfileSlots as ot, event as p, WELL_KNOWN_TABS as pt, FrameHandleSchema as q, RawStateResultSchema as r, makeProfileBrokerId as rt, createDeviceProxy as s, BaseAddon as st, sleep as t, SubscribeFramesInputSchema as tt, createSliceHandle as u, createEvent as ut, ChargingStatus as v, resolveHydratedFieldValue as vt, asJsonObject as w, DeviceType as x, DeviceFeature as y, EventCategory as yt, CamProfileSchema as z };
@@ -82,6 +82,14 @@ export interface AgentPipelineSettings {
82
82
  * enabled-node sets from these flags across the cluster.
83
83
  */
84
84
  readonly detect?: boolean;
85
+ /**
86
+ * @deprecated DEPRECATED AND IGNORED. Decode is always co-located with its
87
+ * frame consumer (the shm ring is node-local; off-owner detection decodes
88
+ * locally via the satellite plane), so a separate per-node decode flag is
89
+ * meaningless: decode eligibility IS detect eligibility. The field is kept
90
+ * OPTIONAL purely so persisted stores written before the removal still
91
+ * parse — no code reads it and no write path emits it.
92
+ */
85
93
  readonly decode?: boolean;
86
94
  readonly audio?: boolean;
87
95
  readonly ingest?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.1.34",
3
+ "version": "1.1.36",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",