@camstack/addon-provider-hikvision 1.2.148 → 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 +422 -139
  2. package/dist/addon.mjs +422 -139
  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()
@@ -37577,7 +37683,13 @@ var TopologyNodeSchema = object({
37577
37683
  })).readonly(),
37578
37684
  processes: array(TopologyProcessSchema).readonly(),
37579
37685
  categories: array(TopologyCategorySchema).readonly(),
37580
- rootPackage: TopologyRootPackageSchema.nullable()
37686
+ rootPackage: TopologyRootPackageSchema.nullable(),
37687
+ /**
37688
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
37689
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
37690
+ * for offline rows and when the hub cannot tell.
37691
+ */
37692
+ meshTransport: _enum(["tls", "clear"]).optional()
37581
37693
  });
37582
37694
  var CapUsageEdgeSchema = object({
37583
37695
  callerAddonId: string(),
@@ -38036,6 +38148,7 @@ var OsdNamedTemplateSchema = object({
38036
38148
  });
38037
38149
  /** Where a slot's value comes from. */
38038
38150
  var OsdSourceSchema = discriminatedUnion("kind", [
38151
+ object({ kind: literal("none") }),
38039
38152
  object({
38040
38153
  kind: literal("static"),
38041
38154
  text: string().max(64)
@@ -38162,6 +38275,13 @@ method(object({ deviceId: number().int() }), object({
38162
38275
  }), object({ success: literal(true) }), {
38163
38276
  kind: "mutation",
38164
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"
38165
38285
  }), method(object({
38166
38286
  sourceDeviceId: number().int(),
38167
38287
  targetDeviceId: number().int()
@@ -38593,7 +38713,15 @@ var GpuInfoSchema = object({
38593
38713
  name: string(),
38594
38714
  memoryMB: number().optional()
38595
38715
  });
38596
- 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
+ });
38597
38725
  var CoralInfoSchema = object({
38598
38726
  type: literal("coral-edgetpu"),
38599
38727
  bus: string().optional()
@@ -43851,9 +43979,11 @@ var zoneRulesCapability = {
43851
43979
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
43852
43980
  * manifest entry and nothing else.
43853
43981
  *
43854
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
43855
- * `notification-output` posture); `describe` concat-fans across providers.
43856
- * 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.
43857
43987
  *
43858
43988
  * Every cloud object a provider creates is tagged with the orchestrator's
43859
43989
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -43877,8 +44007,8 @@ var TrainingRegionOptionSchema = object({
43877
44007
  priceMultiplier: number().positive()
43878
44008
  });
43879
44009
  /**
43880
- * The provider's per-account settings, as the orchestrator reads them. They
43881
- * 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
43882
44012
  * depend on the user's account), never hard-coded in the orchestrator.
43883
44013
  */
43884
44014
  var TrainingProviderDefaultsSchema = object({
@@ -43889,9 +44019,44 @@ var TrainingProviderDefaultsSchema = object({
43889
44019
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43890
44020
  failedDatasetGraceHours: number().nonnegative()
43891
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
+ });
43892
44052
  var TrainingProviderDescriptorSchema = object({
43893
44053
  addonId: string(),
43894
- /** `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. */
43895
44060
  kind: string(),
43896
44061
  label: string(),
43897
44062
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43903,7 +44068,30 @@ var TrainingProviderDescriptorSchema = object({
43903
44068
  dataResidencyNote: string(),
43904
44069
  /** Credentials are present — never the values. */
43905
44070
  configured: boolean(),
43906
- 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()
43907
44095
  });
43908
44096
  var TrainingCredentialCheckSchema = object({
43909
44097
  ok: boolean(),
@@ -43955,20 +44143,33 @@ var TrainerSourceRefSchema = object({
43955
44143
  /** A commit sha (never a branch) — the job must be reproducible. */
43956
44144
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43957
44145
  });
44146
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43958
44147
  var JobRef = {
43959
- addonId: string(),
44148
+ entryId: string().min(1),
43960
44149
  jobKey: string().uuid()
43961
44150
  };
43962
44151
  var TrainingLogLineSchema = object({
43963
44152
  ts: number(),
43964
44153
  text: string()
43965
44154
  });
43966
- 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, {
43967
44168
  kind: "mutation",
43968
44169
  auth: "admin",
43969
44170
  timeoutMs: 3e4
43970
44171
  }), method(object({
43971
- addonId: string(),
44172
+ entryId: string().min(1),
43972
44173
  gpuType: string(),
43973
44174
  region: string(),
43974
44175
  datasetBytes: number().int().nonnegative(),
@@ -44034,7 +44235,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44034
44235
  kind: "mutation",
44035
44236
  auth: "admin",
44036
44237
  timeoutMs: 5 * 6e4
44037
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
44238
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
44038
44239
  auth: "admin",
44039
44240
  timeoutMs: 2 * 6e4
44040
44241
  });
@@ -44044,20 +44245,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44044
44245
  *
44045
44246
  * It owns what every provider must agree on, written once:
44046
44247
  *
44047
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
44048
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
44049
- * the export plan) and reaches this store through the five row methods
44050
- * below, so the Retrain page and the export did not change.
44051
44248
  * - **Jobs.** A persisted state machine, a reconcile loop against the
44052
44249
  * provider, a cost guard, a daily orphan sweep and the retention rules.
44053
44250
  * - **The return flow.** Verified artefacts → Model Studio
44054
44251
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
44055
44252
  * rollback. Nothing is ever registered automatically.
44056
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
+ *
44057
44258
  * Every method is `admin`.
44058
44259
  */
44059
- /** A version WITH its frame list — what the export and a job read. */
44060
- 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
+ });
44061
44273
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
44062
44274
  var TrainingBaseModelSchema = object({
44063
44275
  modelId: string(),
@@ -44075,9 +44287,13 @@ var TrainingPresetSchema = _enum([
44075
44287
  "thorough"
44076
44288
  ]);
44077
44289
  var TrainingJobRequestSchema = object({
44078
- datasetVersionId: string().min(1),
44079
- /** The `training-provider` addon that runs it. */
44080
- 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),
44081
44297
  gpuType: string().min(1),
44082
44298
  region: string(),
44083
44299
  baseModelId: string().min(1),
@@ -44136,6 +44352,7 @@ var TrainingJobPlanSchema = object({
44136
44352
  * result lives after the operator acted on it.
44137
44353
  */
44138
44354
  var TrainingJobStateSchema = _enum([
44355
+ "queued",
44139
44356
  "uploading",
44140
44357
  "submitted",
44141
44358
  "starting",
@@ -44189,6 +44406,11 @@ var TrainingJobSchema = object({
44189
44406
  createdAt: number(),
44190
44407
  updatedAt: number(),
44191
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),
44192
44414
  stage: TrainingStageSchema.nullable(),
44193
44415
  failure: object({
44194
44416
  reason: TrainingFailureReasonSchema,
@@ -44200,6 +44422,12 @@ var TrainingJobSchema = object({
44200
44422
  maxRuntimeSec: number().int().positive(),
44201
44423
  trainer: TrainerSourceRefSchema,
44202
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(),
44203
44431
  dataset: object({
44204
44432
  bytes: number().int(),
44205
44433
  sha256: string(),
@@ -44241,13 +44469,7 @@ var TrainingJobSchema = object({
44241
44469
  canary: TrainingCanarySchema.nullable()
44242
44470
  });
44243
44471
  var IdInput = object({ id: string().min(1) });
44244
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44245
- kind: "mutation",
44246
- auth: "admin"
44247
- }), 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() }), {
44248
- kind: "mutation",
44249
- auth: "admin"
44250
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44472
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44251
44473
  auth: "admin",
44252
44474
  timeoutMs: 6e4
44253
44475
  }), method(TrainingJobRequestSchema.extend({
@@ -44266,6 +44488,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44266
44488
  kind: "mutation",
44267
44489
  auth: "admin",
44268
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
44269
44509
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
44270
44510
  kind: "mutation",
44271
44511
  auth: "admin",
@@ -49839,6 +50079,36 @@ Object.freeze({
49839
50079
  addonId: null,
49840
50080
  access: "view"
49841
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
+ },
49842
50112
  "osd.getStatus": {
49843
50113
  capName: "osd",
49844
50114
  capScope: "device",
@@ -49911,6 +50181,12 @@ Object.freeze({
49911
50181
  addonId: null,
49912
50182
  access: "create"
49913
50183
  },
50184
+ "osdManager.setSlotCameraEnabled": {
50185
+ capName: "osd-manager",
50186
+ capScope: "system",
50187
+ addonId: null,
50188
+ access: "create"
50189
+ },
49914
50190
  "osdManager.upsertTemplate": {
49915
50191
  capName: "osd-manager",
49916
50192
  capScope: "system",
@@ -50049,12 +50325,6 @@ Object.freeze({
50049
50325
  addonId: null,
50050
50326
  access: "create"
50051
50327
  },
50052
- "pipelineAnalytics.createRetrainDatasetVersion": {
50053
- capName: "pipeline-analytics",
50054
- capScope: "device",
50055
- addonId: null,
50056
- access: "create"
50057
- },
50058
50328
  "pipelineAnalytics.deleteDeviceEvents": {
50059
50329
  capName: "pipeline-analytics",
50060
50330
  capScope: "device",
@@ -50067,12 +50337,6 @@ Object.freeze({
50067
50337
  addonId: null,
50068
50338
  access: "delete"
50069
50339
  },
50070
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
50071
- capName: "pipeline-analytics",
50072
- capScope: "device",
50073
- addonId: null,
50074
- access: "delete"
50075
- },
50076
50340
  "pipelineAnalytics.deleteTracks": {
50077
50341
  capName: "pipeline-analytics",
50078
50342
  capScope: "device",
@@ -50175,6 +50439,12 @@ Object.freeze({
50175
50439
  addonId: null,
50176
50440
  access: "view"
50177
50441
  },
50442
+ "pipelineAnalytics.getRetrainCorpusKpi": {
50443
+ capName: "pipeline-analytics",
50444
+ capScope: "device",
50445
+ addonId: null,
50446
+ access: "view"
50447
+ },
50178
50448
  "pipelineAnalytics.getRetrainExportUrl": {
50179
50449
  capName: "pipeline-analytics",
50180
50450
  capScope: "device",
@@ -50295,7 +50565,7 @@ Object.freeze({
50295
50565
  addonId: null,
50296
50566
  access: "view"
50297
50567
  },
50298
- "pipelineAnalytics.listRetrainDatasetVersions": {
50568
+ "pipelineAnalytics.listRetrainCorpusPage": {
50299
50569
  capName: "pipeline-analytics",
50300
50570
  capScope: "device",
50301
50571
  addonId: null,
@@ -50349,12 +50619,6 @@ Object.freeze({
50349
50619
  addonId: null,
50350
50620
  access: "create"
50351
50621
  },
50352
- "pipelineAnalytics.previewRetrainDataset": {
50353
- capName: "pipeline-analytics",
50354
- capScope: "device",
50355
- addonId: null,
50356
- access: "view"
50357
- },
50358
50622
  "pipelineAnalytics.proposeRetrainAnnotations": {
50359
50623
  capName: "pipeline-analytics",
50360
50624
  capScope: "device",
@@ -50433,6 +50697,12 @@ Object.freeze({
50433
50697
  addonId: null,
50434
50698
  access: "create"
50435
50699
  },
50700
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
50701
+ capName: "pipeline-analytics",
50702
+ capScope: "device",
50703
+ addonId: null,
50704
+ access: "view"
50705
+ },
50436
50706
  "pipelineAnalytics.restageRetrainTrack": {
50437
50707
  capName: "pipeline-analytics",
50438
50708
  capScope: "device",
@@ -50493,12 +50763,6 @@ Object.freeze({
50493
50763
  addonId: null,
50494
50764
  access: "create"
50495
50765
  },
50496
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50497
- capName: "pipeline-analytics",
50498
- capScope: "device",
50499
- addonId: null,
50500
- access: "view"
50501
- },
50502
50766
  "pipelineAnalytics.wipeAllAnalytics": {
50503
50767
  capName: "pipeline-analytics",
50504
50768
  capScope: "device",
@@ -52893,18 +53157,6 @@ Object.freeze({
52893
53157
  addonId: null,
52894
53158
  access: "create"
52895
53159
  },
52896
- "training.findDatasetVersionIdByName": {
52897
- capName: "training",
52898
- capScope: "system",
52899
- addonId: null,
52900
- access: "view"
52901
- },
52902
- "training.getDatasetVersion": {
52903
- capName: "training",
52904
- capScope: "system",
52905
- addonId: null,
52906
- access: "view"
52907
- },
52908
53160
  "training.getJob": {
52909
53161
  capName: "training",
52910
53162
  capScope: "system",
@@ -52923,12 +53175,6 @@ Object.freeze({
52923
53175
  addonId: null,
52924
53176
  access: "view"
52925
53177
  },
52926
- "training.listDatasetVersions": {
52927
- capName: "training",
52928
- capScope: "system",
52929
- addonId: null,
52930
- access: "view"
52931
- },
52932
53178
  "training.listJobs": {
52933
53179
  capName: "training",
52934
53180
  capScope: "system",
@@ -52941,54 +53187,66 @@ Object.freeze({
52941
53187
  addonId: null,
52942
53188
  access: "view"
52943
53189
  },
52944
- "training.putDatasetVersion": {
53190
+ "training.registerResult": {
52945
53191
  capName: "training",
52946
53192
  capScope: "system",
52947
53193
  addonId: null,
52948
53194
  access: "create"
52949
53195
  },
52950
- "training.registerResult": {
53196
+ "training.rollbackCanary": {
52951
53197
  capName: "training",
52952
53198
  capScope: "system",
52953
53199
  addonId: null,
52954
53200
  access: "create"
52955
53201
  },
52956
- "training.removeDatasetVersion": {
53202
+ "training.startJob": {
52957
53203
  capName: "training",
52958
53204
  capScope: "system",
52959
53205
  addonId: null,
52960
- access: "delete"
53206
+ access: "create"
52961
53207
  },
52962
- "training.rollbackCanary": {
53208
+ "training.startJobBatch": {
52963
53209
  capName: "training",
52964
53210
  capScope: "system",
52965
53211
  addonId: null,
52966
53212
  access: "create"
52967
53213
  },
52968
- "training.startJob": {
52969
- capName: "training",
53214
+ "trainingProvider.cancelJob": {
53215
+ capName: "training-provider",
52970
53216
  capScope: "system",
52971
53217
  addonId: null,
52972
53218
  access: "create"
52973
53219
  },
52974
- "trainingProvider.cancelJob": {
53220
+ "trainingProvider.cleanupJob": {
52975
53221
  capName: "training-provider",
52976
53222
  capScope: "system",
52977
53223
  addonId: null,
52978
53224
  access: "create"
52979
53225
  },
52980
- "trainingProvider.cleanupJob": {
53226
+ "trainingProvider.createEntry": {
52981
53227
  capName: "training-provider",
52982
53228
  capScope: "system",
52983
53229
  addonId: null,
52984
53230
  access: "create"
52985
53231
  },
53232
+ "trainingProvider.deleteEntry": {
53233
+ capName: "training-provider",
53234
+ capScope: "system",
53235
+ addonId: null,
53236
+ access: "delete"
53237
+ },
52986
53238
  "trainingProvider.describe": {
52987
53239
  capName: "training-provider",
52988
53240
  capScope: "system",
52989
53241
  addonId: null,
52990
53242
  access: "view"
52991
53243
  },
53244
+ "trainingProvider.describeTypes": {
53245
+ capName: "training-provider",
53246
+ capScope: "system",
53247
+ addonId: null,
53248
+ access: "view"
53249
+ },
52992
53250
  "trainingProvider.estimateJob": {
52993
53251
  capName: "training-provider",
52994
53252
  capScope: "system",
@@ -53001,6 +53259,12 @@ Object.freeze({
53001
53259
  addonId: null,
53002
53260
  access: "view"
53003
53261
  },
53262
+ "trainingProvider.listEntries": {
53263
+ capName: "training-provider",
53264
+ capScope: "system",
53265
+ addonId: null,
53266
+ access: "view"
53267
+ },
53004
53268
  "trainingProvider.listJobEvents": {
53005
53269
  capName: "training-provider",
53006
53270
  capScope: "system",
@@ -53031,6 +53295,12 @@ Object.freeze({
53031
53295
  addonId: null,
53032
53296
  access: "create"
53033
53297
  },
53298
+ "trainingProvider.updateEntry": {
53299
+ capName: "training-provider",
53300
+ capScope: "system",
53301
+ addonId: null,
53302
+ access: "create"
53303
+ },
53034
53304
  "trainingProvider.uploadDataset": {
53035
53305
  capName: "training-provider",
53036
53306
  capScope: "system",
@@ -56455,6 +56725,11 @@ Object.freeze({
56455
56725
  form: "single",
56456
56726
  optional: false
56457
56727
  }],
56728
+ "osdManager.setSlotCameraEnabled": [{
56729
+ name: "deviceId",
56730
+ form: "single",
56731
+ optional: false
56732
+ }],
56458
56733
  "petFeeder.callPet": [{
56459
56734
  name: "deviceId",
56460
56735
  form: "single",
@@ -56675,6 +56950,11 @@ Object.freeze({
56675
56950
  form: "array",
56676
56951
  optional: false
56677
56952
  }],
56953
+ "pipelineAnalytics.listRetrainCorpusPage": [{
56954
+ name: "deviceIds",
56955
+ form: "array",
56956
+ optional: true
56957
+ }],
56678
56958
  "pipelineAnalytics.listRetrainStaging": [{
56679
56959
  name: "deviceIds",
56680
56960
  form: "array",
@@ -57784,6 +58064,7 @@ Object.freeze({
57784
58064
  });
57785
58065
  Object.freeze({
57786
58066
  "broker": "broker",
58067
+ "calendar-source": "calendar",
57787
58068
  "device-export": "device-export",
57788
58069
  "llm": "ai",
57789
58070
  "mesh-network": "mesh",
@@ -58269,6 +58550,8 @@ var STATE_SUMMARY_VARS = [
58269
58550
  [...RULE_TEXT],
58270
58551
  [...RULE_TEXT],
58271
58552
  [...RULE_TEXT],
58553
+ [...RULE_TEXT],
58554
+ [...RULE_TEXT],
58272
58555
  ([...RULE_TEXT], [...UPDATES]),
58273
58556
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
58274
58557
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),