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