@camstack/addon-provider-rtsp 1.2.124 → 1.2.125

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
@@ -5377,7 +5377,7 @@ var ZodIssueCode = {
5377
5377
  var ZodFirstPartyTypeKind;
5378
5378
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5379
5379
  //#endregion
5380
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5380
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5381
5381
  /**
5382
5382
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5383
5383
  * window to float samples (D455).
@@ -9383,6 +9383,16 @@ var CompositionSchema = object({
9383
9383
  seen.add(feature.cap);
9384
9384
  });
9385
9385
  });
9386
+ var NodeColorIdSchema = _enum([
9387
+ "node-a",
9388
+ "node-b",
9389
+ "node-c",
9390
+ "node-d",
9391
+ "node-e",
9392
+ "node-f",
9393
+ "node-g",
9394
+ "node-h"
9395
+ ]);
9386
9396
  new Set([
9387
9397
  "track",
9388
9398
  "face",
@@ -18444,14 +18454,14 @@ var LlmProfileSchema = object({
18444
18454
  /** ConfigUISchema tree passed through untyped on the wire (the
18445
18455
  * notification-output `ConfigSchemaPassthrough` precedent at
18446
18456
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18447
- var ConfigSchemaPassthrough$1 = unknown();
18457
+ var ConfigSchemaPassthrough$3 = unknown();
18448
18458
  var LlmProfileKindDescriptorSchema = object({
18449
18459
  kind: LlmProfileKindSchema,
18450
18460
  label: string(),
18451
18461
  icon: string(),
18452
18462
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18453
18463
  addonId: string(),
18454
- configSchema: ConfigSchemaPassthrough$1
18464
+ configSchema: ConfigSchemaPassthrough$3
18455
18465
  });
18456
18466
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18457
18467
  var LlmDefaultSchema = object({
@@ -19572,7 +19582,7 @@ var TargetKindCapsSchema = object({
19572
19582
  * the union is large and not meant for runtime validation here; the exported
19573
19583
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19574
19584
  */
19575
- var ConfigSchemaPassthrough = unknown();
19585
+ var ConfigSchemaPassthrough$2 = unknown();
19576
19586
  var TargetKindSchema = object({
19577
19587
  kind: string(),
19578
19588
  label: string(),
@@ -19609,7 +19619,7 @@ var TargetKindSchema = object({
19609
19619
  * its raster path, which is the safe default for an unknown image.
19610
19620
  */
19611
19621
  iconMediaType: string().optional(),
19612
- configSchema: ConfigSchemaPassthrough,
19622
+ configSchema: ConfigSchemaPassthrough$2,
19613
19623
  /**
19614
19624
  * The config keys that decide WHERE this kind's secrets are sent (server,
19615
19625
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22946,6 +22956,61 @@ var OauthIntegrationDescriptorSchema = object({
22946
22956
  });
22947
22957
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
22948
22958
  /**
22959
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22960
+ *
22961
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22962
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
22963
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
22964
+ * immutable after create.
22965
+ */
22966
+ var ConfigSchemaPassthrough$1 = unknown();
22967
+ var OidcConnectionSchema = object({
22968
+ id: string().min(1),
22969
+ displayName: string(),
22970
+ icon: string(),
22971
+ issuerUrl: string(),
22972
+ clientId: string(),
22973
+ /** Client id + secret present — never the secret value. */
22974
+ configured: boolean(),
22975
+ /**
22976
+ * Values for the connection form schema. `clientSecret` is a keychain
22977
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
22978
+ */
22979
+ formValues: record(string(), unknown()).optional()
22980
+ });
22981
+ /**
22982
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
22983
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
22984
+ */
22985
+ var OidcConnectionUpdateInputSchema = object({
22986
+ id: string().min(1),
22987
+ displayName: string().min(1),
22988
+ icon: string().optional(),
22989
+ issuerUrl: string().optional(),
22990
+ clientId: string().optional(),
22991
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
22992
+ redirectUri: string().optional(),
22993
+ scopes: string().optional(),
22994
+ usernameClaim: _enum([
22995
+ "preferred_username",
22996
+ "email",
22997
+ "sub"
22998
+ ]).optional()
22999
+ });
23000
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23001
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23002
+ displayName: string().min(1)
23003
+ }), object({ id: string() }), {
23004
+ kind: "mutation",
23005
+ auth: "admin"
23006
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23007
+ kind: "mutation",
23008
+ auth: "admin"
23009
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23010
+ kind: "mutation",
23011
+ auth: "admin"
23012
+ });
23013
+ /**
22949
23014
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22950
23015
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22951
23016
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24302,24 +24367,69 @@ var RetrainFrameListSchema = object({
24302
24367
  /** What the page pre-selects — the native key frame when one survives. */
24303
24368
  autoPickMediaId: number().int().optional()
24304
24369
  });
24370
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24371
+ var RetrainFrameWorkStateSchema = _enum([
24372
+ "unannotated",
24373
+ "annotated",
24374
+ "complete"
24375
+ ]);
24376
+ /**
24377
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24378
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24379
+ */
24380
+ var RetrainCorpusFilterSchema = object({
24381
+ workState: RetrainFrameWorkStateSchema.optional(),
24382
+ deviceIds: array(number()).max(500).optional(),
24383
+ /** When set, only frames in this named collection. */
24384
+ collectionId: string().optional(),
24385
+ /** Frames that carry at least one saved annotation in one of these classes. */
24386
+ classes: array(RetrainMacroClassSchema).optional(),
24387
+ page: number().int().positive().default(1),
24388
+ pageSize: number().int().positive().max(100).default(50)
24389
+ });
24390
+ var RetrainCorpusPageSchema = object({
24391
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24392
+ total: number().int().nonnegative(),
24393
+ page: number().int().positive(),
24394
+ pageSize: number().int().positive()
24395
+ });
24396
+ var RetrainCorpusKpiCameraRowSchema = object({
24397
+ deviceId: number(),
24398
+ unannotated: number().int().nonnegative(),
24399
+ annotated: number().int().nonnegative(),
24400
+ complete: number().int().nonnegative(),
24401
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24402
+ * `null` when the corpus is empty (no ratio). */
24403
+ pctOfCorpus: number().min(0).max(1).nullable()
24404
+ });
24405
+ var RetrainCorpusKpiSchema = object({
24406
+ total: number().int().nonnegative(),
24407
+ unannotated: number().int().nonnegative(),
24408
+ annotated: number().int().nonnegative(),
24409
+ complete: number().int().nonnegative(),
24410
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24411
+ });
24305
24412
  /**
24306
24413
  * Which frames an annotated export carries. Every field narrows; an empty
24307
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24308
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24309
- * the primitive a version export uses; `batchId` re-selects what an earlier
24310
- * export carried (`exportedInBatch`).
24414
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24415
+ * download uses; `batchId` re-selects what an earlier export carried
24416
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24417
+ * resolves to `frameIds` at plan/start.
24311
24418
  */
24312
24419
  var RetrainExportFilterSchema = object({
24313
24420
  deviceIds: array(number()).optional(),
24314
24421
  frameIds: array(string()).max(2e4).optional(),
24315
24422
  /** Only frames in at least one of these named collections. */
24316
24423
  collectionIds: array(string()).max(200).optional(),
24317
- /** Exactly the frames of this dataset version (and its completeOnly). An
24318
- * unknown id selects nothing. */
24319
- datasetVersionId: string().optional(),
24424
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24425
+ collectionId: string().optional(),
24320
24426
  batchId: string().optional(),
24321
24427
  /** Only frames the operator marked complete (all subjects boxed). */
24322
- completeOnly: boolean().optional()
24428
+ completeOnly: boolean().optional(),
24429
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24430
+ workState: RetrainFrameWorkStateSchema.optional(),
24431
+ /** Frames with at least one saved annotation in one of these classes. */
24432
+ classes: array(RetrainMacroClassSchema).optional()
24323
24433
  });
24324
24434
  /**
24325
24435
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24519,8 +24629,7 @@ var RetrainDatasetStatsSchema = object({
24519
24629
  completeFrames: number().int()
24520
24630
  })).readonly()
24521
24631
  });
24522
- /** An immutable dataset version, without its frame list. */
24523
- var RetrainDatasetVersionSchema = object({
24632
+ object({
24524
24633
  id: string(),
24525
24634
  name: string(),
24526
24635
  createdAt: number(),
@@ -24528,22 +24637,33 @@ var RetrainDatasetVersionSchema = object({
24528
24637
  layout: RetrainExportLayoutSchema,
24529
24638
  completeOnly: boolean(),
24530
24639
  frameCount: number().int(),
24531
- /** sha256 of what the frames taught when the version was frozen. */
24532
24640
  annotationHash: string(),
24533
- /** The export manifest schema the version was cut under. */
24534
24641
  manifestSchema: string(),
24535
24642
  stats: RetrainDatasetStatsSchema
24536
24643
  });
24537
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24538
- kind: literal("created"),
24539
- version: RetrainDatasetVersionSchema
24644
+ /**
24645
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24646
+ * the training cap. Resolved here so plan/start and the annotated export share
24647
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24648
+ */
24649
+ var RetrainTrainingCorpusSelectionSchema = object({
24650
+ collectionIds: array(string()).min(1),
24651
+ workState: _enum([
24652
+ "complete",
24653
+ "annotated_or_complete",
24654
+ "any_annotated"
24655
+ ]).default("complete")
24656
+ });
24657
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24658
+ kind: literal("resolved"),
24659
+ frameIds: array(string()).max(2e4).readonly(),
24660
+ stats: RetrainDatasetStatsSchema,
24661
+ annotationHash: string(),
24662
+ layout: RetrainExportLayoutSchema
24540
24663
  }), object({
24541
24664
  kind: literal("refused"),
24542
- reason: _enum([
24543
- "empty-name",
24544
- "duplicate-name",
24545
- "no-frames"
24546
- ])
24665
+ reason: _enum(["unknown-collection", "no-frames"]),
24666
+ detail: string()
24547
24667
  })]);
24548
24668
  /** The outcome of a lifecycle move owned by the retrain page. */
24549
24669
  var RetrainTransitionResultSchema = object({
@@ -25250,6 +25370,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25250
25370
  }), array(RetrainTrackSchema).readonly(), {
25251
25371
  kind: "query",
25252
25372
  auth: "admin"
25373
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25374
+ kind: "query",
25375
+ auth: "admin"
25376
+ }), method(object({}), RetrainCorpusKpiSchema, {
25377
+ kind: "query",
25378
+ auth: "admin"
25253
25379
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25254
25380
  kind: "query",
25255
25381
  auth: "admin"
@@ -25345,36 +25471,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25345
25471
  kind: "mutation",
25346
25472
  auth: "admin",
25347
25473
  timeoutMs: 12e4
25348
- }), method(object({
25349
- selection: RetrainDatasetSelectionSchema,
25350
- completeOnly: boolean().optional()
25351
- }), RetrainDatasetStatsSchema, {
25352
- kind: "query",
25353
- auth: "admin"
25354
- }), method(object({
25355
- name: string().max(120),
25356
- selection: RetrainDatasetSelectionSchema,
25357
- layout: RetrainExportLayoutSchema,
25358
- completeOnly: boolean()
25359
- }), CreateRetrainDatasetVersionResultSchema, {
25360
- kind: "mutation",
25361
- auth: "admin",
25362
- timeoutMs: 12e4
25363
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25364
- kind: "query",
25365
- auth: "admin"
25366
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25367
- kind: "mutation",
25368
- auth: "admin"
25369
- }), method(object({ id: string() }), object({
25370
- found: boolean(),
25371
- annotationHash: string(),
25372
- matches: boolean(),
25373
- missingFrames: number().int()
25374
- }), {
25375
- kind: "query",
25376
- auth: "admin",
25377
- timeoutMs: 12e4
25378
25474
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25379
25475
  kind: "query",
25380
25476
  auth: "admin"
@@ -25401,6 +25497,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25401
25497
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25402
25498
  kind: "query",
25403
25499
  auth: "admin"
25500
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25501
+ kind: "query",
25502
+ auth: "admin",
25503
+ timeoutMs: 6e4
25404
25504
  }), method(object({
25405
25505
  id: string(),
25406
25506
  name: string().max(120)
@@ -26017,11 +26117,14 @@ var HardwareClassIdSchema = _enum([
26017
26117
  "intel-n-series",
26018
26118
  "apple-m-base",
26019
26119
  "apple-m-pro",
26120
+ "amd-phoenix",
26020
26121
  "unknown"
26021
26122
  ]);
26022
26123
  var AcceleratorKindSchema = _enum([
26023
26124
  "intel-npu",
26024
26125
  "intel-igpu",
26126
+ "amd-igpu",
26127
+ "amd-npu",
26025
26128
  "x86-cpu",
26026
26129
  "arm-cpu",
26027
26130
  "apple-ane",
@@ -27951,6 +28054,8 @@ var AgentPipelineSettingsSchema = object({
27951
28054
  * address is wrong (multi-homed host, NAT, custom interface).
27952
28055
  */
27953
28056
  reachableHost: string().optional(),
28057
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28058
+ color: NodeColorIdSchema.optional(),
27954
28059
  /**
27955
28060
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27956
28061
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28500,8 +28605,9 @@ method(object({
28500
28605
  auth: "admin"
28501
28606
  }), method(object({
28502
28607
  agentNodeId: string(),
28503
- reachableHost: string().nullable()
28504
- }), object({ success: literal(true) }), {
28608
+ reachableHost: string().nullable().optional(),
28609
+ color: NodeColorIdSchema.nullable().optional()
28610
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28505
28611
  kind: "mutation",
28506
28612
  auth: "admin"
28507
28613
  }), method(object({
@@ -31681,7 +31787,7 @@ var CustomActionInputSchema = object({
31681
31787
  action: string().min(1),
31682
31788
  input: unknown()
31683
31789
  });
31684
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31790
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31685
31791
  addonId: string(),
31686
31792
  limit: number().min(1).max(500).default(100),
31687
31793
  level: LogLevelSchema$2.optional()
@@ -36751,7 +36857,13 @@ var TopologyNodeSchema = object({
36751
36857
  })).readonly(),
36752
36858
  processes: array(TopologyProcessSchema).readonly(),
36753
36859
  categories: array(TopologyCategorySchema).readonly(),
36754
- rootPackage: TopologyRootPackageSchema.nullable()
36860
+ rootPackage: TopologyRootPackageSchema.nullable(),
36861
+ /**
36862
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
36863
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
36864
+ * for offline rows and when the hub cannot tell.
36865
+ */
36866
+ meshTransport: _enum(["tls", "clear"]).optional()
36755
36867
  });
36756
36868
  var CapUsageEdgeSchema = object({
36757
36869
  callerAddonId: string(),
@@ -37164,6 +37276,7 @@ var OsdNamedTemplateSchema = object({
37164
37276
  });
37165
37277
  /** Where a slot's value comes from. */
37166
37278
  var OsdSourceSchema = discriminatedUnion("kind", [
37279
+ object({ kind: literal("none") }),
37167
37280
  object({
37168
37281
  kind: literal("static"),
37169
37282
  text: string().max(64)
@@ -37290,6 +37403,13 @@ method(object({ deviceId: number().int() }), object({
37290
37403
  }), object({ success: literal(true) }), {
37291
37404
  kind: "mutation",
37292
37405
  auth: "admin"
37406
+ }), method(object({
37407
+ deviceId: number().int(),
37408
+ slotId: string().min(1),
37409
+ enabled: boolean()
37410
+ }), object({ success: literal(true) }), {
37411
+ kind: "mutation",
37412
+ auth: "admin"
37293
37413
  }), method(object({
37294
37414
  sourceDeviceId: number().int(),
37295
37415
  targetDeviceId: number().int()
@@ -37721,7 +37841,15 @@ var GpuInfoSchema = object({
37721
37841
  name: string(),
37722
37842
  memoryMB: number().optional()
37723
37843
  });
37724
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
37844
+ var NpuInfoSchema = object({
37845
+ type: _enum([
37846
+ "apple-ane",
37847
+ "intel-npu",
37848
+ "amd-xdna"
37849
+ ]),
37850
+ name: string().optional(),
37851
+ generation: _enum(["xdna1", "xdna2"]).optional()
37852
+ });
37725
37853
  var CoralInfoSchema = object({
37726
37854
  type: literal("coral-edgetpu"),
37727
37855
  bus: string().optional()
@@ -42464,9 +42592,11 @@ var zoneRulesCapability = {
42464
42592
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42465
42593
  * manifest entry and nothing else.
42466
42594
  *
42467
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42468
- * `notification-output` posture); `describe` concat-fans across providers.
42469
- * Every method is `admin`: these spend money.
42595
+ * Collection of provider **types** (addons). Each addon owns zero or more
42596
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
42597
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
42598
+ * `entryId`; callers also pass the owning `addonId` as the collection
42599
+ * selector (broker posture). Every method is `admin`: these spend money.
42470
42600
  *
42471
42601
  * Every cloud object a provider creates is tagged with the orchestrator's
42472
42602
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42490,8 +42620,8 @@ var TrainingRegionOptionSchema = object({
42490
42620
  priceMultiplier: number().positive()
42491
42621
  });
42492
42622
  /**
42493
- * The provider's per-account settings, as the orchestrator reads them. They
42494
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
42623
+ * The provider's per-entry settings, as the orchestrator reads them. They
42624
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
42495
42625
  * depend on the user's account), never hard-coded in the orchestrator.
42496
42626
  */
42497
42627
  var TrainingProviderDefaultsSchema = object({
@@ -42502,9 +42632,44 @@ var TrainingProviderDefaultsSchema = object({
42502
42632
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
42503
42633
  failedDatasetGraceHours: number().nonnegative()
42504
42634
  });
42635
+ /**
42636
+ * Entry form schema for a provider type — same seam as notification
42637
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
42638
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
42639
+ */
42640
+ var ConfigSchemaPassthrough = unknown();
42641
+ /** One creatable provider type, for the Add-entry dialog. */
42642
+ var TrainingProviderTypeSchema = object({
42643
+ typeId: string(),
42644
+ label: string(),
42645
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
42646
+ iconAsset: string(),
42647
+ /** Owning `training-provider` addon — collection selector for createEntry. */
42648
+ addonId: string(),
42649
+ /**
42650
+ * Fields for one entry of this type (credentials + defaults). Absent on a
42651
+ * type that only needs a name. Password fields are keychain-backed on the
42652
+ * provider addon (`secretStatePaths`), not D634 plaintext.
42653
+ */
42654
+ configSchema: ConfigSchemaPassthrough.optional()
42655
+ });
42656
+ /** One configured account / workspace under a provider type. */
42657
+ var TrainingProviderEntrySchema = object({
42658
+ entryId: string(),
42659
+ typeId: string(),
42660
+ name: string(),
42661
+ addonId: string(),
42662
+ /** Credentials are present — never the values. */
42663
+ configured: boolean()
42664
+ });
42505
42665
  var TrainingProviderDescriptorSchema = object({
42506
42666
  addonId: string(),
42507
- /** `modal`, `runpod`, `fake`, … */
42667
+ entryId: string(),
42668
+ typeId: string(),
42669
+ /** Operator-chosen entry name. */
42670
+ name: string(),
42671
+ iconAsset: string(),
42672
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
42508
42673
  kind: string(),
42509
42674
  label: string(),
42510
42675
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -42516,7 +42681,30 @@ var TrainingProviderDescriptorSchema = object({
42516
42681
  dataResidencyNote: string(),
42517
42682
  /** Credentials are present — never the values. */
42518
42683
  configured: boolean(),
42519
- defaults: TrainingProviderDefaultsSchema
42684
+ defaults: TrainingProviderDefaultsSchema,
42685
+ /**
42686
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
42687
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
42688
+ * never plaintext. Same hydrate contract as settings forms (D789).
42689
+ */
42690
+ formValues: record(string(), unknown()).optional()
42691
+ });
42692
+ /**
42693
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
42694
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
42695
+ * `{ $secretClear: true }` clears it.
42696
+ */
42697
+ var TrainingProviderUpdateEntryInputSchema = object({
42698
+ entryId: string().min(1),
42699
+ name: string().min(1),
42700
+ tokenId: string().optional(),
42701
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
42702
+ environment: string().optional(),
42703
+ gpuType: string().optional(),
42704
+ region: string().optional(),
42705
+ costCapUsd: number().nonnegative().optional(),
42706
+ maxRuntimeSec: number().int().positive().optional(),
42707
+ failedDatasetGraceHours: number().nonnegative().optional()
42520
42708
  });
42521
42709
  var TrainingCredentialCheckSchema = object({
42522
42710
  ok: boolean(),
@@ -42568,20 +42756,33 @@ var TrainerSourceRefSchema = object({
42568
42756
  /** A commit sha (never a branch) — the job must be reproducible. */
42569
42757
  revision: string().regex(/^[0-9a-f]{7,64}$/)
42570
42758
  });
42759
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
42571
42760
  var JobRef = {
42572
- addonId: string(),
42761
+ entryId: string().min(1),
42573
42762
  jobKey: string().uuid()
42574
42763
  };
42575
42764
  var TrainingLogLineSchema = object({
42576
42765
  ts: number(),
42577
42766
  text: string()
42578
42767
  });
42579
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
42768
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
42769
+ typeId: string().min(1),
42770
+ name: string().min(1)
42771
+ }), object({ entryId: string() }), {
42772
+ kind: "mutation",
42773
+ auth: "admin"
42774
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
42775
+ kind: "mutation",
42776
+ auth: "admin"
42777
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
42778
+ kind: "mutation",
42779
+ auth: "admin"
42780
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
42580
42781
  kind: "mutation",
42581
42782
  auth: "admin",
42582
42783
  timeoutMs: 3e4
42583
42784
  }), method(object({
42584
- addonId: string(),
42785
+ entryId: string().min(1),
42585
42786
  gpuType: string(),
42586
42787
  region: string(),
42587
42788
  datasetBytes: number().int().nonnegative(),
@@ -42647,7 +42848,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42647
42848
  kind: "mutation",
42648
42849
  auth: "admin",
42649
42850
  timeoutMs: 5 * 6e4
42650
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
42851
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
42651
42852
  auth: "admin",
42652
42853
  timeoutMs: 2 * 6e4
42653
42854
  });
@@ -42657,20 +42858,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42657
42858
  *
42658
42859
  * It owns what every provider must agree on, written once:
42659
42860
  *
42660
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
42661
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
42662
- * the export plan) and reaches this store through the five row methods
42663
- * below, so the Retrain page and the export did not change.
42664
42861
  * - **Jobs.** A persisted state machine, a reconcile loop against the
42665
42862
  * provider, a cost guard, a daily orphan sweep and the retention rules.
42666
42863
  * - **The return flow.** Verified artefacts → Model Studio
42667
42864
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
42668
42865
  * rollback. Nothing is ever registered automatically.
42669
42866
  *
42867
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
42868
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
42869
+ * moment and snapshotted on the job. No frozen dataset version.
42870
+ *
42670
42871
  * Every method is `admin`.
42671
42872
  */
42672
- /** A version WITH its frame list — what the export and a job read. */
42673
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
42873
+ /**
42874
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
42875
+ * Frame ids are resolved at plan/start — never a frozen version id.
42876
+ */
42877
+ var TrainingCorpusSelectionSchema = object({
42878
+ collectionIds: array(string()).min(1),
42879
+ /** Default complete-only for v1 */
42880
+ workState: _enum([
42881
+ "complete",
42882
+ "annotated_or_complete",
42883
+ "any_annotated"
42884
+ ]).default("complete")
42885
+ });
42674
42886
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
42675
42887
  var TrainingBaseModelSchema = object({
42676
42888
  modelId: string(),
@@ -42688,9 +42900,13 @@ var TrainingPresetSchema = _enum([
42688
42900
  "thorough"
42689
42901
  ]);
42690
42902
  var TrainingJobRequestSchema = object({
42691
- datasetVersionId: string().min(1),
42692
- /** The `training-provider` addon that runs it. */
42693
- addonId: string().min(1),
42903
+ /** Live collection + work-state criteria; resolved at plan/start. */
42904
+ selection: TrainingCorpusSelectionSchema,
42905
+ /**
42906
+ * The provider **entry** that runs it (credentials + defaults).
42907
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
42908
+ */
42909
+ entryId: string().min(1),
42694
42910
  gpuType: string().min(1),
42695
42911
  region: string(),
42696
42912
  baseModelId: string().min(1),
@@ -42749,6 +42965,7 @@ var TrainingJobPlanSchema = object({
42749
42965
  * result lives after the operator acted on it.
42750
42966
  */
42751
42967
  var TrainingJobStateSchema = _enum([
42968
+ "queued",
42752
42969
  "uploading",
42753
42970
  "submitted",
42754
42971
  "starting",
@@ -42802,6 +43019,11 @@ var TrainingJobSchema = object({
42802
43019
  createdAt: number(),
42803
43020
  updatedAt: number(),
42804
43021
  state: TrainingJobStateSchema,
43022
+ /**
43023
+ * Shared by every job enqueued together via `startJobBatch`.
43024
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43025
+ */
43026
+ batchId: string().nullable().default(null),
42805
43027
  stage: TrainingStageSchema.nullable(),
42806
43028
  failure: object({
42807
43029
  reason: TrainingFailureReasonSchema,
@@ -42813,6 +43035,12 @@ var TrainingJobSchema = object({
42813
43035
  maxRuntimeSec: number().int().positive(),
42814
43036
  trainer: TrainerSourceRefSchema,
42815
43037
  datasetLayout: RetrainExportLayoutSchema,
43038
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43039
+ frameCount: number().int().nonnegative(),
43040
+ /** Resolved frame ids at start — the archive ships exactly these. */
43041
+ frameIds: array(string()).max(2e4).readonly(),
43042
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43043
+ annotationHash: string(),
42816
43044
  dataset: object({
42817
43045
  bytes: number().int(),
42818
43046
  sha256: string(),
@@ -42854,13 +43082,7 @@ var TrainingJobSchema = object({
42854
43082
  canary: TrainingCanarySchema.nullable()
42855
43083
  });
42856
43084
  var IdInput = object({ id: string().min(1) });
42857
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42858
- kind: "mutation",
42859
- auth: "admin"
42860
- }), 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() }), {
42861
- kind: "mutation",
42862
- auth: "admin"
42863
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43085
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
42864
43086
  auth: "admin",
42865
43087
  timeoutMs: 6e4
42866
43088
  }), method(TrainingJobRequestSchema.extend({
@@ -42879,6 +43101,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42879
43101
  kind: "mutation",
42880
43102
  auth: "admin",
42881
43103
  timeoutMs: 12e4
43104
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43105
+ baseModelIds: array(string().min(1)).min(1),
43106
+ name: string().min(1).max(120),
43107
+ maxCostUsd: number().positive(),
43108
+ maxRuntimeSec: number().int().positive(),
43109
+ idempotencyKey: string().min(8).max(80)
43110
+ }), discriminatedUnion("kind", [object({
43111
+ kind: literal("started"),
43112
+ batchId: string(),
43113
+ jobs: array(TrainingJobSchema).min(1).readonly()
43114
+ }), object({
43115
+ kind: literal("refused"),
43116
+ reason: TrainingRefusalReasonSchema,
43117
+ detail: string()
43118
+ })]), {
43119
+ kind: "mutation",
43120
+ auth: "admin",
43121
+ timeoutMs: 12e4
42882
43122
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
42883
43123
  kind: "mutation",
42884
43124
  auth: "admin",
@@ -48437,6 +48677,36 @@ Object.freeze({
48437
48677
  addonId: null,
48438
48678
  access: "view"
48439
48679
  },
48680
+ "oidcConnections.connectionFormSchema": {
48681
+ capName: "oidc-connections",
48682
+ capScope: "system",
48683
+ addonId: null,
48684
+ access: "view"
48685
+ },
48686
+ "oidcConnections.createConnection": {
48687
+ capName: "oidc-connections",
48688
+ capScope: "system",
48689
+ addonId: null,
48690
+ access: "create"
48691
+ },
48692
+ "oidcConnections.deleteConnection": {
48693
+ capName: "oidc-connections",
48694
+ capScope: "system",
48695
+ addonId: null,
48696
+ access: "delete"
48697
+ },
48698
+ "oidcConnections.listConnections": {
48699
+ capName: "oidc-connections",
48700
+ capScope: "system",
48701
+ addonId: null,
48702
+ access: "view"
48703
+ },
48704
+ "oidcConnections.updateConnection": {
48705
+ capName: "oidc-connections",
48706
+ capScope: "system",
48707
+ addonId: null,
48708
+ access: "create"
48709
+ },
48440
48710
  "osd.getStatus": {
48441
48711
  capName: "osd",
48442
48712
  capScope: "device",
@@ -48509,6 +48779,12 @@ Object.freeze({
48509
48779
  addonId: null,
48510
48780
  access: "create"
48511
48781
  },
48782
+ "osdManager.setSlotCameraEnabled": {
48783
+ capName: "osd-manager",
48784
+ capScope: "system",
48785
+ addonId: null,
48786
+ access: "create"
48787
+ },
48512
48788
  "osdManager.upsertTemplate": {
48513
48789
  capName: "osd-manager",
48514
48790
  capScope: "system",
@@ -48647,12 +48923,6 @@ Object.freeze({
48647
48923
  addonId: null,
48648
48924
  access: "create"
48649
48925
  },
48650
- "pipelineAnalytics.createRetrainDatasetVersion": {
48651
- capName: "pipeline-analytics",
48652
- capScope: "device",
48653
- addonId: null,
48654
- access: "create"
48655
- },
48656
48926
  "pipelineAnalytics.deleteDeviceEvents": {
48657
48927
  capName: "pipeline-analytics",
48658
48928
  capScope: "device",
@@ -48665,12 +48935,6 @@ Object.freeze({
48665
48935
  addonId: null,
48666
48936
  access: "delete"
48667
48937
  },
48668
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
48669
- capName: "pipeline-analytics",
48670
- capScope: "device",
48671
- addonId: null,
48672
- access: "delete"
48673
- },
48674
48938
  "pipelineAnalytics.deleteTracks": {
48675
48939
  capName: "pipeline-analytics",
48676
48940
  capScope: "device",
@@ -48773,6 +49037,12 @@ Object.freeze({
48773
49037
  addonId: null,
48774
49038
  access: "view"
48775
49039
  },
49040
+ "pipelineAnalytics.getRetrainCorpusKpi": {
49041
+ capName: "pipeline-analytics",
49042
+ capScope: "device",
49043
+ addonId: null,
49044
+ access: "view"
49045
+ },
48776
49046
  "pipelineAnalytics.getRetrainExportUrl": {
48777
49047
  capName: "pipeline-analytics",
48778
49048
  capScope: "device",
@@ -48893,7 +49163,7 @@ Object.freeze({
48893
49163
  addonId: null,
48894
49164
  access: "view"
48895
49165
  },
48896
- "pipelineAnalytics.listRetrainDatasetVersions": {
49166
+ "pipelineAnalytics.listRetrainCorpusPage": {
48897
49167
  capName: "pipeline-analytics",
48898
49168
  capScope: "device",
48899
49169
  addonId: null,
@@ -48947,12 +49217,6 @@ Object.freeze({
48947
49217
  addonId: null,
48948
49218
  access: "create"
48949
49219
  },
48950
- "pipelineAnalytics.previewRetrainDataset": {
48951
- capName: "pipeline-analytics",
48952
- capScope: "device",
48953
- addonId: null,
48954
- access: "view"
48955
- },
48956
49220
  "pipelineAnalytics.proposeRetrainAnnotations": {
48957
49221
  capName: "pipeline-analytics",
48958
49222
  capScope: "device",
@@ -49031,6 +49295,12 @@ Object.freeze({
49031
49295
  addonId: null,
49032
49296
  access: "create"
49033
49297
  },
49298
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
49299
+ capName: "pipeline-analytics",
49300
+ capScope: "device",
49301
+ addonId: null,
49302
+ access: "view"
49303
+ },
49034
49304
  "pipelineAnalytics.restageRetrainTrack": {
49035
49305
  capName: "pipeline-analytics",
49036
49306
  capScope: "device",
@@ -49091,12 +49361,6 @@ Object.freeze({
49091
49361
  addonId: null,
49092
49362
  access: "create"
49093
49363
  },
49094
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
49095
- capName: "pipeline-analytics",
49096
- capScope: "device",
49097
- addonId: null,
49098
- access: "view"
49099
- },
49100
49364
  "pipelineAnalytics.wipeAllAnalytics": {
49101
49365
  capName: "pipeline-analytics",
49102
49366
  capScope: "device",
@@ -51491,18 +51755,6 @@ Object.freeze({
51491
51755
  addonId: null,
51492
51756
  access: "create"
51493
51757
  },
51494
- "training.findDatasetVersionIdByName": {
51495
- capName: "training",
51496
- capScope: "system",
51497
- addonId: null,
51498
- access: "view"
51499
- },
51500
- "training.getDatasetVersion": {
51501
- capName: "training",
51502
- capScope: "system",
51503
- addonId: null,
51504
- access: "view"
51505
- },
51506
51758
  "training.getJob": {
51507
51759
  capName: "training",
51508
51760
  capScope: "system",
@@ -51521,12 +51773,6 @@ Object.freeze({
51521
51773
  addonId: null,
51522
51774
  access: "view"
51523
51775
  },
51524
- "training.listDatasetVersions": {
51525
- capName: "training",
51526
- capScope: "system",
51527
- addonId: null,
51528
- access: "view"
51529
- },
51530
51776
  "training.listJobs": {
51531
51777
  capName: "training",
51532
51778
  capScope: "system",
@@ -51539,54 +51785,66 @@ Object.freeze({
51539
51785
  addonId: null,
51540
51786
  access: "view"
51541
51787
  },
51542
- "training.putDatasetVersion": {
51788
+ "training.registerResult": {
51543
51789
  capName: "training",
51544
51790
  capScope: "system",
51545
51791
  addonId: null,
51546
51792
  access: "create"
51547
51793
  },
51548
- "training.registerResult": {
51794
+ "training.rollbackCanary": {
51549
51795
  capName: "training",
51550
51796
  capScope: "system",
51551
51797
  addonId: null,
51552
51798
  access: "create"
51553
51799
  },
51554
- "training.removeDatasetVersion": {
51800
+ "training.startJob": {
51555
51801
  capName: "training",
51556
51802
  capScope: "system",
51557
51803
  addonId: null,
51558
- access: "delete"
51804
+ access: "create"
51559
51805
  },
51560
- "training.rollbackCanary": {
51806
+ "training.startJobBatch": {
51561
51807
  capName: "training",
51562
51808
  capScope: "system",
51563
51809
  addonId: null,
51564
51810
  access: "create"
51565
51811
  },
51566
- "training.startJob": {
51567
- capName: "training",
51812
+ "trainingProvider.cancelJob": {
51813
+ capName: "training-provider",
51568
51814
  capScope: "system",
51569
51815
  addonId: null,
51570
51816
  access: "create"
51571
51817
  },
51572
- "trainingProvider.cancelJob": {
51818
+ "trainingProvider.cleanupJob": {
51573
51819
  capName: "training-provider",
51574
51820
  capScope: "system",
51575
51821
  addonId: null,
51576
51822
  access: "create"
51577
51823
  },
51578
- "trainingProvider.cleanupJob": {
51824
+ "trainingProvider.createEntry": {
51579
51825
  capName: "training-provider",
51580
51826
  capScope: "system",
51581
51827
  addonId: null,
51582
51828
  access: "create"
51583
51829
  },
51830
+ "trainingProvider.deleteEntry": {
51831
+ capName: "training-provider",
51832
+ capScope: "system",
51833
+ addonId: null,
51834
+ access: "delete"
51835
+ },
51584
51836
  "trainingProvider.describe": {
51585
51837
  capName: "training-provider",
51586
51838
  capScope: "system",
51587
51839
  addonId: null,
51588
51840
  access: "view"
51589
51841
  },
51842
+ "trainingProvider.describeTypes": {
51843
+ capName: "training-provider",
51844
+ capScope: "system",
51845
+ addonId: null,
51846
+ access: "view"
51847
+ },
51590
51848
  "trainingProvider.estimateJob": {
51591
51849
  capName: "training-provider",
51592
51850
  capScope: "system",
@@ -51599,6 +51857,12 @@ Object.freeze({
51599
51857
  addonId: null,
51600
51858
  access: "view"
51601
51859
  },
51860
+ "trainingProvider.listEntries": {
51861
+ capName: "training-provider",
51862
+ capScope: "system",
51863
+ addonId: null,
51864
+ access: "view"
51865
+ },
51602
51866
  "trainingProvider.listJobEvents": {
51603
51867
  capName: "training-provider",
51604
51868
  capScope: "system",
@@ -51629,6 +51893,12 @@ Object.freeze({
51629
51893
  addonId: null,
51630
51894
  access: "create"
51631
51895
  },
51896
+ "trainingProvider.updateEntry": {
51897
+ capName: "training-provider",
51898
+ capScope: "system",
51899
+ addonId: null,
51900
+ access: "create"
51901
+ },
51632
51902
  "trainingProvider.uploadDataset": {
51633
51903
  capName: "training-provider",
51634
51904
  capScope: "system",
@@ -54901,6 +55171,11 @@ Object.freeze({
54901
55171
  form: "single",
54902
55172
  optional: false
54903
55173
  }],
55174
+ "osdManager.setSlotCameraEnabled": [{
55175
+ name: "deviceId",
55176
+ form: "single",
55177
+ optional: false
55178
+ }],
54904
55179
  "petFeeder.callPet": [{
54905
55180
  name: "deviceId",
54906
55181
  form: "single",
@@ -55121,6 +55396,11 @@ Object.freeze({
55121
55396
  form: "array",
55122
55397
  optional: false
55123
55398
  }],
55399
+ "pipelineAnalytics.listRetrainCorpusPage": [{
55400
+ name: "deviceIds",
55401
+ form: "array",
55402
+ optional: true
55403
+ }],
55124
55404
  "pipelineAnalytics.listRetrainStaging": [{
55125
55405
  name: "deviceIds",
55126
55406
  form: "array",
@@ -56230,6 +56510,7 @@ Object.freeze({
56230
56510
  });
56231
56511
  Object.freeze({
56232
56512
  "broker": "broker",
56513
+ "calendar-source": "calendar",
56233
56514
  "device-export": "device-export",
56234
56515
  "llm": "ai",
56235
56516
  "mesh-network": "mesh",
@@ -56715,6 +56996,8 @@ var STATE_SUMMARY_VARS = [
56715
56996
  [...RULE_TEXT],
56716
56997
  [...RULE_TEXT],
56717
56998
  [...RULE_TEXT],
56999
+ [...RULE_TEXT],
57000
+ [...RULE_TEXT],
56718
57001
  ([...RULE_TEXT], [...UPDATES]),
56719
57002
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
56720
57003
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),