@camstack/addon-provider-dreo 0.2.124 → 0.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
@@ -5414,7 +5414,7 @@ var ZodIssueCode = {
5414
5414
  var ZodFirstPartyTypeKind;
5415
5415
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5416
5416
  //#endregion
5417
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5417
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5418
5418
  /**
5419
5419
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5420
5420
  * window to float samples (D455).
@@ -9420,6 +9420,16 @@ var CompositionSchema = object({
9420
9420
  seen.add(feature.cap);
9421
9421
  });
9422
9422
  });
9423
+ var NodeColorIdSchema = _enum([
9424
+ "node-a",
9425
+ "node-b",
9426
+ "node-c",
9427
+ "node-d",
9428
+ "node-e",
9429
+ "node-f",
9430
+ "node-g",
9431
+ "node-h"
9432
+ ]);
9423
9433
  new Set([
9424
9434
  "track",
9425
9435
  "face",
@@ -18466,14 +18476,14 @@ var LlmProfileSchema = object({
18466
18476
  /** ConfigUISchema tree passed through untyped on the wire (the
18467
18477
  * notification-output `ConfigSchemaPassthrough` precedent at
18468
18478
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18469
- var ConfigSchemaPassthrough$1 = unknown();
18479
+ var ConfigSchemaPassthrough$3 = unknown();
18470
18480
  var LlmProfileKindDescriptorSchema = object({
18471
18481
  kind: LlmProfileKindSchema,
18472
18482
  label: string(),
18473
18483
  icon: string(),
18474
18484
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18475
18485
  addonId: string(),
18476
- configSchema: ConfigSchemaPassthrough$1
18486
+ configSchema: ConfigSchemaPassthrough$3
18477
18487
  });
18478
18488
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18479
18489
  var LlmDefaultSchema = object({
@@ -19594,7 +19604,7 @@ var TargetKindCapsSchema = object({
19594
19604
  * the union is large and not meant for runtime validation here; the exported
19595
19605
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19596
19606
  */
19597
- var ConfigSchemaPassthrough = unknown();
19607
+ var ConfigSchemaPassthrough$2 = unknown();
19598
19608
  var TargetKindSchema = object({
19599
19609
  kind: string(),
19600
19610
  label: string(),
@@ -19631,7 +19641,7 @@ var TargetKindSchema = object({
19631
19641
  * its raster path, which is the safe default for an unknown image.
19632
19642
  */
19633
19643
  iconMediaType: string().optional(),
19634
- configSchema: ConfigSchemaPassthrough,
19644
+ configSchema: ConfigSchemaPassthrough$2,
19635
19645
  /**
19636
19646
  * The config keys that decide WHERE this kind's secrets are sent (server,
19637
19647
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -22968,6 +22978,61 @@ var OauthIntegrationDescriptorSchema = object({
22968
22978
  });
22969
22979
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
22970
22980
  /**
22981
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
22982
+ *
22983
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
22984
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
22985
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
22986
+ * immutable after create.
22987
+ */
22988
+ var ConfigSchemaPassthrough$1 = unknown();
22989
+ var OidcConnectionSchema = object({
22990
+ id: string().min(1),
22991
+ displayName: string(),
22992
+ icon: string(),
22993
+ issuerUrl: string(),
22994
+ clientId: string(),
22995
+ /** Client id + secret present — never the secret value. */
22996
+ configured: boolean(),
22997
+ /**
22998
+ * Values for the connection form schema. `clientSecret` is a keychain
22999
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23000
+ */
23001
+ formValues: record(string(), unknown()).optional()
23002
+ });
23003
+ /**
23004
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23005
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23006
+ */
23007
+ var OidcConnectionUpdateInputSchema = object({
23008
+ id: string().min(1),
23009
+ displayName: string().min(1),
23010
+ icon: string().optional(),
23011
+ issuerUrl: string().optional(),
23012
+ clientId: string().optional(),
23013
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23014
+ redirectUri: string().optional(),
23015
+ scopes: string().optional(),
23016
+ usernameClaim: _enum([
23017
+ "preferred_username",
23018
+ "email",
23019
+ "sub"
23020
+ ]).optional()
23021
+ });
23022
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23023
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23024
+ displayName: string().min(1)
23025
+ }), object({ id: string() }), {
23026
+ kind: "mutation",
23027
+ auth: "admin"
23028
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23029
+ kind: "mutation",
23030
+ auth: "admin"
23031
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23032
+ kind: "mutation",
23033
+ auth: "admin"
23034
+ });
23035
+ /**
22971
23036
  * What started a camera's onboard motion (D672). `camera` is the camera's own
22972
23037
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
22973
23038
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24324,24 +24389,69 @@ var RetrainFrameListSchema = object({
24324
24389
  /** What the page pre-selects — the native key frame when one survives. */
24325
24390
  autoPickMediaId: number().int().optional()
24326
24391
  });
24392
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24393
+ var RetrainFrameWorkStateSchema = _enum([
24394
+ "unannotated",
24395
+ "annotated",
24396
+ "complete"
24397
+ ]);
24398
+ /**
24399
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24400
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24401
+ */
24402
+ var RetrainCorpusFilterSchema = object({
24403
+ workState: RetrainFrameWorkStateSchema.optional(),
24404
+ deviceIds: array(number()).max(500).optional(),
24405
+ /** When set, only frames in this named collection. */
24406
+ collectionId: string().optional(),
24407
+ /** Frames that carry at least one saved annotation in one of these classes. */
24408
+ classes: array(RetrainMacroClassSchema).optional(),
24409
+ page: number().int().positive().default(1),
24410
+ pageSize: number().int().positive().max(100).default(50)
24411
+ });
24412
+ var RetrainCorpusPageSchema = object({
24413
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24414
+ total: number().int().nonnegative(),
24415
+ page: number().int().positive(),
24416
+ pageSize: number().int().positive()
24417
+ });
24418
+ var RetrainCorpusKpiCameraRowSchema = object({
24419
+ deviceId: number(),
24420
+ unannotated: number().int().nonnegative(),
24421
+ annotated: number().int().nonnegative(),
24422
+ complete: number().int().nonnegative(),
24423
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24424
+ * `null` when the corpus is empty (no ratio). */
24425
+ pctOfCorpus: number().min(0).max(1).nullable()
24426
+ });
24427
+ var RetrainCorpusKpiSchema = object({
24428
+ total: number().int().nonnegative(),
24429
+ unannotated: number().int().nonnegative(),
24430
+ annotated: number().int().nonnegative(),
24431
+ complete: number().int().nonnegative(),
24432
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24433
+ });
24327
24434
  /**
24328
24435
  * Which frames an annotated export carries. Every field narrows; an empty
24329
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24330
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24331
- * the primitive a version export uses; `batchId` re-selects what an earlier
24332
- * export carried (`exportedInBatch`).
24436
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24437
+ * download uses; `batchId` re-selects what an earlier export carried
24438
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24439
+ * resolves to `frameIds` at plan/start.
24333
24440
  */
24334
24441
  var RetrainExportFilterSchema = object({
24335
24442
  deviceIds: array(number()).optional(),
24336
24443
  frameIds: array(string()).max(2e4).optional(),
24337
24444
  /** Only frames in at least one of these named collections. */
24338
24445
  collectionIds: array(string()).max(200).optional(),
24339
- /** Exactly the frames of this dataset version (and its completeOnly). An
24340
- * unknown id selects nothing. */
24341
- datasetVersionId: string().optional(),
24446
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24447
+ collectionId: string().optional(),
24342
24448
  batchId: string().optional(),
24343
24449
  /** Only frames the operator marked complete (all subjects boxed). */
24344
- completeOnly: boolean().optional()
24450
+ completeOnly: boolean().optional(),
24451
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24452
+ workState: RetrainFrameWorkStateSchema.optional(),
24453
+ /** Frames with at least one saved annotation in one of these classes. */
24454
+ classes: array(RetrainMacroClassSchema).optional()
24345
24455
  });
24346
24456
  /**
24347
24457
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24541,8 +24651,7 @@ var RetrainDatasetStatsSchema = object({
24541
24651
  completeFrames: number().int()
24542
24652
  })).readonly()
24543
24653
  });
24544
- /** An immutable dataset version, without its frame list. */
24545
- var RetrainDatasetVersionSchema = object({
24654
+ object({
24546
24655
  id: string(),
24547
24656
  name: string(),
24548
24657
  createdAt: number(),
@@ -24550,22 +24659,33 @@ var RetrainDatasetVersionSchema = object({
24550
24659
  layout: RetrainExportLayoutSchema,
24551
24660
  completeOnly: boolean(),
24552
24661
  frameCount: number().int(),
24553
- /** sha256 of what the frames taught when the version was frozen. */
24554
24662
  annotationHash: string(),
24555
- /** The export manifest schema the version was cut under. */
24556
24663
  manifestSchema: string(),
24557
24664
  stats: RetrainDatasetStatsSchema
24558
24665
  });
24559
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24560
- kind: literal("created"),
24561
- version: RetrainDatasetVersionSchema
24666
+ /**
24667
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24668
+ * the training cap. Resolved here so plan/start and the annotated export share
24669
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24670
+ */
24671
+ var RetrainTrainingCorpusSelectionSchema = object({
24672
+ collectionIds: array(string()).min(1),
24673
+ workState: _enum([
24674
+ "complete",
24675
+ "annotated_or_complete",
24676
+ "any_annotated"
24677
+ ]).default("complete")
24678
+ });
24679
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24680
+ kind: literal("resolved"),
24681
+ frameIds: array(string()).max(2e4).readonly(),
24682
+ stats: RetrainDatasetStatsSchema,
24683
+ annotationHash: string(),
24684
+ layout: RetrainExportLayoutSchema
24562
24685
  }), object({
24563
24686
  kind: literal("refused"),
24564
- reason: _enum([
24565
- "empty-name",
24566
- "duplicate-name",
24567
- "no-frames"
24568
- ])
24687
+ reason: _enum(["unknown-collection", "no-frames"]),
24688
+ detail: string()
24569
24689
  })]);
24570
24690
  /** The outcome of a lifecycle move owned by the retrain page. */
24571
24691
  var RetrainTransitionResultSchema = object({
@@ -25272,6 +25392,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25272
25392
  }), array(RetrainTrackSchema).readonly(), {
25273
25393
  kind: "query",
25274
25394
  auth: "admin"
25395
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25396
+ kind: "query",
25397
+ auth: "admin"
25398
+ }), method(object({}), RetrainCorpusKpiSchema, {
25399
+ kind: "query",
25400
+ auth: "admin"
25275
25401
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25276
25402
  kind: "query",
25277
25403
  auth: "admin"
@@ -25367,36 +25493,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25367
25493
  kind: "mutation",
25368
25494
  auth: "admin",
25369
25495
  timeoutMs: 12e4
25370
- }), method(object({
25371
- selection: RetrainDatasetSelectionSchema,
25372
- completeOnly: boolean().optional()
25373
- }), RetrainDatasetStatsSchema, {
25374
- kind: "query",
25375
- auth: "admin"
25376
- }), method(object({
25377
- name: string().max(120),
25378
- selection: RetrainDatasetSelectionSchema,
25379
- layout: RetrainExportLayoutSchema,
25380
- completeOnly: boolean()
25381
- }), CreateRetrainDatasetVersionResultSchema, {
25382
- kind: "mutation",
25383
- auth: "admin",
25384
- timeoutMs: 12e4
25385
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25386
- kind: "query",
25387
- auth: "admin"
25388
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25389
- kind: "mutation",
25390
- auth: "admin"
25391
- }), method(object({ id: string() }), object({
25392
- found: boolean(),
25393
- annotationHash: string(),
25394
- matches: boolean(),
25395
- missingFrames: number().int()
25396
- }), {
25397
- kind: "query",
25398
- auth: "admin",
25399
- timeoutMs: 12e4
25400
25496
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25401
25497
  kind: "query",
25402
25498
  auth: "admin"
@@ -25423,6 +25519,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25423
25519
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25424
25520
  kind: "query",
25425
25521
  auth: "admin"
25522
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25523
+ kind: "query",
25524
+ auth: "admin",
25525
+ timeoutMs: 6e4
25426
25526
  }), method(object({
25427
25527
  id: string(),
25428
25528
  name: string().max(120)
@@ -26039,11 +26139,14 @@ var HardwareClassIdSchema = _enum([
26039
26139
  "intel-n-series",
26040
26140
  "apple-m-base",
26041
26141
  "apple-m-pro",
26142
+ "amd-phoenix",
26042
26143
  "unknown"
26043
26144
  ]);
26044
26145
  var AcceleratorKindSchema = _enum([
26045
26146
  "intel-npu",
26046
26147
  "intel-igpu",
26148
+ "amd-igpu",
26149
+ "amd-npu",
26047
26150
  "x86-cpu",
26048
26151
  "arm-cpu",
26049
26152
  "apple-ane",
@@ -27973,6 +28076,8 @@ var AgentPipelineSettingsSchema = object({
27973
28076
  * address is wrong (multi-homed host, NAT, custom interface).
27974
28077
  */
27975
28078
  reachableHost: string().optional(),
28079
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28080
+ color: NodeColorIdSchema.optional(),
27976
28081
  /**
27977
28082
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
27978
28083
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28522,8 +28627,9 @@ method(object({
28522
28627
  auth: "admin"
28523
28628
  }), method(object({
28524
28629
  agentNodeId: string(),
28525
- reachableHost: string().nullable()
28526
- }), object({ success: literal(true) }), {
28630
+ reachableHost: string().nullable().optional(),
28631
+ color: NodeColorIdSchema.nullable().optional()
28632
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28527
28633
  kind: "mutation",
28528
28634
  auth: "admin"
28529
28635
  }), method(object({
@@ -31599,7 +31705,7 @@ var CustomActionInputSchema = object({
31599
31705
  action: string().min(1),
31600
31706
  input: unknown()
31601
31707
  });
31602
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31708
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31603
31709
  addonId: string(),
31604
31710
  limit: number().min(1).max(500).default(100),
31605
31711
  level: LogLevelSchema$2.optional()
@@ -36669,7 +36775,13 @@ var TopologyNodeSchema = object({
36669
36775
  })).readonly(),
36670
36776
  processes: array(TopologyProcessSchema).readonly(),
36671
36777
  categories: array(TopologyCategorySchema).readonly(),
36672
- rootPackage: TopologyRootPackageSchema.nullable()
36778
+ rootPackage: TopologyRootPackageSchema.nullable(),
36779
+ /**
36780
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
36781
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
36782
+ * for offline rows and when the hub cannot tell.
36783
+ */
36784
+ meshTransport: _enum(["tls", "clear"]).optional()
36673
36785
  });
36674
36786
  var CapUsageEdgeSchema = object({
36675
36787
  callerAddonId: string(),
@@ -37082,6 +37194,7 @@ var OsdNamedTemplateSchema = object({
37082
37194
  });
37083
37195
  /** Where a slot's value comes from. */
37084
37196
  var OsdSourceSchema = discriminatedUnion("kind", [
37197
+ object({ kind: literal("none") }),
37085
37198
  object({
37086
37199
  kind: literal("static"),
37087
37200
  text: string().max(64)
@@ -37208,6 +37321,13 @@ method(object({ deviceId: number().int() }), object({
37208
37321
  }), object({ success: literal(true) }), {
37209
37322
  kind: "mutation",
37210
37323
  auth: "admin"
37324
+ }), method(object({
37325
+ deviceId: number().int(),
37326
+ slotId: string().min(1),
37327
+ enabled: boolean()
37328
+ }), object({ success: literal(true) }), {
37329
+ kind: "mutation",
37330
+ auth: "admin"
37211
37331
  }), method(object({
37212
37332
  sourceDeviceId: number().int(),
37213
37333
  targetDeviceId: number().int()
@@ -37639,7 +37759,15 @@ var GpuInfoSchema = object({
37639
37759
  name: string(),
37640
37760
  memoryMB: number().optional()
37641
37761
  });
37642
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
37762
+ var NpuInfoSchema = object({
37763
+ type: _enum([
37764
+ "apple-ane",
37765
+ "intel-npu",
37766
+ "amd-xdna"
37767
+ ]),
37768
+ name: string().optional(),
37769
+ generation: _enum(["xdna1", "xdna2"]).optional()
37770
+ });
37643
37771
  var CoralInfoSchema = object({
37644
37772
  type: literal("coral-edgetpu"),
37645
37773
  bus: string().optional()
@@ -42382,9 +42510,11 @@ var zoneRulesCapability = {
42382
42510
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42383
42511
  * manifest entry and nothing else.
42384
42512
  *
42385
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42386
- * `notification-output` posture); `describe` concat-fans across providers.
42387
- * Every method is `admin`: these spend money.
42513
+ * Collection of provider **types** (addons). Each addon owns zero or more
42514
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
42515
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
42516
+ * `entryId`; callers also pass the owning `addonId` as the collection
42517
+ * selector (broker posture). Every method is `admin`: these spend money.
42388
42518
  *
42389
42519
  * Every cloud object a provider creates is tagged with the orchestrator's
42390
42520
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42408,8 +42538,8 @@ var TrainingRegionOptionSchema = object({
42408
42538
  priceMultiplier: number().positive()
42409
42539
  });
42410
42540
  /**
42411
- * The provider's per-account settings, as the orchestrator reads them. They
42412
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
42541
+ * The provider's per-entry settings, as the orchestrator reads them. They
42542
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
42413
42543
  * depend on the user's account), never hard-coded in the orchestrator.
42414
42544
  */
42415
42545
  var TrainingProviderDefaultsSchema = object({
@@ -42420,9 +42550,44 @@ var TrainingProviderDefaultsSchema = object({
42420
42550
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
42421
42551
  failedDatasetGraceHours: number().nonnegative()
42422
42552
  });
42553
+ /**
42554
+ * Entry form schema for a provider type — same seam as notification
42555
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
42556
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
42557
+ */
42558
+ var ConfigSchemaPassthrough = unknown();
42559
+ /** One creatable provider type, for the Add-entry dialog. */
42560
+ var TrainingProviderTypeSchema = object({
42561
+ typeId: string(),
42562
+ label: string(),
42563
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
42564
+ iconAsset: string(),
42565
+ /** Owning `training-provider` addon — collection selector for createEntry. */
42566
+ addonId: string(),
42567
+ /**
42568
+ * Fields for one entry of this type (credentials + defaults). Absent on a
42569
+ * type that only needs a name. Password fields are keychain-backed on the
42570
+ * provider addon (`secretStatePaths`), not D634 plaintext.
42571
+ */
42572
+ configSchema: ConfigSchemaPassthrough.optional()
42573
+ });
42574
+ /** One configured account / workspace under a provider type. */
42575
+ var TrainingProviderEntrySchema = object({
42576
+ entryId: string(),
42577
+ typeId: string(),
42578
+ name: string(),
42579
+ addonId: string(),
42580
+ /** Credentials are present — never the values. */
42581
+ configured: boolean()
42582
+ });
42423
42583
  var TrainingProviderDescriptorSchema = object({
42424
42584
  addonId: string(),
42425
- /** `modal`, `runpod`, `fake`, … */
42585
+ entryId: string(),
42586
+ typeId: string(),
42587
+ /** Operator-chosen entry name. */
42588
+ name: string(),
42589
+ iconAsset: string(),
42590
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
42426
42591
  kind: string(),
42427
42592
  label: string(),
42428
42593
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -42434,7 +42599,30 @@ var TrainingProviderDescriptorSchema = object({
42434
42599
  dataResidencyNote: string(),
42435
42600
  /** Credentials are present — never the values. */
42436
42601
  configured: boolean(),
42437
- defaults: TrainingProviderDefaultsSchema
42602
+ defaults: TrainingProviderDefaultsSchema,
42603
+ /**
42604
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
42605
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
42606
+ * never plaintext. Same hydrate contract as settings forms (D789).
42607
+ */
42608
+ formValues: record(string(), unknown()).optional()
42609
+ });
42610
+ /**
42611
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
42612
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
42613
+ * `{ $secretClear: true }` clears it.
42614
+ */
42615
+ var TrainingProviderUpdateEntryInputSchema = object({
42616
+ entryId: string().min(1),
42617
+ name: string().min(1),
42618
+ tokenId: string().optional(),
42619
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
42620
+ environment: string().optional(),
42621
+ gpuType: string().optional(),
42622
+ region: string().optional(),
42623
+ costCapUsd: number().nonnegative().optional(),
42624
+ maxRuntimeSec: number().int().positive().optional(),
42625
+ failedDatasetGraceHours: number().nonnegative().optional()
42438
42626
  });
42439
42627
  var TrainingCredentialCheckSchema = object({
42440
42628
  ok: boolean(),
@@ -42486,20 +42674,33 @@ var TrainerSourceRefSchema = object({
42486
42674
  /** A commit sha (never a branch) — the job must be reproducible. */
42487
42675
  revision: string().regex(/^[0-9a-f]{7,64}$/)
42488
42676
  });
42677
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
42489
42678
  var JobRef = {
42490
- addonId: string(),
42679
+ entryId: string().min(1),
42491
42680
  jobKey: string().uuid()
42492
42681
  };
42493
42682
  var TrainingLogLineSchema = object({
42494
42683
  ts: number(),
42495
42684
  text: string()
42496
42685
  });
42497
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
42686
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
42687
+ typeId: string().min(1),
42688
+ name: string().min(1)
42689
+ }), object({ entryId: string() }), {
42690
+ kind: "mutation",
42691
+ auth: "admin"
42692
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
42693
+ kind: "mutation",
42694
+ auth: "admin"
42695
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
42696
+ kind: "mutation",
42697
+ auth: "admin"
42698
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
42498
42699
  kind: "mutation",
42499
42700
  auth: "admin",
42500
42701
  timeoutMs: 3e4
42501
42702
  }), method(object({
42502
- addonId: string(),
42703
+ entryId: string().min(1),
42503
42704
  gpuType: string(),
42504
42705
  region: string(),
42505
42706
  datasetBytes: number().int().nonnegative(),
@@ -42565,7 +42766,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42565
42766
  kind: "mutation",
42566
42767
  auth: "admin",
42567
42768
  timeoutMs: 5 * 6e4
42568
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
42769
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
42569
42770
  auth: "admin",
42570
42771
  timeoutMs: 2 * 6e4
42571
42772
  });
@@ -42575,20 +42776,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42575
42776
  *
42576
42777
  * It owns what every provider must agree on, written once:
42577
42778
  *
42578
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
42579
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
42580
- * the export plan) and reaches this store through the five row methods
42581
- * below, so the Retrain page and the export did not change.
42582
42779
  * - **Jobs.** A persisted state machine, a reconcile loop against the
42583
42780
  * provider, a cost guard, a daily orphan sweep and the retention rules.
42584
42781
  * - **The return flow.** Verified artefacts → Model Studio
42585
42782
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
42586
42783
  * rollback. Nothing is ever registered automatically.
42587
42784
  *
42785
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
42786
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
42787
+ * moment and snapshotted on the job. No frozen dataset version.
42788
+ *
42588
42789
  * Every method is `admin`.
42589
42790
  */
42590
- /** A version WITH its frame list — what the export and a job read. */
42591
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
42791
+ /**
42792
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
42793
+ * Frame ids are resolved at plan/start — never a frozen version id.
42794
+ */
42795
+ var TrainingCorpusSelectionSchema = object({
42796
+ collectionIds: array(string()).min(1),
42797
+ /** Default complete-only for v1 */
42798
+ workState: _enum([
42799
+ "complete",
42800
+ "annotated_or_complete",
42801
+ "any_annotated"
42802
+ ]).default("complete")
42803
+ });
42592
42804
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
42593
42805
  var TrainingBaseModelSchema = object({
42594
42806
  modelId: string(),
@@ -42606,9 +42818,13 @@ var TrainingPresetSchema = _enum([
42606
42818
  "thorough"
42607
42819
  ]);
42608
42820
  var TrainingJobRequestSchema = object({
42609
- datasetVersionId: string().min(1),
42610
- /** The `training-provider` addon that runs it. */
42611
- addonId: string().min(1),
42821
+ /** Live collection + work-state criteria; resolved at plan/start. */
42822
+ selection: TrainingCorpusSelectionSchema,
42823
+ /**
42824
+ * The provider **entry** that runs it (credentials + defaults).
42825
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
42826
+ */
42827
+ entryId: string().min(1),
42612
42828
  gpuType: string().min(1),
42613
42829
  region: string(),
42614
42830
  baseModelId: string().min(1),
@@ -42667,6 +42883,7 @@ var TrainingJobPlanSchema = object({
42667
42883
  * result lives after the operator acted on it.
42668
42884
  */
42669
42885
  var TrainingJobStateSchema = _enum([
42886
+ "queued",
42670
42887
  "uploading",
42671
42888
  "submitted",
42672
42889
  "starting",
@@ -42720,6 +42937,11 @@ var TrainingJobSchema = object({
42720
42937
  createdAt: number(),
42721
42938
  updatedAt: number(),
42722
42939
  state: TrainingJobStateSchema,
42940
+ /**
42941
+ * Shared by every job enqueued together via `startJobBatch`.
42942
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
42943
+ */
42944
+ batchId: string().nullable().default(null),
42723
42945
  stage: TrainingStageSchema.nullable(),
42724
42946
  failure: object({
42725
42947
  reason: TrainingFailureReasonSchema,
@@ -42731,6 +42953,12 @@ var TrainingJobSchema = object({
42731
42953
  maxRuntimeSec: number().int().positive(),
42732
42954
  trainer: TrainerSourceRefSchema,
42733
42955
  datasetLayout: RetrainExportLayoutSchema,
42956
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
42957
+ frameCount: number().int().nonnegative(),
42958
+ /** Resolved frame ids at start — the archive ships exactly these. */
42959
+ frameIds: array(string()).max(2e4).readonly(),
42960
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
42961
+ annotationHash: string(),
42734
42962
  dataset: object({
42735
42963
  bytes: number().int(),
42736
42964
  sha256: string(),
@@ -42772,13 +43000,7 @@ var TrainingJobSchema = object({
42772
43000
  canary: TrainingCanarySchema.nullable()
42773
43001
  });
42774
43002
  var IdInput = object({ id: string().min(1) });
42775
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42776
- kind: "mutation",
42777
- auth: "admin"
42778
- }), 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() }), {
42779
- kind: "mutation",
42780
- auth: "admin"
42781
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43003
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
42782
43004
  auth: "admin",
42783
43005
  timeoutMs: 6e4
42784
43006
  }), method(TrainingJobRequestSchema.extend({
@@ -42797,6 +43019,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42797
43019
  kind: "mutation",
42798
43020
  auth: "admin",
42799
43021
  timeoutMs: 12e4
43022
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43023
+ baseModelIds: array(string().min(1)).min(1),
43024
+ name: string().min(1).max(120),
43025
+ maxCostUsd: number().positive(),
43026
+ maxRuntimeSec: number().int().positive(),
43027
+ idempotencyKey: string().min(8).max(80)
43028
+ }), discriminatedUnion("kind", [object({
43029
+ kind: literal("started"),
43030
+ batchId: string(),
43031
+ jobs: array(TrainingJobSchema).min(1).readonly()
43032
+ }), object({
43033
+ kind: literal("refused"),
43034
+ reason: TrainingRefusalReasonSchema,
43035
+ detail: string()
43036
+ })]), {
43037
+ kind: "mutation",
43038
+ auth: "admin",
43039
+ timeoutMs: 12e4
42800
43040
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
42801
43041
  kind: "mutation",
42802
43042
  auth: "admin",
@@ -48355,6 +48595,36 @@ Object.freeze({
48355
48595
  addonId: null,
48356
48596
  access: "view"
48357
48597
  },
48598
+ "oidcConnections.connectionFormSchema": {
48599
+ capName: "oidc-connections",
48600
+ capScope: "system",
48601
+ addonId: null,
48602
+ access: "view"
48603
+ },
48604
+ "oidcConnections.createConnection": {
48605
+ capName: "oidc-connections",
48606
+ capScope: "system",
48607
+ addonId: null,
48608
+ access: "create"
48609
+ },
48610
+ "oidcConnections.deleteConnection": {
48611
+ capName: "oidc-connections",
48612
+ capScope: "system",
48613
+ addonId: null,
48614
+ access: "delete"
48615
+ },
48616
+ "oidcConnections.listConnections": {
48617
+ capName: "oidc-connections",
48618
+ capScope: "system",
48619
+ addonId: null,
48620
+ access: "view"
48621
+ },
48622
+ "oidcConnections.updateConnection": {
48623
+ capName: "oidc-connections",
48624
+ capScope: "system",
48625
+ addonId: null,
48626
+ access: "create"
48627
+ },
48358
48628
  "osd.getStatus": {
48359
48629
  capName: "osd",
48360
48630
  capScope: "device",
@@ -48427,6 +48697,12 @@ Object.freeze({
48427
48697
  addonId: null,
48428
48698
  access: "create"
48429
48699
  },
48700
+ "osdManager.setSlotCameraEnabled": {
48701
+ capName: "osd-manager",
48702
+ capScope: "system",
48703
+ addonId: null,
48704
+ access: "create"
48705
+ },
48430
48706
  "osdManager.upsertTemplate": {
48431
48707
  capName: "osd-manager",
48432
48708
  capScope: "system",
@@ -48565,12 +48841,6 @@ Object.freeze({
48565
48841
  addonId: null,
48566
48842
  access: "create"
48567
48843
  },
48568
- "pipelineAnalytics.createRetrainDatasetVersion": {
48569
- capName: "pipeline-analytics",
48570
- capScope: "device",
48571
- addonId: null,
48572
- access: "create"
48573
- },
48574
48844
  "pipelineAnalytics.deleteDeviceEvents": {
48575
48845
  capName: "pipeline-analytics",
48576
48846
  capScope: "device",
@@ -48583,12 +48853,6 @@ Object.freeze({
48583
48853
  addonId: null,
48584
48854
  access: "delete"
48585
48855
  },
48586
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
48587
- capName: "pipeline-analytics",
48588
- capScope: "device",
48589
- addonId: null,
48590
- access: "delete"
48591
- },
48592
48856
  "pipelineAnalytics.deleteTracks": {
48593
48857
  capName: "pipeline-analytics",
48594
48858
  capScope: "device",
@@ -48691,6 +48955,12 @@ Object.freeze({
48691
48955
  addonId: null,
48692
48956
  access: "view"
48693
48957
  },
48958
+ "pipelineAnalytics.getRetrainCorpusKpi": {
48959
+ capName: "pipeline-analytics",
48960
+ capScope: "device",
48961
+ addonId: null,
48962
+ access: "view"
48963
+ },
48694
48964
  "pipelineAnalytics.getRetrainExportUrl": {
48695
48965
  capName: "pipeline-analytics",
48696
48966
  capScope: "device",
@@ -48811,7 +49081,7 @@ Object.freeze({
48811
49081
  addonId: null,
48812
49082
  access: "view"
48813
49083
  },
48814
- "pipelineAnalytics.listRetrainDatasetVersions": {
49084
+ "pipelineAnalytics.listRetrainCorpusPage": {
48815
49085
  capName: "pipeline-analytics",
48816
49086
  capScope: "device",
48817
49087
  addonId: null,
@@ -48865,12 +49135,6 @@ Object.freeze({
48865
49135
  addonId: null,
48866
49136
  access: "create"
48867
49137
  },
48868
- "pipelineAnalytics.previewRetrainDataset": {
48869
- capName: "pipeline-analytics",
48870
- capScope: "device",
48871
- addonId: null,
48872
- access: "view"
48873
- },
48874
49138
  "pipelineAnalytics.proposeRetrainAnnotations": {
48875
49139
  capName: "pipeline-analytics",
48876
49140
  capScope: "device",
@@ -48949,6 +49213,12 @@ Object.freeze({
48949
49213
  addonId: null,
48950
49214
  access: "create"
48951
49215
  },
49216
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
49217
+ capName: "pipeline-analytics",
49218
+ capScope: "device",
49219
+ addonId: null,
49220
+ access: "view"
49221
+ },
48952
49222
  "pipelineAnalytics.restageRetrainTrack": {
48953
49223
  capName: "pipeline-analytics",
48954
49224
  capScope: "device",
@@ -49009,12 +49279,6 @@ Object.freeze({
49009
49279
  addonId: null,
49010
49280
  access: "create"
49011
49281
  },
49012
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
49013
- capName: "pipeline-analytics",
49014
- capScope: "device",
49015
- addonId: null,
49016
- access: "view"
49017
- },
49018
49282
  "pipelineAnalytics.wipeAllAnalytics": {
49019
49283
  capName: "pipeline-analytics",
49020
49284
  capScope: "device",
@@ -51409,18 +51673,6 @@ Object.freeze({
51409
51673
  addonId: null,
51410
51674
  access: "create"
51411
51675
  },
51412
- "training.findDatasetVersionIdByName": {
51413
- capName: "training",
51414
- capScope: "system",
51415
- addonId: null,
51416
- access: "view"
51417
- },
51418
- "training.getDatasetVersion": {
51419
- capName: "training",
51420
- capScope: "system",
51421
- addonId: null,
51422
- access: "view"
51423
- },
51424
51676
  "training.getJob": {
51425
51677
  capName: "training",
51426
51678
  capScope: "system",
@@ -51439,12 +51691,6 @@ Object.freeze({
51439
51691
  addonId: null,
51440
51692
  access: "view"
51441
51693
  },
51442
- "training.listDatasetVersions": {
51443
- capName: "training",
51444
- capScope: "system",
51445
- addonId: null,
51446
- access: "view"
51447
- },
51448
51694
  "training.listJobs": {
51449
51695
  capName: "training",
51450
51696
  capScope: "system",
@@ -51457,54 +51703,66 @@ Object.freeze({
51457
51703
  addonId: null,
51458
51704
  access: "view"
51459
51705
  },
51460
- "training.putDatasetVersion": {
51706
+ "training.registerResult": {
51461
51707
  capName: "training",
51462
51708
  capScope: "system",
51463
51709
  addonId: null,
51464
51710
  access: "create"
51465
51711
  },
51466
- "training.registerResult": {
51712
+ "training.rollbackCanary": {
51467
51713
  capName: "training",
51468
51714
  capScope: "system",
51469
51715
  addonId: null,
51470
51716
  access: "create"
51471
51717
  },
51472
- "training.removeDatasetVersion": {
51718
+ "training.startJob": {
51473
51719
  capName: "training",
51474
51720
  capScope: "system",
51475
51721
  addonId: null,
51476
- access: "delete"
51722
+ access: "create"
51477
51723
  },
51478
- "training.rollbackCanary": {
51724
+ "training.startJobBatch": {
51479
51725
  capName: "training",
51480
51726
  capScope: "system",
51481
51727
  addonId: null,
51482
51728
  access: "create"
51483
51729
  },
51484
- "training.startJob": {
51485
- capName: "training",
51730
+ "trainingProvider.cancelJob": {
51731
+ capName: "training-provider",
51486
51732
  capScope: "system",
51487
51733
  addonId: null,
51488
51734
  access: "create"
51489
51735
  },
51490
- "trainingProvider.cancelJob": {
51736
+ "trainingProvider.cleanupJob": {
51491
51737
  capName: "training-provider",
51492
51738
  capScope: "system",
51493
51739
  addonId: null,
51494
51740
  access: "create"
51495
51741
  },
51496
- "trainingProvider.cleanupJob": {
51742
+ "trainingProvider.createEntry": {
51497
51743
  capName: "training-provider",
51498
51744
  capScope: "system",
51499
51745
  addonId: null,
51500
51746
  access: "create"
51501
51747
  },
51748
+ "trainingProvider.deleteEntry": {
51749
+ capName: "training-provider",
51750
+ capScope: "system",
51751
+ addonId: null,
51752
+ access: "delete"
51753
+ },
51502
51754
  "trainingProvider.describe": {
51503
51755
  capName: "training-provider",
51504
51756
  capScope: "system",
51505
51757
  addonId: null,
51506
51758
  access: "view"
51507
51759
  },
51760
+ "trainingProvider.describeTypes": {
51761
+ capName: "training-provider",
51762
+ capScope: "system",
51763
+ addonId: null,
51764
+ access: "view"
51765
+ },
51508
51766
  "trainingProvider.estimateJob": {
51509
51767
  capName: "training-provider",
51510
51768
  capScope: "system",
@@ -51517,6 +51775,12 @@ Object.freeze({
51517
51775
  addonId: null,
51518
51776
  access: "view"
51519
51777
  },
51778
+ "trainingProvider.listEntries": {
51779
+ capName: "training-provider",
51780
+ capScope: "system",
51781
+ addonId: null,
51782
+ access: "view"
51783
+ },
51520
51784
  "trainingProvider.listJobEvents": {
51521
51785
  capName: "training-provider",
51522
51786
  capScope: "system",
@@ -51547,6 +51811,12 @@ Object.freeze({
51547
51811
  addonId: null,
51548
51812
  access: "create"
51549
51813
  },
51814
+ "trainingProvider.updateEntry": {
51815
+ capName: "training-provider",
51816
+ capScope: "system",
51817
+ addonId: null,
51818
+ access: "create"
51819
+ },
51550
51820
  "trainingProvider.uploadDataset": {
51551
51821
  capName: "training-provider",
51552
51822
  capScope: "system",
@@ -54753,6 +55023,11 @@ Object.freeze({
54753
55023
  form: "single",
54754
55024
  optional: false
54755
55025
  }],
55026
+ "osdManager.setSlotCameraEnabled": [{
55027
+ name: "deviceId",
55028
+ form: "single",
55029
+ optional: false
55030
+ }],
54756
55031
  "petFeeder.callPet": [{
54757
55032
  name: "deviceId",
54758
55033
  form: "single",
@@ -54973,6 +55248,11 @@ Object.freeze({
54973
55248
  form: "array",
54974
55249
  optional: false
54975
55250
  }],
55251
+ "pipelineAnalytics.listRetrainCorpusPage": [{
55252
+ name: "deviceIds",
55253
+ form: "array",
55254
+ optional: true
55255
+ }],
54976
55256
  "pipelineAnalytics.listRetrainStaging": [{
54977
55257
  name: "deviceIds",
54978
55258
  form: "array",
@@ -56082,6 +56362,7 @@ Object.freeze({
56082
56362
  });
56083
56363
  Object.freeze({
56084
56364
  "broker": "broker",
56365
+ "calendar-source": "calendar",
56085
56366
  "device-export": "device-export",
56086
56367
  "llm": "ai",
56087
56368
  "mesh-network": "mesh",
@@ -56567,6 +56848,8 @@ var STATE_SUMMARY_VARS = [
56567
56848
  [...RULE_TEXT],
56568
56849
  [...RULE_TEXT],
56569
56850
  [...RULE_TEXT],
56851
+ [...RULE_TEXT],
56852
+ [...RULE_TEXT],
56570
56853
  ([...RULE_TEXT], [...UPDATES]),
56571
56854
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
56572
56855
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),