@camstack/addon-provider-hikvision 1.2.149 → 1.2.150

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 (3) hide show
  1. package/dist/addon.js +413 -138
  2. package/dist/addon.mjs +413 -138
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -5390,7 +5390,7 @@ var ZodIssueCode = {
5390
5390
  var ZodFirstPartyTypeKind;
5391
5391
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5392
5392
  //#endregion
5393
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5393
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5394
5394
  /**
5395
5395
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5396
5396
  * window to float samples (D455).
@@ -9398,6 +9398,16 @@ var CompositionSchema = object({
9398
9398
  seen.add(feature.cap);
9399
9399
  });
9400
9400
  });
9401
+ var NodeColorIdSchema = _enum([
9402
+ "node-a",
9403
+ "node-b",
9404
+ "node-c",
9405
+ "node-d",
9406
+ "node-e",
9407
+ "node-f",
9408
+ "node-g",
9409
+ "node-h"
9410
+ ]);
9401
9411
  new Set([
9402
9412
  "track",
9403
9413
  "face",
@@ -18860,14 +18870,14 @@ var LlmProfileSchema = object({
18860
18870
  /** ConfigUISchema tree passed through untyped on the wire (the
18861
18871
  * notification-output `ConfigSchemaPassthrough` precedent at
18862
18872
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18863
- var ConfigSchemaPassthrough$1 = unknown();
18873
+ var ConfigSchemaPassthrough$3 = unknown();
18864
18874
  var LlmProfileKindDescriptorSchema = object({
18865
18875
  kind: LlmProfileKindSchema,
18866
18876
  label: string(),
18867
18877
  icon: string(),
18868
18878
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18869
18879
  addonId: string(),
18870
- configSchema: ConfigSchemaPassthrough$1
18880
+ configSchema: ConfigSchemaPassthrough$3
18871
18881
  });
18872
18882
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18873
18883
  var LlmDefaultSchema = object({
@@ -19988,7 +19998,7 @@ var TargetKindCapsSchema = object({
19988
19998
  * the union is large and not meant for runtime validation here; the exported
19989
19999
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19990
20000
  */
19991
- var ConfigSchemaPassthrough = unknown();
20001
+ var ConfigSchemaPassthrough$2 = unknown();
19992
20002
  var TargetKindSchema = object({
19993
20003
  kind: string(),
19994
20004
  label: string(),
@@ -20025,7 +20035,7 @@ var TargetKindSchema = object({
20025
20035
  * its raster path, which is the safe default for an unknown image.
20026
20036
  */
20027
20037
  iconMediaType: string().optional(),
20028
- configSchema: ConfigSchemaPassthrough,
20038
+ configSchema: ConfigSchemaPassthrough$2,
20029
20039
  /**
20030
20040
  * The config keys that decide WHERE this kind's secrets are sent (server,
20031
20041
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23362,6 +23372,61 @@ var OauthIntegrationDescriptorSchema = object({
23362
23372
  });
23363
23373
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23364
23374
  /**
23375
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23376
+ *
23377
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23378
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23379
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23380
+ * immutable after create.
23381
+ */
23382
+ var ConfigSchemaPassthrough$1 = unknown();
23383
+ var OidcConnectionSchema = object({
23384
+ id: string().min(1),
23385
+ displayName: string(),
23386
+ icon: string(),
23387
+ issuerUrl: string(),
23388
+ clientId: string(),
23389
+ /** Client id + secret present — never the secret value. */
23390
+ configured: boolean(),
23391
+ /**
23392
+ * Values for the connection form schema. `clientSecret` is a keychain
23393
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23394
+ */
23395
+ formValues: record(string(), unknown()).optional()
23396
+ });
23397
+ /**
23398
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23399
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23400
+ */
23401
+ var OidcConnectionUpdateInputSchema = object({
23402
+ id: string().min(1),
23403
+ displayName: string().min(1),
23404
+ icon: string().optional(),
23405
+ issuerUrl: string().optional(),
23406
+ clientId: string().optional(),
23407
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23408
+ redirectUri: string().optional(),
23409
+ scopes: string().optional(),
23410
+ usernameClaim: _enum([
23411
+ "preferred_username",
23412
+ "email",
23413
+ "sub"
23414
+ ]).optional()
23415
+ });
23416
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23417
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23418
+ displayName: string().min(1)
23419
+ }), object({ id: string() }), {
23420
+ kind: "mutation",
23421
+ auth: "admin"
23422
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23423
+ kind: "mutation",
23424
+ auth: "admin"
23425
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23426
+ kind: "mutation",
23427
+ auth: "admin"
23428
+ });
23429
+ /**
23365
23430
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23366
23431
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23367
23432
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24718,24 +24783,69 @@ var RetrainFrameListSchema = object({
24718
24783
  /** What the page pre-selects — the native key frame when one survives. */
24719
24784
  autoPickMediaId: number().int().optional()
24720
24785
  });
24786
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24787
+ var RetrainFrameWorkStateSchema = _enum([
24788
+ "unannotated",
24789
+ "annotated",
24790
+ "complete"
24791
+ ]);
24792
+ /**
24793
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24794
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24795
+ */
24796
+ var RetrainCorpusFilterSchema = object({
24797
+ workState: RetrainFrameWorkStateSchema.optional(),
24798
+ deviceIds: array(number()).max(500).optional(),
24799
+ /** When set, only frames in this named collection. */
24800
+ collectionId: string().optional(),
24801
+ /** Frames that carry at least one saved annotation in one of these classes. */
24802
+ classes: array(RetrainMacroClassSchema).optional(),
24803
+ page: number().int().positive().default(1),
24804
+ pageSize: number().int().positive().max(100).default(50)
24805
+ });
24806
+ var RetrainCorpusPageSchema = object({
24807
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24808
+ total: number().int().nonnegative(),
24809
+ page: number().int().positive(),
24810
+ pageSize: number().int().positive()
24811
+ });
24812
+ var RetrainCorpusKpiCameraRowSchema = object({
24813
+ deviceId: number(),
24814
+ unannotated: number().int().nonnegative(),
24815
+ annotated: number().int().nonnegative(),
24816
+ complete: number().int().nonnegative(),
24817
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24818
+ * `null` when the corpus is empty (no ratio). */
24819
+ pctOfCorpus: number().min(0).max(1).nullable()
24820
+ });
24821
+ var RetrainCorpusKpiSchema = object({
24822
+ total: number().int().nonnegative(),
24823
+ unannotated: number().int().nonnegative(),
24824
+ annotated: number().int().nonnegative(),
24825
+ complete: number().int().nonnegative(),
24826
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24827
+ });
24721
24828
  /**
24722
24829
  * Which frames an annotated export carries. Every field narrows; an empty
24723
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24724
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24725
- * the primitive a version export uses; `batchId` re-selects what an earlier
24726
- * export carried (`exportedInBatch`).
24830
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24831
+ * download uses; `batchId` re-selects what an earlier export carried
24832
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24833
+ * resolves to `frameIds` at plan/start.
24727
24834
  */
24728
24835
  var RetrainExportFilterSchema = object({
24729
24836
  deviceIds: array(number()).optional(),
24730
24837
  frameIds: array(string()).max(2e4).optional(),
24731
24838
  /** Only frames in at least one of these named collections. */
24732
24839
  collectionIds: array(string()).max(200).optional(),
24733
- /** Exactly the frames of this dataset version (and its completeOnly). An
24734
- * unknown id selects nothing. */
24735
- datasetVersionId: string().optional(),
24840
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24841
+ collectionId: string().optional(),
24736
24842
  batchId: string().optional(),
24737
24843
  /** Only frames the operator marked complete (all subjects boxed). */
24738
- completeOnly: boolean().optional()
24844
+ completeOnly: boolean().optional(),
24845
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24846
+ workState: RetrainFrameWorkStateSchema.optional(),
24847
+ /** Frames with at least one saved annotation in one of these classes. */
24848
+ classes: array(RetrainMacroClassSchema).optional()
24739
24849
  });
24740
24850
  /**
24741
24851
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24935,8 +25045,7 @@ var RetrainDatasetStatsSchema = object({
24935
25045
  completeFrames: number().int()
24936
25046
  })).readonly()
24937
25047
  });
24938
- /** An immutable dataset version, without its frame list. */
24939
- var RetrainDatasetVersionSchema = object({
25048
+ object({
24940
25049
  id: string(),
24941
25050
  name: string(),
24942
25051
  createdAt: number(),
@@ -24944,22 +25053,33 @@ var RetrainDatasetVersionSchema = object({
24944
25053
  layout: RetrainExportLayoutSchema,
24945
25054
  completeOnly: boolean(),
24946
25055
  frameCount: number().int(),
24947
- /** sha256 of what the frames taught when the version was frozen. */
24948
25056
  annotationHash: string(),
24949
- /** The export manifest schema the version was cut under. */
24950
25057
  manifestSchema: string(),
24951
25058
  stats: RetrainDatasetStatsSchema
24952
25059
  });
24953
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24954
- kind: literal("created"),
24955
- version: RetrainDatasetVersionSchema
25060
+ /**
25061
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25062
+ * the training cap. Resolved here so plan/start and the annotated export share
25063
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25064
+ */
25065
+ var RetrainTrainingCorpusSelectionSchema = object({
25066
+ collectionIds: array(string()).min(1),
25067
+ workState: _enum([
25068
+ "complete",
25069
+ "annotated_or_complete",
25070
+ "any_annotated"
25071
+ ]).default("complete")
25072
+ });
25073
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25074
+ kind: literal("resolved"),
25075
+ frameIds: array(string()).max(2e4).readonly(),
25076
+ stats: RetrainDatasetStatsSchema,
25077
+ annotationHash: string(),
25078
+ layout: RetrainExportLayoutSchema
24956
25079
  }), object({
24957
25080
  kind: literal("refused"),
24958
- reason: _enum([
24959
- "empty-name",
24960
- "duplicate-name",
24961
- "no-frames"
24962
- ])
25081
+ reason: _enum(["unknown-collection", "no-frames"]),
25082
+ detail: string()
24963
25083
  })]);
24964
25084
  /** The outcome of a lifecycle move owned by the retrain page. */
24965
25085
  var RetrainTransitionResultSchema = object({
@@ -25666,6 +25786,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25666
25786
  }), array(RetrainTrackSchema).readonly(), {
25667
25787
  kind: "query",
25668
25788
  auth: "admin"
25789
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25790
+ kind: "query",
25791
+ auth: "admin"
25792
+ }), method(object({}), RetrainCorpusKpiSchema, {
25793
+ kind: "query",
25794
+ auth: "admin"
25669
25795
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25670
25796
  kind: "query",
25671
25797
  auth: "admin"
@@ -25761,36 +25887,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25761
25887
  kind: "mutation",
25762
25888
  auth: "admin",
25763
25889
  timeoutMs: 12e4
25764
- }), method(object({
25765
- selection: RetrainDatasetSelectionSchema,
25766
- completeOnly: boolean().optional()
25767
- }), RetrainDatasetStatsSchema, {
25768
- kind: "query",
25769
- auth: "admin"
25770
- }), method(object({
25771
- name: string().max(120),
25772
- selection: RetrainDatasetSelectionSchema,
25773
- layout: RetrainExportLayoutSchema,
25774
- completeOnly: boolean()
25775
- }), CreateRetrainDatasetVersionResultSchema, {
25776
- kind: "mutation",
25777
- auth: "admin",
25778
- timeoutMs: 12e4
25779
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25780
- kind: "query",
25781
- auth: "admin"
25782
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25783
- kind: "mutation",
25784
- auth: "admin"
25785
- }), method(object({ id: string() }), object({
25786
- found: boolean(),
25787
- annotationHash: string(),
25788
- matches: boolean(),
25789
- missingFrames: number().int()
25790
- }), {
25791
- kind: "query",
25792
- auth: "admin",
25793
- timeoutMs: 12e4
25794
25890
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25795
25891
  kind: "query",
25796
25892
  auth: "admin"
@@ -25817,6 +25913,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25817
25913
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25818
25914
  kind: "query",
25819
25915
  auth: "admin"
25916
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25917
+ kind: "query",
25918
+ auth: "admin",
25919
+ timeoutMs: 6e4
25820
25920
  }), method(object({
25821
25921
  id: string(),
25822
25922
  name: string().max(120)
@@ -26433,11 +26533,14 @@ var HardwareClassIdSchema = _enum([
26433
26533
  "intel-n-series",
26434
26534
  "apple-m-base",
26435
26535
  "apple-m-pro",
26536
+ "amd-phoenix",
26436
26537
  "unknown"
26437
26538
  ]);
26438
26539
  var AcceleratorKindSchema = _enum([
26439
26540
  "intel-npu",
26440
26541
  "intel-igpu",
26542
+ "amd-igpu",
26543
+ "amd-npu",
26441
26544
  "x86-cpu",
26442
26545
  "arm-cpu",
26443
26546
  "apple-ane",
@@ -28367,6 +28470,8 @@ var AgentPipelineSettingsSchema = object({
28367
28470
  * address is wrong (multi-homed host, NAT, custom interface).
28368
28471
  */
28369
28472
  reachableHost: string().optional(),
28473
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28474
+ color: NodeColorIdSchema.optional(),
28370
28475
  /**
28371
28476
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28372
28477
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28916,8 +29021,9 @@ method(object({
28916
29021
  auth: "admin"
28917
29022
  }), method(object({
28918
29023
  agentNodeId: string(),
28919
- reachableHost: string().nullable()
28920
- }), object({ success: literal(true) }), {
29024
+ reachableHost: string().nullable().optional(),
29025
+ color: NodeColorIdSchema.nullable().optional()
29026
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28921
29027
  kind: "mutation",
28922
29028
  auth: "admin"
28923
29029
  }), method(object({
@@ -32515,7 +32621,7 @@ var CustomActionInputSchema = object({
32515
32621
  action: string().min(1),
32516
32622
  input: unknown()
32517
32623
  });
32518
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32624
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32519
32625
  addonId: string(),
32520
32626
  limit: number().min(1).max(500).default(100),
32521
32627
  level: LogLevelSchema$2.optional()
@@ -38042,6 +38148,7 @@ var OsdNamedTemplateSchema = object({
38042
38148
  });
38043
38149
  /** Where a slot's value comes from. */
38044
38150
  var OsdSourceSchema = discriminatedUnion("kind", [
38151
+ object({ kind: literal("none") }),
38045
38152
  object({
38046
38153
  kind: literal("static"),
38047
38154
  text: string().max(64)
@@ -38168,6 +38275,13 @@ method(object({ deviceId: number().int() }), object({
38168
38275
  }), object({ success: literal(true) }), {
38169
38276
  kind: "mutation",
38170
38277
  auth: "admin"
38278
+ }), method(object({
38279
+ deviceId: number().int(),
38280
+ slotId: string().min(1),
38281
+ enabled: boolean()
38282
+ }), object({ success: literal(true) }), {
38283
+ kind: "mutation",
38284
+ auth: "admin"
38171
38285
  }), method(object({
38172
38286
  sourceDeviceId: number().int(),
38173
38287
  targetDeviceId: number().int()
@@ -38599,7 +38713,15 @@ var GpuInfoSchema = object({
38599
38713
  name: string(),
38600
38714
  memoryMB: number().optional()
38601
38715
  });
38602
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
38716
+ var NpuInfoSchema = object({
38717
+ type: _enum([
38718
+ "apple-ane",
38719
+ "intel-npu",
38720
+ "amd-xdna"
38721
+ ]),
38722
+ name: string().optional(),
38723
+ generation: _enum(["xdna1", "xdna2"]).optional()
38724
+ });
38603
38725
  var CoralInfoSchema = object({
38604
38726
  type: literal("coral-edgetpu"),
38605
38727
  bus: string().optional()
@@ -43857,9 +43979,11 @@ var zoneRulesCapability = {
43857
43979
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
43858
43980
  * manifest entry and nothing else.
43859
43981
  *
43860
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
43861
- * `notification-output` posture); `describe` concat-fans across providers.
43862
- * Every method is `admin`: these spend money.
43982
+ * Collection of provider **types** (addons). Each addon owns zero or more
43983
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
43984
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
43985
+ * `entryId`; callers also pass the owning `addonId` as the collection
43986
+ * selector (broker posture). Every method is `admin`: these spend money.
43863
43987
  *
43864
43988
  * Every cloud object a provider creates is tagged with the orchestrator's
43865
43989
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -43883,8 +44007,8 @@ var TrainingRegionOptionSchema = object({
43883
44007
  priceMultiplier: number().positive()
43884
44008
  });
43885
44009
  /**
43886
- * The provider's per-account settings, as the orchestrator reads them. They
43887
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
44010
+ * The provider's per-entry settings, as the orchestrator reads them. They
44011
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
43888
44012
  * depend on the user's account), never hard-coded in the orchestrator.
43889
44013
  */
43890
44014
  var TrainingProviderDefaultsSchema = object({
@@ -43895,9 +44019,44 @@ var TrainingProviderDefaultsSchema = object({
43895
44019
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43896
44020
  failedDatasetGraceHours: number().nonnegative()
43897
44021
  });
44022
+ /**
44023
+ * Entry form schema for a provider type — same seam as notification
44024
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
44025
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
44026
+ */
44027
+ var ConfigSchemaPassthrough = unknown();
44028
+ /** One creatable provider type, for the Add-entry dialog. */
44029
+ var TrainingProviderTypeSchema = object({
44030
+ typeId: string(),
44031
+ label: string(),
44032
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
44033
+ iconAsset: string(),
44034
+ /** Owning `training-provider` addon — collection selector for createEntry. */
44035
+ addonId: string(),
44036
+ /**
44037
+ * Fields for one entry of this type (credentials + defaults). Absent on a
44038
+ * type that only needs a name. Password fields are keychain-backed on the
44039
+ * provider addon (`secretStatePaths`), not D634 plaintext.
44040
+ */
44041
+ configSchema: ConfigSchemaPassthrough.optional()
44042
+ });
44043
+ /** One configured account / workspace under a provider type. */
44044
+ var TrainingProviderEntrySchema = object({
44045
+ entryId: string(),
44046
+ typeId: string(),
44047
+ name: string(),
44048
+ addonId: string(),
44049
+ /** Credentials are present — never the values. */
44050
+ configured: boolean()
44051
+ });
43898
44052
  var TrainingProviderDescriptorSchema = object({
43899
44053
  addonId: string(),
43900
- /** `modal`, `runpod`, `fake`, … */
44054
+ entryId: string(),
44055
+ typeId: string(),
44056
+ /** Operator-chosen entry name. */
44057
+ name: string(),
44058
+ iconAsset: string(),
44059
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
43901
44060
  kind: string(),
43902
44061
  label: string(),
43903
44062
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43909,7 +44068,30 @@ var TrainingProviderDescriptorSchema = object({
43909
44068
  dataResidencyNote: string(),
43910
44069
  /** Credentials are present — never the values. */
43911
44070
  configured: boolean(),
43912
- defaults: TrainingProviderDefaultsSchema
44071
+ defaults: TrainingProviderDefaultsSchema,
44072
+ /**
44073
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
44074
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
44075
+ * never plaintext. Same hydrate contract as settings forms (D789).
44076
+ */
44077
+ formValues: record(string(), unknown()).optional()
44078
+ });
44079
+ /**
44080
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
44081
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
44082
+ * `{ $secretClear: true }` clears it.
44083
+ */
44084
+ var TrainingProviderUpdateEntryInputSchema = object({
44085
+ entryId: string().min(1),
44086
+ name: string().min(1),
44087
+ tokenId: string().optional(),
44088
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
44089
+ environment: string().optional(),
44090
+ gpuType: string().optional(),
44091
+ region: string().optional(),
44092
+ costCapUsd: number().nonnegative().optional(),
44093
+ maxRuntimeSec: number().int().positive().optional(),
44094
+ failedDatasetGraceHours: number().nonnegative().optional()
43913
44095
  });
43914
44096
  var TrainingCredentialCheckSchema = object({
43915
44097
  ok: boolean(),
@@ -43961,20 +44143,33 @@ var TrainerSourceRefSchema = object({
43961
44143
  /** A commit sha (never a branch) — the job must be reproducible. */
43962
44144
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43963
44145
  });
44146
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43964
44147
  var JobRef = {
43965
- addonId: string(),
44148
+ entryId: string().min(1),
43966
44149
  jobKey: string().uuid()
43967
44150
  };
43968
44151
  var TrainingLogLineSchema = object({
43969
44152
  ts: number(),
43970
44153
  text: string()
43971
44154
  });
43972
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
44155
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
44156
+ typeId: string().min(1),
44157
+ name: string().min(1)
44158
+ }), object({ entryId: string() }), {
44159
+ kind: "mutation",
44160
+ auth: "admin"
44161
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
44162
+ kind: "mutation",
44163
+ auth: "admin"
44164
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
44165
+ kind: "mutation",
44166
+ auth: "admin"
44167
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
43973
44168
  kind: "mutation",
43974
44169
  auth: "admin",
43975
44170
  timeoutMs: 3e4
43976
44171
  }), method(object({
43977
- addonId: string(),
44172
+ entryId: string().min(1),
43978
44173
  gpuType: string(),
43979
44174
  region: string(),
43980
44175
  datasetBytes: number().int().nonnegative(),
@@ -44040,7 +44235,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44040
44235
  kind: "mutation",
44041
44236
  auth: "admin",
44042
44237
  timeoutMs: 5 * 6e4
44043
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
44238
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
44044
44239
  auth: "admin",
44045
44240
  timeoutMs: 2 * 6e4
44046
44241
  });
@@ -44050,20 +44245,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44050
44245
  *
44051
44246
  * It owns what every provider must agree on, written once:
44052
44247
  *
44053
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
44054
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
44055
- * the export plan) and reaches this store through the five row methods
44056
- * below, so the Retrain page and the export did not change.
44057
44248
  * - **Jobs.** A persisted state machine, a reconcile loop against the
44058
44249
  * provider, a cost guard, a daily orphan sweep and the retention rules.
44059
44250
  * - **The return flow.** Verified artefacts → Model Studio
44060
44251
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
44061
44252
  * rollback. Nothing is ever registered automatically.
44062
44253
  *
44254
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
44255
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
44256
+ * moment and snapshotted on the job. No frozen dataset version.
44257
+ *
44063
44258
  * Every method is `admin`.
44064
44259
  */
44065
- /** A version WITH its frame list — what the export and a job read. */
44066
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
44260
+ /**
44261
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
44262
+ * Frame ids are resolved at plan/start — never a frozen version id.
44263
+ */
44264
+ var TrainingCorpusSelectionSchema = object({
44265
+ collectionIds: array(string()).min(1),
44266
+ /** Default complete-only for v1 */
44267
+ workState: _enum([
44268
+ "complete",
44269
+ "annotated_or_complete",
44270
+ "any_annotated"
44271
+ ]).default("complete")
44272
+ });
44067
44273
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
44068
44274
  var TrainingBaseModelSchema = object({
44069
44275
  modelId: string(),
@@ -44081,9 +44287,13 @@ var TrainingPresetSchema = _enum([
44081
44287
  "thorough"
44082
44288
  ]);
44083
44289
  var TrainingJobRequestSchema = object({
44084
- datasetVersionId: string().min(1),
44085
- /** The `training-provider` addon that runs it. */
44086
- addonId: string().min(1),
44290
+ /** Live collection + work-state criteria; resolved at plan/start. */
44291
+ selection: TrainingCorpusSelectionSchema,
44292
+ /**
44293
+ * The provider **entry** that runs it (credentials + defaults).
44294
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
44295
+ */
44296
+ entryId: string().min(1),
44087
44297
  gpuType: string().min(1),
44088
44298
  region: string(),
44089
44299
  baseModelId: string().min(1),
@@ -44142,6 +44352,7 @@ var TrainingJobPlanSchema = object({
44142
44352
  * result lives after the operator acted on it.
44143
44353
  */
44144
44354
  var TrainingJobStateSchema = _enum([
44355
+ "queued",
44145
44356
  "uploading",
44146
44357
  "submitted",
44147
44358
  "starting",
@@ -44195,6 +44406,11 @@ var TrainingJobSchema = object({
44195
44406
  createdAt: number(),
44196
44407
  updatedAt: number(),
44197
44408
  state: TrainingJobStateSchema,
44409
+ /**
44410
+ * Shared by every job enqueued together via `startJobBatch`.
44411
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
44412
+ */
44413
+ batchId: string().nullable().default(null),
44198
44414
  stage: TrainingStageSchema.nullable(),
44199
44415
  failure: object({
44200
44416
  reason: TrainingFailureReasonSchema,
@@ -44206,6 +44422,12 @@ var TrainingJobSchema = object({
44206
44422
  maxRuntimeSec: number().int().positive(),
44207
44423
  trainer: TrainerSourceRefSchema,
44208
44424
  datasetLayout: RetrainExportLayoutSchema,
44425
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
44426
+ frameCount: number().int().nonnegative(),
44427
+ /** Resolved frame ids at start — the archive ships exactly these. */
44428
+ frameIds: array(string()).max(2e4).readonly(),
44429
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
44430
+ annotationHash: string(),
44209
44431
  dataset: object({
44210
44432
  bytes: number().int(),
44211
44433
  sha256: string(),
@@ -44247,13 +44469,7 @@ var TrainingJobSchema = object({
44247
44469
  canary: TrainingCanarySchema.nullable()
44248
44470
  });
44249
44471
  var IdInput = object({ id: string().min(1) });
44250
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44251
- kind: "mutation",
44252
- auth: "admin"
44253
- }), method(IdInput, TrainingDatasetVersionRowSchema.nullable(), { auth: "admin" }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), object({ id: string().nullable() }), { auth: "admin" }), method(IdInput, object({ removed: boolean() }), {
44254
- kind: "mutation",
44255
- auth: "admin"
44256
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44472
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44257
44473
  auth: "admin",
44258
44474
  timeoutMs: 6e4
44259
44475
  }), method(TrainingJobRequestSchema.extend({
@@ -44272,6 +44488,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44272
44488
  kind: "mutation",
44273
44489
  auth: "admin",
44274
44490
  timeoutMs: 12e4
44491
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
44492
+ baseModelIds: array(string().min(1)).min(1),
44493
+ name: string().min(1).max(120),
44494
+ maxCostUsd: number().positive(),
44495
+ maxRuntimeSec: number().int().positive(),
44496
+ idempotencyKey: string().min(8).max(80)
44497
+ }), discriminatedUnion("kind", [object({
44498
+ kind: literal("started"),
44499
+ batchId: string(),
44500
+ jobs: array(TrainingJobSchema).min(1).readonly()
44501
+ }), object({
44502
+ kind: literal("refused"),
44503
+ reason: TrainingRefusalReasonSchema,
44504
+ detail: string()
44505
+ })]), {
44506
+ kind: "mutation",
44507
+ auth: "admin",
44508
+ timeoutMs: 12e4
44275
44509
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
44276
44510
  kind: "mutation",
44277
44511
  auth: "admin",
@@ -49845,6 +50079,36 @@ Object.freeze({
49845
50079
  addonId: null,
49846
50080
  access: "view"
49847
50081
  },
50082
+ "oidcConnections.connectionFormSchema": {
50083
+ capName: "oidc-connections",
50084
+ capScope: "system",
50085
+ addonId: null,
50086
+ access: "view"
50087
+ },
50088
+ "oidcConnections.createConnection": {
50089
+ capName: "oidc-connections",
50090
+ capScope: "system",
50091
+ addonId: null,
50092
+ access: "create"
50093
+ },
50094
+ "oidcConnections.deleteConnection": {
50095
+ capName: "oidc-connections",
50096
+ capScope: "system",
50097
+ addonId: null,
50098
+ access: "delete"
50099
+ },
50100
+ "oidcConnections.listConnections": {
50101
+ capName: "oidc-connections",
50102
+ capScope: "system",
50103
+ addonId: null,
50104
+ access: "view"
50105
+ },
50106
+ "oidcConnections.updateConnection": {
50107
+ capName: "oidc-connections",
50108
+ capScope: "system",
50109
+ addonId: null,
50110
+ access: "create"
50111
+ },
49848
50112
  "osd.getStatus": {
49849
50113
  capName: "osd",
49850
50114
  capScope: "device",
@@ -49917,6 +50181,12 @@ Object.freeze({
49917
50181
  addonId: null,
49918
50182
  access: "create"
49919
50183
  },
50184
+ "osdManager.setSlotCameraEnabled": {
50185
+ capName: "osd-manager",
50186
+ capScope: "system",
50187
+ addonId: null,
50188
+ access: "create"
50189
+ },
49920
50190
  "osdManager.upsertTemplate": {
49921
50191
  capName: "osd-manager",
49922
50192
  capScope: "system",
@@ -50055,12 +50325,6 @@ Object.freeze({
50055
50325
  addonId: null,
50056
50326
  access: "create"
50057
50327
  },
50058
- "pipelineAnalytics.createRetrainDatasetVersion": {
50059
- capName: "pipeline-analytics",
50060
- capScope: "device",
50061
- addonId: null,
50062
- access: "create"
50063
- },
50064
50328
  "pipelineAnalytics.deleteDeviceEvents": {
50065
50329
  capName: "pipeline-analytics",
50066
50330
  capScope: "device",
@@ -50073,12 +50337,6 @@ Object.freeze({
50073
50337
  addonId: null,
50074
50338
  access: "delete"
50075
50339
  },
50076
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
50077
- capName: "pipeline-analytics",
50078
- capScope: "device",
50079
- addonId: null,
50080
- access: "delete"
50081
- },
50082
50340
  "pipelineAnalytics.deleteTracks": {
50083
50341
  capName: "pipeline-analytics",
50084
50342
  capScope: "device",
@@ -50181,6 +50439,12 @@ Object.freeze({
50181
50439
  addonId: null,
50182
50440
  access: "view"
50183
50441
  },
50442
+ "pipelineAnalytics.getRetrainCorpusKpi": {
50443
+ capName: "pipeline-analytics",
50444
+ capScope: "device",
50445
+ addonId: null,
50446
+ access: "view"
50447
+ },
50184
50448
  "pipelineAnalytics.getRetrainExportUrl": {
50185
50449
  capName: "pipeline-analytics",
50186
50450
  capScope: "device",
@@ -50301,7 +50565,7 @@ Object.freeze({
50301
50565
  addonId: null,
50302
50566
  access: "view"
50303
50567
  },
50304
- "pipelineAnalytics.listRetrainDatasetVersions": {
50568
+ "pipelineAnalytics.listRetrainCorpusPage": {
50305
50569
  capName: "pipeline-analytics",
50306
50570
  capScope: "device",
50307
50571
  addonId: null,
@@ -50355,12 +50619,6 @@ Object.freeze({
50355
50619
  addonId: null,
50356
50620
  access: "create"
50357
50621
  },
50358
- "pipelineAnalytics.previewRetrainDataset": {
50359
- capName: "pipeline-analytics",
50360
- capScope: "device",
50361
- addonId: null,
50362
- access: "view"
50363
- },
50364
50622
  "pipelineAnalytics.proposeRetrainAnnotations": {
50365
50623
  capName: "pipeline-analytics",
50366
50624
  capScope: "device",
@@ -50439,6 +50697,12 @@ Object.freeze({
50439
50697
  addonId: null,
50440
50698
  access: "create"
50441
50699
  },
50700
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
50701
+ capName: "pipeline-analytics",
50702
+ capScope: "device",
50703
+ addonId: null,
50704
+ access: "view"
50705
+ },
50442
50706
  "pipelineAnalytics.restageRetrainTrack": {
50443
50707
  capName: "pipeline-analytics",
50444
50708
  capScope: "device",
@@ -50499,12 +50763,6 @@ Object.freeze({
50499
50763
  addonId: null,
50500
50764
  access: "create"
50501
50765
  },
50502
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50503
- capName: "pipeline-analytics",
50504
- capScope: "device",
50505
- addonId: null,
50506
- access: "view"
50507
- },
50508
50766
  "pipelineAnalytics.wipeAllAnalytics": {
50509
50767
  capName: "pipeline-analytics",
50510
50768
  capScope: "device",
@@ -52899,18 +53157,6 @@ Object.freeze({
52899
53157
  addonId: null,
52900
53158
  access: "create"
52901
53159
  },
52902
- "training.findDatasetVersionIdByName": {
52903
- capName: "training",
52904
- capScope: "system",
52905
- addonId: null,
52906
- access: "view"
52907
- },
52908
- "training.getDatasetVersion": {
52909
- capName: "training",
52910
- capScope: "system",
52911
- addonId: null,
52912
- access: "view"
52913
- },
52914
53160
  "training.getJob": {
52915
53161
  capName: "training",
52916
53162
  capScope: "system",
@@ -52929,12 +53175,6 @@ Object.freeze({
52929
53175
  addonId: null,
52930
53176
  access: "view"
52931
53177
  },
52932
- "training.listDatasetVersions": {
52933
- capName: "training",
52934
- capScope: "system",
52935
- addonId: null,
52936
- access: "view"
52937
- },
52938
53178
  "training.listJobs": {
52939
53179
  capName: "training",
52940
53180
  capScope: "system",
@@ -52947,54 +53187,66 @@ Object.freeze({
52947
53187
  addonId: null,
52948
53188
  access: "view"
52949
53189
  },
52950
- "training.putDatasetVersion": {
53190
+ "training.registerResult": {
52951
53191
  capName: "training",
52952
53192
  capScope: "system",
52953
53193
  addonId: null,
52954
53194
  access: "create"
52955
53195
  },
52956
- "training.registerResult": {
53196
+ "training.rollbackCanary": {
52957
53197
  capName: "training",
52958
53198
  capScope: "system",
52959
53199
  addonId: null,
52960
53200
  access: "create"
52961
53201
  },
52962
- "training.removeDatasetVersion": {
53202
+ "training.startJob": {
52963
53203
  capName: "training",
52964
53204
  capScope: "system",
52965
53205
  addonId: null,
52966
- access: "delete"
53206
+ access: "create"
52967
53207
  },
52968
- "training.rollbackCanary": {
53208
+ "training.startJobBatch": {
52969
53209
  capName: "training",
52970
53210
  capScope: "system",
52971
53211
  addonId: null,
52972
53212
  access: "create"
52973
53213
  },
52974
- "training.startJob": {
52975
- capName: "training",
53214
+ "trainingProvider.cancelJob": {
53215
+ capName: "training-provider",
52976
53216
  capScope: "system",
52977
53217
  addonId: null,
52978
53218
  access: "create"
52979
53219
  },
52980
- "trainingProvider.cancelJob": {
53220
+ "trainingProvider.cleanupJob": {
52981
53221
  capName: "training-provider",
52982
53222
  capScope: "system",
52983
53223
  addonId: null,
52984
53224
  access: "create"
52985
53225
  },
52986
- "trainingProvider.cleanupJob": {
53226
+ "trainingProvider.createEntry": {
52987
53227
  capName: "training-provider",
52988
53228
  capScope: "system",
52989
53229
  addonId: null,
52990
53230
  access: "create"
52991
53231
  },
53232
+ "trainingProvider.deleteEntry": {
53233
+ capName: "training-provider",
53234
+ capScope: "system",
53235
+ addonId: null,
53236
+ access: "delete"
53237
+ },
52992
53238
  "trainingProvider.describe": {
52993
53239
  capName: "training-provider",
52994
53240
  capScope: "system",
52995
53241
  addonId: null,
52996
53242
  access: "view"
52997
53243
  },
53244
+ "trainingProvider.describeTypes": {
53245
+ capName: "training-provider",
53246
+ capScope: "system",
53247
+ addonId: null,
53248
+ access: "view"
53249
+ },
52998
53250
  "trainingProvider.estimateJob": {
52999
53251
  capName: "training-provider",
53000
53252
  capScope: "system",
@@ -53007,6 +53259,12 @@ Object.freeze({
53007
53259
  addonId: null,
53008
53260
  access: "view"
53009
53261
  },
53262
+ "trainingProvider.listEntries": {
53263
+ capName: "training-provider",
53264
+ capScope: "system",
53265
+ addonId: null,
53266
+ access: "view"
53267
+ },
53010
53268
  "trainingProvider.listJobEvents": {
53011
53269
  capName: "training-provider",
53012
53270
  capScope: "system",
@@ -53037,6 +53295,12 @@ Object.freeze({
53037
53295
  addonId: null,
53038
53296
  access: "create"
53039
53297
  },
53298
+ "trainingProvider.updateEntry": {
53299
+ capName: "training-provider",
53300
+ capScope: "system",
53301
+ addonId: null,
53302
+ access: "create"
53303
+ },
53040
53304
  "trainingProvider.uploadDataset": {
53041
53305
  capName: "training-provider",
53042
53306
  capScope: "system",
@@ -56461,6 +56725,11 @@ Object.freeze({
56461
56725
  form: "single",
56462
56726
  optional: false
56463
56727
  }],
56728
+ "osdManager.setSlotCameraEnabled": [{
56729
+ name: "deviceId",
56730
+ form: "single",
56731
+ optional: false
56732
+ }],
56464
56733
  "petFeeder.callPet": [{
56465
56734
  name: "deviceId",
56466
56735
  form: "single",
@@ -56681,6 +56950,11 @@ Object.freeze({
56681
56950
  form: "array",
56682
56951
  optional: false
56683
56952
  }],
56953
+ "pipelineAnalytics.listRetrainCorpusPage": [{
56954
+ name: "deviceIds",
56955
+ form: "array",
56956
+ optional: true
56957
+ }],
56684
56958
  "pipelineAnalytics.listRetrainStaging": [{
56685
56959
  name: "deviceIds",
56686
56960
  form: "array",
@@ -57790,6 +58064,7 @@ Object.freeze({
57790
58064
  });
57791
58065
  Object.freeze({
57792
58066
  "broker": "broker",
58067
+ "calendar-source": "calendar",
57793
58068
  "device-export": "device-export",
57794
58069
  "llm": "ai",
57795
58070
  "mesh-network": "mesh",