@camstack/addon-provider-velux 0.2.125 → 0.2.126

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
@@ -5376,7 +5376,7 @@ var ZodIssueCode = {
5376
5376
  var ZodFirstPartyTypeKind;
5377
5377
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5378
5378
  //#endregion
5379
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5379
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5380
5380
  /**
5381
5381
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5382
5382
  * window to float samples (D455).
@@ -9382,6 +9382,16 @@ var CompositionSchema = object({
9382
9382
  seen.add(feature.cap);
9383
9383
  });
9384
9384
  });
9385
+ var NodeColorIdSchema = _enum([
9386
+ "node-a",
9387
+ "node-b",
9388
+ "node-c",
9389
+ "node-d",
9390
+ "node-e",
9391
+ "node-f",
9392
+ "node-g",
9393
+ "node-h"
9394
+ ]);
9385
9395
  new Set([
9386
9396
  "track",
9387
9397
  "face",
@@ -18524,14 +18534,14 @@ var LlmProfileSchema = object({
18524
18534
  /** ConfigUISchema tree passed through untyped on the wire (the
18525
18535
  * notification-output `ConfigSchemaPassthrough` precedent at
18526
18536
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18527
- var ConfigSchemaPassthrough$1 = unknown();
18537
+ var ConfigSchemaPassthrough$3 = unknown();
18528
18538
  var LlmProfileKindDescriptorSchema = object({
18529
18539
  kind: LlmProfileKindSchema,
18530
18540
  label: string(),
18531
18541
  icon: string(),
18532
18542
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18533
18543
  addonId: string(),
18534
- configSchema: ConfigSchemaPassthrough$1
18544
+ configSchema: ConfigSchemaPassthrough$3
18535
18545
  });
18536
18546
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18537
18547
  var LlmDefaultSchema = object({
@@ -19652,7 +19662,7 @@ var TargetKindCapsSchema = object({
19652
19662
  * the union is large and not meant for runtime validation here; the exported
19653
19663
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19654
19664
  */
19655
- var ConfigSchemaPassthrough = unknown();
19665
+ var ConfigSchemaPassthrough$2 = unknown();
19656
19666
  var TargetKindSchema = object({
19657
19667
  kind: string(),
19658
19668
  label: string(),
@@ -19689,7 +19699,7 @@ var TargetKindSchema = object({
19689
19699
  * its raster path, which is the safe default for an unknown image.
19690
19700
  */
19691
19701
  iconMediaType: string().optional(),
19692
- configSchema: ConfigSchemaPassthrough,
19702
+ configSchema: ConfigSchemaPassthrough$2,
19693
19703
  /**
19694
19704
  * The config keys that decide WHERE this kind's secrets are sent (server,
19695
19705
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23026,6 +23036,61 @@ var OauthIntegrationDescriptorSchema = object({
23026
23036
  });
23027
23037
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23028
23038
  /**
23039
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23040
+ *
23041
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23042
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23043
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23044
+ * immutable after create.
23045
+ */
23046
+ var ConfigSchemaPassthrough$1 = unknown();
23047
+ var OidcConnectionSchema = object({
23048
+ id: string().min(1),
23049
+ displayName: string(),
23050
+ icon: string(),
23051
+ issuerUrl: string(),
23052
+ clientId: string(),
23053
+ /** Client id + secret present — never the secret value. */
23054
+ configured: boolean(),
23055
+ /**
23056
+ * Values for the connection form schema. `clientSecret` is a keychain
23057
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23058
+ */
23059
+ formValues: record(string(), unknown()).optional()
23060
+ });
23061
+ /**
23062
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23063
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23064
+ */
23065
+ var OidcConnectionUpdateInputSchema = object({
23066
+ id: string().min(1),
23067
+ displayName: string().min(1),
23068
+ icon: string().optional(),
23069
+ issuerUrl: string().optional(),
23070
+ clientId: string().optional(),
23071
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23072
+ redirectUri: string().optional(),
23073
+ scopes: string().optional(),
23074
+ usernameClaim: _enum([
23075
+ "preferred_username",
23076
+ "email",
23077
+ "sub"
23078
+ ]).optional()
23079
+ });
23080
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23081
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23082
+ displayName: string().min(1)
23083
+ }), object({ id: string() }), {
23084
+ kind: "mutation",
23085
+ auth: "admin"
23086
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23087
+ kind: "mutation",
23088
+ auth: "admin"
23089
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23090
+ kind: "mutation",
23091
+ auth: "admin"
23092
+ });
23093
+ /**
23029
23094
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23030
23095
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23031
23096
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24382,24 +24447,69 @@ var RetrainFrameListSchema = object({
24382
24447
  /** What the page pre-selects — the native key frame when one survives. */
24383
24448
  autoPickMediaId: number().int().optional()
24384
24449
  });
24450
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24451
+ var RetrainFrameWorkStateSchema = _enum([
24452
+ "unannotated",
24453
+ "annotated",
24454
+ "complete"
24455
+ ]);
24456
+ /**
24457
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24458
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24459
+ */
24460
+ var RetrainCorpusFilterSchema = object({
24461
+ workState: RetrainFrameWorkStateSchema.optional(),
24462
+ deviceIds: array(number()).max(500).optional(),
24463
+ /** When set, only frames in this named collection. */
24464
+ collectionId: string().optional(),
24465
+ /** Frames that carry at least one saved annotation in one of these classes. */
24466
+ classes: array(RetrainMacroClassSchema).optional(),
24467
+ page: number().int().positive().default(1),
24468
+ pageSize: number().int().positive().max(100).default(50)
24469
+ });
24470
+ var RetrainCorpusPageSchema = object({
24471
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24472
+ total: number().int().nonnegative(),
24473
+ page: number().int().positive(),
24474
+ pageSize: number().int().positive()
24475
+ });
24476
+ var RetrainCorpusKpiCameraRowSchema = object({
24477
+ deviceId: number(),
24478
+ unannotated: number().int().nonnegative(),
24479
+ annotated: number().int().nonnegative(),
24480
+ complete: number().int().nonnegative(),
24481
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24482
+ * `null` when the corpus is empty (no ratio). */
24483
+ pctOfCorpus: number().min(0).max(1).nullable()
24484
+ });
24485
+ var RetrainCorpusKpiSchema = object({
24486
+ total: number().int().nonnegative(),
24487
+ unannotated: number().int().nonnegative(),
24488
+ annotated: number().int().nonnegative(),
24489
+ complete: number().int().nonnegative(),
24490
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24491
+ });
24385
24492
  /**
24386
24493
  * Which frames an annotated export carries. Every field narrows; an empty
24387
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24388
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24389
- * the primitive a version export uses; `batchId` re-selects what an earlier
24390
- * export carried (`exportedInBatch`).
24494
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24495
+ * download uses; `batchId` re-selects what an earlier export carried
24496
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24497
+ * resolves to `frameIds` at plan/start.
24391
24498
  */
24392
24499
  var RetrainExportFilterSchema = object({
24393
24500
  deviceIds: array(number()).optional(),
24394
24501
  frameIds: array(string()).max(2e4).optional(),
24395
24502
  /** Only frames in at least one of these named collections. */
24396
24503
  collectionIds: array(string()).max(200).optional(),
24397
- /** Exactly the frames of this dataset version (and its completeOnly). An
24398
- * unknown id selects nothing. */
24399
- datasetVersionId: string().optional(),
24504
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24505
+ collectionId: string().optional(),
24400
24506
  batchId: string().optional(),
24401
24507
  /** Only frames the operator marked complete (all subjects boxed). */
24402
- completeOnly: boolean().optional()
24508
+ completeOnly: boolean().optional(),
24509
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24510
+ workState: RetrainFrameWorkStateSchema.optional(),
24511
+ /** Frames with at least one saved annotation in one of these classes. */
24512
+ classes: array(RetrainMacroClassSchema).optional()
24403
24513
  });
24404
24514
  /**
24405
24515
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24599,8 +24709,7 @@ var RetrainDatasetStatsSchema = object({
24599
24709
  completeFrames: number().int()
24600
24710
  })).readonly()
24601
24711
  });
24602
- /** An immutable dataset version, without its frame list. */
24603
- var RetrainDatasetVersionSchema = object({
24712
+ object({
24604
24713
  id: string(),
24605
24714
  name: string(),
24606
24715
  createdAt: number(),
@@ -24608,22 +24717,33 @@ var RetrainDatasetVersionSchema = object({
24608
24717
  layout: RetrainExportLayoutSchema,
24609
24718
  completeOnly: boolean(),
24610
24719
  frameCount: number().int(),
24611
- /** sha256 of what the frames taught when the version was frozen. */
24612
24720
  annotationHash: string(),
24613
- /** The export manifest schema the version was cut under. */
24614
24721
  manifestSchema: string(),
24615
24722
  stats: RetrainDatasetStatsSchema
24616
24723
  });
24617
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24618
- kind: literal("created"),
24619
- version: RetrainDatasetVersionSchema
24724
+ /**
24725
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24726
+ * the training cap. Resolved here so plan/start and the annotated export share
24727
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24728
+ */
24729
+ var RetrainTrainingCorpusSelectionSchema = object({
24730
+ collectionIds: array(string()).min(1),
24731
+ workState: _enum([
24732
+ "complete",
24733
+ "annotated_or_complete",
24734
+ "any_annotated"
24735
+ ]).default("complete")
24736
+ });
24737
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24738
+ kind: literal("resolved"),
24739
+ frameIds: array(string()).max(2e4).readonly(),
24740
+ stats: RetrainDatasetStatsSchema,
24741
+ annotationHash: string(),
24742
+ layout: RetrainExportLayoutSchema
24620
24743
  }), object({
24621
24744
  kind: literal("refused"),
24622
- reason: _enum([
24623
- "empty-name",
24624
- "duplicate-name",
24625
- "no-frames"
24626
- ])
24745
+ reason: _enum(["unknown-collection", "no-frames"]),
24746
+ detail: string()
24627
24747
  })]);
24628
24748
  /** The outcome of a lifecycle move owned by the retrain page. */
24629
24749
  var RetrainTransitionResultSchema = object({
@@ -25330,6 +25450,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25330
25450
  }), array(RetrainTrackSchema).readonly(), {
25331
25451
  kind: "query",
25332
25452
  auth: "admin"
25453
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25454
+ kind: "query",
25455
+ auth: "admin"
25456
+ }), method(object({}), RetrainCorpusKpiSchema, {
25457
+ kind: "query",
25458
+ auth: "admin"
25333
25459
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25334
25460
  kind: "query",
25335
25461
  auth: "admin"
@@ -25425,36 +25551,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25425
25551
  kind: "mutation",
25426
25552
  auth: "admin",
25427
25553
  timeoutMs: 12e4
25428
- }), method(object({
25429
- selection: RetrainDatasetSelectionSchema,
25430
- completeOnly: boolean().optional()
25431
- }), RetrainDatasetStatsSchema, {
25432
- kind: "query",
25433
- auth: "admin"
25434
- }), method(object({
25435
- name: string().max(120),
25436
- selection: RetrainDatasetSelectionSchema,
25437
- layout: RetrainExportLayoutSchema,
25438
- completeOnly: boolean()
25439
- }), CreateRetrainDatasetVersionResultSchema, {
25440
- kind: "mutation",
25441
- auth: "admin",
25442
- timeoutMs: 12e4
25443
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25444
- kind: "query",
25445
- auth: "admin"
25446
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25447
- kind: "mutation",
25448
- auth: "admin"
25449
- }), method(object({ id: string() }), object({
25450
- found: boolean(),
25451
- annotationHash: string(),
25452
- matches: boolean(),
25453
- missingFrames: number().int()
25454
- }), {
25455
- kind: "query",
25456
- auth: "admin",
25457
- timeoutMs: 12e4
25458
25554
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25459
25555
  kind: "query",
25460
25556
  auth: "admin"
@@ -25481,6 +25577,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25481
25577
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25482
25578
  kind: "query",
25483
25579
  auth: "admin"
25580
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25581
+ kind: "query",
25582
+ auth: "admin",
25583
+ timeoutMs: 6e4
25484
25584
  }), method(object({
25485
25585
  id: string(),
25486
25586
  name: string().max(120)
@@ -26097,11 +26197,14 @@ var HardwareClassIdSchema = _enum([
26097
26197
  "intel-n-series",
26098
26198
  "apple-m-base",
26099
26199
  "apple-m-pro",
26200
+ "amd-phoenix",
26100
26201
  "unknown"
26101
26202
  ]);
26102
26203
  var AcceleratorKindSchema = _enum([
26103
26204
  "intel-npu",
26104
26205
  "intel-igpu",
26206
+ "amd-igpu",
26207
+ "amd-npu",
26105
26208
  "x86-cpu",
26106
26209
  "arm-cpu",
26107
26210
  "apple-ane",
@@ -28031,6 +28134,8 @@ var AgentPipelineSettingsSchema = object({
28031
28134
  * address is wrong (multi-homed host, NAT, custom interface).
28032
28135
  */
28033
28136
  reachableHost: string().optional(),
28137
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28138
+ color: NodeColorIdSchema.optional(),
28034
28139
  /**
28035
28140
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28036
28141
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28580,8 +28685,9 @@ method(object({
28580
28685
  auth: "admin"
28581
28686
  }), method(object({
28582
28687
  agentNodeId: string(),
28583
- reachableHost: string().nullable()
28584
- }), object({ success: literal(true) }), {
28688
+ reachableHost: string().nullable().optional(),
28689
+ color: NodeColorIdSchema.nullable().optional()
28690
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28585
28691
  kind: "mutation",
28586
28692
  auth: "admin"
28587
28693
  }), method(object({
@@ -31657,7 +31763,7 @@ var CustomActionInputSchema = object({
31657
31763
  action: string().min(1),
31658
31764
  input: unknown()
31659
31765
  });
31660
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31766
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31661
31767
  addonId: string(),
31662
31768
  limit: number().min(1).max(500).default(100),
31663
31769
  level: LogLevelSchema$2.optional()
@@ -36719,7 +36825,13 @@ var TopologyNodeSchema = object({
36719
36825
  })).readonly(),
36720
36826
  processes: array(TopologyProcessSchema).readonly(),
36721
36827
  categories: array(TopologyCategorySchema).readonly(),
36722
- rootPackage: TopologyRootPackageSchema.nullable()
36828
+ rootPackage: TopologyRootPackageSchema.nullable(),
36829
+ /**
36830
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
36831
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
36832
+ * for offline rows and when the hub cannot tell.
36833
+ */
36834
+ meshTransport: _enum(["tls", "clear"]).optional()
36723
36835
  });
36724
36836
  var CapUsageEdgeSchema = object({
36725
36837
  callerAddonId: string(),
@@ -37132,6 +37244,7 @@ var OsdNamedTemplateSchema = object({
37132
37244
  });
37133
37245
  /** Where a slot's value comes from. */
37134
37246
  var OsdSourceSchema = discriminatedUnion("kind", [
37247
+ object({ kind: literal("none") }),
37135
37248
  object({
37136
37249
  kind: literal("static"),
37137
37250
  text: string().max(64)
@@ -37258,6 +37371,13 @@ method(object({ deviceId: number().int() }), object({
37258
37371
  }), object({ success: literal(true) }), {
37259
37372
  kind: "mutation",
37260
37373
  auth: "admin"
37374
+ }), method(object({
37375
+ deviceId: number().int(),
37376
+ slotId: string().min(1),
37377
+ enabled: boolean()
37378
+ }), object({ success: literal(true) }), {
37379
+ kind: "mutation",
37380
+ auth: "admin"
37261
37381
  }), method(object({
37262
37382
  sourceDeviceId: number().int(),
37263
37383
  targetDeviceId: number().int()
@@ -37689,7 +37809,15 @@ var GpuInfoSchema = object({
37689
37809
  name: string(),
37690
37810
  memoryMB: number().optional()
37691
37811
  });
37692
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
37812
+ var NpuInfoSchema = object({
37813
+ type: _enum([
37814
+ "apple-ane",
37815
+ "intel-npu",
37816
+ "amd-xdna"
37817
+ ]),
37818
+ name: string().optional(),
37819
+ generation: _enum(["xdna1", "xdna2"]).optional()
37820
+ });
37693
37821
  var CoralInfoSchema = object({
37694
37822
  type: literal("coral-edgetpu"),
37695
37823
  bus: string().optional()
@@ -42432,9 +42560,11 @@ var zoneRulesCapability = {
42432
42560
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42433
42561
  * manifest entry and nothing else.
42434
42562
  *
42435
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42436
- * `notification-output` posture); `describe` concat-fans across providers.
42437
- * Every method is `admin`: these spend money.
42563
+ * Collection of provider **types** (addons). Each addon owns zero or more
42564
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
42565
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
42566
+ * `entryId`; callers also pass the owning `addonId` as the collection
42567
+ * selector (broker posture). Every method is `admin`: these spend money.
42438
42568
  *
42439
42569
  * Every cloud object a provider creates is tagged with the orchestrator's
42440
42570
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42458,8 +42588,8 @@ var TrainingRegionOptionSchema = object({
42458
42588
  priceMultiplier: number().positive()
42459
42589
  });
42460
42590
  /**
42461
- * The provider's per-account settings, as the orchestrator reads them. They
42462
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
42591
+ * The provider's per-entry settings, as the orchestrator reads them. They
42592
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
42463
42593
  * depend on the user's account), never hard-coded in the orchestrator.
42464
42594
  */
42465
42595
  var TrainingProviderDefaultsSchema = object({
@@ -42470,9 +42600,44 @@ var TrainingProviderDefaultsSchema = object({
42470
42600
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
42471
42601
  failedDatasetGraceHours: number().nonnegative()
42472
42602
  });
42603
+ /**
42604
+ * Entry form schema for a provider type — same seam as notification
42605
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
42606
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
42607
+ */
42608
+ var ConfigSchemaPassthrough = unknown();
42609
+ /** One creatable provider type, for the Add-entry dialog. */
42610
+ var TrainingProviderTypeSchema = object({
42611
+ typeId: string(),
42612
+ label: string(),
42613
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
42614
+ iconAsset: string(),
42615
+ /** Owning `training-provider` addon — collection selector for createEntry. */
42616
+ addonId: string(),
42617
+ /**
42618
+ * Fields for one entry of this type (credentials + defaults). Absent on a
42619
+ * type that only needs a name. Password fields are keychain-backed on the
42620
+ * provider addon (`secretStatePaths`), not D634 plaintext.
42621
+ */
42622
+ configSchema: ConfigSchemaPassthrough.optional()
42623
+ });
42624
+ /** One configured account / workspace under a provider type. */
42625
+ var TrainingProviderEntrySchema = object({
42626
+ entryId: string(),
42627
+ typeId: string(),
42628
+ name: string(),
42629
+ addonId: string(),
42630
+ /** Credentials are present — never the values. */
42631
+ configured: boolean()
42632
+ });
42473
42633
  var TrainingProviderDescriptorSchema = object({
42474
42634
  addonId: string(),
42475
- /** `modal`, `runpod`, `fake`, … */
42635
+ entryId: string(),
42636
+ typeId: string(),
42637
+ /** Operator-chosen entry name. */
42638
+ name: string(),
42639
+ iconAsset: string(),
42640
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
42476
42641
  kind: string(),
42477
42642
  label: string(),
42478
42643
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -42484,7 +42649,30 @@ var TrainingProviderDescriptorSchema = object({
42484
42649
  dataResidencyNote: string(),
42485
42650
  /** Credentials are present — never the values. */
42486
42651
  configured: boolean(),
42487
- defaults: TrainingProviderDefaultsSchema
42652
+ defaults: TrainingProviderDefaultsSchema,
42653
+ /**
42654
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
42655
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
42656
+ * never plaintext. Same hydrate contract as settings forms (D789).
42657
+ */
42658
+ formValues: record(string(), unknown()).optional()
42659
+ });
42660
+ /**
42661
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
42662
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
42663
+ * `{ $secretClear: true }` clears it.
42664
+ */
42665
+ var TrainingProviderUpdateEntryInputSchema = object({
42666
+ entryId: string().min(1),
42667
+ name: string().min(1),
42668
+ tokenId: string().optional(),
42669
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
42670
+ environment: string().optional(),
42671
+ gpuType: string().optional(),
42672
+ region: string().optional(),
42673
+ costCapUsd: number().nonnegative().optional(),
42674
+ maxRuntimeSec: number().int().positive().optional(),
42675
+ failedDatasetGraceHours: number().nonnegative().optional()
42488
42676
  });
42489
42677
  var TrainingCredentialCheckSchema = object({
42490
42678
  ok: boolean(),
@@ -42536,20 +42724,33 @@ var TrainerSourceRefSchema = object({
42536
42724
  /** A commit sha (never a branch) — the job must be reproducible. */
42537
42725
  revision: string().regex(/^[0-9a-f]{7,64}$/)
42538
42726
  });
42727
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
42539
42728
  var JobRef = {
42540
- addonId: string(),
42729
+ entryId: string().min(1),
42541
42730
  jobKey: string().uuid()
42542
42731
  };
42543
42732
  var TrainingLogLineSchema = object({
42544
42733
  ts: number(),
42545
42734
  text: string()
42546
42735
  });
42547
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
42736
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
42737
+ typeId: string().min(1),
42738
+ name: string().min(1)
42739
+ }), object({ entryId: string() }), {
42740
+ kind: "mutation",
42741
+ auth: "admin"
42742
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
42743
+ kind: "mutation",
42744
+ auth: "admin"
42745
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
42746
+ kind: "mutation",
42747
+ auth: "admin"
42748
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
42548
42749
  kind: "mutation",
42549
42750
  auth: "admin",
42550
42751
  timeoutMs: 3e4
42551
42752
  }), method(object({
42552
- addonId: string(),
42753
+ entryId: string().min(1),
42553
42754
  gpuType: string(),
42554
42755
  region: string(),
42555
42756
  datasetBytes: number().int().nonnegative(),
@@ -42615,7 +42816,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42615
42816
  kind: "mutation",
42616
42817
  auth: "admin",
42617
42818
  timeoutMs: 5 * 6e4
42618
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
42819
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
42619
42820
  auth: "admin",
42620
42821
  timeoutMs: 2 * 6e4
42621
42822
  });
@@ -42625,20 +42826,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42625
42826
  *
42626
42827
  * It owns what every provider must agree on, written once:
42627
42828
  *
42628
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
42629
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
42630
- * the export plan) and reaches this store through the five row methods
42631
- * below, so the Retrain page and the export did not change.
42632
42829
  * - **Jobs.** A persisted state machine, a reconcile loop against the
42633
42830
  * provider, a cost guard, a daily orphan sweep and the retention rules.
42634
42831
  * - **The return flow.** Verified artefacts → Model Studio
42635
42832
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
42636
42833
  * rollback. Nothing is ever registered automatically.
42637
42834
  *
42835
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
42836
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
42837
+ * moment and snapshotted on the job. No frozen dataset version.
42838
+ *
42638
42839
  * Every method is `admin`.
42639
42840
  */
42640
- /** A version WITH its frame list — what the export and a job read. */
42641
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
42841
+ /**
42842
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
42843
+ * Frame ids are resolved at plan/start — never a frozen version id.
42844
+ */
42845
+ var TrainingCorpusSelectionSchema = object({
42846
+ collectionIds: array(string()).min(1),
42847
+ /** Default complete-only for v1 */
42848
+ workState: _enum([
42849
+ "complete",
42850
+ "annotated_or_complete",
42851
+ "any_annotated"
42852
+ ]).default("complete")
42853
+ });
42642
42854
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
42643
42855
  var TrainingBaseModelSchema = object({
42644
42856
  modelId: string(),
@@ -42656,9 +42868,13 @@ var TrainingPresetSchema = _enum([
42656
42868
  "thorough"
42657
42869
  ]);
42658
42870
  var TrainingJobRequestSchema = object({
42659
- datasetVersionId: string().min(1),
42660
- /** The `training-provider` addon that runs it. */
42661
- addonId: string().min(1),
42871
+ /** Live collection + work-state criteria; resolved at plan/start. */
42872
+ selection: TrainingCorpusSelectionSchema,
42873
+ /**
42874
+ * The provider **entry** that runs it (credentials + defaults).
42875
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
42876
+ */
42877
+ entryId: string().min(1),
42662
42878
  gpuType: string().min(1),
42663
42879
  region: string(),
42664
42880
  baseModelId: string().min(1),
@@ -42717,6 +42933,7 @@ var TrainingJobPlanSchema = object({
42717
42933
  * result lives after the operator acted on it.
42718
42934
  */
42719
42935
  var TrainingJobStateSchema = _enum([
42936
+ "queued",
42720
42937
  "uploading",
42721
42938
  "submitted",
42722
42939
  "starting",
@@ -42770,6 +42987,11 @@ var TrainingJobSchema = object({
42770
42987
  createdAt: number(),
42771
42988
  updatedAt: number(),
42772
42989
  state: TrainingJobStateSchema,
42990
+ /**
42991
+ * Shared by every job enqueued together via `startJobBatch`.
42992
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
42993
+ */
42994
+ batchId: string().nullable().default(null),
42773
42995
  stage: TrainingStageSchema.nullable(),
42774
42996
  failure: object({
42775
42997
  reason: TrainingFailureReasonSchema,
@@ -42781,6 +43003,12 @@ var TrainingJobSchema = object({
42781
43003
  maxRuntimeSec: number().int().positive(),
42782
43004
  trainer: TrainerSourceRefSchema,
42783
43005
  datasetLayout: RetrainExportLayoutSchema,
43006
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43007
+ frameCount: number().int().nonnegative(),
43008
+ /** Resolved frame ids at start — the archive ships exactly these. */
43009
+ frameIds: array(string()).max(2e4).readonly(),
43010
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43011
+ annotationHash: string(),
42784
43012
  dataset: object({
42785
43013
  bytes: number().int(),
42786
43014
  sha256: string(),
@@ -42822,13 +43050,7 @@ var TrainingJobSchema = object({
42822
43050
  canary: TrainingCanarySchema.nullable()
42823
43051
  });
42824
43052
  var IdInput = object({ id: string().min(1) });
42825
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42826
- kind: "mutation",
42827
- auth: "admin"
42828
- }), 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() }), {
42829
- kind: "mutation",
42830
- auth: "admin"
42831
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43053
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
42832
43054
  auth: "admin",
42833
43055
  timeoutMs: 6e4
42834
43056
  }), method(TrainingJobRequestSchema.extend({
@@ -42847,6 +43069,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42847
43069
  kind: "mutation",
42848
43070
  auth: "admin",
42849
43071
  timeoutMs: 12e4
43072
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43073
+ baseModelIds: array(string().min(1)).min(1),
43074
+ name: string().min(1).max(120),
43075
+ maxCostUsd: number().positive(),
43076
+ maxRuntimeSec: number().int().positive(),
43077
+ idempotencyKey: string().min(8).max(80)
43078
+ }), discriminatedUnion("kind", [object({
43079
+ kind: literal("started"),
43080
+ batchId: string(),
43081
+ jobs: array(TrainingJobSchema).min(1).readonly()
43082
+ }), object({
43083
+ kind: literal("refused"),
43084
+ reason: TrainingRefusalReasonSchema,
43085
+ detail: string()
43086
+ })]), {
43087
+ kind: "mutation",
43088
+ auth: "admin",
43089
+ timeoutMs: 12e4
42850
43090
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
42851
43091
  kind: "mutation",
42852
43092
  auth: "admin",
@@ -48405,6 +48645,36 @@ Object.freeze({
48405
48645
  addonId: null,
48406
48646
  access: "view"
48407
48647
  },
48648
+ "oidcConnections.connectionFormSchema": {
48649
+ capName: "oidc-connections",
48650
+ capScope: "system",
48651
+ addonId: null,
48652
+ access: "view"
48653
+ },
48654
+ "oidcConnections.createConnection": {
48655
+ capName: "oidc-connections",
48656
+ capScope: "system",
48657
+ addonId: null,
48658
+ access: "create"
48659
+ },
48660
+ "oidcConnections.deleteConnection": {
48661
+ capName: "oidc-connections",
48662
+ capScope: "system",
48663
+ addonId: null,
48664
+ access: "delete"
48665
+ },
48666
+ "oidcConnections.listConnections": {
48667
+ capName: "oidc-connections",
48668
+ capScope: "system",
48669
+ addonId: null,
48670
+ access: "view"
48671
+ },
48672
+ "oidcConnections.updateConnection": {
48673
+ capName: "oidc-connections",
48674
+ capScope: "system",
48675
+ addonId: null,
48676
+ access: "create"
48677
+ },
48408
48678
  "osd.getStatus": {
48409
48679
  capName: "osd",
48410
48680
  capScope: "device",
@@ -48477,6 +48747,12 @@ Object.freeze({
48477
48747
  addonId: null,
48478
48748
  access: "create"
48479
48749
  },
48750
+ "osdManager.setSlotCameraEnabled": {
48751
+ capName: "osd-manager",
48752
+ capScope: "system",
48753
+ addonId: null,
48754
+ access: "create"
48755
+ },
48480
48756
  "osdManager.upsertTemplate": {
48481
48757
  capName: "osd-manager",
48482
48758
  capScope: "system",
@@ -48615,12 +48891,6 @@ Object.freeze({
48615
48891
  addonId: null,
48616
48892
  access: "create"
48617
48893
  },
48618
- "pipelineAnalytics.createRetrainDatasetVersion": {
48619
- capName: "pipeline-analytics",
48620
- capScope: "device",
48621
- addonId: null,
48622
- access: "create"
48623
- },
48624
48894
  "pipelineAnalytics.deleteDeviceEvents": {
48625
48895
  capName: "pipeline-analytics",
48626
48896
  capScope: "device",
@@ -48633,12 +48903,6 @@ Object.freeze({
48633
48903
  addonId: null,
48634
48904
  access: "delete"
48635
48905
  },
48636
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
48637
- capName: "pipeline-analytics",
48638
- capScope: "device",
48639
- addonId: null,
48640
- access: "delete"
48641
- },
48642
48906
  "pipelineAnalytics.deleteTracks": {
48643
48907
  capName: "pipeline-analytics",
48644
48908
  capScope: "device",
@@ -48741,6 +49005,12 @@ Object.freeze({
48741
49005
  addonId: null,
48742
49006
  access: "view"
48743
49007
  },
49008
+ "pipelineAnalytics.getRetrainCorpusKpi": {
49009
+ capName: "pipeline-analytics",
49010
+ capScope: "device",
49011
+ addonId: null,
49012
+ access: "view"
49013
+ },
48744
49014
  "pipelineAnalytics.getRetrainExportUrl": {
48745
49015
  capName: "pipeline-analytics",
48746
49016
  capScope: "device",
@@ -48861,7 +49131,7 @@ Object.freeze({
48861
49131
  addonId: null,
48862
49132
  access: "view"
48863
49133
  },
48864
- "pipelineAnalytics.listRetrainDatasetVersions": {
49134
+ "pipelineAnalytics.listRetrainCorpusPage": {
48865
49135
  capName: "pipeline-analytics",
48866
49136
  capScope: "device",
48867
49137
  addonId: null,
@@ -48915,12 +49185,6 @@ Object.freeze({
48915
49185
  addonId: null,
48916
49186
  access: "create"
48917
49187
  },
48918
- "pipelineAnalytics.previewRetrainDataset": {
48919
- capName: "pipeline-analytics",
48920
- capScope: "device",
48921
- addonId: null,
48922
- access: "view"
48923
- },
48924
49188
  "pipelineAnalytics.proposeRetrainAnnotations": {
48925
49189
  capName: "pipeline-analytics",
48926
49190
  capScope: "device",
@@ -48999,6 +49263,12 @@ Object.freeze({
48999
49263
  addonId: null,
49000
49264
  access: "create"
49001
49265
  },
49266
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
49267
+ capName: "pipeline-analytics",
49268
+ capScope: "device",
49269
+ addonId: null,
49270
+ access: "view"
49271
+ },
49002
49272
  "pipelineAnalytics.restageRetrainTrack": {
49003
49273
  capName: "pipeline-analytics",
49004
49274
  capScope: "device",
@@ -49059,12 +49329,6 @@ Object.freeze({
49059
49329
  addonId: null,
49060
49330
  access: "create"
49061
49331
  },
49062
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
49063
- capName: "pipeline-analytics",
49064
- capScope: "device",
49065
- addonId: null,
49066
- access: "view"
49067
- },
49068
49332
  "pipelineAnalytics.wipeAllAnalytics": {
49069
49333
  capName: "pipeline-analytics",
49070
49334
  capScope: "device",
@@ -51459,18 +51723,6 @@ Object.freeze({
51459
51723
  addonId: null,
51460
51724
  access: "create"
51461
51725
  },
51462
- "training.findDatasetVersionIdByName": {
51463
- capName: "training",
51464
- capScope: "system",
51465
- addonId: null,
51466
- access: "view"
51467
- },
51468
- "training.getDatasetVersion": {
51469
- capName: "training",
51470
- capScope: "system",
51471
- addonId: null,
51472
- access: "view"
51473
- },
51474
51726
  "training.getJob": {
51475
51727
  capName: "training",
51476
51728
  capScope: "system",
@@ -51489,12 +51741,6 @@ Object.freeze({
51489
51741
  addonId: null,
51490
51742
  access: "view"
51491
51743
  },
51492
- "training.listDatasetVersions": {
51493
- capName: "training",
51494
- capScope: "system",
51495
- addonId: null,
51496
- access: "view"
51497
- },
51498
51744
  "training.listJobs": {
51499
51745
  capName: "training",
51500
51746
  capScope: "system",
@@ -51507,54 +51753,66 @@ Object.freeze({
51507
51753
  addonId: null,
51508
51754
  access: "view"
51509
51755
  },
51510
- "training.putDatasetVersion": {
51756
+ "training.registerResult": {
51511
51757
  capName: "training",
51512
51758
  capScope: "system",
51513
51759
  addonId: null,
51514
51760
  access: "create"
51515
51761
  },
51516
- "training.registerResult": {
51762
+ "training.rollbackCanary": {
51517
51763
  capName: "training",
51518
51764
  capScope: "system",
51519
51765
  addonId: null,
51520
51766
  access: "create"
51521
51767
  },
51522
- "training.removeDatasetVersion": {
51768
+ "training.startJob": {
51523
51769
  capName: "training",
51524
51770
  capScope: "system",
51525
51771
  addonId: null,
51526
- access: "delete"
51772
+ access: "create"
51527
51773
  },
51528
- "training.rollbackCanary": {
51774
+ "training.startJobBatch": {
51529
51775
  capName: "training",
51530
51776
  capScope: "system",
51531
51777
  addonId: null,
51532
51778
  access: "create"
51533
51779
  },
51534
- "training.startJob": {
51535
- capName: "training",
51780
+ "trainingProvider.cancelJob": {
51781
+ capName: "training-provider",
51536
51782
  capScope: "system",
51537
51783
  addonId: null,
51538
51784
  access: "create"
51539
51785
  },
51540
- "trainingProvider.cancelJob": {
51786
+ "trainingProvider.cleanupJob": {
51541
51787
  capName: "training-provider",
51542
51788
  capScope: "system",
51543
51789
  addonId: null,
51544
51790
  access: "create"
51545
51791
  },
51546
- "trainingProvider.cleanupJob": {
51792
+ "trainingProvider.createEntry": {
51547
51793
  capName: "training-provider",
51548
51794
  capScope: "system",
51549
51795
  addonId: null,
51550
51796
  access: "create"
51551
51797
  },
51798
+ "trainingProvider.deleteEntry": {
51799
+ capName: "training-provider",
51800
+ capScope: "system",
51801
+ addonId: null,
51802
+ access: "delete"
51803
+ },
51552
51804
  "trainingProvider.describe": {
51553
51805
  capName: "training-provider",
51554
51806
  capScope: "system",
51555
51807
  addonId: null,
51556
51808
  access: "view"
51557
51809
  },
51810
+ "trainingProvider.describeTypes": {
51811
+ capName: "training-provider",
51812
+ capScope: "system",
51813
+ addonId: null,
51814
+ access: "view"
51815
+ },
51558
51816
  "trainingProvider.estimateJob": {
51559
51817
  capName: "training-provider",
51560
51818
  capScope: "system",
@@ -51567,6 +51825,12 @@ Object.freeze({
51567
51825
  addonId: null,
51568
51826
  access: "view"
51569
51827
  },
51828
+ "trainingProvider.listEntries": {
51829
+ capName: "training-provider",
51830
+ capScope: "system",
51831
+ addonId: null,
51832
+ access: "view"
51833
+ },
51570
51834
  "trainingProvider.listJobEvents": {
51571
51835
  capName: "training-provider",
51572
51836
  capScope: "system",
@@ -51597,6 +51861,12 @@ Object.freeze({
51597
51861
  addonId: null,
51598
51862
  access: "create"
51599
51863
  },
51864
+ "trainingProvider.updateEntry": {
51865
+ capName: "training-provider",
51866
+ capScope: "system",
51867
+ addonId: null,
51868
+ access: "create"
51869
+ },
51600
51870
  "trainingProvider.uploadDataset": {
51601
51871
  capName: "training-provider",
51602
51872
  capScope: "system",
@@ -54803,6 +55073,11 @@ Object.freeze({
54803
55073
  form: "single",
54804
55074
  optional: false
54805
55075
  }],
55076
+ "osdManager.setSlotCameraEnabled": [{
55077
+ name: "deviceId",
55078
+ form: "single",
55079
+ optional: false
55080
+ }],
54806
55081
  "petFeeder.callPet": [{
54807
55082
  name: "deviceId",
54808
55083
  form: "single",
@@ -55023,6 +55298,11 @@ Object.freeze({
55023
55298
  form: "array",
55024
55299
  optional: false
55025
55300
  }],
55301
+ "pipelineAnalytics.listRetrainCorpusPage": [{
55302
+ name: "deviceIds",
55303
+ form: "array",
55304
+ optional: true
55305
+ }],
55026
55306
  "pipelineAnalytics.listRetrainStaging": [{
55027
55307
  name: "deviceIds",
55028
55308
  form: "array",
@@ -56132,6 +56412,7 @@ Object.freeze({
56132
56412
  });
56133
56413
  Object.freeze({
56134
56414
  "broker": "broker",
56415
+ "calendar-source": "calendar",
56135
56416
  "device-export": "device-export",
56136
56417
  "llm": "ai",
56137
56418
  "mesh-network": "mesh",
@@ -56617,6 +56898,8 @@ var STATE_SUMMARY_VARS = [
56617
56898
  [...RULE_TEXT],
56618
56899
  [...RULE_TEXT],
56619
56900
  [...RULE_TEXT],
56901
+ [...RULE_TEXT],
56902
+ [...RULE_TEXT],
56620
56903
  ([...RULE_TEXT], [...UPDATES]),
56621
56904
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
56622
56905
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),