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