@camstack/addon-provider-onvif 1.2.126 → 1.2.127

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
@@ -5380,7 +5380,7 @@ var ZodIssueCode = {
5380
5380
  var ZodFirstPartyTypeKind;
5381
5381
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5382
5382
  //#endregion
5383
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5383
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5384
5384
  /**
5385
5385
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5386
5386
  * window to float samples (D455).
@@ -9319,6 +9319,16 @@ var CompositionSchema = object({
9319
9319
  seen.add(feature.cap);
9320
9320
  });
9321
9321
  });
9322
+ var NodeColorIdSchema = _enum([
9323
+ "node-a",
9324
+ "node-b",
9325
+ "node-c",
9326
+ "node-d",
9327
+ "node-e",
9328
+ "node-f",
9329
+ "node-g",
9330
+ "node-h"
9331
+ ]);
9322
9332
  new Set([
9323
9333
  "track",
9324
9334
  "face",
@@ -18252,14 +18262,14 @@ var LlmProfileSchema = object({
18252
18262
  /** ConfigUISchema tree passed through untyped on the wire (the
18253
18263
  * notification-output `ConfigSchemaPassthrough` precedent at
18254
18264
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18255
- var ConfigSchemaPassthrough$1 = unknown();
18265
+ var ConfigSchemaPassthrough$3 = unknown();
18256
18266
  var LlmProfileKindDescriptorSchema = object({
18257
18267
  kind: LlmProfileKindSchema,
18258
18268
  label: string(),
18259
18269
  icon: string(),
18260
18270
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18261
18271
  addonId: string(),
18262
- configSchema: ConfigSchemaPassthrough$1
18272
+ configSchema: ConfigSchemaPassthrough$3
18263
18273
  });
18264
18274
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18265
18275
  var LlmDefaultSchema = object({
@@ -19380,7 +19390,7 @@ var TargetKindCapsSchema = object({
19380
19390
  * the union is large and not meant for runtime validation here; the exported
19381
19391
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19382
19392
  */
19383
- var ConfigSchemaPassthrough = unknown();
19393
+ var ConfigSchemaPassthrough$2 = unknown();
19384
19394
  var TargetKindSchema = object({
19385
19395
  kind: string(),
19386
19396
  label: string(),
@@ -19417,7 +19427,7 @@ var TargetKindSchema = object({
19417
19427
  * its raster path, which is the safe default for an unknown image.
19418
19428
  */
19419
19429
  iconMediaType: string().optional(),
19420
- configSchema: ConfigSchemaPassthrough,
19430
+ configSchema: ConfigSchemaPassthrough$2,
19421
19431
  /**
19422
19432
  * The config keys that decide WHERE this kind's secrets are sent (server,
19423
19433
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22716,6 +22726,61 @@ var OauthIntegrationDescriptorSchema = object({
22716
22726
  });
22717
22727
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
22718
22728
  /**
22729
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22730
+ *
22731
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22732
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
22733
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
22734
+ * immutable after create.
22735
+ */
22736
+ var ConfigSchemaPassthrough$1 = unknown();
22737
+ var OidcConnectionSchema = object({
22738
+ id: string().min(1),
22739
+ displayName: string(),
22740
+ icon: string(),
22741
+ issuerUrl: string(),
22742
+ clientId: string(),
22743
+ /** Client id + secret present — never the secret value. */
22744
+ configured: boolean(),
22745
+ /**
22746
+ * Values for the connection form schema. `clientSecret` is a keychain
22747
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
22748
+ */
22749
+ formValues: record(string(), unknown()).optional()
22750
+ });
22751
+ /**
22752
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
22753
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
22754
+ */
22755
+ var OidcConnectionUpdateInputSchema = object({
22756
+ id: string().min(1),
22757
+ displayName: string().min(1),
22758
+ icon: string().optional(),
22759
+ issuerUrl: string().optional(),
22760
+ clientId: string().optional(),
22761
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
22762
+ redirectUri: string().optional(),
22763
+ scopes: string().optional(),
22764
+ usernameClaim: _enum([
22765
+ "preferred_username",
22766
+ "email",
22767
+ "sub"
22768
+ ]).optional()
22769
+ });
22770
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
22771
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
22772
+ displayName: string().min(1)
22773
+ }), object({ id: string() }), {
22774
+ kind: "mutation",
22775
+ auth: "admin"
22776
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
22777
+ kind: "mutation",
22778
+ auth: "admin"
22779
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
22780
+ kind: "mutation",
22781
+ auth: "admin"
22782
+ });
22783
+ /**
22719
22784
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22720
22785
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22721
22786
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24072,24 +24137,69 @@ var RetrainFrameListSchema = object({
24072
24137
  /** What the page pre-selects — the native key frame when one survives. */
24073
24138
  autoPickMediaId: number().int().optional()
24074
24139
  });
24140
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24141
+ var RetrainFrameWorkStateSchema = _enum([
24142
+ "unannotated",
24143
+ "annotated",
24144
+ "complete"
24145
+ ]);
24146
+ /**
24147
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24148
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24149
+ */
24150
+ var RetrainCorpusFilterSchema = object({
24151
+ workState: RetrainFrameWorkStateSchema.optional(),
24152
+ deviceIds: array(number()).max(500).optional(),
24153
+ /** When set, only frames in this named collection. */
24154
+ collectionId: string().optional(),
24155
+ /** Frames that carry at least one saved annotation in one of these classes. */
24156
+ classes: array(RetrainMacroClassSchema).optional(),
24157
+ page: number().int().positive().default(1),
24158
+ pageSize: number().int().positive().max(100).default(50)
24159
+ });
24160
+ var RetrainCorpusPageSchema = object({
24161
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24162
+ total: number().int().nonnegative(),
24163
+ page: number().int().positive(),
24164
+ pageSize: number().int().positive()
24165
+ });
24166
+ var RetrainCorpusKpiCameraRowSchema = object({
24167
+ deviceId: number(),
24168
+ unannotated: number().int().nonnegative(),
24169
+ annotated: number().int().nonnegative(),
24170
+ complete: number().int().nonnegative(),
24171
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24172
+ * `null` when the corpus is empty (no ratio). */
24173
+ pctOfCorpus: number().min(0).max(1).nullable()
24174
+ });
24175
+ var RetrainCorpusKpiSchema = object({
24176
+ total: number().int().nonnegative(),
24177
+ unannotated: number().int().nonnegative(),
24178
+ annotated: number().int().nonnegative(),
24179
+ complete: number().int().nonnegative(),
24180
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24181
+ });
24075
24182
  /**
24076
24183
  * Which frames an annotated export carries. Every field narrows; an empty
24077
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24078
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24079
- * the primitive a version export uses; `batchId` re-selects what an earlier
24080
- * export carried (`exportedInBatch`).
24184
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24185
+ * download uses; `batchId` re-selects what an earlier export carried
24186
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24187
+ * resolves to `frameIds` at plan/start.
24081
24188
  */
24082
24189
  var RetrainExportFilterSchema = object({
24083
24190
  deviceIds: array(number()).optional(),
24084
24191
  frameIds: array(string()).max(2e4).optional(),
24085
24192
  /** Only frames in at least one of these named collections. */
24086
24193
  collectionIds: array(string()).max(200).optional(),
24087
- /** Exactly the frames of this dataset version (and its completeOnly). An
24088
- * unknown id selects nothing. */
24089
- datasetVersionId: string().optional(),
24194
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24195
+ collectionId: string().optional(),
24090
24196
  batchId: string().optional(),
24091
24197
  /** Only frames the operator marked complete (all subjects boxed). */
24092
- completeOnly: boolean().optional()
24198
+ completeOnly: boolean().optional(),
24199
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24200
+ workState: RetrainFrameWorkStateSchema.optional(),
24201
+ /** Frames with at least one saved annotation in one of these classes. */
24202
+ classes: array(RetrainMacroClassSchema).optional()
24093
24203
  });
24094
24204
  /**
24095
24205
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24289,8 +24399,7 @@ var RetrainDatasetStatsSchema = object({
24289
24399
  completeFrames: number().int()
24290
24400
  })).readonly()
24291
24401
  });
24292
- /** An immutable dataset version, without its frame list. */
24293
- var RetrainDatasetVersionSchema = object({
24402
+ object({
24294
24403
  id: string(),
24295
24404
  name: string(),
24296
24405
  createdAt: number(),
@@ -24298,22 +24407,33 @@ var RetrainDatasetVersionSchema = object({
24298
24407
  layout: RetrainExportLayoutSchema,
24299
24408
  completeOnly: boolean(),
24300
24409
  frameCount: number().int(),
24301
- /** sha256 of what the frames taught when the version was frozen. */
24302
24410
  annotationHash: string(),
24303
- /** The export manifest schema the version was cut under. */
24304
24411
  manifestSchema: string(),
24305
24412
  stats: RetrainDatasetStatsSchema
24306
24413
  });
24307
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24308
- kind: literal("created"),
24309
- version: RetrainDatasetVersionSchema
24414
+ /**
24415
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24416
+ * the training cap. Resolved here so plan/start and the annotated export share
24417
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24418
+ */
24419
+ var RetrainTrainingCorpusSelectionSchema = object({
24420
+ collectionIds: array(string()).min(1),
24421
+ workState: _enum([
24422
+ "complete",
24423
+ "annotated_or_complete",
24424
+ "any_annotated"
24425
+ ]).default("complete")
24426
+ });
24427
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24428
+ kind: literal("resolved"),
24429
+ frameIds: array(string()).max(2e4).readonly(),
24430
+ stats: RetrainDatasetStatsSchema,
24431
+ annotationHash: string(),
24432
+ layout: RetrainExportLayoutSchema
24310
24433
  }), object({
24311
24434
  kind: literal("refused"),
24312
- reason: _enum([
24313
- "empty-name",
24314
- "duplicate-name",
24315
- "no-frames"
24316
- ])
24435
+ reason: _enum(["unknown-collection", "no-frames"]),
24436
+ detail: string()
24317
24437
  })]);
24318
24438
  /** The outcome of a lifecycle move owned by the retrain page. */
24319
24439
  var RetrainTransitionResultSchema = object({
@@ -25020,6 +25140,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25020
25140
  }), array(RetrainTrackSchema).readonly(), {
25021
25141
  kind: "query",
25022
25142
  auth: "admin"
25143
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25144
+ kind: "query",
25145
+ auth: "admin"
25146
+ }), method(object({}), RetrainCorpusKpiSchema, {
25147
+ kind: "query",
25148
+ auth: "admin"
25023
25149
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25024
25150
  kind: "query",
25025
25151
  auth: "admin"
@@ -25115,36 +25241,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25115
25241
  kind: "mutation",
25116
25242
  auth: "admin",
25117
25243
  timeoutMs: 12e4
25118
- }), method(object({
25119
- selection: RetrainDatasetSelectionSchema,
25120
- completeOnly: boolean().optional()
25121
- }), RetrainDatasetStatsSchema, {
25122
- kind: "query",
25123
- auth: "admin"
25124
- }), method(object({
25125
- name: string().max(120),
25126
- selection: RetrainDatasetSelectionSchema,
25127
- layout: RetrainExportLayoutSchema,
25128
- completeOnly: boolean()
25129
- }), CreateRetrainDatasetVersionResultSchema, {
25130
- kind: "mutation",
25131
- auth: "admin",
25132
- timeoutMs: 12e4
25133
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25134
- kind: "query",
25135
- auth: "admin"
25136
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25137
- kind: "mutation",
25138
- auth: "admin"
25139
- }), method(object({ id: string() }), object({
25140
- found: boolean(),
25141
- annotationHash: string(),
25142
- matches: boolean(),
25143
- missingFrames: number().int()
25144
- }), {
25145
- kind: "query",
25146
- auth: "admin",
25147
- timeoutMs: 12e4
25148
25244
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25149
25245
  kind: "query",
25150
25246
  auth: "admin"
@@ -25171,6 +25267,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25171
25267
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25172
25268
  kind: "query",
25173
25269
  auth: "admin"
25270
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25271
+ kind: "query",
25272
+ auth: "admin",
25273
+ timeoutMs: 6e4
25174
25274
  }), method(object({
25175
25275
  id: string(),
25176
25276
  name: string().max(120)
@@ -25787,11 +25887,14 @@ var HardwareClassIdSchema = _enum([
25787
25887
  "intel-n-series",
25788
25888
  "apple-m-base",
25789
25889
  "apple-m-pro",
25890
+ "amd-phoenix",
25790
25891
  "unknown"
25791
25892
  ]);
25792
25893
  var AcceleratorKindSchema = _enum([
25793
25894
  "intel-npu",
25794
25895
  "intel-igpu",
25896
+ "amd-igpu",
25897
+ "amd-npu",
25795
25898
  "x86-cpu",
25796
25899
  "arm-cpu",
25797
25900
  "apple-ane",
@@ -27681,6 +27784,8 @@ var AgentPipelineSettingsSchema = object({
27681
27784
  * address is wrong (multi-homed host, NAT, custom interface).
27682
27785
  */
27683
27786
  reachableHost: string().optional(),
27787
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
27788
+ color: NodeColorIdSchema.optional(),
27684
27789
  /**
27685
27790
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27686
27791
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28230,8 +28335,9 @@ method(object({
28230
28335
  auth: "admin"
28231
28336
  }), method(object({
28232
28337
  agentNodeId: string(),
28233
- reachableHost: string().nullable()
28234
- }), object({ success: literal(true) }), {
28338
+ reachableHost: string().nullable().optional(),
28339
+ color: NodeColorIdSchema.nullable().optional()
28340
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28235
28341
  kind: "mutation",
28236
28342
  auth: "admin"
28237
28343
  }), method(object({
@@ -31382,7 +31488,7 @@ var CustomActionInputSchema = object({
31382
31488
  action: string().min(1),
31383
31489
  input: unknown()
31384
31490
  });
31385
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31491
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31386
31492
  addonId: string(),
31387
31493
  limit: number().min(1).max(500).default(100),
31388
31494
  level: LogLevelSchema$2.optional()
@@ -34929,7 +35035,13 @@ var TopologyNodeSchema = object({
34929
35035
  })).readonly(),
34930
35036
  processes: array(TopologyProcessSchema).readonly(),
34931
35037
  categories: array(TopologyCategorySchema).readonly(),
34932
- rootPackage: TopologyRootPackageSchema.nullable()
35038
+ rootPackage: TopologyRootPackageSchema.nullable(),
35039
+ /**
35040
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
35041
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
35042
+ * for offline rows and when the hub cannot tell.
35043
+ */
35044
+ meshTransport: _enum(["tls", "clear"]).optional()
34933
35045
  });
34934
35046
  var CapUsageEdgeSchema = object({
34935
35047
  callerAddonId: string(),
@@ -35269,6 +35381,7 @@ var OsdNamedTemplateSchema = object({
35269
35381
  });
35270
35382
  /** Where a slot's value comes from. */
35271
35383
  var OsdSourceSchema = discriminatedUnion("kind", [
35384
+ object({ kind: literal("none") }),
35272
35385
  object({
35273
35386
  kind: literal("static"),
35274
35387
  text: string().max(64)
@@ -35395,6 +35508,13 @@ method(object({ deviceId: number().int() }), object({
35395
35508
  }), object({ success: literal(true) }), {
35396
35509
  kind: "mutation",
35397
35510
  auth: "admin"
35511
+ }), method(object({
35512
+ deviceId: number().int(),
35513
+ slotId: string().min(1),
35514
+ enabled: boolean()
35515
+ }), object({ success: literal(true) }), {
35516
+ kind: "mutation",
35517
+ auth: "admin"
35398
35518
  }), method(object({
35399
35519
  sourceDeviceId: number().int(),
35400
35520
  targetDeviceId: number().int()
@@ -35775,7 +35895,15 @@ var GpuInfoSchema = object({
35775
35895
  name: string(),
35776
35896
  memoryMB: number().optional()
35777
35897
  });
35778
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
35898
+ var NpuInfoSchema = object({
35899
+ type: _enum([
35900
+ "apple-ane",
35901
+ "intel-npu",
35902
+ "amd-xdna"
35903
+ ]),
35904
+ name: string().optional(),
35905
+ generation: _enum(["xdna1", "xdna2"]).optional()
35906
+ });
35779
35907
  var CoralInfoSchema = object({
35780
35908
  type: literal("coral-edgetpu"),
35781
35909
  bus: string().optional()
@@ -39629,9 +39757,11 @@ DeviceType.Camera, method(object({
39629
39757
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
39630
39758
  * manifest entry and nothing else.
39631
39759
  *
39632
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
39633
- * `notification-output` posture); `describe` concat-fans across providers.
39634
- * Every method is `admin`: these spend money.
39760
+ * Collection of provider **types** (addons). Each addon owns zero or more
39761
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
39762
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
39763
+ * `entryId`; callers also pass the owning `addonId` as the collection
39764
+ * selector (broker posture). Every method is `admin`: these spend money.
39635
39765
  *
39636
39766
  * Every cloud object a provider creates is tagged with the orchestrator's
39637
39767
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -39655,8 +39785,8 @@ var TrainingRegionOptionSchema = object({
39655
39785
  priceMultiplier: number().positive()
39656
39786
  });
39657
39787
  /**
39658
- * The provider's per-account settings, as the orchestrator reads them. They
39659
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
39788
+ * The provider's per-entry settings, as the orchestrator reads them. They
39789
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
39660
39790
  * depend on the user's account), never hard-coded in the orchestrator.
39661
39791
  */
39662
39792
  var TrainingProviderDefaultsSchema = object({
@@ -39667,9 +39797,44 @@ var TrainingProviderDefaultsSchema = object({
39667
39797
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
39668
39798
  failedDatasetGraceHours: number().nonnegative()
39669
39799
  });
39800
+ /**
39801
+ * Entry form schema for a provider type — same seam as notification
39802
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
39803
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
39804
+ */
39805
+ var ConfigSchemaPassthrough = unknown();
39806
+ /** One creatable provider type, for the Add-entry dialog. */
39807
+ var TrainingProviderTypeSchema = object({
39808
+ typeId: string(),
39809
+ label: string(),
39810
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
39811
+ iconAsset: string(),
39812
+ /** Owning `training-provider` addon — collection selector for createEntry. */
39813
+ addonId: string(),
39814
+ /**
39815
+ * Fields for one entry of this type (credentials + defaults). Absent on a
39816
+ * type that only needs a name. Password fields are keychain-backed on the
39817
+ * provider addon (`secretStatePaths`), not D634 plaintext.
39818
+ */
39819
+ configSchema: ConfigSchemaPassthrough.optional()
39820
+ });
39821
+ /** One configured account / workspace under a provider type. */
39822
+ var TrainingProviderEntrySchema = object({
39823
+ entryId: string(),
39824
+ typeId: string(),
39825
+ name: string(),
39826
+ addonId: string(),
39827
+ /** Credentials are present — never the values. */
39828
+ configured: boolean()
39829
+ });
39670
39830
  var TrainingProviderDescriptorSchema = object({
39671
39831
  addonId: string(),
39672
- /** `modal`, `runpod`, `fake`, … */
39832
+ entryId: string(),
39833
+ typeId: string(),
39834
+ /** Operator-chosen entry name. */
39835
+ name: string(),
39836
+ iconAsset: string(),
39837
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
39673
39838
  kind: string(),
39674
39839
  label: string(),
39675
39840
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -39681,7 +39846,30 @@ var TrainingProviderDescriptorSchema = object({
39681
39846
  dataResidencyNote: string(),
39682
39847
  /** Credentials are present — never the values. */
39683
39848
  configured: boolean(),
39684
- defaults: TrainingProviderDefaultsSchema
39849
+ defaults: TrainingProviderDefaultsSchema,
39850
+ /**
39851
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
39852
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
39853
+ * never plaintext. Same hydrate contract as settings forms (D789).
39854
+ */
39855
+ formValues: record(string(), unknown()).optional()
39856
+ });
39857
+ /**
39858
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
39859
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
39860
+ * `{ $secretClear: true }` clears it.
39861
+ */
39862
+ var TrainingProviderUpdateEntryInputSchema = object({
39863
+ entryId: string().min(1),
39864
+ name: string().min(1),
39865
+ tokenId: string().optional(),
39866
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
39867
+ environment: string().optional(),
39868
+ gpuType: string().optional(),
39869
+ region: string().optional(),
39870
+ costCapUsd: number().nonnegative().optional(),
39871
+ maxRuntimeSec: number().int().positive().optional(),
39872
+ failedDatasetGraceHours: number().nonnegative().optional()
39685
39873
  });
39686
39874
  var TrainingCredentialCheckSchema = object({
39687
39875
  ok: boolean(),
@@ -39733,20 +39921,33 @@ var TrainerSourceRefSchema = object({
39733
39921
  /** A commit sha (never a branch) — the job must be reproducible. */
39734
39922
  revision: string().regex(/^[0-9a-f]{7,64}$/)
39735
39923
  });
39924
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
39736
39925
  var JobRef = {
39737
- addonId: string(),
39926
+ entryId: string().min(1),
39738
39927
  jobKey: string().uuid()
39739
39928
  };
39740
39929
  var TrainingLogLineSchema = object({
39741
39930
  ts: number(),
39742
39931
  text: string()
39743
39932
  });
39744
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
39933
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
39934
+ typeId: string().min(1),
39935
+ name: string().min(1)
39936
+ }), object({ entryId: string() }), {
39937
+ kind: "mutation",
39938
+ auth: "admin"
39939
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
39940
+ kind: "mutation",
39941
+ auth: "admin"
39942
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
39943
+ kind: "mutation",
39944
+ auth: "admin"
39945
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
39745
39946
  kind: "mutation",
39746
39947
  auth: "admin",
39747
39948
  timeoutMs: 3e4
39748
39949
  }), method(object({
39749
- addonId: string(),
39950
+ entryId: string().min(1),
39750
39951
  gpuType: string(),
39751
39952
  region: string(),
39752
39953
  datasetBytes: number().int().nonnegative(),
@@ -39812,7 +40013,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39812
40013
  kind: "mutation",
39813
40014
  auth: "admin",
39814
40015
  timeoutMs: 5 * 6e4
39815
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
40016
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
39816
40017
  auth: "admin",
39817
40018
  timeoutMs: 2 * 6e4
39818
40019
  });
@@ -39822,20 +40023,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
39822
40023
  *
39823
40024
  * It owns what every provider must agree on, written once:
39824
40025
  *
39825
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
39826
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
39827
- * the export plan) and reaches this store through the five row methods
39828
- * below, so the Retrain page and the export did not change.
39829
40026
  * - **Jobs.** A persisted state machine, a reconcile loop against the
39830
40027
  * provider, a cost guard, a daily orphan sweep and the retention rules.
39831
40028
  * - **The return flow.** Verified artefacts → Model Studio
39832
40029
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
39833
40030
  * rollback. Nothing is ever registered automatically.
39834
40031
  *
40032
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
40033
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
40034
+ * moment and snapshotted on the job. No frozen dataset version.
40035
+ *
39835
40036
  * Every method is `admin`.
39836
40037
  */
39837
- /** A version WITH its frame list — what the export and a job read. */
39838
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
40038
+ /**
40039
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
40040
+ * Frame ids are resolved at plan/start — never a frozen version id.
40041
+ */
40042
+ var TrainingCorpusSelectionSchema = object({
40043
+ collectionIds: array(string()).min(1),
40044
+ /** Default complete-only for v1 */
40045
+ workState: _enum([
40046
+ "complete",
40047
+ "annotated_or_complete",
40048
+ "any_annotated"
40049
+ ]).default("complete")
40050
+ });
39839
40051
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
39840
40052
  var TrainingBaseModelSchema = object({
39841
40053
  modelId: string(),
@@ -39853,9 +40065,13 @@ var TrainingPresetSchema = _enum([
39853
40065
  "thorough"
39854
40066
  ]);
39855
40067
  var TrainingJobRequestSchema = object({
39856
- datasetVersionId: string().min(1),
39857
- /** The `training-provider` addon that runs it. */
39858
- addonId: string().min(1),
40068
+ /** Live collection + work-state criteria; resolved at plan/start. */
40069
+ selection: TrainingCorpusSelectionSchema,
40070
+ /**
40071
+ * The provider **entry** that runs it (credentials + defaults).
40072
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
40073
+ */
40074
+ entryId: string().min(1),
39859
40075
  gpuType: string().min(1),
39860
40076
  region: string(),
39861
40077
  baseModelId: string().min(1),
@@ -39914,6 +40130,7 @@ var TrainingJobPlanSchema = object({
39914
40130
  * result lives after the operator acted on it.
39915
40131
  */
39916
40132
  var TrainingJobStateSchema = _enum([
40133
+ "queued",
39917
40134
  "uploading",
39918
40135
  "submitted",
39919
40136
  "starting",
@@ -39967,6 +40184,11 @@ var TrainingJobSchema = object({
39967
40184
  createdAt: number(),
39968
40185
  updatedAt: number(),
39969
40186
  state: TrainingJobStateSchema,
40187
+ /**
40188
+ * Shared by every job enqueued together via `startJobBatch`.
40189
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
40190
+ */
40191
+ batchId: string().nullable().default(null),
39970
40192
  stage: TrainingStageSchema.nullable(),
39971
40193
  failure: object({
39972
40194
  reason: TrainingFailureReasonSchema,
@@ -39978,6 +40200,12 @@ var TrainingJobSchema = object({
39978
40200
  maxRuntimeSec: number().int().positive(),
39979
40201
  trainer: TrainerSourceRefSchema,
39980
40202
  datasetLayout: RetrainExportLayoutSchema,
40203
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
40204
+ frameCount: number().int().nonnegative(),
40205
+ /** Resolved frame ids at start — the archive ships exactly these. */
40206
+ frameIds: array(string()).max(2e4).readonly(),
40207
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
40208
+ annotationHash: string(),
39981
40209
  dataset: object({
39982
40210
  bytes: number().int(),
39983
40211
  sha256: string(),
@@ -40019,13 +40247,7 @@ var TrainingJobSchema = object({
40019
40247
  canary: TrainingCanarySchema.nullable()
40020
40248
  });
40021
40249
  var IdInput = object({ id: string().min(1) });
40022
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
40023
- kind: "mutation",
40024
- auth: "admin"
40025
- }), 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() }), {
40026
- kind: "mutation",
40027
- auth: "admin"
40028
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
40250
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
40029
40251
  auth: "admin",
40030
40252
  timeoutMs: 6e4
40031
40253
  }), method(TrainingJobRequestSchema.extend({
@@ -40044,6 +40266,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
40044
40266
  kind: "mutation",
40045
40267
  auth: "admin",
40046
40268
  timeoutMs: 12e4
40269
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
40270
+ baseModelIds: array(string().min(1)).min(1),
40271
+ name: string().min(1).max(120),
40272
+ maxCostUsd: number().positive(),
40273
+ maxRuntimeSec: number().int().positive(),
40274
+ idempotencyKey: string().min(8).max(80)
40275
+ }), discriminatedUnion("kind", [object({
40276
+ kind: literal("started"),
40277
+ batchId: string(),
40278
+ jobs: array(TrainingJobSchema).min(1).readonly()
40279
+ }), object({
40280
+ kind: literal("refused"),
40281
+ reason: TrainingRefusalReasonSchema,
40282
+ detail: string()
40283
+ })]), {
40284
+ kind: "mutation",
40285
+ auth: "admin",
40286
+ timeoutMs: 12e4
40047
40287
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
40048
40288
  kind: "mutation",
40049
40289
  auth: "admin",
@@ -44896,6 +45136,36 @@ Object.freeze({
44896
45136
  addonId: null,
44897
45137
  access: "view"
44898
45138
  },
45139
+ "oidcConnections.connectionFormSchema": {
45140
+ capName: "oidc-connections",
45141
+ capScope: "system",
45142
+ addonId: null,
45143
+ access: "view"
45144
+ },
45145
+ "oidcConnections.createConnection": {
45146
+ capName: "oidc-connections",
45147
+ capScope: "system",
45148
+ addonId: null,
45149
+ access: "create"
45150
+ },
45151
+ "oidcConnections.deleteConnection": {
45152
+ capName: "oidc-connections",
45153
+ capScope: "system",
45154
+ addonId: null,
45155
+ access: "delete"
45156
+ },
45157
+ "oidcConnections.listConnections": {
45158
+ capName: "oidc-connections",
45159
+ capScope: "system",
45160
+ addonId: null,
45161
+ access: "view"
45162
+ },
45163
+ "oidcConnections.updateConnection": {
45164
+ capName: "oidc-connections",
45165
+ capScope: "system",
45166
+ addonId: null,
45167
+ access: "create"
45168
+ },
44899
45169
  "osd.getStatus": {
44900
45170
  capName: "osd",
44901
45171
  capScope: "device",
@@ -44968,6 +45238,12 @@ Object.freeze({
44968
45238
  addonId: null,
44969
45239
  access: "create"
44970
45240
  },
45241
+ "osdManager.setSlotCameraEnabled": {
45242
+ capName: "osd-manager",
45243
+ capScope: "system",
45244
+ addonId: null,
45245
+ access: "create"
45246
+ },
44971
45247
  "osdManager.upsertTemplate": {
44972
45248
  capName: "osd-manager",
44973
45249
  capScope: "system",
@@ -45106,12 +45382,6 @@ Object.freeze({
45106
45382
  addonId: null,
45107
45383
  access: "create"
45108
45384
  },
45109
- "pipelineAnalytics.createRetrainDatasetVersion": {
45110
- capName: "pipeline-analytics",
45111
- capScope: "device",
45112
- addonId: null,
45113
- access: "create"
45114
- },
45115
45385
  "pipelineAnalytics.deleteDeviceEvents": {
45116
45386
  capName: "pipeline-analytics",
45117
45387
  capScope: "device",
@@ -45124,12 +45394,6 @@ Object.freeze({
45124
45394
  addonId: null,
45125
45395
  access: "delete"
45126
45396
  },
45127
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
45128
- capName: "pipeline-analytics",
45129
- capScope: "device",
45130
- addonId: null,
45131
- access: "delete"
45132
- },
45133
45397
  "pipelineAnalytics.deleteTracks": {
45134
45398
  capName: "pipeline-analytics",
45135
45399
  capScope: "device",
@@ -45232,6 +45496,12 @@ Object.freeze({
45232
45496
  addonId: null,
45233
45497
  access: "view"
45234
45498
  },
45499
+ "pipelineAnalytics.getRetrainCorpusKpi": {
45500
+ capName: "pipeline-analytics",
45501
+ capScope: "device",
45502
+ addonId: null,
45503
+ access: "view"
45504
+ },
45235
45505
  "pipelineAnalytics.getRetrainExportUrl": {
45236
45506
  capName: "pipeline-analytics",
45237
45507
  capScope: "device",
@@ -45352,7 +45622,7 @@ Object.freeze({
45352
45622
  addonId: null,
45353
45623
  access: "view"
45354
45624
  },
45355
- "pipelineAnalytics.listRetrainDatasetVersions": {
45625
+ "pipelineAnalytics.listRetrainCorpusPage": {
45356
45626
  capName: "pipeline-analytics",
45357
45627
  capScope: "device",
45358
45628
  addonId: null,
@@ -45406,12 +45676,6 @@ Object.freeze({
45406
45676
  addonId: null,
45407
45677
  access: "create"
45408
45678
  },
45409
- "pipelineAnalytics.previewRetrainDataset": {
45410
- capName: "pipeline-analytics",
45411
- capScope: "device",
45412
- addonId: null,
45413
- access: "view"
45414
- },
45415
45679
  "pipelineAnalytics.proposeRetrainAnnotations": {
45416
45680
  capName: "pipeline-analytics",
45417
45681
  capScope: "device",
@@ -45490,6 +45754,12 @@ Object.freeze({
45490
45754
  addonId: null,
45491
45755
  access: "create"
45492
45756
  },
45757
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
45758
+ capName: "pipeline-analytics",
45759
+ capScope: "device",
45760
+ addonId: null,
45761
+ access: "view"
45762
+ },
45493
45763
  "pipelineAnalytics.restageRetrainTrack": {
45494
45764
  capName: "pipeline-analytics",
45495
45765
  capScope: "device",
@@ -45550,12 +45820,6 @@ Object.freeze({
45550
45820
  addonId: null,
45551
45821
  access: "create"
45552
45822
  },
45553
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
45554
- capName: "pipeline-analytics",
45555
- capScope: "device",
45556
- addonId: null,
45557
- access: "view"
45558
- },
45559
45823
  "pipelineAnalytics.wipeAllAnalytics": {
45560
45824
  capName: "pipeline-analytics",
45561
45825
  capScope: "device",
@@ -47950,18 +48214,6 @@ Object.freeze({
47950
48214
  addonId: null,
47951
48215
  access: "create"
47952
48216
  },
47953
- "training.findDatasetVersionIdByName": {
47954
- capName: "training",
47955
- capScope: "system",
47956
- addonId: null,
47957
- access: "view"
47958
- },
47959
- "training.getDatasetVersion": {
47960
- capName: "training",
47961
- capScope: "system",
47962
- addonId: null,
47963
- access: "view"
47964
- },
47965
48217
  "training.getJob": {
47966
48218
  capName: "training",
47967
48219
  capScope: "system",
@@ -47980,12 +48232,6 @@ Object.freeze({
47980
48232
  addonId: null,
47981
48233
  access: "view"
47982
48234
  },
47983
- "training.listDatasetVersions": {
47984
- capName: "training",
47985
- capScope: "system",
47986
- addonId: null,
47987
- access: "view"
47988
- },
47989
48235
  "training.listJobs": {
47990
48236
  capName: "training",
47991
48237
  capScope: "system",
@@ -47998,54 +48244,66 @@ Object.freeze({
47998
48244
  addonId: null,
47999
48245
  access: "view"
48000
48246
  },
48001
- "training.putDatasetVersion": {
48247
+ "training.registerResult": {
48002
48248
  capName: "training",
48003
48249
  capScope: "system",
48004
48250
  addonId: null,
48005
48251
  access: "create"
48006
48252
  },
48007
- "training.registerResult": {
48253
+ "training.rollbackCanary": {
48008
48254
  capName: "training",
48009
48255
  capScope: "system",
48010
48256
  addonId: null,
48011
48257
  access: "create"
48012
48258
  },
48013
- "training.removeDatasetVersion": {
48259
+ "training.startJob": {
48014
48260
  capName: "training",
48015
48261
  capScope: "system",
48016
48262
  addonId: null,
48017
- access: "delete"
48263
+ access: "create"
48018
48264
  },
48019
- "training.rollbackCanary": {
48265
+ "training.startJobBatch": {
48020
48266
  capName: "training",
48021
48267
  capScope: "system",
48022
48268
  addonId: null,
48023
48269
  access: "create"
48024
48270
  },
48025
- "training.startJob": {
48026
- capName: "training",
48271
+ "trainingProvider.cancelJob": {
48272
+ capName: "training-provider",
48027
48273
  capScope: "system",
48028
48274
  addonId: null,
48029
48275
  access: "create"
48030
48276
  },
48031
- "trainingProvider.cancelJob": {
48277
+ "trainingProvider.cleanupJob": {
48032
48278
  capName: "training-provider",
48033
48279
  capScope: "system",
48034
48280
  addonId: null,
48035
48281
  access: "create"
48036
48282
  },
48037
- "trainingProvider.cleanupJob": {
48283
+ "trainingProvider.createEntry": {
48038
48284
  capName: "training-provider",
48039
48285
  capScope: "system",
48040
48286
  addonId: null,
48041
48287
  access: "create"
48042
48288
  },
48289
+ "trainingProvider.deleteEntry": {
48290
+ capName: "training-provider",
48291
+ capScope: "system",
48292
+ addonId: null,
48293
+ access: "delete"
48294
+ },
48043
48295
  "trainingProvider.describe": {
48044
48296
  capName: "training-provider",
48045
48297
  capScope: "system",
48046
48298
  addonId: null,
48047
48299
  access: "view"
48048
48300
  },
48301
+ "trainingProvider.describeTypes": {
48302
+ capName: "training-provider",
48303
+ capScope: "system",
48304
+ addonId: null,
48305
+ access: "view"
48306
+ },
48049
48307
  "trainingProvider.estimateJob": {
48050
48308
  capName: "training-provider",
48051
48309
  capScope: "system",
@@ -48058,6 +48316,12 @@ Object.freeze({
48058
48316
  addonId: null,
48059
48317
  access: "view"
48060
48318
  },
48319
+ "trainingProvider.listEntries": {
48320
+ capName: "training-provider",
48321
+ capScope: "system",
48322
+ addonId: null,
48323
+ access: "view"
48324
+ },
48061
48325
  "trainingProvider.listJobEvents": {
48062
48326
  capName: "training-provider",
48063
48327
  capScope: "system",
@@ -48088,6 +48352,12 @@ Object.freeze({
48088
48352
  addonId: null,
48089
48353
  access: "create"
48090
48354
  },
48355
+ "trainingProvider.updateEntry": {
48356
+ capName: "training-provider",
48357
+ capScope: "system",
48358
+ addonId: null,
48359
+ access: "create"
48360
+ },
48091
48361
  "trainingProvider.uploadDataset": {
48092
48362
  capName: "training-provider",
48093
48363
  capScope: "system",
@@ -51360,6 +51630,11 @@ Object.freeze({
51360
51630
  form: "single",
51361
51631
  optional: false
51362
51632
  }],
51633
+ "osdManager.setSlotCameraEnabled": [{
51634
+ name: "deviceId",
51635
+ form: "single",
51636
+ optional: false
51637
+ }],
51363
51638
  "petFeeder.callPet": [{
51364
51639
  name: "deviceId",
51365
51640
  form: "single",
@@ -51580,6 +51855,11 @@ Object.freeze({
51580
51855
  form: "array",
51581
51856
  optional: false
51582
51857
  }],
51858
+ "pipelineAnalytics.listRetrainCorpusPage": [{
51859
+ name: "deviceIds",
51860
+ form: "array",
51861
+ optional: true
51862
+ }],
51583
51863
  "pipelineAnalytics.listRetrainStaging": [{
51584
51864
  name: "deviceIds",
51585
51865
  form: "array",
@@ -52689,6 +52969,7 @@ Object.freeze({
52689
52969
  });
52690
52970
  Object.freeze({
52691
52971
  "broker": "broker",
52972
+ "calendar-source": "calendar",
52692
52973
  "device-export": "device-export",
52693
52974
  "llm": "ai",
52694
52975
  "mesh-network": "mesh",
@@ -53174,6 +53455,8 @@ var STATE_SUMMARY_VARS = [
53174
53455
  [...RULE_TEXT],
53175
53456
  [...RULE_TEXT],
53176
53457
  [...RULE_TEXT],
53458
+ [...RULE_TEXT],
53459
+ [...RULE_TEXT],
53177
53460
  ([...RULE_TEXT], [...UPDATES]),
53178
53461
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
53179
53462
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),