@camstack/addon-provider-unraid 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()
@@ -36736,7 +36842,13 @@ var TopologyNodeSchema = object({
36736
36842
  })).readonly(),
36737
36843
  processes: array(TopologyProcessSchema).readonly(),
36738
36844
  categories: array(TopologyCategorySchema).readonly(),
36739
- rootPackage: TopologyRootPackageSchema.nullable()
36845
+ rootPackage: TopologyRootPackageSchema.nullable(),
36846
+ /**
36847
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
36848
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
36849
+ * for offline rows and when the hub cannot tell.
36850
+ */
36851
+ meshTransport: _enum(["tls", "clear"]).optional()
36740
36852
  });
36741
36853
  var CapUsageEdgeSchema = object({
36742
36854
  callerAddonId: string(),
@@ -37149,6 +37261,7 @@ var OsdNamedTemplateSchema = object({
37149
37261
  });
37150
37262
  /** Where a slot's value comes from. */
37151
37263
  var OsdSourceSchema = discriminatedUnion("kind", [
37264
+ object({ kind: literal("none") }),
37152
37265
  object({
37153
37266
  kind: literal("static"),
37154
37267
  text: string().max(64)
@@ -37275,6 +37388,13 @@ method(object({ deviceId: number().int() }), object({
37275
37388
  }), object({ success: literal(true) }), {
37276
37389
  kind: "mutation",
37277
37390
  auth: "admin"
37391
+ }), method(object({
37392
+ deviceId: number().int(),
37393
+ slotId: string().min(1),
37394
+ enabled: boolean()
37395
+ }), object({ success: literal(true) }), {
37396
+ kind: "mutation",
37397
+ auth: "admin"
37278
37398
  }), method(object({
37279
37399
  sourceDeviceId: number().int(),
37280
37400
  targetDeviceId: number().int()
@@ -37706,7 +37826,15 @@ var GpuInfoSchema = object({
37706
37826
  name: string(),
37707
37827
  memoryMB: number().optional()
37708
37828
  });
37709
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
37829
+ var NpuInfoSchema = object({
37830
+ type: _enum([
37831
+ "apple-ane",
37832
+ "intel-npu",
37833
+ "amd-xdna"
37834
+ ]),
37835
+ name: string().optional(),
37836
+ generation: _enum(["xdna1", "xdna2"]).optional()
37837
+ });
37710
37838
  var CoralInfoSchema = object({
37711
37839
  type: literal("coral-edgetpu"),
37712
37840
  bus: string().optional()
@@ -42449,9 +42577,11 @@ var zoneRulesCapability = {
42449
42577
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42450
42578
  * manifest entry and nothing else.
42451
42579
  *
42452
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42453
- * `notification-output` posture); `describe` concat-fans across providers.
42454
- * Every method is `admin`: these spend money.
42580
+ * Collection of provider **types** (addons). Each addon owns zero or more
42581
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
42582
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
42583
+ * `entryId`; callers also pass the owning `addonId` as the collection
42584
+ * selector (broker posture). Every method is `admin`: these spend money.
42455
42585
  *
42456
42586
  * Every cloud object a provider creates is tagged with the orchestrator's
42457
42587
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42475,8 +42605,8 @@ var TrainingRegionOptionSchema = object({
42475
42605
  priceMultiplier: number().positive()
42476
42606
  });
42477
42607
  /**
42478
- * The provider's per-account settings, as the orchestrator reads them. They
42479
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
42608
+ * The provider's per-entry settings, as the orchestrator reads them. They
42609
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
42480
42610
  * depend on the user's account), never hard-coded in the orchestrator.
42481
42611
  */
42482
42612
  var TrainingProviderDefaultsSchema = object({
@@ -42487,9 +42617,44 @@ var TrainingProviderDefaultsSchema = object({
42487
42617
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
42488
42618
  failedDatasetGraceHours: number().nonnegative()
42489
42619
  });
42620
+ /**
42621
+ * Entry form schema for a provider type — same seam as notification
42622
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
42623
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
42624
+ */
42625
+ var ConfigSchemaPassthrough = unknown();
42626
+ /** One creatable provider type, for the Add-entry dialog. */
42627
+ var TrainingProviderTypeSchema = object({
42628
+ typeId: string(),
42629
+ label: string(),
42630
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
42631
+ iconAsset: string(),
42632
+ /** Owning `training-provider` addon — collection selector for createEntry. */
42633
+ addonId: string(),
42634
+ /**
42635
+ * Fields for one entry of this type (credentials + defaults). Absent on a
42636
+ * type that only needs a name. Password fields are keychain-backed on the
42637
+ * provider addon (`secretStatePaths`), not D634 plaintext.
42638
+ */
42639
+ configSchema: ConfigSchemaPassthrough.optional()
42640
+ });
42641
+ /** One configured account / workspace under a provider type. */
42642
+ var TrainingProviderEntrySchema = object({
42643
+ entryId: string(),
42644
+ typeId: string(),
42645
+ name: string(),
42646
+ addonId: string(),
42647
+ /** Credentials are present — never the values. */
42648
+ configured: boolean()
42649
+ });
42490
42650
  var TrainingProviderDescriptorSchema = object({
42491
42651
  addonId: string(),
42492
- /** `modal`, `runpod`, `fake`, … */
42652
+ entryId: string(),
42653
+ typeId: string(),
42654
+ /** Operator-chosen entry name. */
42655
+ name: string(),
42656
+ iconAsset: string(),
42657
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
42493
42658
  kind: string(),
42494
42659
  label: string(),
42495
42660
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -42501,7 +42666,30 @@ var TrainingProviderDescriptorSchema = object({
42501
42666
  dataResidencyNote: string(),
42502
42667
  /** Credentials are present — never the values. */
42503
42668
  configured: boolean(),
42504
- defaults: TrainingProviderDefaultsSchema
42669
+ defaults: TrainingProviderDefaultsSchema,
42670
+ /**
42671
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
42672
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
42673
+ * never plaintext. Same hydrate contract as settings forms (D789).
42674
+ */
42675
+ formValues: record(string(), unknown()).optional()
42676
+ });
42677
+ /**
42678
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
42679
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
42680
+ * `{ $secretClear: true }` clears it.
42681
+ */
42682
+ var TrainingProviderUpdateEntryInputSchema = object({
42683
+ entryId: string().min(1),
42684
+ name: string().min(1),
42685
+ tokenId: string().optional(),
42686
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
42687
+ environment: string().optional(),
42688
+ gpuType: string().optional(),
42689
+ region: string().optional(),
42690
+ costCapUsd: number().nonnegative().optional(),
42691
+ maxRuntimeSec: number().int().positive().optional(),
42692
+ failedDatasetGraceHours: number().nonnegative().optional()
42505
42693
  });
42506
42694
  var TrainingCredentialCheckSchema = object({
42507
42695
  ok: boolean(),
@@ -42553,20 +42741,33 @@ var TrainerSourceRefSchema = object({
42553
42741
  /** A commit sha (never a branch) — the job must be reproducible. */
42554
42742
  revision: string().regex(/^[0-9a-f]{7,64}$/)
42555
42743
  });
42744
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
42556
42745
  var JobRef = {
42557
- addonId: string(),
42746
+ entryId: string().min(1),
42558
42747
  jobKey: string().uuid()
42559
42748
  };
42560
42749
  var TrainingLogLineSchema = object({
42561
42750
  ts: number(),
42562
42751
  text: string()
42563
42752
  });
42564
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
42753
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
42754
+ typeId: string().min(1),
42755
+ name: string().min(1)
42756
+ }), object({ entryId: string() }), {
42757
+ kind: "mutation",
42758
+ auth: "admin"
42759
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
42760
+ kind: "mutation",
42761
+ auth: "admin"
42762
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
42763
+ kind: "mutation",
42764
+ auth: "admin"
42765
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
42565
42766
  kind: "mutation",
42566
42767
  auth: "admin",
42567
42768
  timeoutMs: 3e4
42568
42769
  }), method(object({
42569
- addonId: string(),
42770
+ entryId: string().min(1),
42570
42771
  gpuType: string(),
42571
42772
  region: string(),
42572
42773
  datasetBytes: number().int().nonnegative(),
@@ -42632,7 +42833,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42632
42833
  kind: "mutation",
42633
42834
  auth: "admin",
42634
42835
  timeoutMs: 5 * 6e4
42635
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
42836
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
42636
42837
  auth: "admin",
42637
42838
  timeoutMs: 2 * 6e4
42638
42839
  });
@@ -42642,20 +42843,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42642
42843
  *
42643
42844
  * It owns what every provider must agree on, written once:
42644
42845
  *
42645
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
42646
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
42647
- * the export plan) and reaches this store through the five row methods
42648
- * below, so the Retrain page and the export did not change.
42649
42846
  * - **Jobs.** A persisted state machine, a reconcile loop against the
42650
42847
  * provider, a cost guard, a daily orphan sweep and the retention rules.
42651
42848
  * - **The return flow.** Verified artefacts → Model Studio
42652
42849
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
42653
42850
  * rollback. Nothing is ever registered automatically.
42654
42851
  *
42852
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
42853
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
42854
+ * moment and snapshotted on the job. No frozen dataset version.
42855
+ *
42655
42856
  * Every method is `admin`.
42656
42857
  */
42657
- /** A version WITH its frame list — what the export and a job read. */
42658
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
42858
+ /**
42859
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
42860
+ * Frame ids are resolved at plan/start — never a frozen version id.
42861
+ */
42862
+ var TrainingCorpusSelectionSchema = object({
42863
+ collectionIds: array(string()).min(1),
42864
+ /** Default complete-only for v1 */
42865
+ workState: _enum([
42866
+ "complete",
42867
+ "annotated_or_complete",
42868
+ "any_annotated"
42869
+ ]).default("complete")
42870
+ });
42659
42871
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
42660
42872
  var TrainingBaseModelSchema = object({
42661
42873
  modelId: string(),
@@ -42673,9 +42885,13 @@ var TrainingPresetSchema = _enum([
42673
42885
  "thorough"
42674
42886
  ]);
42675
42887
  var TrainingJobRequestSchema = object({
42676
- datasetVersionId: string().min(1),
42677
- /** The `training-provider` addon that runs it. */
42678
- addonId: string().min(1),
42888
+ /** Live collection + work-state criteria; resolved at plan/start. */
42889
+ selection: TrainingCorpusSelectionSchema,
42890
+ /**
42891
+ * The provider **entry** that runs it (credentials + defaults).
42892
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
42893
+ */
42894
+ entryId: string().min(1),
42679
42895
  gpuType: string().min(1),
42680
42896
  region: string(),
42681
42897
  baseModelId: string().min(1),
@@ -42734,6 +42950,7 @@ var TrainingJobPlanSchema = object({
42734
42950
  * result lives after the operator acted on it.
42735
42951
  */
42736
42952
  var TrainingJobStateSchema = _enum([
42953
+ "queued",
42737
42954
  "uploading",
42738
42955
  "submitted",
42739
42956
  "starting",
@@ -42787,6 +43004,11 @@ var TrainingJobSchema = object({
42787
43004
  createdAt: number(),
42788
43005
  updatedAt: number(),
42789
43006
  state: TrainingJobStateSchema,
43007
+ /**
43008
+ * Shared by every job enqueued together via `startJobBatch`.
43009
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43010
+ */
43011
+ batchId: string().nullable().default(null),
42790
43012
  stage: TrainingStageSchema.nullable(),
42791
43013
  failure: object({
42792
43014
  reason: TrainingFailureReasonSchema,
@@ -42798,6 +43020,12 @@ var TrainingJobSchema = object({
42798
43020
  maxRuntimeSec: number().int().positive(),
42799
43021
  trainer: TrainerSourceRefSchema,
42800
43022
  datasetLayout: RetrainExportLayoutSchema,
43023
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43024
+ frameCount: number().int().nonnegative(),
43025
+ /** Resolved frame ids at start — the archive ships exactly these. */
43026
+ frameIds: array(string()).max(2e4).readonly(),
43027
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43028
+ annotationHash: string(),
42801
43029
  dataset: object({
42802
43030
  bytes: number().int(),
42803
43031
  sha256: string(),
@@ -42839,13 +43067,7 @@ var TrainingJobSchema = object({
42839
43067
  canary: TrainingCanarySchema.nullable()
42840
43068
  });
42841
43069
  var IdInput = object({ id: string().min(1) });
42842
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42843
- kind: "mutation",
42844
- auth: "admin"
42845
- }), 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() }), {
42846
- kind: "mutation",
42847
- auth: "admin"
42848
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43070
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
42849
43071
  auth: "admin",
42850
43072
  timeoutMs: 6e4
42851
43073
  }), method(TrainingJobRequestSchema.extend({
@@ -42864,6 +43086,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42864
43086
  kind: "mutation",
42865
43087
  auth: "admin",
42866
43088
  timeoutMs: 12e4
43089
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43090
+ baseModelIds: array(string().min(1)).min(1),
43091
+ name: string().min(1).max(120),
43092
+ maxCostUsd: number().positive(),
43093
+ maxRuntimeSec: number().int().positive(),
43094
+ idempotencyKey: string().min(8).max(80)
43095
+ }), discriminatedUnion("kind", [object({
43096
+ kind: literal("started"),
43097
+ batchId: string(),
43098
+ jobs: array(TrainingJobSchema).min(1).readonly()
43099
+ }), object({
43100
+ kind: literal("refused"),
43101
+ reason: TrainingRefusalReasonSchema,
43102
+ detail: string()
43103
+ })]), {
43104
+ kind: "mutation",
43105
+ auth: "admin",
43106
+ timeoutMs: 12e4
42867
43107
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
42868
43108
  kind: "mutation",
42869
43109
  auth: "admin",
@@ -48422,6 +48662,36 @@ Object.freeze({
48422
48662
  addonId: null,
48423
48663
  access: "view"
48424
48664
  },
48665
+ "oidcConnections.connectionFormSchema": {
48666
+ capName: "oidc-connections",
48667
+ capScope: "system",
48668
+ addonId: null,
48669
+ access: "view"
48670
+ },
48671
+ "oidcConnections.createConnection": {
48672
+ capName: "oidc-connections",
48673
+ capScope: "system",
48674
+ addonId: null,
48675
+ access: "create"
48676
+ },
48677
+ "oidcConnections.deleteConnection": {
48678
+ capName: "oidc-connections",
48679
+ capScope: "system",
48680
+ addonId: null,
48681
+ access: "delete"
48682
+ },
48683
+ "oidcConnections.listConnections": {
48684
+ capName: "oidc-connections",
48685
+ capScope: "system",
48686
+ addonId: null,
48687
+ access: "view"
48688
+ },
48689
+ "oidcConnections.updateConnection": {
48690
+ capName: "oidc-connections",
48691
+ capScope: "system",
48692
+ addonId: null,
48693
+ access: "create"
48694
+ },
48425
48695
  "osd.getStatus": {
48426
48696
  capName: "osd",
48427
48697
  capScope: "device",
@@ -48494,6 +48764,12 @@ Object.freeze({
48494
48764
  addonId: null,
48495
48765
  access: "create"
48496
48766
  },
48767
+ "osdManager.setSlotCameraEnabled": {
48768
+ capName: "osd-manager",
48769
+ capScope: "system",
48770
+ addonId: null,
48771
+ access: "create"
48772
+ },
48497
48773
  "osdManager.upsertTemplate": {
48498
48774
  capName: "osd-manager",
48499
48775
  capScope: "system",
@@ -48632,12 +48908,6 @@ Object.freeze({
48632
48908
  addonId: null,
48633
48909
  access: "create"
48634
48910
  },
48635
- "pipelineAnalytics.createRetrainDatasetVersion": {
48636
- capName: "pipeline-analytics",
48637
- capScope: "device",
48638
- addonId: null,
48639
- access: "create"
48640
- },
48641
48911
  "pipelineAnalytics.deleteDeviceEvents": {
48642
48912
  capName: "pipeline-analytics",
48643
48913
  capScope: "device",
@@ -48650,12 +48920,6 @@ Object.freeze({
48650
48920
  addonId: null,
48651
48921
  access: "delete"
48652
48922
  },
48653
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
48654
- capName: "pipeline-analytics",
48655
- capScope: "device",
48656
- addonId: null,
48657
- access: "delete"
48658
- },
48659
48923
  "pipelineAnalytics.deleteTracks": {
48660
48924
  capName: "pipeline-analytics",
48661
48925
  capScope: "device",
@@ -48758,6 +49022,12 @@ Object.freeze({
48758
49022
  addonId: null,
48759
49023
  access: "view"
48760
49024
  },
49025
+ "pipelineAnalytics.getRetrainCorpusKpi": {
49026
+ capName: "pipeline-analytics",
49027
+ capScope: "device",
49028
+ addonId: null,
49029
+ access: "view"
49030
+ },
48761
49031
  "pipelineAnalytics.getRetrainExportUrl": {
48762
49032
  capName: "pipeline-analytics",
48763
49033
  capScope: "device",
@@ -48878,7 +49148,7 @@ Object.freeze({
48878
49148
  addonId: null,
48879
49149
  access: "view"
48880
49150
  },
48881
- "pipelineAnalytics.listRetrainDatasetVersions": {
49151
+ "pipelineAnalytics.listRetrainCorpusPage": {
48882
49152
  capName: "pipeline-analytics",
48883
49153
  capScope: "device",
48884
49154
  addonId: null,
@@ -48932,12 +49202,6 @@ Object.freeze({
48932
49202
  addonId: null,
48933
49203
  access: "create"
48934
49204
  },
48935
- "pipelineAnalytics.previewRetrainDataset": {
48936
- capName: "pipeline-analytics",
48937
- capScope: "device",
48938
- addonId: null,
48939
- access: "view"
48940
- },
48941
49205
  "pipelineAnalytics.proposeRetrainAnnotations": {
48942
49206
  capName: "pipeline-analytics",
48943
49207
  capScope: "device",
@@ -49016,6 +49280,12 @@ Object.freeze({
49016
49280
  addonId: null,
49017
49281
  access: "create"
49018
49282
  },
49283
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
49284
+ capName: "pipeline-analytics",
49285
+ capScope: "device",
49286
+ addonId: null,
49287
+ access: "view"
49288
+ },
49019
49289
  "pipelineAnalytics.restageRetrainTrack": {
49020
49290
  capName: "pipeline-analytics",
49021
49291
  capScope: "device",
@@ -49076,12 +49346,6 @@ Object.freeze({
49076
49346
  addonId: null,
49077
49347
  access: "create"
49078
49348
  },
49079
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
49080
- capName: "pipeline-analytics",
49081
- capScope: "device",
49082
- addonId: null,
49083
- access: "view"
49084
- },
49085
49349
  "pipelineAnalytics.wipeAllAnalytics": {
49086
49350
  capName: "pipeline-analytics",
49087
49351
  capScope: "device",
@@ -51476,18 +51740,6 @@ Object.freeze({
51476
51740
  addonId: null,
51477
51741
  access: "create"
51478
51742
  },
51479
- "training.findDatasetVersionIdByName": {
51480
- capName: "training",
51481
- capScope: "system",
51482
- addonId: null,
51483
- access: "view"
51484
- },
51485
- "training.getDatasetVersion": {
51486
- capName: "training",
51487
- capScope: "system",
51488
- addonId: null,
51489
- access: "view"
51490
- },
51491
51743
  "training.getJob": {
51492
51744
  capName: "training",
51493
51745
  capScope: "system",
@@ -51506,12 +51758,6 @@ Object.freeze({
51506
51758
  addonId: null,
51507
51759
  access: "view"
51508
51760
  },
51509
- "training.listDatasetVersions": {
51510
- capName: "training",
51511
- capScope: "system",
51512
- addonId: null,
51513
- access: "view"
51514
- },
51515
51761
  "training.listJobs": {
51516
51762
  capName: "training",
51517
51763
  capScope: "system",
@@ -51524,54 +51770,66 @@ Object.freeze({
51524
51770
  addonId: null,
51525
51771
  access: "view"
51526
51772
  },
51527
- "training.putDatasetVersion": {
51773
+ "training.registerResult": {
51528
51774
  capName: "training",
51529
51775
  capScope: "system",
51530
51776
  addonId: null,
51531
51777
  access: "create"
51532
51778
  },
51533
- "training.registerResult": {
51779
+ "training.rollbackCanary": {
51534
51780
  capName: "training",
51535
51781
  capScope: "system",
51536
51782
  addonId: null,
51537
51783
  access: "create"
51538
51784
  },
51539
- "training.removeDatasetVersion": {
51785
+ "training.startJob": {
51540
51786
  capName: "training",
51541
51787
  capScope: "system",
51542
51788
  addonId: null,
51543
- access: "delete"
51789
+ access: "create"
51544
51790
  },
51545
- "training.rollbackCanary": {
51791
+ "training.startJobBatch": {
51546
51792
  capName: "training",
51547
51793
  capScope: "system",
51548
51794
  addonId: null,
51549
51795
  access: "create"
51550
51796
  },
51551
- "training.startJob": {
51552
- capName: "training",
51797
+ "trainingProvider.cancelJob": {
51798
+ capName: "training-provider",
51553
51799
  capScope: "system",
51554
51800
  addonId: null,
51555
51801
  access: "create"
51556
51802
  },
51557
- "trainingProvider.cancelJob": {
51803
+ "trainingProvider.cleanupJob": {
51558
51804
  capName: "training-provider",
51559
51805
  capScope: "system",
51560
51806
  addonId: null,
51561
51807
  access: "create"
51562
51808
  },
51563
- "trainingProvider.cleanupJob": {
51809
+ "trainingProvider.createEntry": {
51564
51810
  capName: "training-provider",
51565
51811
  capScope: "system",
51566
51812
  addonId: null,
51567
51813
  access: "create"
51568
51814
  },
51815
+ "trainingProvider.deleteEntry": {
51816
+ capName: "training-provider",
51817
+ capScope: "system",
51818
+ addonId: null,
51819
+ access: "delete"
51820
+ },
51569
51821
  "trainingProvider.describe": {
51570
51822
  capName: "training-provider",
51571
51823
  capScope: "system",
51572
51824
  addonId: null,
51573
51825
  access: "view"
51574
51826
  },
51827
+ "trainingProvider.describeTypes": {
51828
+ capName: "training-provider",
51829
+ capScope: "system",
51830
+ addonId: null,
51831
+ access: "view"
51832
+ },
51575
51833
  "trainingProvider.estimateJob": {
51576
51834
  capName: "training-provider",
51577
51835
  capScope: "system",
@@ -51584,6 +51842,12 @@ Object.freeze({
51584
51842
  addonId: null,
51585
51843
  access: "view"
51586
51844
  },
51845
+ "trainingProvider.listEntries": {
51846
+ capName: "training-provider",
51847
+ capScope: "system",
51848
+ addonId: null,
51849
+ access: "view"
51850
+ },
51587
51851
  "trainingProvider.listJobEvents": {
51588
51852
  capName: "training-provider",
51589
51853
  capScope: "system",
@@ -51614,6 +51878,12 @@ Object.freeze({
51614
51878
  addonId: null,
51615
51879
  access: "create"
51616
51880
  },
51881
+ "trainingProvider.updateEntry": {
51882
+ capName: "training-provider",
51883
+ capScope: "system",
51884
+ addonId: null,
51885
+ access: "create"
51886
+ },
51617
51887
  "trainingProvider.uploadDataset": {
51618
51888
  capName: "training-provider",
51619
51889
  capScope: "system",
@@ -54820,6 +55090,11 @@ Object.freeze({
54820
55090
  form: "single",
54821
55091
  optional: false
54822
55092
  }],
55093
+ "osdManager.setSlotCameraEnabled": [{
55094
+ name: "deviceId",
55095
+ form: "single",
55096
+ optional: false
55097
+ }],
54823
55098
  "petFeeder.callPet": [{
54824
55099
  name: "deviceId",
54825
55100
  form: "single",
@@ -55040,6 +55315,11 @@ Object.freeze({
55040
55315
  form: "array",
55041
55316
  optional: false
55042
55317
  }],
55318
+ "pipelineAnalytics.listRetrainCorpusPage": [{
55319
+ name: "deviceIds",
55320
+ form: "array",
55321
+ optional: true
55322
+ }],
55043
55323
  "pipelineAnalytics.listRetrainStaging": [{
55044
55324
  name: "deviceIds",
55045
55325
  form: "array",
@@ -56149,6 +56429,7 @@ Object.freeze({
56149
56429
  });
56150
56430
  Object.freeze({
56151
56431
  "broker": "broker",
56432
+ "calendar-source": "calendar",
56152
56433
  "device-export": "device-export",
56153
56434
  "llm": "ai",
56154
56435
  "mesh-network": "mesh",
@@ -56634,6 +56915,8 @@ var STATE_SUMMARY_VARS = [
56634
56915
  [...RULE_TEXT],
56635
56916
  [...RULE_TEXT],
56636
56917
  [...RULE_TEXT],
56918
+ [...RULE_TEXT],
56919
+ [...RULE_TEXT],
56637
56920
  ([...RULE_TEXT], [...UPDATES]),
56638
56921
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
56639
56922
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),