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