@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.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()
@@ -37598,7 +37704,13 @@ var TopologyNodeSchema = object({
37598
37704
  })).readonly(),
37599
37705
  processes: array(TopologyProcessSchema).readonly(),
37600
37706
  categories: array(TopologyCategorySchema).readonly(),
37601
- rootPackage: TopologyRootPackageSchema.nullable()
37707
+ rootPackage: TopologyRootPackageSchema.nullable(),
37708
+ /**
37709
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
37710
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
37711
+ * for offline rows and when the hub cannot tell.
37712
+ */
37713
+ meshTransport: _enum(["tls", "clear"]).optional()
37602
37714
  });
37603
37715
  var CapUsageEdgeSchema = object({
37604
37716
  callerAddonId: string(),
@@ -38057,6 +38169,7 @@ var OsdNamedTemplateSchema = object({
38057
38169
  });
38058
38170
  /** Where a slot's value comes from. */
38059
38171
  var OsdSourceSchema = discriminatedUnion("kind", [
38172
+ object({ kind: literal("none") }),
38060
38173
  object({
38061
38174
  kind: literal("static"),
38062
38175
  text: string().max(64)
@@ -38183,6 +38296,13 @@ method(object({ deviceId: number().int() }), object({
38183
38296
  }), object({ success: literal(true) }), {
38184
38297
  kind: "mutation",
38185
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"
38186
38306
  }), method(object({
38187
38307
  sourceDeviceId: number().int(),
38188
38308
  targetDeviceId: number().int()
@@ -38614,7 +38734,15 @@ var GpuInfoSchema = object({
38614
38734
  name: string(),
38615
38735
  memoryMB: number().optional()
38616
38736
  });
38617
- 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
+ });
38618
38746
  var CoralInfoSchema = object({
38619
38747
  type: literal("coral-edgetpu"),
38620
38748
  bus: string().optional()
@@ -43872,9 +44000,11 @@ var zoneRulesCapability = {
43872
44000
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
43873
44001
  * manifest entry and nothing else.
43874
44002
  *
43875
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
43876
- * `notification-output` posture); `describe` concat-fans across providers.
43877
- * 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.
43878
44008
  *
43879
44009
  * Every cloud object a provider creates is tagged with the orchestrator's
43880
44010
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -43898,8 +44028,8 @@ var TrainingRegionOptionSchema = object({
43898
44028
  priceMultiplier: number().positive()
43899
44029
  });
43900
44030
  /**
43901
- * The provider's per-account settings, as the orchestrator reads them. They
43902
- * 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
43903
44033
  * depend on the user's account), never hard-coded in the orchestrator.
43904
44034
  */
43905
44035
  var TrainingProviderDefaultsSchema = object({
@@ -43910,9 +44040,44 @@ var TrainingProviderDefaultsSchema = object({
43910
44040
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43911
44041
  failedDatasetGraceHours: number().nonnegative()
43912
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
+ });
43913
44073
  var TrainingProviderDescriptorSchema = object({
43914
44074
  addonId: string(),
43915
- /** `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. */
43916
44081
  kind: string(),
43917
44082
  label: string(),
43918
44083
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43924,7 +44089,30 @@ var TrainingProviderDescriptorSchema = object({
43924
44089
  dataResidencyNote: string(),
43925
44090
  /** Credentials are present — never the values. */
43926
44091
  configured: boolean(),
43927
- 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()
43928
44116
  });
43929
44117
  var TrainingCredentialCheckSchema = object({
43930
44118
  ok: boolean(),
@@ -43976,20 +44164,33 @@ var TrainerSourceRefSchema = object({
43976
44164
  /** A commit sha (never a branch) — the job must be reproducible. */
43977
44165
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43978
44166
  });
44167
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43979
44168
  var JobRef = {
43980
- addonId: string(),
44169
+ entryId: string().min(1),
43981
44170
  jobKey: string().uuid()
43982
44171
  };
43983
44172
  var TrainingLogLineSchema = object({
43984
44173
  ts: number(),
43985
44174
  text: string()
43986
44175
  });
43987
- 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, {
43988
44189
  kind: "mutation",
43989
44190
  auth: "admin",
43990
44191
  timeoutMs: 3e4
43991
44192
  }), method(object({
43992
- addonId: string(),
44193
+ entryId: string().min(1),
43993
44194
  gpuType: string(),
43994
44195
  region: string(),
43995
44196
  datasetBytes: number().int().nonnegative(),
@@ -44055,7 +44256,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44055
44256
  kind: "mutation",
44056
44257
  auth: "admin",
44057
44258
  timeoutMs: 5 * 6e4
44058
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
44259
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
44059
44260
  auth: "admin",
44060
44261
  timeoutMs: 2 * 6e4
44061
44262
  });
@@ -44065,20 +44266,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
44065
44266
  *
44066
44267
  * It owns what every provider must agree on, written once:
44067
44268
  *
44068
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
44069
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
44070
- * the export plan) and reaches this store through the five row methods
44071
- * below, so the Retrain page and the export did not change.
44072
44269
  * - **Jobs.** A persisted state machine, a reconcile loop against the
44073
44270
  * provider, a cost guard, a daily orphan sweep and the retention rules.
44074
44271
  * - **The return flow.** Verified artefacts → Model Studio
44075
44272
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
44076
44273
  * rollback. Nothing is ever registered automatically.
44077
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
+ *
44078
44279
  * Every method is `admin`.
44079
44280
  */
44080
- /** A version WITH its frame list — what the export and a job read. */
44081
- 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
+ });
44082
44294
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
44083
44295
  var TrainingBaseModelSchema = object({
44084
44296
  modelId: string(),
@@ -44096,9 +44308,13 @@ var TrainingPresetSchema = _enum([
44096
44308
  "thorough"
44097
44309
  ]);
44098
44310
  var TrainingJobRequestSchema = object({
44099
- datasetVersionId: string().min(1),
44100
- /** The `training-provider` addon that runs it. */
44101
- 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),
44102
44318
  gpuType: string().min(1),
44103
44319
  region: string(),
44104
44320
  baseModelId: string().min(1),
@@ -44157,6 +44373,7 @@ var TrainingJobPlanSchema = object({
44157
44373
  * result lives after the operator acted on it.
44158
44374
  */
44159
44375
  var TrainingJobStateSchema = _enum([
44376
+ "queued",
44160
44377
  "uploading",
44161
44378
  "submitted",
44162
44379
  "starting",
@@ -44210,6 +44427,11 @@ var TrainingJobSchema = object({
44210
44427
  createdAt: number(),
44211
44428
  updatedAt: number(),
44212
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),
44213
44435
  stage: TrainingStageSchema.nullable(),
44214
44436
  failure: object({
44215
44437
  reason: TrainingFailureReasonSchema,
@@ -44221,6 +44443,12 @@ var TrainingJobSchema = object({
44221
44443
  maxRuntimeSec: number().int().positive(),
44222
44444
  trainer: TrainerSourceRefSchema,
44223
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(),
44224
44452
  dataset: object({
44225
44453
  bytes: number().int(),
44226
44454
  sha256: string(),
@@ -44262,13 +44490,7 @@ var TrainingJobSchema = object({
44262
44490
  canary: TrainingCanarySchema.nullable()
44263
44491
  });
44264
44492
  var IdInput = object({ id: string().min(1) });
44265
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44266
- kind: "mutation",
44267
- auth: "admin"
44268
- }), 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() }), {
44269
- kind: "mutation",
44270
- auth: "admin"
44271
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44493
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44272
44494
  auth: "admin",
44273
44495
  timeoutMs: 6e4
44274
44496
  }), method(TrainingJobRequestSchema.extend({
@@ -44287,6 +44509,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
44287
44509
  kind: "mutation",
44288
44510
  auth: "admin",
44289
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
44290
44530
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
44291
44531
  kind: "mutation",
44292
44532
  auth: "admin",
@@ -49860,6 +50100,36 @@ Object.freeze({
49860
50100
  addonId: null,
49861
50101
  access: "view"
49862
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
+ },
49863
50133
  "osd.getStatus": {
49864
50134
  capName: "osd",
49865
50135
  capScope: "device",
@@ -49932,6 +50202,12 @@ Object.freeze({
49932
50202
  addonId: null,
49933
50203
  access: "create"
49934
50204
  },
50205
+ "osdManager.setSlotCameraEnabled": {
50206
+ capName: "osd-manager",
50207
+ capScope: "system",
50208
+ addonId: null,
50209
+ access: "create"
50210
+ },
49935
50211
  "osdManager.upsertTemplate": {
49936
50212
  capName: "osd-manager",
49937
50213
  capScope: "system",
@@ -50070,12 +50346,6 @@ Object.freeze({
50070
50346
  addonId: null,
50071
50347
  access: "create"
50072
50348
  },
50073
- "pipelineAnalytics.createRetrainDatasetVersion": {
50074
- capName: "pipeline-analytics",
50075
- capScope: "device",
50076
- addonId: null,
50077
- access: "create"
50078
- },
50079
50349
  "pipelineAnalytics.deleteDeviceEvents": {
50080
50350
  capName: "pipeline-analytics",
50081
50351
  capScope: "device",
@@ -50088,12 +50358,6 @@ Object.freeze({
50088
50358
  addonId: null,
50089
50359
  access: "delete"
50090
50360
  },
50091
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
50092
- capName: "pipeline-analytics",
50093
- capScope: "device",
50094
- addonId: null,
50095
- access: "delete"
50096
- },
50097
50361
  "pipelineAnalytics.deleteTracks": {
50098
50362
  capName: "pipeline-analytics",
50099
50363
  capScope: "device",
@@ -50196,6 +50460,12 @@ Object.freeze({
50196
50460
  addonId: null,
50197
50461
  access: "view"
50198
50462
  },
50463
+ "pipelineAnalytics.getRetrainCorpusKpi": {
50464
+ capName: "pipeline-analytics",
50465
+ capScope: "device",
50466
+ addonId: null,
50467
+ access: "view"
50468
+ },
50199
50469
  "pipelineAnalytics.getRetrainExportUrl": {
50200
50470
  capName: "pipeline-analytics",
50201
50471
  capScope: "device",
@@ -50316,7 +50586,7 @@ Object.freeze({
50316
50586
  addonId: null,
50317
50587
  access: "view"
50318
50588
  },
50319
- "pipelineAnalytics.listRetrainDatasetVersions": {
50589
+ "pipelineAnalytics.listRetrainCorpusPage": {
50320
50590
  capName: "pipeline-analytics",
50321
50591
  capScope: "device",
50322
50592
  addonId: null,
@@ -50370,12 +50640,6 @@ Object.freeze({
50370
50640
  addonId: null,
50371
50641
  access: "create"
50372
50642
  },
50373
- "pipelineAnalytics.previewRetrainDataset": {
50374
- capName: "pipeline-analytics",
50375
- capScope: "device",
50376
- addonId: null,
50377
- access: "view"
50378
- },
50379
50643
  "pipelineAnalytics.proposeRetrainAnnotations": {
50380
50644
  capName: "pipeline-analytics",
50381
50645
  capScope: "device",
@@ -50454,6 +50718,12 @@ Object.freeze({
50454
50718
  addonId: null,
50455
50719
  access: "create"
50456
50720
  },
50721
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
50722
+ capName: "pipeline-analytics",
50723
+ capScope: "device",
50724
+ addonId: null,
50725
+ access: "view"
50726
+ },
50457
50727
  "pipelineAnalytics.restageRetrainTrack": {
50458
50728
  capName: "pipeline-analytics",
50459
50729
  capScope: "device",
@@ -50514,12 +50784,6 @@ Object.freeze({
50514
50784
  addonId: null,
50515
50785
  access: "create"
50516
50786
  },
50517
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50518
- capName: "pipeline-analytics",
50519
- capScope: "device",
50520
- addonId: null,
50521
- access: "view"
50522
- },
50523
50787
  "pipelineAnalytics.wipeAllAnalytics": {
50524
50788
  capName: "pipeline-analytics",
50525
50789
  capScope: "device",
@@ -52914,18 +53178,6 @@ Object.freeze({
52914
53178
  addonId: null,
52915
53179
  access: "create"
52916
53180
  },
52917
- "training.findDatasetVersionIdByName": {
52918
- capName: "training",
52919
- capScope: "system",
52920
- addonId: null,
52921
- access: "view"
52922
- },
52923
- "training.getDatasetVersion": {
52924
- capName: "training",
52925
- capScope: "system",
52926
- addonId: null,
52927
- access: "view"
52928
- },
52929
53181
  "training.getJob": {
52930
53182
  capName: "training",
52931
53183
  capScope: "system",
@@ -52944,12 +53196,6 @@ Object.freeze({
52944
53196
  addonId: null,
52945
53197
  access: "view"
52946
53198
  },
52947
- "training.listDatasetVersions": {
52948
- capName: "training",
52949
- capScope: "system",
52950
- addonId: null,
52951
- access: "view"
52952
- },
52953
53199
  "training.listJobs": {
52954
53200
  capName: "training",
52955
53201
  capScope: "system",
@@ -52962,54 +53208,66 @@ Object.freeze({
52962
53208
  addonId: null,
52963
53209
  access: "view"
52964
53210
  },
52965
- "training.putDatasetVersion": {
53211
+ "training.registerResult": {
52966
53212
  capName: "training",
52967
53213
  capScope: "system",
52968
53214
  addonId: null,
52969
53215
  access: "create"
52970
53216
  },
52971
- "training.registerResult": {
53217
+ "training.rollbackCanary": {
52972
53218
  capName: "training",
52973
53219
  capScope: "system",
52974
53220
  addonId: null,
52975
53221
  access: "create"
52976
53222
  },
52977
- "training.removeDatasetVersion": {
53223
+ "training.startJob": {
52978
53224
  capName: "training",
52979
53225
  capScope: "system",
52980
53226
  addonId: null,
52981
- access: "delete"
53227
+ access: "create"
52982
53228
  },
52983
- "training.rollbackCanary": {
53229
+ "training.startJobBatch": {
52984
53230
  capName: "training",
52985
53231
  capScope: "system",
52986
53232
  addonId: null,
52987
53233
  access: "create"
52988
53234
  },
52989
- "training.startJob": {
52990
- capName: "training",
53235
+ "trainingProvider.cancelJob": {
53236
+ capName: "training-provider",
52991
53237
  capScope: "system",
52992
53238
  addonId: null,
52993
53239
  access: "create"
52994
53240
  },
52995
- "trainingProvider.cancelJob": {
53241
+ "trainingProvider.cleanupJob": {
52996
53242
  capName: "training-provider",
52997
53243
  capScope: "system",
52998
53244
  addonId: null,
52999
53245
  access: "create"
53000
53246
  },
53001
- "trainingProvider.cleanupJob": {
53247
+ "trainingProvider.createEntry": {
53002
53248
  capName: "training-provider",
53003
53249
  capScope: "system",
53004
53250
  addonId: null,
53005
53251
  access: "create"
53006
53252
  },
53253
+ "trainingProvider.deleteEntry": {
53254
+ capName: "training-provider",
53255
+ capScope: "system",
53256
+ addonId: null,
53257
+ access: "delete"
53258
+ },
53007
53259
  "trainingProvider.describe": {
53008
53260
  capName: "training-provider",
53009
53261
  capScope: "system",
53010
53262
  addonId: null,
53011
53263
  access: "view"
53012
53264
  },
53265
+ "trainingProvider.describeTypes": {
53266
+ capName: "training-provider",
53267
+ capScope: "system",
53268
+ addonId: null,
53269
+ access: "view"
53270
+ },
53013
53271
  "trainingProvider.estimateJob": {
53014
53272
  capName: "training-provider",
53015
53273
  capScope: "system",
@@ -53022,6 +53280,12 @@ Object.freeze({
53022
53280
  addonId: null,
53023
53281
  access: "view"
53024
53282
  },
53283
+ "trainingProvider.listEntries": {
53284
+ capName: "training-provider",
53285
+ capScope: "system",
53286
+ addonId: null,
53287
+ access: "view"
53288
+ },
53025
53289
  "trainingProvider.listJobEvents": {
53026
53290
  capName: "training-provider",
53027
53291
  capScope: "system",
@@ -53052,6 +53316,12 @@ Object.freeze({
53052
53316
  addonId: null,
53053
53317
  access: "create"
53054
53318
  },
53319
+ "trainingProvider.updateEntry": {
53320
+ capName: "training-provider",
53321
+ capScope: "system",
53322
+ addonId: null,
53323
+ access: "create"
53324
+ },
53055
53325
  "trainingProvider.uploadDataset": {
53056
53326
  capName: "training-provider",
53057
53327
  capScope: "system",
@@ -56476,6 +56746,11 @@ Object.freeze({
56476
56746
  form: "single",
56477
56747
  optional: false
56478
56748
  }],
56749
+ "osdManager.setSlotCameraEnabled": [{
56750
+ name: "deviceId",
56751
+ form: "single",
56752
+ optional: false
56753
+ }],
56479
56754
  "petFeeder.callPet": [{
56480
56755
  name: "deviceId",
56481
56756
  form: "single",
@@ -56696,6 +56971,11 @@ Object.freeze({
56696
56971
  form: "array",
56697
56972
  optional: false
56698
56973
  }],
56974
+ "pipelineAnalytics.listRetrainCorpusPage": [{
56975
+ name: "deviceIds",
56976
+ form: "array",
56977
+ optional: true
56978
+ }],
56699
56979
  "pipelineAnalytics.listRetrainStaging": [{
56700
56980
  name: "deviceIds",
56701
56981
  form: "array",
@@ -57805,6 +58085,7 @@ Object.freeze({
57805
58085
  });
57806
58086
  Object.freeze({
57807
58087
  "broker": "broker",
58088
+ "calendar-source": "calendar",
57808
58089
  "device-export": "device-export",
57809
58090
  "llm": "ai",
57810
58091
  "mesh-network": "mesh",
@@ -58290,6 +58571,8 @@ var STATE_SUMMARY_VARS = [
58290
58571
  [...RULE_TEXT],
58291
58572
  [...RULE_TEXT],
58292
58573
  [...RULE_TEXT],
58574
+ [...RULE_TEXT],
58575
+ [...RULE_TEXT],
58293
58576
  ([...RULE_TEXT], [...UPDATES]),
58294
58577
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
58295
58578
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),