@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.js CHANGED
@@ -5411,7 +5411,7 @@ var ZodIssueCode = {
5411
5411
  var ZodFirstPartyTypeKind;
5412
5412
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5413
5413
  //#endregion
5414
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5414
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5415
5415
  /**
5416
5416
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5417
5417
  * window to float samples (D455).
@@ -9419,6 +9419,16 @@ var CompositionSchema = object({
9419
9419
  seen.add(feature.cap);
9420
9420
  });
9421
9421
  });
9422
+ var NodeColorIdSchema = _enum([
9423
+ "node-a",
9424
+ "node-b",
9425
+ "node-c",
9426
+ "node-d",
9427
+ "node-e",
9428
+ "node-f",
9429
+ "node-g",
9430
+ "node-h"
9431
+ ]);
9422
9432
  new Set([
9423
9433
  "track",
9424
9434
  "face",
@@ -18881,14 +18891,14 @@ var LlmProfileSchema = object({
18881
18891
  /** ConfigUISchema tree passed through untyped on the wire (the
18882
18892
  * notification-output `ConfigSchemaPassthrough` precedent at
18883
18893
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18884
- var ConfigSchemaPassthrough$1 = unknown();
18894
+ var ConfigSchemaPassthrough$3 = unknown();
18885
18895
  var LlmProfileKindDescriptorSchema = object({
18886
18896
  kind: LlmProfileKindSchema,
18887
18897
  label: string(),
18888
18898
  icon: string(),
18889
18899
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18890
18900
  addonId: string(),
18891
- configSchema: ConfigSchemaPassthrough$1
18901
+ configSchema: ConfigSchemaPassthrough$3
18892
18902
  });
18893
18903
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18894
18904
  var LlmDefaultSchema = object({
@@ -20009,7 +20019,7 @@ var TargetKindCapsSchema = object({
20009
20019
  * the union is large and not meant for runtime validation here; the exported
20010
20020
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
20011
20021
  */
20012
- var ConfigSchemaPassthrough = unknown();
20022
+ var ConfigSchemaPassthrough$2 = unknown();
20013
20023
  var TargetKindSchema = object({
20014
20024
  kind: string(),
20015
20025
  label: string(),
@@ -20046,7 +20056,7 @@ var TargetKindSchema = object({
20046
20056
  * its raster path, which is the safe default for an unknown image.
20047
20057
  */
20048
20058
  iconMediaType: string().optional(),
20049
- configSchema: ConfigSchemaPassthrough,
20059
+ configSchema: ConfigSchemaPassthrough$2,
20050
20060
  /**
20051
20061
  * The config keys that decide WHERE this kind's secrets are sent (server,
20052
20062
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23383,6 +23393,61 @@ var OauthIntegrationDescriptorSchema = object({
23383
23393
  });
23384
23394
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23385
23395
  /**
23396
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23397
+ *
23398
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23399
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23400
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23401
+ * immutable after create.
23402
+ */
23403
+ var ConfigSchemaPassthrough$1 = unknown();
23404
+ var OidcConnectionSchema = object({
23405
+ id: string().min(1),
23406
+ displayName: string(),
23407
+ icon: string(),
23408
+ issuerUrl: string(),
23409
+ clientId: string(),
23410
+ /** Client id + secret present — never the secret value. */
23411
+ configured: boolean(),
23412
+ /**
23413
+ * Values for the connection form schema. `clientSecret` is a keychain
23414
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23415
+ */
23416
+ formValues: record(string(), unknown()).optional()
23417
+ });
23418
+ /**
23419
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23420
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23421
+ */
23422
+ var OidcConnectionUpdateInputSchema = object({
23423
+ id: string().min(1),
23424
+ displayName: string().min(1),
23425
+ icon: string().optional(),
23426
+ issuerUrl: string().optional(),
23427
+ clientId: string().optional(),
23428
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23429
+ redirectUri: string().optional(),
23430
+ scopes: string().optional(),
23431
+ usernameClaim: _enum([
23432
+ "preferred_username",
23433
+ "email",
23434
+ "sub"
23435
+ ]).optional()
23436
+ });
23437
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23438
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23439
+ displayName: string().min(1)
23440
+ }), object({ id: string() }), {
23441
+ kind: "mutation",
23442
+ auth: "admin"
23443
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23444
+ kind: "mutation",
23445
+ auth: "admin"
23446
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23447
+ kind: "mutation",
23448
+ auth: "admin"
23449
+ });
23450
+ /**
23386
23451
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23387
23452
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23388
23453
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24739,24 +24804,69 @@ var RetrainFrameListSchema = object({
24739
24804
  /** What the page pre-selects — the native key frame when one survives. */
24740
24805
  autoPickMediaId: number().int().optional()
24741
24806
  });
24807
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24808
+ var RetrainFrameWorkStateSchema = _enum([
24809
+ "unannotated",
24810
+ "annotated",
24811
+ "complete"
24812
+ ]);
24813
+ /**
24814
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24815
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24816
+ */
24817
+ var RetrainCorpusFilterSchema = object({
24818
+ workState: RetrainFrameWorkStateSchema.optional(),
24819
+ deviceIds: array(number()).max(500).optional(),
24820
+ /** When set, only frames in this named collection. */
24821
+ collectionId: string().optional(),
24822
+ /** Frames that carry at least one saved annotation in one of these classes. */
24823
+ classes: array(RetrainMacroClassSchema).optional(),
24824
+ page: number().int().positive().default(1),
24825
+ pageSize: number().int().positive().max(100).default(50)
24826
+ });
24827
+ var RetrainCorpusPageSchema = object({
24828
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24829
+ total: number().int().nonnegative(),
24830
+ page: number().int().positive(),
24831
+ pageSize: number().int().positive()
24832
+ });
24833
+ var RetrainCorpusKpiCameraRowSchema = object({
24834
+ deviceId: number(),
24835
+ unannotated: number().int().nonnegative(),
24836
+ annotated: number().int().nonnegative(),
24837
+ complete: number().int().nonnegative(),
24838
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24839
+ * `null` when the corpus is empty (no ratio). */
24840
+ pctOfCorpus: number().min(0).max(1).nullable()
24841
+ });
24842
+ var RetrainCorpusKpiSchema = object({
24843
+ total: number().int().nonnegative(),
24844
+ unannotated: number().int().nonnegative(),
24845
+ annotated: number().int().nonnegative(),
24846
+ complete: number().int().nonnegative(),
24847
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24848
+ });
24742
24849
  /**
24743
24850
  * Which frames an annotated export carries. Every field narrows; an empty
24744
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24745
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24746
- * the primitive a version export uses; `batchId` re-selects what an earlier
24747
- * export carried (`exportedInBatch`).
24851
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24852
+ * download uses; `batchId` re-selects what an earlier export carried
24853
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24854
+ * resolves to `frameIds` at plan/start.
24748
24855
  */
24749
24856
  var RetrainExportFilterSchema = object({
24750
24857
  deviceIds: array(number()).optional(),
24751
24858
  frameIds: array(string()).max(2e4).optional(),
24752
24859
  /** Only frames in at least one of these named collections. */
24753
24860
  collectionIds: array(string()).max(200).optional(),
24754
- /** Exactly the frames of this dataset version (and its completeOnly). An
24755
- * unknown id selects nothing. */
24756
- datasetVersionId: string().optional(),
24861
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24862
+ collectionId: string().optional(),
24757
24863
  batchId: string().optional(),
24758
24864
  /** Only frames the operator marked complete (all subjects boxed). */
24759
- completeOnly: boolean().optional()
24865
+ completeOnly: boolean().optional(),
24866
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24867
+ workState: RetrainFrameWorkStateSchema.optional(),
24868
+ /** Frames with at least one saved annotation in one of these classes. */
24869
+ classes: array(RetrainMacroClassSchema).optional()
24760
24870
  });
24761
24871
  /**
24762
24872
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24956,8 +25066,7 @@ var RetrainDatasetStatsSchema = object({
24956
25066
  completeFrames: number().int()
24957
25067
  })).readonly()
24958
25068
  });
24959
- /** An immutable dataset version, without its frame list. */
24960
- var RetrainDatasetVersionSchema = object({
25069
+ object({
24961
25070
  id: string(),
24962
25071
  name: string(),
24963
25072
  createdAt: number(),
@@ -24965,22 +25074,33 @@ var RetrainDatasetVersionSchema = object({
24965
25074
  layout: RetrainExportLayoutSchema,
24966
25075
  completeOnly: boolean(),
24967
25076
  frameCount: number().int(),
24968
- /** sha256 of what the frames taught when the version was frozen. */
24969
25077
  annotationHash: string(),
24970
- /** The export manifest schema the version was cut under. */
24971
25078
  manifestSchema: string(),
24972
25079
  stats: RetrainDatasetStatsSchema
24973
25080
  });
24974
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24975
- kind: literal("created"),
24976
- version: RetrainDatasetVersionSchema
25081
+ /**
25082
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25083
+ * the training cap. Resolved here so plan/start and the annotated export share
25084
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25085
+ */
25086
+ var RetrainTrainingCorpusSelectionSchema = object({
25087
+ collectionIds: array(string()).min(1),
25088
+ workState: _enum([
25089
+ "complete",
25090
+ "annotated_or_complete",
25091
+ "any_annotated"
25092
+ ]).default("complete")
25093
+ });
25094
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25095
+ kind: literal("resolved"),
25096
+ frameIds: array(string()).max(2e4).readonly(),
25097
+ stats: RetrainDatasetStatsSchema,
25098
+ annotationHash: string(),
25099
+ layout: RetrainExportLayoutSchema
24977
25100
  }), object({
24978
25101
  kind: literal("refused"),
24979
- reason: _enum([
24980
- "empty-name",
24981
- "duplicate-name",
24982
- "no-frames"
24983
- ])
25102
+ reason: _enum(["unknown-collection", "no-frames"]),
25103
+ detail: string()
24984
25104
  })]);
24985
25105
  /** The outcome of a lifecycle move owned by the retrain page. */
24986
25106
  var RetrainTransitionResultSchema = object({
@@ -25687,6 +25807,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25687
25807
  }), array(RetrainTrackSchema).readonly(), {
25688
25808
  kind: "query",
25689
25809
  auth: "admin"
25810
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25811
+ kind: "query",
25812
+ auth: "admin"
25813
+ }), method(object({}), RetrainCorpusKpiSchema, {
25814
+ kind: "query",
25815
+ auth: "admin"
25690
25816
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25691
25817
  kind: "query",
25692
25818
  auth: "admin"
@@ -25782,36 +25908,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25782
25908
  kind: "mutation",
25783
25909
  auth: "admin",
25784
25910
  timeoutMs: 12e4
25785
- }), method(object({
25786
- selection: RetrainDatasetSelectionSchema,
25787
- completeOnly: boolean().optional()
25788
- }), RetrainDatasetStatsSchema, {
25789
- kind: "query",
25790
- auth: "admin"
25791
- }), method(object({
25792
- name: string().max(120),
25793
- selection: RetrainDatasetSelectionSchema,
25794
- layout: RetrainExportLayoutSchema,
25795
- completeOnly: boolean()
25796
- }), CreateRetrainDatasetVersionResultSchema, {
25797
- kind: "mutation",
25798
- auth: "admin",
25799
- timeoutMs: 12e4
25800
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25801
- kind: "query",
25802
- auth: "admin"
25803
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25804
- kind: "mutation",
25805
- auth: "admin"
25806
- }), method(object({ id: string() }), object({
25807
- found: boolean(),
25808
- annotationHash: string(),
25809
- matches: boolean(),
25810
- missingFrames: number().int()
25811
- }), {
25812
- kind: "query",
25813
- auth: "admin",
25814
- timeoutMs: 12e4
25815
25911
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25816
25912
  kind: "query",
25817
25913
  auth: "admin"
@@ -25838,6 +25934,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25838
25934
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25839
25935
  kind: "query",
25840
25936
  auth: "admin"
25937
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25938
+ kind: "query",
25939
+ auth: "admin",
25940
+ timeoutMs: 6e4
25841
25941
  }), method(object({
25842
25942
  id: string(),
25843
25943
  name: string().max(120)
@@ -26454,11 +26554,14 @@ var HardwareClassIdSchema = _enum([
26454
26554
  "intel-n-series",
26455
26555
  "apple-m-base",
26456
26556
  "apple-m-pro",
26557
+ "amd-phoenix",
26457
26558
  "unknown"
26458
26559
  ]);
26459
26560
  var AcceleratorKindSchema = _enum([
26460
26561
  "intel-npu",
26461
26562
  "intel-igpu",
26563
+ "amd-igpu",
26564
+ "amd-npu",
26462
26565
  "x86-cpu",
26463
26566
  "arm-cpu",
26464
26567
  "apple-ane",
@@ -28388,6 +28491,8 @@ var AgentPipelineSettingsSchema = object({
28388
28491
  * address is wrong (multi-homed host, NAT, custom interface).
28389
28492
  */
28390
28493
  reachableHost: string().optional(),
28494
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28495
+ color: NodeColorIdSchema.optional(),
28391
28496
  /**
28392
28497
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28393
28498
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28937,8 +29042,9 @@ method(object({
28937
29042
  auth: "admin"
28938
29043
  }), method(object({
28939
29044
  agentNodeId: string(),
28940
- reachableHost: string().nullable()
28941
- }), object({ success: literal(true) }), {
29045
+ reachableHost: string().nullable().optional(),
29046
+ color: NodeColorIdSchema.nullable().optional()
29047
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28942
29048
  kind: "mutation",
28943
29049
  auth: "admin"
28944
29050
  }), method(object({
@@ -32536,7 +32642,7 @@ var CustomActionInputSchema = object({
32536
32642
  action: string().min(1),
32537
32643
  input: unknown()
32538
32644
  });
32539
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32645
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32540
32646
  addonId: string(),
32541
32647
  limit: number().min(1).max(500).default(100),
32542
32648
  level: LogLevelSchema$2.optional()
@@ -38063,6 +38169,7 @@ var OsdNamedTemplateSchema = object({
38063
38169
  });
38064
38170
  /** Where a slot's value comes from. */
38065
38171
  var OsdSourceSchema = discriminatedUnion("kind", [
38172
+ object({ kind: literal("none") }),
38066
38173
  object({
38067
38174
  kind: literal("static"),
38068
38175
  text: string().max(64)
@@ -38189,6 +38296,13 @@ method(object({ deviceId: number().int() }), object({
38189
38296
  }), object({ success: literal(true) }), {
38190
38297
  kind: "mutation",
38191
38298
  auth: "admin"
38299
+ }), method(object({
38300
+ deviceId: number().int(),
38301
+ slotId: string().min(1),
38302
+ enabled: boolean()
38303
+ }), object({ success: literal(true) }), {
38304
+ kind: "mutation",
38305
+ auth: "admin"
38192
38306
  }), method(object({
38193
38307
  sourceDeviceId: number().int(),
38194
38308
  targetDeviceId: number().int()
@@ -38620,7 +38734,15 @@ var GpuInfoSchema = object({
38620
38734
  name: string(),
38621
38735
  memoryMB: number().optional()
38622
38736
  });
38623
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
38737
+ var NpuInfoSchema = object({
38738
+ type: _enum([
38739
+ "apple-ane",
38740
+ "intel-npu",
38741
+ "amd-xdna"
38742
+ ]),
38743
+ name: string().optional(),
38744
+ generation: _enum(["xdna1", "xdna2"]).optional()
38745
+ });
38624
38746
  var CoralInfoSchema = object({
38625
38747
  type: literal("coral-edgetpu"),
38626
38748
  bus: string().optional()
@@ -43878,9 +44000,11 @@ var zoneRulesCapability = {
43878
44000
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
43879
44001
  * manifest entry and nothing else.
43880
44002
  *
43881
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
43882
- * `notification-output` posture); `describe` concat-fans across providers.
43883
- * Every method is `admin`: these spend money.
44003
+ * Collection of provider **types** (addons). Each addon owns zero or more
44004
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
44005
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
44006
+ * `entryId`; callers also pass the owning `addonId` as the collection
44007
+ * selector (broker posture). Every method is `admin`: these spend money.
43884
44008
  *
43885
44009
  * Every cloud object a provider creates is tagged with the orchestrator's
43886
44010
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -43904,8 +44028,8 @@ var TrainingRegionOptionSchema = object({
43904
44028
  priceMultiplier: number().positive()
43905
44029
  });
43906
44030
  /**
43907
- * The provider's per-account settings, as the orchestrator reads them. They
43908
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
44031
+ * The provider's per-entry settings, as the orchestrator reads them. They
44032
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
43909
44033
  * depend on the user's account), never hard-coded in the orchestrator.
43910
44034
  */
43911
44035
  var TrainingProviderDefaultsSchema = object({
@@ -43916,9 +44040,44 @@ var TrainingProviderDefaultsSchema = object({
43916
44040
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43917
44041
  failedDatasetGraceHours: number().nonnegative()
43918
44042
  });
44043
+ /**
44044
+ * Entry form schema for a provider type — same seam as notification
44045
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
44046
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
44047
+ */
44048
+ var ConfigSchemaPassthrough = unknown();
44049
+ /** One creatable provider type, for the Add-entry dialog. */
44050
+ var TrainingProviderTypeSchema = object({
44051
+ typeId: string(),
44052
+ label: string(),
44053
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
44054
+ iconAsset: string(),
44055
+ /** Owning `training-provider` addon — collection selector for createEntry. */
44056
+ addonId: string(),
44057
+ /**
44058
+ * Fields for one entry of this type (credentials + defaults). Absent on a
44059
+ * type that only needs a name. Password fields are keychain-backed on the
44060
+ * provider addon (`secretStatePaths`), not D634 plaintext.
44061
+ */
44062
+ configSchema: ConfigSchemaPassthrough.optional()
44063
+ });
44064
+ /** One configured account / workspace under a provider type. */
44065
+ var TrainingProviderEntrySchema = object({
44066
+ entryId: string(),
44067
+ typeId: string(),
44068
+ name: string(),
44069
+ addonId: string(),
44070
+ /** Credentials are present — never the values. */
44071
+ configured: boolean()
44072
+ });
43919
44073
  var TrainingProviderDescriptorSchema = object({
43920
44074
  addonId: string(),
43921
- /** `modal`, `runpod`, `fake`, … */
44075
+ entryId: string(),
44076
+ typeId: string(),
44077
+ /** Operator-chosen entry name. */
44078
+ name: string(),
44079
+ iconAsset: string(),
44080
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
43922
44081
  kind: string(),
43923
44082
  label: string(),
43924
44083
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43930,7 +44089,30 @@ var TrainingProviderDescriptorSchema = object({
43930
44089
  dataResidencyNote: string(),
43931
44090
  /** Credentials are present — never the values. */
43932
44091
  configured: boolean(),
43933
- defaults: TrainingProviderDefaultsSchema
44092
+ defaults: TrainingProviderDefaultsSchema,
44093
+ /**
44094
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
44095
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
44096
+ * never plaintext. Same hydrate contract as settings forms (D789).
44097
+ */
44098
+ formValues: record(string(), unknown()).optional()
44099
+ });
44100
+ /**
44101
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
44102
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
44103
+ * `{ $secretClear: true }` clears it.
44104
+ */
44105
+ var TrainingProviderUpdateEntryInputSchema = object({
44106
+ entryId: string().min(1),
44107
+ name: string().min(1),
44108
+ tokenId: string().optional(),
44109
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
44110
+ environment: string().optional(),
44111
+ gpuType: string().optional(),
44112
+ region: string().optional(),
44113
+ costCapUsd: number().nonnegative().optional(),
44114
+ maxRuntimeSec: number().int().positive().optional(),
44115
+ failedDatasetGraceHours: number().nonnegative().optional()
43934
44116
  });
43935
44117
  var TrainingCredentialCheckSchema = object({
43936
44118
  ok: boolean(),
@@ -43982,20 +44164,33 @@ var TrainerSourceRefSchema = object({
43982
44164
  /** A commit sha (never a branch) — the job must be reproducible. */
43983
44165
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43984
44166
  });
44167
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43985
44168
  var JobRef = {
43986
- addonId: string(),
44169
+ entryId: string().min(1),
43987
44170
  jobKey: string().uuid()
43988
44171
  };
43989
44172
  var TrainingLogLineSchema = object({
43990
44173
  ts: number(),
43991
44174
  text: string()
43992
44175
  });
43993
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
44176
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
44177
+ typeId: string().min(1),
44178
+ name: string().min(1)
44179
+ }), object({ entryId: string() }), {
44180
+ kind: "mutation",
44181
+ auth: "admin"
44182
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
44183
+ kind: "mutation",
44184
+ auth: "admin"
44185
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
44186
+ kind: "mutation",
44187
+ auth: "admin"
44188
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
43994
44189
  kind: "mutation",
43995
44190
  auth: "admin",
43996
44191
  timeoutMs: 3e4
43997
44192
  }), method(object({
43998
- addonId: string(),
44193
+ entryId: string().min(1),
43999
44194
  gpuType: string(),
44000
44195
  region: string(),
44001
44196
  datasetBytes: number().int().nonnegative(),
@@ -44061,7 +44256,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44061
44256
  kind: "mutation",
44062
44257
  auth: "admin",
44063
44258
  timeoutMs: 5 * 6e4
44064
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
44259
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
44065
44260
  auth: "admin",
44066
44261
  timeoutMs: 2 * 6e4
44067
44262
  });
@@ -44071,20 +44266,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44071
44266
  *
44072
44267
  * It owns what every provider must agree on, written once:
44073
44268
  *
44074
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
44075
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
44076
- * the export plan) and reaches this store through the five row methods
44077
- * below, so the Retrain page and the export did not change.
44078
44269
  * - **Jobs.** A persisted state machine, a reconcile loop against the
44079
44270
  * provider, a cost guard, a daily orphan sweep and the retention rules.
44080
44271
  * - **The return flow.** Verified artefacts → Model Studio
44081
44272
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
44082
44273
  * rollback. Nothing is ever registered automatically.
44083
44274
  *
44275
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
44276
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
44277
+ * moment and snapshotted on the job. No frozen dataset version.
44278
+ *
44084
44279
  * Every method is `admin`.
44085
44280
  */
44086
- /** A version WITH its frame list — what the export and a job read. */
44087
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
44281
+ /**
44282
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
44283
+ * Frame ids are resolved at plan/start — never a frozen version id.
44284
+ */
44285
+ var TrainingCorpusSelectionSchema = object({
44286
+ collectionIds: array(string()).min(1),
44287
+ /** Default complete-only for v1 */
44288
+ workState: _enum([
44289
+ "complete",
44290
+ "annotated_or_complete",
44291
+ "any_annotated"
44292
+ ]).default("complete")
44293
+ });
44088
44294
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
44089
44295
  var TrainingBaseModelSchema = object({
44090
44296
  modelId: string(),
@@ -44102,9 +44308,13 @@ var TrainingPresetSchema = _enum([
44102
44308
  "thorough"
44103
44309
  ]);
44104
44310
  var TrainingJobRequestSchema = object({
44105
- datasetVersionId: string().min(1),
44106
- /** The `training-provider` addon that runs it. */
44107
- addonId: string().min(1),
44311
+ /** Live collection + work-state criteria; resolved at plan/start. */
44312
+ selection: TrainingCorpusSelectionSchema,
44313
+ /**
44314
+ * The provider **entry** that runs it (credentials + defaults).
44315
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
44316
+ */
44317
+ entryId: string().min(1),
44108
44318
  gpuType: string().min(1),
44109
44319
  region: string(),
44110
44320
  baseModelId: string().min(1),
@@ -44163,6 +44373,7 @@ var TrainingJobPlanSchema = object({
44163
44373
  * result lives after the operator acted on it.
44164
44374
  */
44165
44375
  var TrainingJobStateSchema = _enum([
44376
+ "queued",
44166
44377
  "uploading",
44167
44378
  "submitted",
44168
44379
  "starting",
@@ -44216,6 +44427,11 @@ var TrainingJobSchema = object({
44216
44427
  createdAt: number(),
44217
44428
  updatedAt: number(),
44218
44429
  state: TrainingJobStateSchema,
44430
+ /**
44431
+ * Shared by every job enqueued together via `startJobBatch`.
44432
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
44433
+ */
44434
+ batchId: string().nullable().default(null),
44219
44435
  stage: TrainingStageSchema.nullable(),
44220
44436
  failure: object({
44221
44437
  reason: TrainingFailureReasonSchema,
@@ -44227,6 +44443,12 @@ var TrainingJobSchema = object({
44227
44443
  maxRuntimeSec: number().int().positive(),
44228
44444
  trainer: TrainerSourceRefSchema,
44229
44445
  datasetLayout: RetrainExportLayoutSchema,
44446
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
44447
+ frameCount: number().int().nonnegative(),
44448
+ /** Resolved frame ids at start — the archive ships exactly these. */
44449
+ frameIds: array(string()).max(2e4).readonly(),
44450
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
44451
+ annotationHash: string(),
44230
44452
  dataset: object({
44231
44453
  bytes: number().int(),
44232
44454
  sha256: string(),
@@ -44268,13 +44490,7 @@ var TrainingJobSchema = object({
44268
44490
  canary: TrainingCanarySchema.nullable()
44269
44491
  });
44270
44492
  var IdInput = object({ id: string().min(1) });
44271
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44272
- kind: "mutation",
44273
- auth: "admin"
44274
- }), 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() }), {
44275
- kind: "mutation",
44276
- auth: "admin"
44277
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44493
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44278
44494
  auth: "admin",
44279
44495
  timeoutMs: 6e4
44280
44496
  }), method(TrainingJobRequestSchema.extend({
@@ -44293,6 +44509,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44293
44509
  kind: "mutation",
44294
44510
  auth: "admin",
44295
44511
  timeoutMs: 12e4
44512
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
44513
+ baseModelIds: array(string().min(1)).min(1),
44514
+ name: string().min(1).max(120),
44515
+ maxCostUsd: number().positive(),
44516
+ maxRuntimeSec: number().int().positive(),
44517
+ idempotencyKey: string().min(8).max(80)
44518
+ }), discriminatedUnion("kind", [object({
44519
+ kind: literal("started"),
44520
+ batchId: string(),
44521
+ jobs: array(TrainingJobSchema).min(1).readonly()
44522
+ }), object({
44523
+ kind: literal("refused"),
44524
+ reason: TrainingRefusalReasonSchema,
44525
+ detail: string()
44526
+ })]), {
44527
+ kind: "mutation",
44528
+ auth: "admin",
44529
+ timeoutMs: 12e4
44296
44530
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
44297
44531
  kind: "mutation",
44298
44532
  auth: "admin",
@@ -49866,6 +50100,36 @@ Object.freeze({
49866
50100
  addonId: null,
49867
50101
  access: "view"
49868
50102
  },
50103
+ "oidcConnections.connectionFormSchema": {
50104
+ capName: "oidc-connections",
50105
+ capScope: "system",
50106
+ addonId: null,
50107
+ access: "view"
50108
+ },
50109
+ "oidcConnections.createConnection": {
50110
+ capName: "oidc-connections",
50111
+ capScope: "system",
50112
+ addonId: null,
50113
+ access: "create"
50114
+ },
50115
+ "oidcConnections.deleteConnection": {
50116
+ capName: "oidc-connections",
50117
+ capScope: "system",
50118
+ addonId: null,
50119
+ access: "delete"
50120
+ },
50121
+ "oidcConnections.listConnections": {
50122
+ capName: "oidc-connections",
50123
+ capScope: "system",
50124
+ addonId: null,
50125
+ access: "view"
50126
+ },
50127
+ "oidcConnections.updateConnection": {
50128
+ capName: "oidc-connections",
50129
+ capScope: "system",
50130
+ addonId: null,
50131
+ access: "create"
50132
+ },
49869
50133
  "osd.getStatus": {
49870
50134
  capName: "osd",
49871
50135
  capScope: "device",
@@ -49938,6 +50202,12 @@ Object.freeze({
49938
50202
  addonId: null,
49939
50203
  access: "create"
49940
50204
  },
50205
+ "osdManager.setSlotCameraEnabled": {
50206
+ capName: "osd-manager",
50207
+ capScope: "system",
50208
+ addonId: null,
50209
+ access: "create"
50210
+ },
49941
50211
  "osdManager.upsertTemplate": {
49942
50212
  capName: "osd-manager",
49943
50213
  capScope: "system",
@@ -50076,12 +50346,6 @@ Object.freeze({
50076
50346
  addonId: null,
50077
50347
  access: "create"
50078
50348
  },
50079
- "pipelineAnalytics.createRetrainDatasetVersion": {
50080
- capName: "pipeline-analytics",
50081
- capScope: "device",
50082
- addonId: null,
50083
- access: "create"
50084
- },
50085
50349
  "pipelineAnalytics.deleteDeviceEvents": {
50086
50350
  capName: "pipeline-analytics",
50087
50351
  capScope: "device",
@@ -50094,12 +50358,6 @@ Object.freeze({
50094
50358
  addonId: null,
50095
50359
  access: "delete"
50096
50360
  },
50097
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
50098
- capName: "pipeline-analytics",
50099
- capScope: "device",
50100
- addonId: null,
50101
- access: "delete"
50102
- },
50103
50361
  "pipelineAnalytics.deleteTracks": {
50104
50362
  capName: "pipeline-analytics",
50105
50363
  capScope: "device",
@@ -50202,6 +50460,12 @@ Object.freeze({
50202
50460
  addonId: null,
50203
50461
  access: "view"
50204
50462
  },
50463
+ "pipelineAnalytics.getRetrainCorpusKpi": {
50464
+ capName: "pipeline-analytics",
50465
+ capScope: "device",
50466
+ addonId: null,
50467
+ access: "view"
50468
+ },
50205
50469
  "pipelineAnalytics.getRetrainExportUrl": {
50206
50470
  capName: "pipeline-analytics",
50207
50471
  capScope: "device",
@@ -50322,7 +50586,7 @@ Object.freeze({
50322
50586
  addonId: null,
50323
50587
  access: "view"
50324
50588
  },
50325
- "pipelineAnalytics.listRetrainDatasetVersions": {
50589
+ "pipelineAnalytics.listRetrainCorpusPage": {
50326
50590
  capName: "pipeline-analytics",
50327
50591
  capScope: "device",
50328
50592
  addonId: null,
@@ -50376,12 +50640,6 @@ Object.freeze({
50376
50640
  addonId: null,
50377
50641
  access: "create"
50378
50642
  },
50379
- "pipelineAnalytics.previewRetrainDataset": {
50380
- capName: "pipeline-analytics",
50381
- capScope: "device",
50382
- addonId: null,
50383
- access: "view"
50384
- },
50385
50643
  "pipelineAnalytics.proposeRetrainAnnotations": {
50386
50644
  capName: "pipeline-analytics",
50387
50645
  capScope: "device",
@@ -50460,6 +50718,12 @@ Object.freeze({
50460
50718
  addonId: null,
50461
50719
  access: "create"
50462
50720
  },
50721
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
50722
+ capName: "pipeline-analytics",
50723
+ capScope: "device",
50724
+ addonId: null,
50725
+ access: "view"
50726
+ },
50463
50727
  "pipelineAnalytics.restageRetrainTrack": {
50464
50728
  capName: "pipeline-analytics",
50465
50729
  capScope: "device",
@@ -50520,12 +50784,6 @@ Object.freeze({
50520
50784
  addonId: null,
50521
50785
  access: "create"
50522
50786
  },
50523
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50524
- capName: "pipeline-analytics",
50525
- capScope: "device",
50526
- addonId: null,
50527
- access: "view"
50528
- },
50529
50787
  "pipelineAnalytics.wipeAllAnalytics": {
50530
50788
  capName: "pipeline-analytics",
50531
50789
  capScope: "device",
@@ -52920,18 +53178,6 @@ Object.freeze({
52920
53178
  addonId: null,
52921
53179
  access: "create"
52922
53180
  },
52923
- "training.findDatasetVersionIdByName": {
52924
- capName: "training",
52925
- capScope: "system",
52926
- addonId: null,
52927
- access: "view"
52928
- },
52929
- "training.getDatasetVersion": {
52930
- capName: "training",
52931
- capScope: "system",
52932
- addonId: null,
52933
- access: "view"
52934
- },
52935
53181
  "training.getJob": {
52936
53182
  capName: "training",
52937
53183
  capScope: "system",
@@ -52950,12 +53196,6 @@ Object.freeze({
52950
53196
  addonId: null,
52951
53197
  access: "view"
52952
53198
  },
52953
- "training.listDatasetVersions": {
52954
- capName: "training",
52955
- capScope: "system",
52956
- addonId: null,
52957
- access: "view"
52958
- },
52959
53199
  "training.listJobs": {
52960
53200
  capName: "training",
52961
53201
  capScope: "system",
@@ -52968,54 +53208,66 @@ Object.freeze({
52968
53208
  addonId: null,
52969
53209
  access: "view"
52970
53210
  },
52971
- "training.putDatasetVersion": {
53211
+ "training.registerResult": {
52972
53212
  capName: "training",
52973
53213
  capScope: "system",
52974
53214
  addonId: null,
52975
53215
  access: "create"
52976
53216
  },
52977
- "training.registerResult": {
53217
+ "training.rollbackCanary": {
52978
53218
  capName: "training",
52979
53219
  capScope: "system",
52980
53220
  addonId: null,
52981
53221
  access: "create"
52982
53222
  },
52983
- "training.removeDatasetVersion": {
53223
+ "training.startJob": {
52984
53224
  capName: "training",
52985
53225
  capScope: "system",
52986
53226
  addonId: null,
52987
- access: "delete"
53227
+ access: "create"
52988
53228
  },
52989
- "training.rollbackCanary": {
53229
+ "training.startJobBatch": {
52990
53230
  capName: "training",
52991
53231
  capScope: "system",
52992
53232
  addonId: null,
52993
53233
  access: "create"
52994
53234
  },
52995
- "training.startJob": {
52996
- capName: "training",
53235
+ "trainingProvider.cancelJob": {
53236
+ capName: "training-provider",
52997
53237
  capScope: "system",
52998
53238
  addonId: null,
52999
53239
  access: "create"
53000
53240
  },
53001
- "trainingProvider.cancelJob": {
53241
+ "trainingProvider.cleanupJob": {
53002
53242
  capName: "training-provider",
53003
53243
  capScope: "system",
53004
53244
  addonId: null,
53005
53245
  access: "create"
53006
53246
  },
53007
- "trainingProvider.cleanupJob": {
53247
+ "trainingProvider.createEntry": {
53008
53248
  capName: "training-provider",
53009
53249
  capScope: "system",
53010
53250
  addonId: null,
53011
53251
  access: "create"
53012
53252
  },
53253
+ "trainingProvider.deleteEntry": {
53254
+ capName: "training-provider",
53255
+ capScope: "system",
53256
+ addonId: null,
53257
+ access: "delete"
53258
+ },
53013
53259
  "trainingProvider.describe": {
53014
53260
  capName: "training-provider",
53015
53261
  capScope: "system",
53016
53262
  addonId: null,
53017
53263
  access: "view"
53018
53264
  },
53265
+ "trainingProvider.describeTypes": {
53266
+ capName: "training-provider",
53267
+ capScope: "system",
53268
+ addonId: null,
53269
+ access: "view"
53270
+ },
53019
53271
  "trainingProvider.estimateJob": {
53020
53272
  capName: "training-provider",
53021
53273
  capScope: "system",
@@ -53028,6 +53280,12 @@ Object.freeze({
53028
53280
  addonId: null,
53029
53281
  access: "view"
53030
53282
  },
53283
+ "trainingProvider.listEntries": {
53284
+ capName: "training-provider",
53285
+ capScope: "system",
53286
+ addonId: null,
53287
+ access: "view"
53288
+ },
53031
53289
  "trainingProvider.listJobEvents": {
53032
53290
  capName: "training-provider",
53033
53291
  capScope: "system",
@@ -53058,6 +53316,12 @@ Object.freeze({
53058
53316
  addonId: null,
53059
53317
  access: "create"
53060
53318
  },
53319
+ "trainingProvider.updateEntry": {
53320
+ capName: "training-provider",
53321
+ capScope: "system",
53322
+ addonId: null,
53323
+ access: "create"
53324
+ },
53061
53325
  "trainingProvider.uploadDataset": {
53062
53326
  capName: "training-provider",
53063
53327
  capScope: "system",
@@ -56482,6 +56746,11 @@ Object.freeze({
56482
56746
  form: "single",
56483
56747
  optional: false
56484
56748
  }],
56749
+ "osdManager.setSlotCameraEnabled": [{
56750
+ name: "deviceId",
56751
+ form: "single",
56752
+ optional: false
56753
+ }],
56485
56754
  "petFeeder.callPet": [{
56486
56755
  name: "deviceId",
56487
56756
  form: "single",
@@ -56702,6 +56971,11 @@ Object.freeze({
56702
56971
  form: "array",
56703
56972
  optional: false
56704
56973
  }],
56974
+ "pipelineAnalytics.listRetrainCorpusPage": [{
56975
+ name: "deviceIds",
56976
+ form: "array",
56977
+ optional: true
56978
+ }],
56705
56979
  "pipelineAnalytics.listRetrainStaging": [{
56706
56980
  name: "deviceIds",
56707
56981
  form: "array",
@@ -57811,6 +58085,7 @@ Object.freeze({
57811
58085
  });
57812
58086
  Object.freeze({
57813
58087
  "broker": "broker",
58088
+ "calendar-source": "calendar",
57814
58089
  "device-export": "device-export",
57815
58090
  "llm": "ai",
57816
58091
  "mesh-network": "mesh",