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