@camstack/ui-library 1.2.318 → 1.2.320

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.
@@ -1,5 +1,5 @@
1
1
  import { type JSX } from "react";
2
- import { type AgentAddonConfig, type ConfigField, type PipelineAddonSchema } from "@camstack/types";
2
+ import { type ConfigField, type DeviceStepConfig, type PipelineAddonSchema } from "@camstack/types";
3
3
  import { type RootModelInfo } from "./root-model-source";
4
4
  /**
5
5
  * A step's node-local fields: the catalog schema minus the knobs the CLUSTER
@@ -27,9 +27,9 @@ export declare function RootSuppliedModelNote({ rootModel, stepModelId }: {
27
27
  }): JSX.Element | null;
28
28
  export interface AgentStepEditorProps {
29
29
  readonly addon: PipelineAddonSchema;
30
- /** The node's base for the step — the controlled value. */
31
- readonly agentDefault: AgentAddonConfig;
32
- readonly onChangeAgentConfig?: (next: AgentAddonConfig) => void;
30
+ /** The accelerator's step config — the controlled value (D927: the model's own place). */
31
+ readonly agentDefault: DeviceStepConfig;
32
+ readonly onChangeAgentConfig?: (next: DeviceStepConfig) => void;
33
33
  readonly engineFormat: string;
34
34
  /**
35
35
  * The model this step would ACTUALLY run when nothing is explicitly pinned —
@@ -9,8 +9,8 @@
9
9
  * (override → base → `resolveEffectiveDefaultModel`).
10
10
  *
11
11
  * Consumers: `AgentStepEditor` (the drawer picker), `NodeDeviceStepsMatrix`
12
- * (per-node base), `DeviceStepOverrideTab` (per-camera override), the Models
13
- * page and `pipeline-mirror`. They are views of the same decision and drifted
12
+ * (per-node base), the camera step inspector (read-only, D927) and the Models
13
+ * page. They are views of the same decision and drifted
14
14
  * apart once already — see `resolveEffectiveDefaultModel` for the bite.
15
15
  * `scripts/check-step-model-single-owner.ts` is what stops the next copy.
16
16
  *
@@ -88,7 +88,7 @@ export interface StepModelFormatBuilds {
88
88
  export declare function stepModelOptions<M extends StepModelFormatBuilds>(models: readonly M[], format: string | undefined): readonly M[];
89
89
  /** Can this step run on `format` at all? (`false` ⇒ the caller renders "⚠ skip"/"—".) */
90
90
  export declare function stepHasModelForFormat(models: readonly StepModelFormatBuilds[], format: string | undefined): boolean;
91
- /** The layers a surface may pin, outermost first. Both are optional per surface. */
91
+ /** The one stored layer a model comes from: the accelerator's pin (D927). */
92
92
  export interface EffectiveStepModelInput {
93
93
  readonly catalog: StepModelCatalog & {
94
94
  readonly slot?: string;
@@ -97,19 +97,17 @@ export interface EffectiveStepModelInput {
97
97
  readonly format?: string;
98
98
  readonly defaultModelId?: string;
99
99
  } | null | undefined;
100
- /** Per-camera override (`stepOverridesByDevice[node][deviceKey][step].modelId`). */
101
- readonly override?: string | undefined;
102
- /** Per-(node,device) base (`inferenceDevices[node][deviceKey].steps[step].modelId`). */
100
+ /** Per-(node,device) pin (`inferenceDevices[node][deviceKey].steps[step].modelId`). */
103
101
  readonly base?: string | undefined;
104
102
  }
105
103
  /**
106
- * The model a step ACTUALLY runs for a (device, camera) — the whole effective
107
- * chain in one place: per-camera override → per-(node,device) base → the
108
- * resolved default (`resolveEffectiveDefaultModel`).
104
+ * The model a step ACTUALLY runs on an accelerator — the whole effective chain
105
+ * in one place: the per-(node,device) pin → the resolved default
106
+ * (`resolveEffectiveDefaultModel`). A model is chosen by the accelerator that
107
+ * runs it (D927); a camera has no layer here.
109
108
  *
110
109
  * Every surface calls this: the matrix cell, and the drawer's picker seed. They
111
110
  * are the same number, and the only way to keep them the same number is to have
112
- * one function produce it. A surface that owns fewer layers omits them (the node
113
- * matrix passes no `override`) — it does NOT get its own resolver.
111
+ * one function produce it.
114
112
  */
115
113
  export declare function resolveEffectiveStepModel(input: EffectiveStepModelInput): string | undefined;
@@ -18,9 +18,8 @@
18
18
  * `clampToParent` narrows the target dropdown + access checkboxes to
19
19
  * what the CALLER possesses. Admins pass `null` to allow everything.
20
20
  *
21
- * This is the RAW editor. The simple, two-question Access panel on
22
- * `/system/users` composes the same wire shape through `ACCESS_ROLES`; this
23
- * one is what an operator drops into when a grant set is not a plain role.
21
+ * This is the RAW editor, for TOKENS. People are not edited here: a person
22
+ * is an Admin or a Viewer (D921), set from `/system/identity?tab=users`.
24
23
  */
25
24
  import { type ReactNode } from "react";
26
25
  import { type TokenScope } from "@camstack/types";
@@ -1,6 +1,6 @@
1
1
  export { GateBadge, GateControl, type GateControlProps, type StepGate } from "./gate-control";
2
2
  export { LayeredSettingsForm, type LayeredSettingsFormProps, type LayerLabels, type SettingsTarget, stepFieldDomId } from "./layered-settings-form";
3
- export { bindsToModel, defaultOfField, formatSettingValue, isValueField, type ValueField } from "./setting-values";
3
+ export { bindsToModel, defaultOfField, formatSettingValue, isModelScopedField, isValueField, type ValueField, withoutModelScopedFields } from "./setting-values";
4
4
  export { SegmentedChoice, type SegmentedChoiceOption, type SegmentedChoiceProps } from "./segmented-choice";
5
5
  export { BackToStepsButton, dockBox, STEP_DOCK_WIDTH_PX, StepDetailDock, type StepDetailDockProps } from "./step-detail-dock";
6
6
  export { type SaveBarState, StepInspectorPanel, type StepInspectorPanelProps } from "./step-inspector-panel";
@@ -5,7 +5,6 @@ import { type RootModelInfo } from "../root-model-source";
5
5
  export type SettingsTarget = Exclude<StepSettingSource, "default">;
6
6
  /** How each stored layer is named on screen. A layer without a label is not shown. */
7
7
  export interface LayerLabels {
8
- readonly accelerator?: string;
9
8
  readonly camera?: string;
10
9
  readonly node: string;
11
10
  }
@@ -25,7 +24,7 @@ export interface LayeredSettingsFormProps {
25
24
  readonly rootModel?: RootModelInfo;
26
25
  /** Fields the edited layer stores at exactly the value below it (a legacy full copy). */
27
26
  readonly pinnedKeys?: readonly string[];
28
- /** An extra control under one field ("Apply to all accelerators"). */
27
+ /** An extra control under one field. */
29
28
  readonly fieldActions?: (key: string, source: StepSettingSource) => ReactNode;
30
29
  /** Controls on the section header ("Follow the node", a scope switch). */
31
30
  readonly headerActions?: ReactNode;
@@ -35,4 +34,4 @@ export interface LayeredSettingsFormProps {
35
34
  }
36
35
  /** DOM id of a field's box — the target of a search hit. */
37
36
  export declare function stepFieldDomId(key: string): string;
38
- export declare function LayeredSettingsForm({ addon, fields, layers, target, labels, modelId, onChangeLayer, rootModel, pinnedKeys, fieldActions, headerActions, highlightKey, disabled }: LayeredSettingsFormProps): JSX.Element;
37
+ export declare function LayeredSettingsForm({ addon, fields: givenFields, layers, target, labels, modelId, onChangeLayer, rootModel, pinnedKeys, fieldActions, headerActions, highlightKey, disabled }: LayeredSettingsFormProps): JSX.Element;
@@ -3,12 +3,20 @@
3
3
  * back to when no layer stores it. Pure, so the provenance line and its tests
4
4
  * agree on one spelling.
5
5
  */
6
- import type { ConfigField } from "@camstack/types";
6
+ import { type ConfigField } from "@camstack/types";
7
7
  /** A field that stores a value (not a separator, an info block or a group). */
8
8
  export type ValueField = Exclude<ConfigField, {
9
9
  readonly type: "separator" | "info" | "group";
10
10
  }>;
11
11
  export declare function isValueField(field: ConfigField): field is ValueField;
12
+ /**
13
+ * A field only the accelerator that runs the model may set (D927): a model id,
14
+ * a `<key>ModelId` binding, a `minConfidence*` floor, or any field the schema
15
+ * marks as bound to its model. A camera never renders one as an input.
16
+ */
17
+ export declare function isModelScopedField(field: ConfigField): boolean;
18
+ /** The fields a CAMERA may edit: every model-scoped field removed, groups recursed. */
19
+ export declare function withoutModelScopedFields(fields: readonly ConfigField[]): readonly ConfigField[];
12
20
  /** True for a D738 field whose value is stored with the model it was made for. */
13
21
  export declare function bindsToModel(field: ConfigField): boolean;
14
22
  /**
@@ -1529,28 +1529,18 @@ export declare const usePipelineAnalyticsApplyDeviceSettingsPatch: typeof trpc.p
1529
1529
  export declare const usePipelineExecutorGetAvailableEngines: typeof trpc.pipelineExecutor.getAvailableEngines.useQuery;
1530
1530
  /** Generated alias around `trpc.pipelineExecutor.getSelectedEngine.useQuery`. */
1531
1531
  export declare const usePipelineExecutorGetSelectedEngine: typeof trpc.pipelineExecutor.getSelectedEngine.useQuery;
1532
- /** Generated alias around `trpc.pipelineExecutor.getDefaultSteps.useQuery`. */
1533
- export declare const usePipelineExecutorGetDefaultSteps: typeof trpc.pipelineExecutor.getDefaultSteps.useQuery;
1534
1532
  /** Generated alias around `trpc.pipelineExecutor.getEngineProvisioning.useQuery`. */
1535
1533
  export declare const usePipelineExecutorGetEngineProvisioning: typeof trpc.pipelineExecutor.getEngineProvisioning.useQuery;
1536
1534
  /** Generated alias around `trpc.pipelineExecutor.getVideoPipelineSteps.useQuery`. */
1537
1535
  export declare const usePipelineExecutorGetVideoPipelineSteps: typeof trpc.pipelineExecutor.getVideoPipelineSteps.useQuery;
1538
1536
  /** Generated alias around `trpc.pipelineExecutor.setVideoPipelineSteps.useMutation`. */
1539
1537
  export declare const usePipelineExecutorSetVideoPipelineSteps: typeof trpc.pipelineExecutor.setVideoPipelineSteps.useMutation;
1540
- /** Generated alias around `trpc.pipelineExecutor.clearDeviceOverrides.useMutation`. */
1541
- export declare const usePipelineExecutorClearDeviceOverrides: typeof trpc.pipelineExecutor.clearDeviceOverrides.useMutation;
1542
- /** Generated alias around `trpc.pipelineExecutor.clearModelBoundDeviceOverrides.useMutation`. */
1543
- export declare const usePipelineExecutorClearModelBoundDeviceOverrides: typeof trpc.pipelineExecutor.clearModelBoundDeviceOverrides.useMutation;
1544
1538
  /** Generated alias around `trpc.pipelineExecutor.getInferenceDeviceHealth.useQuery`. */
1545
1539
  export declare const usePipelineExecutorGetInferenceDeviceHealth: typeof trpc.pipelineExecutor.getInferenceDeviceHealth.useQuery;
1546
1540
  /** Generated alias around `trpc.pipelineExecutor.rearmInferenceDevice.useMutation`. */
1547
1541
  export declare const usePipelineExecutorRearmInferenceDevice: typeof trpc.pipelineExecutor.rearmInferenceDevice.useMutation;
1548
1542
  /** Generated alias around `trpc.pipelineExecutor.getSchema.useQuery`. */
1549
1543
  export declare const usePipelineExecutorGetSchema: typeof trpc.pipelineExecutor.getSchema.useQuery;
1550
- /** Generated alias around `trpc.pipelineExecutor.getGlobalSteps.useQuery`. */
1551
- export declare const usePipelineExecutorGetGlobalSteps: typeof trpc.pipelineExecutor.getGlobalSteps.useQuery;
1552
- /** Generated alias around `trpc.pipelineExecutor.getGlobalPipelineConfig.useQuery`. */
1553
- export declare const usePipelineExecutorGetGlobalPipelineConfig: typeof trpc.pipelineExecutor.getGlobalPipelineConfig.useQuery;
1554
1544
  /** Generated alias around `trpc.pipelineExecutor.getOrchestratorConfigSchema.useQuery`. */
1555
1545
  export declare const usePipelineExecutorGetOrchestratorConfigSchema: typeof trpc.pipelineExecutor.getOrchestratorConfigSchema.useQuery;
1556
1546
  /** Generated alias around `trpc.pipelineExecutor.validatePipeline.useQuery`. */
@@ -1655,6 +1645,8 @@ export declare const usePipelineOrchestratorSetAgentDecodeLimits: typeof trpc.pi
1655
1645
  export declare const usePipelineOrchestratorSetAgentReachableHost: typeof trpc.pipelineOrchestrator.setAgentReachableHost.useMutation;
1656
1646
  /** Generated alias around `trpc.pipelineOrchestrator.setAgentInferenceDevices.useMutation`. */
1657
1647
  export declare const usePipelineOrchestratorSetAgentInferenceDevices: typeof trpc.pipelineOrchestrator.setAgentInferenceDevices.useMutation;
1648
+ /** Generated alias around `trpc.pipelineOrchestrator.setNodeStepSettings.useMutation`. */
1649
+ export declare const usePipelineOrchestratorSetNodeStepSettings: typeof trpc.pipelineOrchestrator.setNodeStepSettings.useMutation;
1658
1650
  /** Generated alias around `trpc.pipelineOrchestrator.getNodeInferenceDevices.useQuery`. */
1659
1651
  export declare const usePipelineOrchestratorGetNodeInferenceDevices: typeof trpc.pipelineOrchestrator.getNodeInferenceDevices.useQuery;
1660
1652
  /** Generated alias around `trpc.pipelineOrchestrator.forgetInferenceDevice.useMutation`. */
@@ -1697,14 +1689,8 @@ export declare const usePipelineOrchestratorSetCameraStepToggle: typeof trpc.pip
1697
1689
  export declare const usePipelineOrchestratorGetCameraDetectionSource: typeof trpc.pipelineOrchestrator.getCameraDetectionSource.useQuery;
1698
1690
  /** Generated alias around `trpc.pipelineOrchestrator.setCameraDetectionSource.useMutation`. */
1699
1691
  export declare const usePipelineOrchestratorSetCameraDetectionSource: typeof trpc.pipelineOrchestrator.setCameraDetectionSource.useMutation;
1700
- /** Generated alias around `trpc.pipelineOrchestrator.getCameraStepOverrides.useQuery`. */
1701
- export declare const usePipelineOrchestratorGetCameraStepOverrides: typeof trpc.pipelineOrchestrator.getCameraStepOverrides.useQuery;
1702
- /** Generated alias around `trpc.pipelineOrchestrator.setCameraStepOverride.useMutation`. */
1703
- export declare const usePipelineOrchestratorSetCameraStepOverride: typeof trpc.pipelineOrchestrator.setCameraStepOverride.useMutation;
1704
1692
  /** Generated alias around `trpc.pipelineOrchestrator.setCameraStepSettings.useMutation`. */
1705
1693
  export declare const usePipelineOrchestratorSetCameraStepSettings: typeof trpc.pipelineOrchestrator.setCameraStepSettings.useMutation;
1706
- /** Generated alias around `trpc.pipelineOrchestrator.setCameraPipelineForAgent.useMutation`. */
1707
- export declare const usePipelineOrchestratorSetCameraPipelineForAgent: typeof trpc.pipelineOrchestrator.setCameraPipelineForAgent.useMutation;
1708
1694
  /** Generated alias around `trpc.pipelineOrchestrator.resolvePipeline.useQuery`. */
1709
1695
  export declare const usePipelineOrchestratorResolvePipeline: typeof trpc.pipelineOrchestrator.resolvePipeline.useQuery;
1710
1696
  /** Generated alias around `trpc.pipelineOrchestrator.getCameraSwitches.useQuery`. */
@@ -2293,6 +2279,8 @@ export declare const useTrainingGetJob: typeof trpc.training.getJob.useQuery;
2293
2279
  export declare const useTrainingCancelJob: typeof trpc.training.cancelJob.useMutation;
2294
2280
  /** Generated alias around `trpc.training.getJobResult.useQuery`. */
2295
2281
  export declare const useTrainingGetJobResult: typeof trpc.training.getJobResult.useQuery;
2282
+ /** Generated alias around `trpc.training.listCanaryTargets.useQuery`. */
2283
+ export declare const useTrainingListCanaryTargets: typeof trpc.training.listCanaryTargets.useQuery;
2296
2284
  /** Generated alias around `trpc.training.registerResult.useMutation`. */
2297
2285
  export declare const useTrainingRegisterResult: typeof trpc.training.registerResult.useMutation;
2298
2286
  /** Generated alias around `trpc.training.canaryResult.useMutation`. */
package/dist/index.cjs CHANGED
@@ -11809,28 +11809,18 @@ var usePipelineAnalyticsApplyDeviceSettingsPatch = trpc.pipelineAnalytics.applyD
11809
11809
  var usePipelineExecutorGetAvailableEngines = trpc.pipelineExecutor.getAvailableEngines.useQuery;
11810
11810
  /** Generated alias around `trpc.pipelineExecutor.getSelectedEngine.useQuery`. */
11811
11811
  var usePipelineExecutorGetSelectedEngine = trpc.pipelineExecutor.getSelectedEngine.useQuery;
11812
- /** Generated alias around `trpc.pipelineExecutor.getDefaultSteps.useQuery`. */
11813
- var usePipelineExecutorGetDefaultSteps = trpc.pipelineExecutor.getDefaultSteps.useQuery;
11814
11812
  /** Generated alias around `trpc.pipelineExecutor.getEngineProvisioning.useQuery`. */
11815
11813
  var usePipelineExecutorGetEngineProvisioning = trpc.pipelineExecutor.getEngineProvisioning.useQuery;
11816
11814
  /** Generated alias around `trpc.pipelineExecutor.getVideoPipelineSteps.useQuery`. */
11817
11815
  var usePipelineExecutorGetVideoPipelineSteps = trpc.pipelineExecutor.getVideoPipelineSteps.useQuery;
11818
11816
  /** Generated alias around `trpc.pipelineExecutor.setVideoPipelineSteps.useMutation`. */
11819
11817
  var usePipelineExecutorSetVideoPipelineSteps = trpc.pipelineExecutor.setVideoPipelineSteps.useMutation;
11820
- /** Generated alias around `trpc.pipelineExecutor.clearDeviceOverrides.useMutation`. */
11821
- var usePipelineExecutorClearDeviceOverrides = trpc.pipelineExecutor.clearDeviceOverrides.useMutation;
11822
- /** Generated alias around `trpc.pipelineExecutor.clearModelBoundDeviceOverrides.useMutation`. */
11823
- var usePipelineExecutorClearModelBoundDeviceOverrides = trpc.pipelineExecutor.clearModelBoundDeviceOverrides.useMutation;
11824
11818
  /** Generated alias around `trpc.pipelineExecutor.getInferenceDeviceHealth.useQuery`. */
11825
11819
  var usePipelineExecutorGetInferenceDeviceHealth = trpc.pipelineExecutor.getInferenceDeviceHealth.useQuery;
11826
11820
  /** Generated alias around `trpc.pipelineExecutor.rearmInferenceDevice.useMutation`. */
11827
11821
  var usePipelineExecutorRearmInferenceDevice = trpc.pipelineExecutor.rearmInferenceDevice.useMutation;
11828
11822
  /** Generated alias around `trpc.pipelineExecutor.getSchema.useQuery`. */
11829
11823
  var usePipelineExecutorGetSchema = trpc.pipelineExecutor.getSchema.useQuery;
11830
- /** Generated alias around `trpc.pipelineExecutor.getGlobalSteps.useQuery`. */
11831
- var usePipelineExecutorGetGlobalSteps = trpc.pipelineExecutor.getGlobalSteps.useQuery;
11832
- /** Generated alias around `trpc.pipelineExecutor.getGlobalPipelineConfig.useQuery`. */
11833
- var usePipelineExecutorGetGlobalPipelineConfig = trpc.pipelineExecutor.getGlobalPipelineConfig.useQuery;
11834
11824
  /** Generated alias around `trpc.pipelineExecutor.getOrchestratorConfigSchema.useQuery`. */
11835
11825
  var usePipelineExecutorGetOrchestratorConfigSchema = trpc.pipelineExecutor.getOrchestratorConfigSchema.useQuery;
11836
11826
  /** Generated alias around `trpc.pipelineExecutor.validatePipeline.useQuery`. */
@@ -11935,6 +11925,8 @@ var usePipelineOrchestratorSetAgentDecodeLimits = trpc.pipelineOrchestrator.setA
11935
11925
  var usePipelineOrchestratorSetAgentReachableHost = trpc.pipelineOrchestrator.setAgentReachableHost.useMutation;
11936
11926
  /** Generated alias around `trpc.pipelineOrchestrator.setAgentInferenceDevices.useMutation`. */
11937
11927
  var usePipelineOrchestratorSetAgentInferenceDevices = trpc.pipelineOrchestrator.setAgentInferenceDevices.useMutation;
11928
+ /** Generated alias around `trpc.pipelineOrchestrator.setNodeStepSettings.useMutation`. */
11929
+ var usePipelineOrchestratorSetNodeStepSettings = trpc.pipelineOrchestrator.setNodeStepSettings.useMutation;
11938
11930
  /** Generated alias around `trpc.pipelineOrchestrator.getNodeInferenceDevices.useQuery`. */
11939
11931
  var usePipelineOrchestratorGetNodeInferenceDevices = trpc.pipelineOrchestrator.getNodeInferenceDevices.useQuery;
11940
11932
  /** Generated alias around `trpc.pipelineOrchestrator.forgetInferenceDevice.useMutation`. */
@@ -11977,14 +11969,8 @@ var usePipelineOrchestratorSetCameraStepToggle = trpc.pipelineOrchestrator.setCa
11977
11969
  var usePipelineOrchestratorGetCameraDetectionSource = trpc.pipelineOrchestrator.getCameraDetectionSource.useQuery;
11978
11970
  /** Generated alias around `trpc.pipelineOrchestrator.setCameraDetectionSource.useMutation`. */
11979
11971
  var usePipelineOrchestratorSetCameraDetectionSource = trpc.pipelineOrchestrator.setCameraDetectionSource.useMutation;
11980
- /** Generated alias around `trpc.pipelineOrchestrator.getCameraStepOverrides.useQuery`. */
11981
- var usePipelineOrchestratorGetCameraStepOverrides = trpc.pipelineOrchestrator.getCameraStepOverrides.useQuery;
11982
- /** Generated alias around `trpc.pipelineOrchestrator.setCameraStepOverride.useMutation`. */
11983
- var usePipelineOrchestratorSetCameraStepOverride = trpc.pipelineOrchestrator.setCameraStepOverride.useMutation;
11984
11972
  /** Generated alias around `trpc.pipelineOrchestrator.setCameraStepSettings.useMutation`. */
11985
11973
  var usePipelineOrchestratorSetCameraStepSettings = trpc.pipelineOrchestrator.setCameraStepSettings.useMutation;
11986
- /** Generated alias around `trpc.pipelineOrchestrator.setCameraPipelineForAgent.useMutation`. */
11987
- var usePipelineOrchestratorSetCameraPipelineForAgent = trpc.pipelineOrchestrator.setCameraPipelineForAgent.useMutation;
11988
11974
  /** Generated alias around `trpc.pipelineOrchestrator.resolvePipeline.useQuery`. */
11989
11975
  var usePipelineOrchestratorResolvePipeline = trpc.pipelineOrchestrator.resolvePipeline.useQuery;
11990
11976
  /** Generated alias around `trpc.pipelineOrchestrator.getCameraSwitches.useQuery`. */
@@ -12573,6 +12559,8 @@ var useTrainingGetJob = trpc.training.getJob.useQuery;
12573
12559
  var useTrainingCancelJob = trpc.training.cancelJob.useMutation;
12574
12560
  /** Generated alias around `trpc.training.getJobResult.useQuery`. */
12575
12561
  var useTrainingGetJobResult = trpc.training.getJobResult.useQuery;
12562
+ /** Generated alias around `trpc.training.listCanaryTargets.useQuery`. */
12563
+ var useTrainingListCanaryTargets = trpc.training.listCanaryTargets.useQuery;
12576
12564
  /** Generated alias around `trpc.training.registerResult.useMutation`. */
12577
12565
  var useTrainingRegisterResult = trpc.training.registerResult.useMutation;
12578
12566
  /** Generated alias around `trpc.training.canaryResult.useMutation`. */
@@ -31849,17 +31837,17 @@ function stepHasModelForFormat(models, format) {
31849
31837
  return stepModelOptions(models, format).length > 0;
31850
31838
  }
31851
31839
  /**
31852
- * The model a step ACTUALLY runs for a (device, camera) — the whole effective
31853
- * chain in one place: per-camera override → per-(node,device) base → the
31854
- * resolved default (`resolveEffectiveDefaultModel`).
31840
+ * The model a step ACTUALLY runs on an accelerator — the whole effective chain
31841
+ * in one place: the per-(node,device) pin → the resolved default
31842
+ * (`resolveEffectiveDefaultModel`). A model is chosen by the accelerator that
31843
+ * runs it (D927); a camera has no layer here.
31855
31844
  *
31856
31845
  * Every surface calls this: the matrix cell, and the drawer's picker seed. They
31857
31846
  * are the same number, and the only way to keep them the same number is to have
31858
- * one function produce it. A surface that owns fewer layers omits them (the node
31859
- * matrix passes no `override`) — it does NOT get its own resolver.
31847
+ * one function produce it.
31860
31848
  */
31861
31849
  function resolveEffectiveStepModel(input) {
31862
- return input.override ?? input.base ?? resolveEffectiveDefaultModel(input.catalog, input.device);
31850
+ return input.base ?? resolveEffectiveDefaultModel(input.catalog, input.device);
31863
31851
  }
31864
31852
  //#endregion
31865
31853
  //#region src/composites/root-model-source.tsx
@@ -32479,9 +32467,36 @@ function ConfigSchemaFieldControl({ field, allFields, step, disabled, modelScope
32479
32467
  }
32480
32468
  //#endregion
32481
32469
  //#region src/composites/step-inspector/setting-values.ts
32470
+ /**
32471
+ * How the step inspector names a stored setting value, and what a field falls
32472
+ * back to when no layer stores it. Pure, so the provenance line and its tests
32473
+ * agree on one spelling.
32474
+ */
32482
32475
  function isValueField(field) {
32483
32476
  return field.type !== "separator" && field.type !== "info" && field.type !== "group";
32484
32477
  }
32478
+ /**
32479
+ * A field only the accelerator that runs the model may set (D927): a model id,
32480
+ * a `<key>ModelId` binding, a `minConfidence*` floor, or any field the schema
32481
+ * marks as bound to its model. A camera never renders one as an input.
32482
+ */
32483
+ function isModelScopedField(field) {
32484
+ if ("bindsToModel" in field && field.bindsToModel === true) return true;
32485
+ return "key" in field && (0, _camstack_types.isModelScopedStepSettingKey)(field.key);
32486
+ }
32487
+ /** The fields a CAMERA may edit: every model-scoped field removed, groups recursed. */
32488
+ function withoutModelScopedFields(fields) {
32489
+ return fields.flatMap((field) => {
32490
+ if (field.type === "group") {
32491
+ const inner = withoutModelScopedFields(field.fields);
32492
+ return inner.length > 0 ? [{
32493
+ ...field,
32494
+ fields: [...inner]
32495
+ }] : [];
32496
+ }
32497
+ return isModelScopedField(field) ? [] : [field];
32498
+ });
32499
+ }
32485
32500
  /** True for a D738 field whose value is stored with the model it was made for. */
32486
32501
  function bindsToModel(field) {
32487
32502
  return (field.type === "slider" || field.type === "number") && field.bindsToModel === true;
@@ -32527,7 +32542,7 @@ function formatSettingValue(field, value) {
32527
32542
  //#region src/composites/step-inspector/layered-settings-form.tsx
32528
32543
  /**
32529
32544
  * LayeredSettingsForm — a detection step's settings, edited on ONE layer
32530
- * (D754): the node base, the camera (every accelerator) or one accelerator.
32545
+ * (D754, D927): the node base or the camera (every accelerator).
32531
32546
  *
32532
32547
  * Every field shows the value that runs on the viewed accelerator, which layer
32533
32548
  * supplies it, the values of the other levels (so "node vs camera" is read, not
@@ -32537,7 +32552,6 @@ function formatSettingValue(field, value) {
32537
32552
  * freezes the levels below it.
32538
32553
  */
32539
32554
  var SOURCE_TONE$1 = {
32540
- accelerator: "border-amber-500/40 bg-amber-500/10 text-amber-500",
32541
32555
  camera: "border-primary/40 bg-primary/10 text-primary",
32542
32556
  node: "border-border bg-muted/40 text-foreground",
32543
32557
  default: "border-border/60 text-foreground-subtle"
@@ -32559,11 +32573,7 @@ function displayStep(addon, modelId, settings) {
32559
32573
  settings: { ...settings }
32560
32574
  };
32561
32575
  }
32562
- var LAYER_IDS = [
32563
- "accelerator",
32564
- "camera",
32565
- "node"
32566
- ];
32576
+ var LAYER_IDS = ["camera", "node"];
32567
32577
  /** "Camera · node 0.65 · model default 0.78 · [Reset to node]" under one field. */
32568
32578
  function SettingProvenance({ field, layers, target, labels, boundKeys, modelId, pinned, disabled, onReset, action }) {
32569
32579
  const t = useUiText();
@@ -32603,7 +32613,7 @@ function SettingProvenance({ field, layers, target, labels, boundKeys, modelId,
32603
32613
  children: withDefault.join(" · ")
32604
32614
  }),
32605
32615
  pinned && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
32606
- className: "rounded border border-amber-500/40 px-1.5 py-px text-amber-500",
32616
+ className: "rounded border border-warning/40 px-1.5 py-px text-warning",
32607
32617
  title: t("uiLibrary.layeredSettings.pinnedHint", "Stored by an older editor as a copy of the value below. It changes nothing today, but it stops later changes below from reaching this camera."),
32608
32618
  children: t("uiLibrary.layeredSettings.pinned", "pinned at the {{source}} value", { source: pinnedAt.toLowerCase() })
32609
32619
  }),
@@ -32620,8 +32630,9 @@ function SettingProvenance({ field, layers, target, labels, boundKeys, modelId,
32620
32630
  ]
32621
32631
  });
32622
32632
  }
32623
- function LayeredSettingsForm({ addon, fields, layers, target, labels, modelId, onChangeLayer, rootModel, pinnedKeys = [], fieldActions, headerActions, highlightKey = null, disabled = false }) {
32633
+ function LayeredSettingsForm({ addon, fields: givenFields, layers, target, labels, modelId, onChangeLayer, rootModel, pinnedKeys = [], fieldActions, headerActions, highlightKey = null, disabled = false }) {
32624
32634
  const t = useUiText();
32635
+ const fields = target === "camera" ? withoutModelScopedFields(givenFields) : givenFields;
32625
32636
  const boundKeys = (0, _camstack_types.collectModelBoundKeys)(fields);
32626
32637
  const effective = (0, _camstack_types.effectiveStepSettings)(layers);
32627
32638
  const targetLayer = layers[target];
@@ -32766,7 +32777,8 @@ function AgentStepEditor({ addon, agentDefault, onChangeAgentConfig, engineForma
32766
32777
  };
32767
32778
  const fields = stepLocalFields(addon);
32768
32779
  const formatDefault = addon.defaultModelIdByFormat?.[engineFormat] ?? addon.defaultModelId;
32769
- const rootSupplied = rootSourceState(addon.id, agentDefault.settings, rootModel)?.effective === true;
32780
+ const settings = agentDefault.settings ?? {};
32781
+ const rootSupplied = rootSourceState(addon.id, settings, rootModel)?.effective === true;
32770
32782
  const runningModel = agentDefault.modelId ?? effectiveModelId;
32771
32783
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
32772
32784
  className: "space-y-4 text-xs",
@@ -32783,15 +32795,15 @@ function AgentStepEditor({ addon, agentDefault, onChangeAgentConfig, engineForma
32783
32795
  defaultModelId: formatDefault,
32784
32796
  onChange: (modelId) => update({ modelId })
32785
32797
  })] }),
32786
- (fields.length > 0 || rootSourceState(addon.id, agentDefault.settings, rootModel)) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
32798
+ (fields.length > 0 || rootSourceState(addon.id, settings, rootModel)) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
32787
32799
  className: "pt-2 border-t border-border/50",
32788
32800
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LayeredSettingsForm, {
32789
32801
  addon,
32790
32802
  fields,
32791
- layers: { node: agentDefault.settings },
32803
+ layers: { node: settings },
32792
32804
  target: "node",
32793
32805
  labels: { node: "This node" },
32794
- modelId: settingsModelIdFor(addon, runningModel, agentDefault.settings, rootModel),
32806
+ modelId: settingsModelIdFor(addon, runningModel, settings, rootModel),
32795
32807
  ...rootModel !== void 0 ? { rootModel } : {},
32796
32808
  onChangeLayer: (settings) => update({ settings })
32797
32809
  })
@@ -61250,6 +61262,7 @@ function RecordEntrySecretField({ name, label, required, value, disabled, onPatc
61250
61262
  function SchemaField(props) {
61251
61263
  const { path, name, node, value, secretPaths, required, disabled, onPatch } = props;
61252
61264
  const label = labelFor(name, node);
61265
+ const uiText = useUiText();
61253
61266
  if (isSecretField(path, secretPaths, node)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RecordEntrySecretField, {
61254
61267
  name,
61255
61268
  label,
@@ -61321,7 +61334,7 @@ function SchemaField(props) {
61321
61334
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FormField$1, {
61322
61335
  label,
61323
61336
  required,
61324
- description: "JSON object",
61337
+ description: uiText("uiLibrary.recordEntries.jsonObject", "JSON object"),
61325
61338
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
61326
61339
  className: cn("min-h-[8rem] w-full resize-y rounded-md border border-border bg-surface px-2.5 py-2 font-mono text-xs text-foreground", "placeholder:text-foreground-subtle focus:outline-none focus:ring-1 focus:ring-inset focus:ring-primary", "disabled:cursor-not-allowed disabled:opacity-50"),
61327
61340
  rows: 6,
@@ -62078,9 +62091,8 @@ function ResponseLog({ data, label = "Response", className = "" }) {
62078
62091
  * `clampToParent` narrows the target dropdown + access checkboxes to
62079
62092
  * what the CALLER possesses. Admins pass `null` to allow everything.
62080
62093
  *
62081
- * This is the RAW editor. The simple, two-question Access panel on
62082
- * `/system/users` composes the same wire shape through `ACCESS_ROLES`; this
62083
- * one is what an operator drops into when a grant set is not a plain role.
62094
+ * This is the RAW editor, for TOKENS. People are not edited here: a person
62095
+ * is an Admin or a Viewer (D921), set from `/system/identity?tab=users`.
62084
62096
  */
62085
62097
  /** `<select>` value → the tri-state `includeLinked` it means. */
62086
62098
  var INCLUDE_LINKED_VALUES = {
@@ -68035,101 +68047,6 @@ var statusIcons = {
68035
68047
  unknown: CircleQuestionMark
68036
68048
  };
68037
68049
  //#endregion
68038
- //#region src/lib/pipeline-mirror.ts
68039
- function findAddonInCatalog(catalog, addonId) {
68040
- for (const slot of catalog.slots) for (const addon of slot.addons) if (addon.id === addonId) return addon;
68041
- return null;
68042
- }
68043
- function findModel(addon, modelId) {
68044
- return addon.models.find((m) => m.id === modelId) ?? null;
68045
- }
68046
- /**
68047
- * The model to adopt on the target when the source's pin has no build there.
68048
- *
68049
- * Options come from the shared step-model primitive, and the CHOICE is the
68050
- * step's own resolved default for that format — not "the first entry in the
68051
- * array", which is how a mirror could land on `yolov8n-package` for a step
68052
- * whose declared default is `rfdetr-package`, disagreeing with the very cell
68053
- * the steps matrix renders right after the mirror.
68054
- */
68055
- function fallbackModelFor(addon, format) {
68056
- const options = stepModelOptions(addon.models, format);
68057
- if (options.length === 0) return null;
68058
- const resolved = resolveStepDefaultModel(addon, format);
68059
- return options.find((m) => m.id === resolved) ?? options[0] ?? null;
68060
- }
68061
- function dropModelSpecific(settings, targetAddon) {
68062
- const allowedKeys = new Set((targetAddon.configSchema ?? []).map((f) => f.key));
68063
- const out = {};
68064
- for (const [k, v] of Object.entries(settings)) if (allowedKeys.has(k)) out[k] = v;
68065
- return out;
68066
- }
68067
- function mirror(input, t = defaultUiText) {
68068
- const { source, target, catalog, addonIds } = input;
68069
- const out = [];
68070
- for (const addonId of addonIds) {
68071
- const srcCfg = source.defaults[addonId];
68072
- if (!srcCfg) {
68073
- out.push({
68074
- addonId,
68075
- outcome: "skip",
68076
- modelId: null,
68077
- reason: t("uiLibrary.pipelineMirror.noSource", "no source entry"),
68078
- patch: null
68079
- });
68080
- continue;
68081
- }
68082
- const targetAddon = findAddonInCatalog(catalog, addonId);
68083
- if (!targetAddon) {
68084
- out.push({
68085
- addonId,
68086
- outcome: "skip",
68087
- modelId: null,
68088
- reason: t("uiLibrary.pipelineMirror.notInCatalog", "addon not in target catalog"),
68089
- patch: null
68090
- });
68091
- continue;
68092
- }
68093
- let chosenModelId;
68094
- let outcome;
68095
- if (srcCfg.modelId === void 0) {
68096
- chosenModelId = void 0;
68097
- outcome = "exact";
68098
- } else {
68099
- const srcModel = findModel(targetAddon, srcCfg.modelId);
68100
- if (srcModel !== null && stepModelOptions([srcModel], target.engine.format).length > 0) {
68101
- chosenModelId = srcCfg.modelId;
68102
- outcome = "exact";
68103
- } else {
68104
- const fallback = fallbackModelFor(targetAddon, target.engine.format);
68105
- if (!fallback) {
68106
- out.push({
68107
- addonId,
68108
- outcome: "skip",
68109
- modelId: null,
68110
- reason: t("uiLibrary.pipelineMirror.noModel", "no compatible model for target format"),
68111
- patch: null
68112
- });
68113
- continue;
68114
- }
68115
- chosenModelId = fallback.id;
68116
- outcome = "mapped";
68117
- }
68118
- }
68119
- const patch = {
68120
- ...chosenModelId ? { modelId: chosenModelId } : {},
68121
- settings: dropModelSpecific(srcCfg.settings, targetAddon)
68122
- };
68123
- out.push({
68124
- addonId,
68125
- outcome,
68126
- modelId: chosenModelId ?? null,
68127
- patch
68128
- });
68129
- }
68130
- return out;
68131
- }
68132
- //#endregion
68133
68050
  //#region src/index.ts
68134
68051
  /** Lazy-wrapped `MaskShapeCanvas` — code-split off the main bundle.
68135
68052
  * Render inside `<Suspense>` at all call sites. */
@@ -68911,6 +68828,7 @@ exports.isFieldVisible = isFieldVisible;
68911
68828
  exports.isGroupExpanded = isGroupExpanded;
68912
68829
  exports.isHistoryWindowId = isHistoryWindowId;
68913
68830
  exports.isKeychainFieldValue = isKeychainFieldValue;
68831
+ exports.isModelScopedField = isModelScopedField;
68914
68832
  exports.isRedactedSecret = isRedactedSecret;
68915
68833
  exports.isRefusal = isRefusal;
68916
68834
  exports.isSecretField = isSecretField;
@@ -68926,7 +68844,6 @@ exports.mapRootDetectorPlacements = mapRootDetectorPlacements;
68926
68844
  exports.mergeSecretForSubmit = mergeSecretForSubmit;
68927
68845
  exports.metadataEntries = metadataEntries;
68928
68846
  exports.metadataString = metadataString;
68929
- exports.mirror = mirror;
68930
68847
  exports.mountAddonPage = mountAddonPage;
68931
68848
  exports.mountPath = mountPath;
68932
68849
  exports.nextGridPosition = nextGridPosition;
@@ -69887,20 +69804,15 @@ exports.usePipelineAnalyticsWipeAllAnalytics = usePipelineAnalyticsWipeAllAnalyt
69887
69804
  exports.usePipelineAnalyticsWipeObjectEmbeddings = usePipelineAnalyticsWipeObjectEmbeddings;
69888
69805
  exports.usePipelineAnalyticsWriteRetrainArchive = usePipelineAnalyticsWriteRetrainArchive;
69889
69806
  exports.usePipelineExecutorCacheFrameInPool = usePipelineExecutorCacheFrameInPool;
69890
- exports.usePipelineExecutorClearDeviceOverrides = usePipelineExecutorClearDeviceOverrides;
69891
- exports.usePipelineExecutorClearModelBoundDeviceOverrides = usePipelineExecutorClearModelBoundDeviceOverrides;
69892
69807
  exports.usePipelineExecutorDeleteModel = usePipelineExecutorDeleteModel;
69893
69808
  exports.usePipelineExecutorDownloadModel = usePipelineExecutorDownloadModel;
69894
69809
  exports.usePipelineExecutorGetAddonModels = usePipelineExecutorGetAddonModels;
69895
69810
  exports.usePipelineExecutorGetAudioCapabilities = usePipelineExecutorGetAudioCapabilities;
69896
69811
  exports.usePipelineExecutorGetAvailableEngines = usePipelineExecutorGetAvailableEngines;
69897
69812
  exports.usePipelineExecutorGetCapabilities = usePipelineExecutorGetCapabilities;
69898
- exports.usePipelineExecutorGetDefaultSteps = usePipelineExecutorGetDefaultSteps;
69899
69813
  exports.usePipelineExecutorGetDetectionConfigSchema = usePipelineExecutorGetDetectionConfigSchema;
69900
69814
  exports.usePipelineExecutorGetEffectiveTuning = usePipelineExecutorGetEffectiveTuning;
69901
69815
  exports.usePipelineExecutorGetEngineProvisioning = usePipelineExecutorGetEngineProvisioning;
69902
- exports.usePipelineExecutorGetGlobalPipelineConfig = usePipelineExecutorGetGlobalPipelineConfig;
69903
- exports.usePipelineExecutorGetGlobalSteps = usePipelineExecutorGetGlobalSteps;
69904
69816
  exports.usePipelineExecutorGetInferenceDeviceHealth = usePipelineExecutorGetInferenceDeviceHealth;
69905
69817
  exports.usePipelineExecutorGetOrchestratorConfigSchema = usePipelineExecutorGetOrchestratorConfigSchema;
69906
69818
  exports.usePipelineExecutorGetReferenceAudio = usePipelineExecutorGetReferenceAudio;
@@ -69938,7 +69850,6 @@ exports.usePipelineOrchestratorGetCameraMetrics = usePipelineOrchestratorGetCame
69938
69850
  exports.usePipelineOrchestratorGetCameraSettings = usePipelineOrchestratorGetCameraSettings;
69939
69851
  exports.usePipelineOrchestratorGetCameraStatus = usePipelineOrchestratorGetCameraStatus;
69940
69852
  exports.usePipelineOrchestratorGetCameraStatuses = usePipelineOrchestratorGetCameraStatuses;
69941
- exports.usePipelineOrchestratorGetCameraStepOverrides = usePipelineOrchestratorGetCameraStepOverrides;
69942
69853
  exports.usePipelineOrchestratorGetCameraSwitches = usePipelineOrchestratorGetCameraSwitches;
69943
69854
  exports.usePipelineOrchestratorGetCapabilityBindings = usePipelineOrchestratorGetCapabilityBindings;
69944
69855
  exports.usePipelineOrchestratorGetClusterModelChoice = usePipelineOrchestratorGetClusterModelChoice;
@@ -69973,14 +69884,13 @@ exports.usePipelineOrchestratorSetAgentInferenceDevices = usePipelineOrchestrato
69973
69884
  exports.usePipelineOrchestratorSetAgentMaxCameras = usePipelineOrchestratorSetAgentMaxCameras;
69974
69885
  exports.usePipelineOrchestratorSetAgentReachableHost = usePipelineOrchestratorSetAgentReachableHost;
69975
69886
  exports.usePipelineOrchestratorSetCameraDetectionSource = usePipelineOrchestratorSetCameraDetectionSource;
69976
- exports.usePipelineOrchestratorSetCameraPipelineForAgent = usePipelineOrchestratorSetCameraPipelineForAgent;
69977
69887
  exports.usePipelineOrchestratorSetCameraSensors = usePipelineOrchestratorSetCameraSensors;
69978
- exports.usePipelineOrchestratorSetCameraStepOverride = usePipelineOrchestratorSetCameraStepOverride;
69979
69888
  exports.usePipelineOrchestratorSetCameraStepSettings = usePipelineOrchestratorSetCameraStepSettings;
69980
69889
  exports.usePipelineOrchestratorSetCameraStepToggle = usePipelineOrchestratorSetCameraStepToggle;
69981
69890
  exports.usePipelineOrchestratorSetCameraSwitch = usePipelineOrchestratorSetCameraSwitch;
69982
69891
  exports.usePipelineOrchestratorSetCapabilityBinding = usePipelineOrchestratorSetCapabilityBinding;
69983
69892
  exports.usePipelineOrchestratorSetLoadBalancingShares = usePipelineOrchestratorSetLoadBalancingShares;
69893
+ exports.usePipelineOrchestratorSetNodeStepSettings = usePipelineOrchestratorSetNodeStepSettings;
69984
69894
  exports.usePipelineOrchestratorSetPipelineDevicePin = usePipelineOrchestratorSetPipelineDevicePin;
69985
69895
  exports.usePipelineOrchestratorSetShareSource = usePipelineOrchestratorSetShareSource;
69986
69896
  exports.usePipelineOrchestratorStartNodeBenchmark = usePipelineOrchestratorStartNodeBenchmark;
@@ -70284,6 +70194,7 @@ exports.useTrainingDiscardResult = useTrainingDiscardResult;
70284
70194
  exports.useTrainingGetJob = useTrainingGetJob;
70285
70195
  exports.useTrainingGetJobResult = useTrainingGetJobResult;
70286
70196
  exports.useTrainingListBaseModels = useTrainingListBaseModels;
70197
+ exports.useTrainingListCanaryTargets = useTrainingListCanaryTargets;
70287
70198
  exports.useTrainingListJobs = useTrainingListJobs;
70288
70199
  exports.useTrainingPlanJob = useTrainingPlanJob;
70289
70200
  exports.useTrainingRegisterResult = useTrainingRegisterResult;
@@ -70382,5 +70293,6 @@ exports.withHiddenChart = withHiddenChart;
70382
70293
  exports.withPanel = withPanel;
70383
70294
  exports.withResolvedParentDetail = withResolvedParentDetail;
70384
70295
  exports.withUseRootModel = withUseRootModel;
70296
+ exports.withoutModelScopedFields = withoutModelScopedFields;
70385
70297
  exports.withoutPanel = withoutPanel;
70386
70298
  exports.writeStoredGroupBy = writeStoredGroupBy;