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