@camstack/addon-provider-rademacher 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
@@ -6361,7 +6361,7 @@ var ZodIssueCode = {
6361
6361
  var ZodFirstPartyTypeKind;
6362
6362
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
6363
6363
  //#endregion
6364
- //#region ../types/dist/sleep-r3RWkGVx.mjs
6364
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
6365
6365
  /**
6366
6366
  * The audio chunk plane's byte format, and the ONE expansion from a coded
6367
6367
  * window to float samples (D455).
@@ -10367,6 +10367,16 @@ var CompositionSchema = object({
10367
10367
  seen.add(feature.cap);
10368
10368
  });
10369
10369
  });
10370
+ var NodeColorIdSchema = _enum([
10371
+ "node-a",
10372
+ "node-b",
10373
+ "node-c",
10374
+ "node-d",
10375
+ "node-e",
10376
+ "node-f",
10377
+ "node-g",
10378
+ "node-h"
10379
+ ]);
10370
10380
  new Set([
10371
10381
  "track",
10372
10382
  "face",
@@ -19509,14 +19519,14 @@ var LlmProfileSchema = object({
19509
19519
  /** ConfigUISchema tree passed through untyped on the wire (the
19510
19520
  * notification-output `ConfigSchemaPassthrough` precedent at
19511
19521
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
19512
- var ConfigSchemaPassthrough$1 = unknown();
19522
+ var ConfigSchemaPassthrough$3 = unknown();
19513
19523
  var LlmProfileKindDescriptorSchema = object({
19514
19524
  kind: LlmProfileKindSchema,
19515
19525
  label: string(),
19516
19526
  icon: string(),
19517
19527
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
19518
19528
  addonId: string(),
19519
- configSchema: ConfigSchemaPassthrough$1
19529
+ configSchema: ConfigSchemaPassthrough$3
19520
19530
  });
19521
19531
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
19522
19532
  var LlmDefaultSchema = object({
@@ -20637,7 +20647,7 @@ var TargetKindCapsSchema = object({
20637
20647
  * the union is large and not meant for runtime validation here; the exported
20638
20648
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
20639
20649
  */
20640
- var ConfigSchemaPassthrough = unknown();
20650
+ var ConfigSchemaPassthrough$2 = unknown();
20641
20651
  var TargetKindSchema = object({
20642
20652
  kind: string(),
20643
20653
  label: string(),
@@ -20674,7 +20684,7 @@ var TargetKindSchema = object({
20674
20684
  * its raster path, which is the safe default for an unknown image.
20675
20685
  */
20676
20686
  iconMediaType: string().optional(),
20677
- configSchema: ConfigSchemaPassthrough,
20687
+ configSchema: ConfigSchemaPassthrough$2,
20678
20688
  /**
20679
20689
  * The config keys that decide WHERE this kind's secrets are sent (server,
20680
20690
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -24011,6 +24021,61 @@ var OauthIntegrationDescriptorSchema = object({
24011
24021
  });
24012
24022
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
24013
24023
  /**
24024
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
24025
+ *
24026
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
24027
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
24028
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
24029
+ * immutable after create.
24030
+ */
24031
+ var ConfigSchemaPassthrough$1 = unknown();
24032
+ var OidcConnectionSchema = object({
24033
+ id: string().min(1),
24034
+ displayName: string(),
24035
+ icon: string(),
24036
+ issuerUrl: string(),
24037
+ clientId: string(),
24038
+ /** Client id + secret present — never the secret value. */
24039
+ configured: boolean(),
24040
+ /**
24041
+ * Values for the connection form schema. `clientSecret` is a keychain
24042
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
24043
+ */
24044
+ formValues: record(string(), unknown()).optional()
24045
+ });
24046
+ /**
24047
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
24048
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
24049
+ */
24050
+ var OidcConnectionUpdateInputSchema = object({
24051
+ id: string().min(1),
24052
+ displayName: string().min(1),
24053
+ icon: string().optional(),
24054
+ issuerUrl: string().optional(),
24055
+ clientId: string().optional(),
24056
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
24057
+ redirectUri: string().optional(),
24058
+ scopes: string().optional(),
24059
+ usernameClaim: _enum([
24060
+ "preferred_username",
24061
+ "email",
24062
+ "sub"
24063
+ ]).optional()
24064
+ });
24065
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
24066
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
24067
+ displayName: string().min(1)
24068
+ }), object({ id: string() }), {
24069
+ kind: "mutation",
24070
+ auth: "admin"
24071
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
24072
+ kind: "mutation",
24073
+ auth: "admin"
24074
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
24075
+ kind: "mutation",
24076
+ auth: "admin"
24077
+ });
24078
+ /**
24014
24079
  * What started a camera's onboard motion (D672). `camera` is the camera's own
24015
24080
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
24016
24081
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -25367,24 +25432,69 @@ var RetrainFrameListSchema = object({
25367
25432
  /** What the page pre-selects — the native key frame when one survives. */
25368
25433
  autoPickMediaId: number().int().optional()
25369
25434
  });
25435
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
25436
+ var RetrainFrameWorkStateSchema = _enum([
25437
+ "unannotated",
25438
+ "annotated",
25439
+ "complete"
25440
+ ]);
25441
+ /**
25442
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
25443
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
25444
+ */
25445
+ var RetrainCorpusFilterSchema = object({
25446
+ workState: RetrainFrameWorkStateSchema.optional(),
25447
+ deviceIds: array(number()).max(500).optional(),
25448
+ /** When set, only frames in this named collection. */
25449
+ collectionId: string().optional(),
25450
+ /** Frames that carry at least one saved annotation in one of these classes. */
25451
+ classes: array(RetrainMacroClassSchema).optional(),
25452
+ page: number().int().positive().default(1),
25453
+ pageSize: number().int().positive().max(100).default(50)
25454
+ });
25455
+ var RetrainCorpusPageSchema = object({
25456
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
25457
+ total: number().int().nonnegative(),
25458
+ page: number().int().positive(),
25459
+ pageSize: number().int().positive()
25460
+ });
25461
+ var RetrainCorpusKpiCameraRowSchema = object({
25462
+ deviceId: number(),
25463
+ unannotated: number().int().nonnegative(),
25464
+ annotated: number().int().nonnegative(),
25465
+ complete: number().int().nonnegative(),
25466
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
25467
+ * `null` when the corpus is empty (no ratio). */
25468
+ pctOfCorpus: number().min(0).max(1).nullable()
25469
+ });
25470
+ var RetrainCorpusKpiSchema = object({
25471
+ total: number().int().nonnegative(),
25472
+ unannotated: number().int().nonnegative(),
25473
+ annotated: number().int().nonnegative(),
25474
+ complete: number().int().nonnegative(),
25475
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
25476
+ });
25370
25477
  /**
25371
25478
  * Which frames an annotated export carries. Every field narrows; an empty
25372
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
25373
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
25374
- * the primitive a version export uses; `batchId` re-selects what an earlier
25375
- * export carried (`exportedInBatch`).
25479
+ * filter is every annotated copy. `frameIds` is the primitive a job or
25480
+ * download uses; `batchId` re-selects what an earlier export carried
25481
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
25482
+ * resolves to `frameIds` at plan/start.
25376
25483
  */
25377
25484
  var RetrainExportFilterSchema = object({
25378
25485
  deviceIds: array(number()).optional(),
25379
25486
  frameIds: array(string()).max(2e4).optional(),
25380
25487
  /** Only frames in at least one of these named collections. */
25381
25488
  collectionIds: array(string()).max(200).optional(),
25382
- /** Exactly the frames of this dataset version (and its completeOnly). An
25383
- * unknown id selects nothing. */
25384
- datasetVersionId: string().optional(),
25489
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
25490
+ collectionId: string().optional(),
25385
25491
  batchId: string().optional(),
25386
25492
  /** Only frames the operator marked complete (all subjects boxed). */
25387
- completeOnly: boolean().optional()
25493
+ completeOnly: boolean().optional(),
25494
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
25495
+ workState: RetrainFrameWorkStateSchema.optional(),
25496
+ /** Frames with at least one saved annotation in one of these classes. */
25497
+ classes: array(RetrainMacroClassSchema).optional()
25388
25498
  });
25389
25499
  /**
25390
25500
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -25584,8 +25694,7 @@ var RetrainDatasetStatsSchema = object({
25584
25694
  completeFrames: number().int()
25585
25695
  })).readonly()
25586
25696
  });
25587
- /** An immutable dataset version, without its frame list. */
25588
- var RetrainDatasetVersionSchema = object({
25697
+ object({
25589
25698
  id: string(),
25590
25699
  name: string(),
25591
25700
  createdAt: number(),
@@ -25593,22 +25702,33 @@ var RetrainDatasetVersionSchema = object({
25593
25702
  layout: RetrainExportLayoutSchema,
25594
25703
  completeOnly: boolean(),
25595
25704
  frameCount: number().int(),
25596
- /** sha256 of what the frames taught when the version was frozen. */
25597
25705
  annotationHash: string(),
25598
- /** The export manifest schema the version was cut under. */
25599
25706
  manifestSchema: string(),
25600
25707
  stats: RetrainDatasetStatsSchema
25601
25708
  });
25602
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
25603
- kind: literal("created"),
25604
- version: RetrainDatasetVersionSchema
25709
+ /**
25710
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25711
+ * the training cap. Resolved here so plan/start and the annotated export share
25712
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25713
+ */
25714
+ var RetrainTrainingCorpusSelectionSchema = object({
25715
+ collectionIds: array(string()).min(1),
25716
+ workState: _enum([
25717
+ "complete",
25718
+ "annotated_or_complete",
25719
+ "any_annotated"
25720
+ ]).default("complete")
25721
+ });
25722
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25723
+ kind: literal("resolved"),
25724
+ frameIds: array(string()).max(2e4).readonly(),
25725
+ stats: RetrainDatasetStatsSchema,
25726
+ annotationHash: string(),
25727
+ layout: RetrainExportLayoutSchema
25605
25728
  }), object({
25606
25729
  kind: literal("refused"),
25607
- reason: _enum([
25608
- "empty-name",
25609
- "duplicate-name",
25610
- "no-frames"
25611
- ])
25730
+ reason: _enum(["unknown-collection", "no-frames"]),
25731
+ detail: string()
25612
25732
  })]);
25613
25733
  /** The outcome of a lifecycle move owned by the retrain page. */
25614
25734
  var RetrainTransitionResultSchema = object({
@@ -26315,6 +26435,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26315
26435
  }), array(RetrainTrackSchema).readonly(), {
26316
26436
  kind: "query",
26317
26437
  auth: "admin"
26438
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
26439
+ kind: "query",
26440
+ auth: "admin"
26441
+ }), method(object({}), RetrainCorpusKpiSchema, {
26442
+ kind: "query",
26443
+ auth: "admin"
26318
26444
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
26319
26445
  kind: "query",
26320
26446
  auth: "admin"
@@ -26410,36 +26536,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26410
26536
  kind: "mutation",
26411
26537
  auth: "admin",
26412
26538
  timeoutMs: 12e4
26413
- }), method(object({
26414
- selection: RetrainDatasetSelectionSchema,
26415
- completeOnly: boolean().optional()
26416
- }), RetrainDatasetStatsSchema, {
26417
- kind: "query",
26418
- auth: "admin"
26419
- }), method(object({
26420
- name: string().max(120),
26421
- selection: RetrainDatasetSelectionSchema,
26422
- layout: RetrainExportLayoutSchema,
26423
- completeOnly: boolean()
26424
- }), CreateRetrainDatasetVersionResultSchema, {
26425
- kind: "mutation",
26426
- auth: "admin",
26427
- timeoutMs: 12e4
26428
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
26429
- kind: "query",
26430
- auth: "admin"
26431
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
26432
- kind: "mutation",
26433
- auth: "admin"
26434
- }), method(object({ id: string() }), object({
26435
- found: boolean(),
26436
- annotationHash: string(),
26437
- matches: boolean(),
26438
- missingFrames: number().int()
26439
- }), {
26440
- kind: "query",
26441
- auth: "admin",
26442
- timeoutMs: 12e4
26443
26539
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
26444
26540
  kind: "query",
26445
26541
  auth: "admin"
@@ -26466,6 +26562,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
26466
26562
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
26467
26563
  kind: "query",
26468
26564
  auth: "admin"
26565
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
26566
+ kind: "query",
26567
+ auth: "admin",
26568
+ timeoutMs: 6e4
26469
26569
  }), method(object({
26470
26570
  id: string(),
26471
26571
  name: string().max(120)
@@ -27082,11 +27182,14 @@ var HardwareClassIdSchema = _enum([
27082
27182
  "intel-n-series",
27083
27183
  "apple-m-base",
27084
27184
  "apple-m-pro",
27185
+ "amd-phoenix",
27085
27186
  "unknown"
27086
27187
  ]);
27087
27188
  var AcceleratorKindSchema = _enum([
27088
27189
  "intel-npu",
27089
27190
  "intel-igpu",
27191
+ "amd-igpu",
27192
+ "amd-npu",
27090
27193
  "x86-cpu",
27091
27194
  "arm-cpu",
27092
27195
  "apple-ane",
@@ -29016,6 +29119,8 @@ var AgentPipelineSettingsSchema = object({
29016
29119
  * address is wrong (multi-homed host, NAT, custom interface).
29017
29120
  */
29018
29121
  reachableHost: string().optional(),
29122
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
29123
+ color: NodeColorIdSchema.optional(),
29019
29124
  /**
29020
29125
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
29021
29126
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -29565,8 +29670,9 @@ method(object({
29565
29670
  auth: "admin"
29566
29671
  }), method(object({
29567
29672
  agentNodeId: string(),
29568
- reachableHost: string().nullable()
29569
- }), object({ success: literal(true) }), {
29673
+ reachableHost: string().nullable().optional(),
29674
+ color: NodeColorIdSchema.nullable().optional()
29675
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
29570
29676
  kind: "mutation",
29571
29677
  auth: "admin"
29572
29678
  }), method(object({
@@ -32642,7 +32748,7 @@ var CustomActionInputSchema = object({
32642
32748
  action: string().min(1),
32643
32749
  input: unknown()
32644
32750
  });
32645
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32751
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32646
32752
  addonId: string(),
32647
32753
  limit: number().min(1).max(500).default(100),
32648
32754
  level: LogLevelSchema$2.optional()
@@ -37704,7 +37810,13 @@ var TopologyNodeSchema = object({
37704
37810
  })).readonly(),
37705
37811
  processes: array(TopologyProcessSchema).readonly(),
37706
37812
  categories: array(TopologyCategorySchema).readonly(),
37707
- rootPackage: TopologyRootPackageSchema.nullable()
37813
+ rootPackage: TopologyRootPackageSchema.nullable(),
37814
+ /**
37815
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
37816
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
37817
+ * for offline rows and when the hub cannot tell.
37818
+ */
37819
+ meshTransport: _enum(["tls", "clear"]).optional()
37708
37820
  });
37709
37821
  var CapUsageEdgeSchema = object({
37710
37822
  callerAddonId: string(),
@@ -38117,6 +38229,7 @@ var OsdNamedTemplateSchema = object({
38117
38229
  });
38118
38230
  /** Where a slot's value comes from. */
38119
38231
  var OsdSourceSchema = discriminatedUnion("kind", [
38232
+ object({ kind: literal("none") }),
38120
38233
  object({
38121
38234
  kind: literal("static"),
38122
38235
  text: string().max(64)
@@ -38243,6 +38356,13 @@ method(object({ deviceId: number().int() }), object({
38243
38356
  }), object({ success: literal(true) }), {
38244
38357
  kind: "mutation",
38245
38358
  auth: "admin"
38359
+ }), method(object({
38360
+ deviceId: number().int(),
38361
+ slotId: string().min(1),
38362
+ enabled: boolean()
38363
+ }), object({ success: literal(true) }), {
38364
+ kind: "mutation",
38365
+ auth: "admin"
38246
38366
  }), method(object({
38247
38367
  sourceDeviceId: number().int(),
38248
38368
  targetDeviceId: number().int()
@@ -38674,7 +38794,15 @@ var GpuInfoSchema = object({
38674
38794
  name: string(),
38675
38795
  memoryMB: number().optional()
38676
38796
  });
38677
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
38797
+ var NpuInfoSchema = object({
38798
+ type: _enum([
38799
+ "apple-ane",
38800
+ "intel-npu",
38801
+ "amd-xdna"
38802
+ ]),
38803
+ name: string().optional(),
38804
+ generation: _enum(["xdna1", "xdna2"]).optional()
38805
+ });
38678
38806
  var CoralInfoSchema = object({
38679
38807
  type: literal("coral-edgetpu"),
38680
38808
  bus: string().optional()
@@ -43417,9 +43545,11 @@ var zoneRulesCapability = {
43417
43545
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
43418
43546
  * manifest entry and nothing else.
43419
43547
  *
43420
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
43421
- * `notification-output` posture); `describe` concat-fans across providers.
43422
- * Every method is `admin`: these spend money.
43548
+ * Collection of provider **types** (addons). Each addon owns zero or more
43549
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
43550
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
43551
+ * `entryId`; callers also pass the owning `addonId` as the collection
43552
+ * selector (broker posture). Every method is `admin`: these spend money.
43423
43553
  *
43424
43554
  * Every cloud object a provider creates is tagged with the orchestrator's
43425
43555
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -43443,8 +43573,8 @@ var TrainingRegionOptionSchema = object({
43443
43573
  priceMultiplier: number().positive()
43444
43574
  });
43445
43575
  /**
43446
- * The provider's per-account settings, as the orchestrator reads them. They
43447
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
43576
+ * The provider's per-entry settings, as the orchestrator reads them. They
43577
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
43448
43578
  * depend on the user's account), never hard-coded in the orchestrator.
43449
43579
  */
43450
43580
  var TrainingProviderDefaultsSchema = object({
@@ -43455,9 +43585,44 @@ var TrainingProviderDefaultsSchema = object({
43455
43585
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43456
43586
  failedDatasetGraceHours: number().nonnegative()
43457
43587
  });
43588
+ /**
43589
+ * Entry form schema for a provider type — same seam as notification
43590
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
43591
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
43592
+ */
43593
+ var ConfigSchemaPassthrough = unknown();
43594
+ /** One creatable provider type, for the Add-entry dialog. */
43595
+ var TrainingProviderTypeSchema = object({
43596
+ typeId: string(),
43597
+ label: string(),
43598
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
43599
+ iconAsset: string(),
43600
+ /** Owning `training-provider` addon — collection selector for createEntry. */
43601
+ addonId: string(),
43602
+ /**
43603
+ * Fields for one entry of this type (credentials + defaults). Absent on a
43604
+ * type that only needs a name. Password fields are keychain-backed on the
43605
+ * provider addon (`secretStatePaths`), not D634 plaintext.
43606
+ */
43607
+ configSchema: ConfigSchemaPassthrough.optional()
43608
+ });
43609
+ /** One configured account / workspace under a provider type. */
43610
+ var TrainingProviderEntrySchema = object({
43611
+ entryId: string(),
43612
+ typeId: string(),
43613
+ name: string(),
43614
+ addonId: string(),
43615
+ /** Credentials are present — never the values. */
43616
+ configured: boolean()
43617
+ });
43458
43618
  var TrainingProviderDescriptorSchema = object({
43459
43619
  addonId: string(),
43460
- /** `modal`, `runpod`, `fake`, … */
43620
+ entryId: string(),
43621
+ typeId: string(),
43622
+ /** Operator-chosen entry name. */
43623
+ name: string(),
43624
+ iconAsset: string(),
43625
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
43461
43626
  kind: string(),
43462
43627
  label: string(),
43463
43628
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43469,7 +43634,30 @@ var TrainingProviderDescriptorSchema = object({
43469
43634
  dataResidencyNote: string(),
43470
43635
  /** Credentials are present — never the values. */
43471
43636
  configured: boolean(),
43472
- defaults: TrainingProviderDefaultsSchema
43637
+ defaults: TrainingProviderDefaultsSchema,
43638
+ /**
43639
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
43640
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
43641
+ * never plaintext. Same hydrate contract as settings forms (D789).
43642
+ */
43643
+ formValues: record(string(), unknown()).optional()
43644
+ });
43645
+ /**
43646
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
43647
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
43648
+ * `{ $secretClear: true }` clears it.
43649
+ */
43650
+ var TrainingProviderUpdateEntryInputSchema = object({
43651
+ entryId: string().min(1),
43652
+ name: string().min(1),
43653
+ tokenId: string().optional(),
43654
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
43655
+ environment: string().optional(),
43656
+ gpuType: string().optional(),
43657
+ region: string().optional(),
43658
+ costCapUsd: number().nonnegative().optional(),
43659
+ maxRuntimeSec: number().int().positive().optional(),
43660
+ failedDatasetGraceHours: number().nonnegative().optional()
43473
43661
  });
43474
43662
  var TrainingCredentialCheckSchema = object({
43475
43663
  ok: boolean(),
@@ -43521,20 +43709,33 @@ var TrainerSourceRefSchema = object({
43521
43709
  /** A commit sha (never a branch) — the job must be reproducible. */
43522
43710
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43523
43711
  });
43712
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43524
43713
  var JobRef = {
43525
- addonId: string(),
43714
+ entryId: string().min(1),
43526
43715
  jobKey: string().uuid()
43527
43716
  };
43528
43717
  var TrainingLogLineSchema = object({
43529
43718
  ts: number(),
43530
43719
  text: string()
43531
43720
  });
43532
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
43721
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
43722
+ typeId: string().min(1),
43723
+ name: string().min(1)
43724
+ }), object({ entryId: string() }), {
43725
+ kind: "mutation",
43726
+ auth: "admin"
43727
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
43728
+ kind: "mutation",
43729
+ auth: "admin"
43730
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
43731
+ kind: "mutation",
43732
+ auth: "admin"
43733
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
43533
43734
  kind: "mutation",
43534
43735
  auth: "admin",
43535
43736
  timeoutMs: 3e4
43536
43737
  }), method(object({
43537
- addonId: string(),
43738
+ entryId: string().min(1),
43538
43739
  gpuType: string(),
43539
43740
  region: string(),
43540
43741
  datasetBytes: number().int().nonnegative(),
@@ -43600,7 +43801,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43600
43801
  kind: "mutation",
43601
43802
  auth: "admin",
43602
43803
  timeoutMs: 5 * 6e4
43603
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
43804
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
43604
43805
  auth: "admin",
43605
43806
  timeoutMs: 2 * 6e4
43606
43807
  });
@@ -43610,20 +43811,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43610
43811
  *
43611
43812
  * It owns what every provider must agree on, written once:
43612
43813
  *
43613
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
43614
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
43615
- * the export plan) and reaches this store through the five row methods
43616
- * below, so the Retrain page and the export did not change.
43617
43814
  * - **Jobs.** A persisted state machine, a reconcile loop against the
43618
43815
  * provider, a cost guard, a daily orphan sweep and the retention rules.
43619
43816
  * - **The return flow.** Verified artefacts → Model Studio
43620
43817
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
43621
43818
  * rollback. Nothing is ever registered automatically.
43622
43819
  *
43820
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
43821
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
43822
+ * moment and snapshotted on the job. No frozen dataset version.
43823
+ *
43623
43824
  * Every method is `admin`.
43624
43825
  */
43625
- /** A version WITH its frame list — what the export and a job read. */
43626
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
43826
+ /**
43827
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
43828
+ * Frame ids are resolved at plan/start — never a frozen version id.
43829
+ */
43830
+ var TrainingCorpusSelectionSchema = object({
43831
+ collectionIds: array(string()).min(1),
43832
+ /** Default complete-only for v1 */
43833
+ workState: _enum([
43834
+ "complete",
43835
+ "annotated_or_complete",
43836
+ "any_annotated"
43837
+ ]).default("complete")
43838
+ });
43627
43839
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
43628
43840
  var TrainingBaseModelSchema = object({
43629
43841
  modelId: string(),
@@ -43641,9 +43853,13 @@ var TrainingPresetSchema = _enum([
43641
43853
  "thorough"
43642
43854
  ]);
43643
43855
  var TrainingJobRequestSchema = object({
43644
- datasetVersionId: string().min(1),
43645
- /** The `training-provider` addon that runs it. */
43646
- addonId: string().min(1),
43856
+ /** Live collection + work-state criteria; resolved at plan/start. */
43857
+ selection: TrainingCorpusSelectionSchema,
43858
+ /**
43859
+ * The provider **entry** that runs it (credentials + defaults).
43860
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
43861
+ */
43862
+ entryId: string().min(1),
43647
43863
  gpuType: string().min(1),
43648
43864
  region: string(),
43649
43865
  baseModelId: string().min(1),
@@ -43702,6 +43918,7 @@ var TrainingJobPlanSchema = object({
43702
43918
  * result lives after the operator acted on it.
43703
43919
  */
43704
43920
  var TrainingJobStateSchema = _enum([
43921
+ "queued",
43705
43922
  "uploading",
43706
43923
  "submitted",
43707
43924
  "starting",
@@ -43755,6 +43972,11 @@ var TrainingJobSchema = object({
43755
43972
  createdAt: number(),
43756
43973
  updatedAt: number(),
43757
43974
  state: TrainingJobStateSchema,
43975
+ /**
43976
+ * Shared by every job enqueued together via `startJobBatch`.
43977
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43978
+ */
43979
+ batchId: string().nullable().default(null),
43758
43980
  stage: TrainingStageSchema.nullable(),
43759
43981
  failure: object({
43760
43982
  reason: TrainingFailureReasonSchema,
@@ -43766,6 +43988,12 @@ var TrainingJobSchema = object({
43766
43988
  maxRuntimeSec: number().int().positive(),
43767
43989
  trainer: TrainerSourceRefSchema,
43768
43990
  datasetLayout: RetrainExportLayoutSchema,
43991
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43992
+ frameCount: number().int().nonnegative(),
43993
+ /** Resolved frame ids at start — the archive ships exactly these. */
43994
+ frameIds: array(string()).max(2e4).readonly(),
43995
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43996
+ annotationHash: string(),
43769
43997
  dataset: object({
43770
43998
  bytes: number().int(),
43771
43999
  sha256: string(),
@@ -43807,13 +44035,7 @@ var TrainingJobSchema = object({
43807
44035
  canary: TrainingCanarySchema.nullable()
43808
44036
  });
43809
44037
  var IdInput = object({ id: string().min(1) });
43810
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43811
- kind: "mutation",
43812
- auth: "admin"
43813
- }), 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() }), {
43814
- kind: "mutation",
43815
- auth: "admin"
43816
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
44038
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43817
44039
  auth: "admin",
43818
44040
  timeoutMs: 6e4
43819
44041
  }), method(TrainingJobRequestSchema.extend({
@@ -43832,6 +44054,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43832
44054
  kind: "mutation",
43833
44055
  auth: "admin",
43834
44056
  timeoutMs: 12e4
44057
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
44058
+ baseModelIds: array(string().min(1)).min(1),
44059
+ name: string().min(1).max(120),
44060
+ maxCostUsd: number().positive(),
44061
+ maxRuntimeSec: number().int().positive(),
44062
+ idempotencyKey: string().min(8).max(80)
44063
+ }), discriminatedUnion("kind", [object({
44064
+ kind: literal("started"),
44065
+ batchId: string(),
44066
+ jobs: array(TrainingJobSchema).min(1).readonly()
44067
+ }), object({
44068
+ kind: literal("refused"),
44069
+ reason: TrainingRefusalReasonSchema,
44070
+ detail: string()
44071
+ })]), {
44072
+ kind: "mutation",
44073
+ auth: "admin",
44074
+ timeoutMs: 12e4
43835
44075
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
43836
44076
  kind: "mutation",
43837
44077
  auth: "admin",
@@ -49390,6 +49630,36 @@ Object.freeze({
49390
49630
  addonId: null,
49391
49631
  access: "view"
49392
49632
  },
49633
+ "oidcConnections.connectionFormSchema": {
49634
+ capName: "oidc-connections",
49635
+ capScope: "system",
49636
+ addonId: null,
49637
+ access: "view"
49638
+ },
49639
+ "oidcConnections.createConnection": {
49640
+ capName: "oidc-connections",
49641
+ capScope: "system",
49642
+ addonId: null,
49643
+ access: "create"
49644
+ },
49645
+ "oidcConnections.deleteConnection": {
49646
+ capName: "oidc-connections",
49647
+ capScope: "system",
49648
+ addonId: null,
49649
+ access: "delete"
49650
+ },
49651
+ "oidcConnections.listConnections": {
49652
+ capName: "oidc-connections",
49653
+ capScope: "system",
49654
+ addonId: null,
49655
+ access: "view"
49656
+ },
49657
+ "oidcConnections.updateConnection": {
49658
+ capName: "oidc-connections",
49659
+ capScope: "system",
49660
+ addonId: null,
49661
+ access: "create"
49662
+ },
49393
49663
  "osd.getStatus": {
49394
49664
  capName: "osd",
49395
49665
  capScope: "device",
@@ -49462,6 +49732,12 @@ Object.freeze({
49462
49732
  addonId: null,
49463
49733
  access: "create"
49464
49734
  },
49735
+ "osdManager.setSlotCameraEnabled": {
49736
+ capName: "osd-manager",
49737
+ capScope: "system",
49738
+ addonId: null,
49739
+ access: "create"
49740
+ },
49465
49741
  "osdManager.upsertTemplate": {
49466
49742
  capName: "osd-manager",
49467
49743
  capScope: "system",
@@ -49600,12 +49876,6 @@ Object.freeze({
49600
49876
  addonId: null,
49601
49877
  access: "create"
49602
49878
  },
49603
- "pipelineAnalytics.createRetrainDatasetVersion": {
49604
- capName: "pipeline-analytics",
49605
- capScope: "device",
49606
- addonId: null,
49607
- access: "create"
49608
- },
49609
49879
  "pipelineAnalytics.deleteDeviceEvents": {
49610
49880
  capName: "pipeline-analytics",
49611
49881
  capScope: "device",
@@ -49618,12 +49888,6 @@ Object.freeze({
49618
49888
  addonId: null,
49619
49889
  access: "delete"
49620
49890
  },
49621
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
49622
- capName: "pipeline-analytics",
49623
- capScope: "device",
49624
- addonId: null,
49625
- access: "delete"
49626
- },
49627
49891
  "pipelineAnalytics.deleteTracks": {
49628
49892
  capName: "pipeline-analytics",
49629
49893
  capScope: "device",
@@ -49726,6 +49990,12 @@ Object.freeze({
49726
49990
  addonId: null,
49727
49991
  access: "view"
49728
49992
  },
49993
+ "pipelineAnalytics.getRetrainCorpusKpi": {
49994
+ capName: "pipeline-analytics",
49995
+ capScope: "device",
49996
+ addonId: null,
49997
+ access: "view"
49998
+ },
49729
49999
  "pipelineAnalytics.getRetrainExportUrl": {
49730
50000
  capName: "pipeline-analytics",
49731
50001
  capScope: "device",
@@ -49846,7 +50116,7 @@ Object.freeze({
49846
50116
  addonId: null,
49847
50117
  access: "view"
49848
50118
  },
49849
- "pipelineAnalytics.listRetrainDatasetVersions": {
50119
+ "pipelineAnalytics.listRetrainCorpusPage": {
49850
50120
  capName: "pipeline-analytics",
49851
50121
  capScope: "device",
49852
50122
  addonId: null,
@@ -49900,12 +50170,6 @@ Object.freeze({
49900
50170
  addonId: null,
49901
50171
  access: "create"
49902
50172
  },
49903
- "pipelineAnalytics.previewRetrainDataset": {
49904
- capName: "pipeline-analytics",
49905
- capScope: "device",
49906
- addonId: null,
49907
- access: "view"
49908
- },
49909
50173
  "pipelineAnalytics.proposeRetrainAnnotations": {
49910
50174
  capName: "pipeline-analytics",
49911
50175
  capScope: "device",
@@ -49984,6 +50248,12 @@ Object.freeze({
49984
50248
  addonId: null,
49985
50249
  access: "create"
49986
50250
  },
50251
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
50252
+ capName: "pipeline-analytics",
50253
+ capScope: "device",
50254
+ addonId: null,
50255
+ access: "view"
50256
+ },
49987
50257
  "pipelineAnalytics.restageRetrainTrack": {
49988
50258
  capName: "pipeline-analytics",
49989
50259
  capScope: "device",
@@ -50044,12 +50314,6 @@ Object.freeze({
50044
50314
  addonId: null,
50045
50315
  access: "create"
50046
50316
  },
50047
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
50048
- capName: "pipeline-analytics",
50049
- capScope: "device",
50050
- addonId: null,
50051
- access: "view"
50052
- },
50053
50317
  "pipelineAnalytics.wipeAllAnalytics": {
50054
50318
  capName: "pipeline-analytics",
50055
50319
  capScope: "device",
@@ -52444,18 +52708,6 @@ Object.freeze({
52444
52708
  addonId: null,
52445
52709
  access: "create"
52446
52710
  },
52447
- "training.findDatasetVersionIdByName": {
52448
- capName: "training",
52449
- capScope: "system",
52450
- addonId: null,
52451
- access: "view"
52452
- },
52453
- "training.getDatasetVersion": {
52454
- capName: "training",
52455
- capScope: "system",
52456
- addonId: null,
52457
- access: "view"
52458
- },
52459
52711
  "training.getJob": {
52460
52712
  capName: "training",
52461
52713
  capScope: "system",
@@ -52474,12 +52726,6 @@ Object.freeze({
52474
52726
  addonId: null,
52475
52727
  access: "view"
52476
52728
  },
52477
- "training.listDatasetVersions": {
52478
- capName: "training",
52479
- capScope: "system",
52480
- addonId: null,
52481
- access: "view"
52482
- },
52483
52729
  "training.listJobs": {
52484
52730
  capName: "training",
52485
52731
  capScope: "system",
@@ -52492,54 +52738,66 @@ Object.freeze({
52492
52738
  addonId: null,
52493
52739
  access: "view"
52494
52740
  },
52495
- "training.putDatasetVersion": {
52741
+ "training.registerResult": {
52496
52742
  capName: "training",
52497
52743
  capScope: "system",
52498
52744
  addonId: null,
52499
52745
  access: "create"
52500
52746
  },
52501
- "training.registerResult": {
52747
+ "training.rollbackCanary": {
52502
52748
  capName: "training",
52503
52749
  capScope: "system",
52504
52750
  addonId: null,
52505
52751
  access: "create"
52506
52752
  },
52507
- "training.removeDatasetVersion": {
52753
+ "training.startJob": {
52508
52754
  capName: "training",
52509
52755
  capScope: "system",
52510
52756
  addonId: null,
52511
- access: "delete"
52757
+ access: "create"
52512
52758
  },
52513
- "training.rollbackCanary": {
52759
+ "training.startJobBatch": {
52514
52760
  capName: "training",
52515
52761
  capScope: "system",
52516
52762
  addonId: null,
52517
52763
  access: "create"
52518
52764
  },
52519
- "training.startJob": {
52520
- capName: "training",
52765
+ "trainingProvider.cancelJob": {
52766
+ capName: "training-provider",
52521
52767
  capScope: "system",
52522
52768
  addonId: null,
52523
52769
  access: "create"
52524
52770
  },
52525
- "trainingProvider.cancelJob": {
52771
+ "trainingProvider.cleanupJob": {
52526
52772
  capName: "training-provider",
52527
52773
  capScope: "system",
52528
52774
  addonId: null,
52529
52775
  access: "create"
52530
52776
  },
52531
- "trainingProvider.cleanupJob": {
52777
+ "trainingProvider.createEntry": {
52532
52778
  capName: "training-provider",
52533
52779
  capScope: "system",
52534
52780
  addonId: null,
52535
52781
  access: "create"
52536
52782
  },
52783
+ "trainingProvider.deleteEntry": {
52784
+ capName: "training-provider",
52785
+ capScope: "system",
52786
+ addonId: null,
52787
+ access: "delete"
52788
+ },
52537
52789
  "trainingProvider.describe": {
52538
52790
  capName: "training-provider",
52539
52791
  capScope: "system",
52540
52792
  addonId: null,
52541
52793
  access: "view"
52542
52794
  },
52795
+ "trainingProvider.describeTypes": {
52796
+ capName: "training-provider",
52797
+ capScope: "system",
52798
+ addonId: null,
52799
+ access: "view"
52800
+ },
52543
52801
  "trainingProvider.estimateJob": {
52544
52802
  capName: "training-provider",
52545
52803
  capScope: "system",
@@ -52552,6 +52810,12 @@ Object.freeze({
52552
52810
  addonId: null,
52553
52811
  access: "view"
52554
52812
  },
52813
+ "trainingProvider.listEntries": {
52814
+ capName: "training-provider",
52815
+ capScope: "system",
52816
+ addonId: null,
52817
+ access: "view"
52818
+ },
52555
52819
  "trainingProvider.listJobEvents": {
52556
52820
  capName: "training-provider",
52557
52821
  capScope: "system",
@@ -52582,6 +52846,12 @@ Object.freeze({
52582
52846
  addonId: null,
52583
52847
  access: "create"
52584
52848
  },
52849
+ "trainingProvider.updateEntry": {
52850
+ capName: "training-provider",
52851
+ capScope: "system",
52852
+ addonId: null,
52853
+ access: "create"
52854
+ },
52585
52855
  "trainingProvider.uploadDataset": {
52586
52856
  capName: "training-provider",
52587
52857
  capScope: "system",
@@ -55788,6 +56058,11 @@ Object.freeze({
55788
56058
  form: "single",
55789
56059
  optional: false
55790
56060
  }],
56061
+ "osdManager.setSlotCameraEnabled": [{
56062
+ name: "deviceId",
56063
+ form: "single",
56064
+ optional: false
56065
+ }],
55791
56066
  "petFeeder.callPet": [{
55792
56067
  name: "deviceId",
55793
56068
  form: "single",
@@ -56008,6 +56283,11 @@ Object.freeze({
56008
56283
  form: "array",
56009
56284
  optional: false
56010
56285
  }],
56286
+ "pipelineAnalytics.listRetrainCorpusPage": [{
56287
+ name: "deviceIds",
56288
+ form: "array",
56289
+ optional: true
56290
+ }],
56011
56291
  "pipelineAnalytics.listRetrainStaging": [{
56012
56292
  name: "deviceIds",
56013
56293
  form: "array",
@@ -57117,6 +57397,7 @@ Object.freeze({
57117
57397
  });
57118
57398
  Object.freeze({
57119
57399
  "broker": "broker",
57400
+ "calendar-source": "calendar",
57120
57401
  "device-export": "device-export",
57121
57402
  "llm": "ai",
57122
57403
  "mesh-network": "mesh",
@@ -57602,6 +57883,8 @@ var STATE_SUMMARY_VARS = [
57602
57883
  [...RULE_TEXT],
57603
57884
  [...RULE_TEXT],
57604
57885
  [...RULE_TEXT],
57886
+ [...RULE_TEXT],
57887
+ [...RULE_TEXT],
57605
57888
  ([...RULE_TEXT], [...UPDATES]),
57606
57889
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
57607
57890
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),