@camstack/addon-provider-homematic 1.2.132 → 1.2.134

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 +401 -137
  2. package/dist/addon.mjs +401 -137
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -5386,7 +5386,7 @@ var ZodIssueCode = {
5386
5386
  var ZodFirstPartyTypeKind;
5387
5387
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5388
5388
  //#endregion
5389
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5389
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5390
5390
  /**
5391
5391
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5392
5392
  * window to float samples (D455).
@@ -9392,6 +9392,16 @@ var CompositionSchema = object({
9392
9392
  seen.add(feature.cap);
9393
9393
  });
9394
9394
  });
9395
+ var NodeColorIdSchema = _enum([
9396
+ "node-a",
9397
+ "node-b",
9398
+ "node-c",
9399
+ "node-d",
9400
+ "node-e",
9401
+ "node-f",
9402
+ "node-g",
9403
+ "node-h"
9404
+ ]);
9395
9405
  new Set([
9396
9406
  "track",
9397
9407
  "face",
@@ -18600,14 +18610,14 @@ var LlmProfileSchema = object({
18600
18610
  /** ConfigUISchema tree passed through untyped on the wire (the
18601
18611
  * notification-output `ConfigSchemaPassthrough` precedent at
18602
18612
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18603
- var ConfigSchemaPassthrough$1 = unknown();
18613
+ var ConfigSchemaPassthrough$3 = unknown();
18604
18614
  var LlmProfileKindDescriptorSchema = object({
18605
18615
  kind: LlmProfileKindSchema,
18606
18616
  label: string(),
18607
18617
  icon: string(),
18608
18618
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18609
18619
  addonId: string(),
18610
- configSchema: ConfigSchemaPassthrough$1
18620
+ configSchema: ConfigSchemaPassthrough$3
18611
18621
  });
18612
18622
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18613
18623
  var LlmDefaultSchema = object({
@@ -19728,7 +19738,7 @@ var TargetKindCapsSchema = object({
19728
19738
  * the union is large and not meant for runtime validation here; the exported
19729
19739
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
19730
19740
  */
19731
- var ConfigSchemaPassthrough = unknown();
19741
+ var ConfigSchemaPassthrough$2 = unknown();
19732
19742
  var TargetKindSchema = object({
19733
19743
  kind: string(),
19734
19744
  label: string(),
@@ -19765,7 +19775,7 @@ var TargetKindSchema = object({
19765
19775
  * its raster path, which is the safe default for an unknown image.
19766
19776
  */
19767
19777
  iconMediaType: string().optional(),
19768
- configSchema: ConfigSchemaPassthrough,
19778
+ configSchema: ConfigSchemaPassthrough$2,
19769
19779
  /**
19770
19780
  * The config keys that decide WHERE this kind's secrets are sent (server,
19771
19781
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23102,6 +23112,61 @@ var OauthIntegrationDescriptorSchema = object({
23102
23112
  });
23103
23113
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
23104
23114
  /**
23115
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23116
+ *
23117
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23118
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23119
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23120
+ * immutable after create.
23121
+ */
23122
+ var ConfigSchemaPassthrough$1 = unknown();
23123
+ var OidcConnectionSchema = object({
23124
+ id: string().min(1),
23125
+ displayName: string(),
23126
+ icon: string(),
23127
+ issuerUrl: string(),
23128
+ clientId: string(),
23129
+ /** Client id + secret present — never the secret value. */
23130
+ configured: boolean(),
23131
+ /**
23132
+ * Values for the connection form schema. `clientSecret` is a keychain
23133
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23134
+ */
23135
+ formValues: record(string(), unknown()).optional()
23136
+ });
23137
+ /**
23138
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23139
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23140
+ */
23141
+ var OidcConnectionUpdateInputSchema = object({
23142
+ id: string().min(1),
23143
+ displayName: string().min(1),
23144
+ icon: string().optional(),
23145
+ issuerUrl: string().optional(),
23146
+ clientId: string().optional(),
23147
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23148
+ redirectUri: string().optional(),
23149
+ scopes: string().optional(),
23150
+ usernameClaim: _enum([
23151
+ "preferred_username",
23152
+ "email",
23153
+ "sub"
23154
+ ]).optional()
23155
+ });
23156
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23157
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23158
+ displayName: string().min(1)
23159
+ }), object({ id: string() }), {
23160
+ kind: "mutation",
23161
+ auth: "admin"
23162
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23163
+ kind: "mutation",
23164
+ auth: "admin"
23165
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23166
+ kind: "mutation",
23167
+ auth: "admin"
23168
+ });
23169
+ /**
23105
23170
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23106
23171
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23107
23172
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24458,24 +24523,69 @@ var RetrainFrameListSchema = object({
24458
24523
  /** What the page pre-selects — the native key frame when one survives. */
24459
24524
  autoPickMediaId: number().int().optional()
24460
24525
  });
24526
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24527
+ var RetrainFrameWorkStateSchema = _enum([
24528
+ "unannotated",
24529
+ "annotated",
24530
+ "complete"
24531
+ ]);
24532
+ /**
24533
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24534
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24535
+ */
24536
+ var RetrainCorpusFilterSchema = object({
24537
+ workState: RetrainFrameWorkStateSchema.optional(),
24538
+ deviceIds: array(number()).max(500).optional(),
24539
+ /** When set, only frames in this named collection. */
24540
+ collectionId: string().optional(),
24541
+ /** Frames that carry at least one saved annotation in one of these classes. */
24542
+ classes: array(RetrainMacroClassSchema).optional(),
24543
+ page: number().int().positive().default(1),
24544
+ pageSize: number().int().positive().max(100).default(50)
24545
+ });
24546
+ var RetrainCorpusPageSchema = object({
24547
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24548
+ total: number().int().nonnegative(),
24549
+ page: number().int().positive(),
24550
+ pageSize: number().int().positive()
24551
+ });
24552
+ var RetrainCorpusKpiCameraRowSchema = object({
24553
+ deviceId: number(),
24554
+ unannotated: number().int().nonnegative(),
24555
+ annotated: number().int().nonnegative(),
24556
+ complete: number().int().nonnegative(),
24557
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24558
+ * `null` when the corpus is empty (no ratio). */
24559
+ pctOfCorpus: number().min(0).max(1).nullable()
24560
+ });
24561
+ var RetrainCorpusKpiSchema = object({
24562
+ total: number().int().nonnegative(),
24563
+ unannotated: number().int().nonnegative(),
24564
+ annotated: number().int().nonnegative(),
24565
+ complete: number().int().nonnegative(),
24566
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24567
+ });
24461
24568
  /**
24462
24569
  * Which frames an annotated export carries. Every field narrows; an empty
24463
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24464
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24465
- * the primitive a version export uses; `batchId` re-selects what an earlier
24466
- * export carried (`exportedInBatch`).
24570
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24571
+ * download uses; `batchId` re-selects what an earlier export carried
24572
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24573
+ * resolves to `frameIds` at plan/start.
24467
24574
  */
24468
24575
  var RetrainExportFilterSchema = object({
24469
24576
  deviceIds: array(number()).optional(),
24470
24577
  frameIds: array(string()).max(2e4).optional(),
24471
24578
  /** Only frames in at least one of these named collections. */
24472
24579
  collectionIds: array(string()).max(200).optional(),
24473
- /** Exactly the frames of this dataset version (and its completeOnly). An
24474
- * unknown id selects nothing. */
24475
- datasetVersionId: string().optional(),
24580
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24581
+ collectionId: string().optional(),
24476
24582
  batchId: string().optional(),
24477
24583
  /** Only frames the operator marked complete (all subjects boxed). */
24478
- completeOnly: boolean().optional()
24584
+ completeOnly: boolean().optional(),
24585
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24586
+ workState: RetrainFrameWorkStateSchema.optional(),
24587
+ /** Frames with at least one saved annotation in one of these classes. */
24588
+ classes: array(RetrainMacroClassSchema).optional()
24479
24589
  });
24480
24590
  /**
24481
24591
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -24675,8 +24785,7 @@ var RetrainDatasetStatsSchema = object({
24675
24785
  completeFrames: number().int()
24676
24786
  })).readonly()
24677
24787
  });
24678
- /** An immutable dataset version, without its frame list. */
24679
- var RetrainDatasetVersionSchema = object({
24788
+ object({
24680
24789
  id: string(),
24681
24790
  name: string(),
24682
24791
  createdAt: number(),
@@ -24684,22 +24793,33 @@ var RetrainDatasetVersionSchema = object({
24684
24793
  layout: RetrainExportLayoutSchema,
24685
24794
  completeOnly: boolean(),
24686
24795
  frameCount: number().int(),
24687
- /** sha256 of what the frames taught when the version was frozen. */
24688
24796
  annotationHash: string(),
24689
- /** The export manifest schema the version was cut under. */
24690
24797
  manifestSchema: string(),
24691
24798
  stats: RetrainDatasetStatsSchema
24692
24799
  });
24693
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
24694
- kind: literal("created"),
24695
- version: RetrainDatasetVersionSchema
24800
+ /**
24801
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
24802
+ * the training cap. Resolved here so plan/start and the annotated export share
24803
+ * one definition of "the frames" (`buildRetrainExportPlan`).
24804
+ */
24805
+ var RetrainTrainingCorpusSelectionSchema = object({
24806
+ collectionIds: array(string()).min(1),
24807
+ workState: _enum([
24808
+ "complete",
24809
+ "annotated_or_complete",
24810
+ "any_annotated"
24811
+ ]).default("complete")
24812
+ });
24813
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
24814
+ kind: literal("resolved"),
24815
+ frameIds: array(string()).max(2e4).readonly(),
24816
+ stats: RetrainDatasetStatsSchema,
24817
+ annotationHash: string(),
24818
+ layout: RetrainExportLayoutSchema
24696
24819
  }), object({
24697
24820
  kind: literal("refused"),
24698
- reason: _enum([
24699
- "empty-name",
24700
- "duplicate-name",
24701
- "no-frames"
24702
- ])
24821
+ reason: _enum(["unknown-collection", "no-frames"]),
24822
+ detail: string()
24703
24823
  })]);
24704
24824
  /** The outcome of a lifecycle move owned by the retrain page. */
24705
24825
  var RetrainTransitionResultSchema = object({
@@ -25406,6 +25526,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25406
25526
  }), array(RetrainTrackSchema).readonly(), {
25407
25527
  kind: "query",
25408
25528
  auth: "admin"
25529
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25530
+ kind: "query",
25531
+ auth: "admin"
25532
+ }), method(object({}), RetrainCorpusKpiSchema, {
25533
+ kind: "query",
25534
+ auth: "admin"
25409
25535
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25410
25536
  kind: "query",
25411
25537
  auth: "admin"
@@ -25501,36 +25627,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25501
25627
  kind: "mutation",
25502
25628
  auth: "admin",
25503
25629
  timeoutMs: 12e4
25504
- }), method(object({
25505
- selection: RetrainDatasetSelectionSchema,
25506
- completeOnly: boolean().optional()
25507
- }), RetrainDatasetStatsSchema, {
25508
- kind: "query",
25509
- auth: "admin"
25510
- }), method(object({
25511
- name: string().max(120),
25512
- selection: RetrainDatasetSelectionSchema,
25513
- layout: RetrainExportLayoutSchema,
25514
- completeOnly: boolean()
25515
- }), CreateRetrainDatasetVersionResultSchema, {
25516
- kind: "mutation",
25517
- auth: "admin",
25518
- timeoutMs: 12e4
25519
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25520
- kind: "query",
25521
- auth: "admin"
25522
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25523
- kind: "mutation",
25524
- auth: "admin"
25525
- }), method(object({ id: string() }), object({
25526
- found: boolean(),
25527
- annotationHash: string(),
25528
- matches: boolean(),
25529
- missingFrames: number().int()
25530
- }), {
25531
- kind: "query",
25532
- auth: "admin",
25533
- timeoutMs: 12e4
25534
25630
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25535
25631
  kind: "query",
25536
25632
  auth: "admin"
@@ -25557,6 +25653,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25557
25653
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25558
25654
  kind: "query",
25559
25655
  auth: "admin"
25656
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
25657
+ kind: "query",
25658
+ auth: "admin",
25659
+ timeoutMs: 6e4
25560
25660
  }), method(object({
25561
25661
  id: string(),
25562
25662
  name: string().max(120)
@@ -28110,6 +28210,8 @@ var AgentPipelineSettingsSchema = object({
28110
28210
  * address is wrong (multi-homed host, NAT, custom interface).
28111
28211
  */
28112
28212
  reachableHost: string().optional(),
28213
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28214
+ color: NodeColorIdSchema.optional(),
28113
28215
  /**
28114
28216
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28115
28217
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -28659,8 +28761,9 @@ method(object({
28659
28761
  auth: "admin"
28660
28762
  }), method(object({
28661
28763
  agentNodeId: string(),
28662
- reachableHost: string().nullable()
28663
- }), object({ success: literal(true) }), {
28764
+ reachableHost: string().nullable().optional(),
28765
+ color: NodeColorIdSchema.nullable().optional()
28766
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
28664
28767
  kind: "mutation",
28665
28768
  auth: "admin"
28666
28769
  }), method(object({
@@ -31736,7 +31839,7 @@ var CustomActionInputSchema = object({
31736
31839
  action: string().min(1),
31737
31840
  input: unknown()
31738
31841
  });
31739
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
31842
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
31740
31843
  addonId: string(),
31741
31844
  limit: number().min(1).max(500).default(100),
31742
31845
  level: LogLevelSchema$2.optional()
@@ -37217,6 +37320,7 @@ var OsdNamedTemplateSchema = object({
37217
37320
  });
37218
37321
  /** Where a slot's value comes from. */
37219
37322
  var OsdSourceSchema = discriminatedUnion("kind", [
37323
+ object({ kind: literal("none") }),
37220
37324
  object({
37221
37325
  kind: literal("static"),
37222
37326
  text: string().max(64)
@@ -37343,6 +37447,13 @@ method(object({ deviceId: number().int() }), object({
37343
37447
  }), object({ success: literal(true) }), {
37344
37448
  kind: "mutation",
37345
37449
  auth: "admin"
37450
+ }), method(object({
37451
+ deviceId: number().int(),
37452
+ slotId: string().min(1),
37453
+ enabled: boolean()
37454
+ }), object({ success: literal(true) }), {
37455
+ kind: "mutation",
37456
+ auth: "admin"
37346
37457
  }), method(object({
37347
37458
  sourceDeviceId: number().int(),
37348
37459
  targetDeviceId: number().int()
@@ -42525,9 +42636,11 @@ var zoneRulesCapability = {
42525
42636
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42526
42637
  * manifest entry and nothing else.
42527
42638
  *
42528
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42529
- * `notification-output` posture); `describe` concat-fans across providers.
42530
- * Every method is `admin`: these spend money.
42639
+ * Collection of provider **types** (addons). Each addon owns zero or more
42640
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
42641
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
42642
+ * `entryId`; callers also pass the owning `addonId` as the collection
42643
+ * selector (broker posture). Every method is `admin`: these spend money.
42531
42644
  *
42532
42645
  * Every cloud object a provider creates is tagged with the orchestrator's
42533
42646
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42551,8 +42664,8 @@ var TrainingRegionOptionSchema = object({
42551
42664
  priceMultiplier: number().positive()
42552
42665
  });
42553
42666
  /**
42554
- * The provider's per-account settings, as the orchestrator reads them. They
42555
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
42667
+ * The provider's per-entry settings, as the orchestrator reads them. They
42668
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
42556
42669
  * depend on the user's account), never hard-coded in the orchestrator.
42557
42670
  */
42558
42671
  var TrainingProviderDefaultsSchema = object({
@@ -42563,9 +42676,44 @@ var TrainingProviderDefaultsSchema = object({
42563
42676
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
42564
42677
  failedDatasetGraceHours: number().nonnegative()
42565
42678
  });
42679
+ /**
42680
+ * Entry form schema for a provider type — same seam as notification
42681
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
42682
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
42683
+ */
42684
+ var ConfigSchemaPassthrough = unknown();
42685
+ /** One creatable provider type, for the Add-entry dialog. */
42686
+ var TrainingProviderTypeSchema = object({
42687
+ typeId: string(),
42688
+ label: string(),
42689
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
42690
+ iconAsset: string(),
42691
+ /** Owning `training-provider` addon — collection selector for createEntry. */
42692
+ addonId: string(),
42693
+ /**
42694
+ * Fields for one entry of this type (credentials + defaults). Absent on a
42695
+ * type that only needs a name. Password fields are keychain-backed on the
42696
+ * provider addon (`secretStatePaths`), not D634 plaintext.
42697
+ */
42698
+ configSchema: ConfigSchemaPassthrough.optional()
42699
+ });
42700
+ /** One configured account / workspace under a provider type. */
42701
+ var TrainingProviderEntrySchema = object({
42702
+ entryId: string(),
42703
+ typeId: string(),
42704
+ name: string(),
42705
+ addonId: string(),
42706
+ /** Credentials are present — never the values. */
42707
+ configured: boolean()
42708
+ });
42566
42709
  var TrainingProviderDescriptorSchema = object({
42567
42710
  addonId: string(),
42568
- /** `modal`, `runpod`, `fake`, … */
42711
+ entryId: string(),
42712
+ typeId: string(),
42713
+ /** Operator-chosen entry name. */
42714
+ name: string(),
42715
+ iconAsset: string(),
42716
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
42569
42717
  kind: string(),
42570
42718
  label: string(),
42571
42719
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -42577,7 +42725,30 @@ var TrainingProviderDescriptorSchema = object({
42577
42725
  dataResidencyNote: string(),
42578
42726
  /** Credentials are present — never the values. */
42579
42727
  configured: boolean(),
42580
- defaults: TrainingProviderDefaultsSchema
42728
+ defaults: TrainingProviderDefaultsSchema,
42729
+ /**
42730
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
42731
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
42732
+ * never plaintext. Same hydrate contract as settings forms (D789).
42733
+ */
42734
+ formValues: record(string(), unknown()).optional()
42735
+ });
42736
+ /**
42737
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
42738
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
42739
+ * `{ $secretClear: true }` clears it.
42740
+ */
42741
+ var TrainingProviderUpdateEntryInputSchema = object({
42742
+ entryId: string().min(1),
42743
+ name: string().min(1),
42744
+ tokenId: string().optional(),
42745
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
42746
+ environment: string().optional(),
42747
+ gpuType: string().optional(),
42748
+ region: string().optional(),
42749
+ costCapUsd: number().nonnegative().optional(),
42750
+ maxRuntimeSec: number().int().positive().optional(),
42751
+ failedDatasetGraceHours: number().nonnegative().optional()
42581
42752
  });
42582
42753
  var TrainingCredentialCheckSchema = object({
42583
42754
  ok: boolean(),
@@ -42629,20 +42800,33 @@ var TrainerSourceRefSchema = object({
42629
42800
  /** A commit sha (never a branch) — the job must be reproducible. */
42630
42801
  revision: string().regex(/^[0-9a-f]{7,64}$/)
42631
42802
  });
42803
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
42632
42804
  var JobRef = {
42633
- addonId: string(),
42805
+ entryId: string().min(1),
42634
42806
  jobKey: string().uuid()
42635
42807
  };
42636
42808
  var TrainingLogLineSchema = object({
42637
42809
  ts: number(),
42638
42810
  text: string()
42639
42811
  });
42640
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
42812
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
42813
+ typeId: string().min(1),
42814
+ name: string().min(1)
42815
+ }), object({ entryId: string() }), {
42816
+ kind: "mutation",
42817
+ auth: "admin"
42818
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
42819
+ kind: "mutation",
42820
+ auth: "admin"
42821
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
42822
+ kind: "mutation",
42823
+ auth: "admin"
42824
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
42641
42825
  kind: "mutation",
42642
42826
  auth: "admin",
42643
42827
  timeoutMs: 3e4
42644
42828
  }), method(object({
42645
- addonId: string(),
42829
+ entryId: string().min(1),
42646
42830
  gpuType: string(),
42647
42831
  region: string(),
42648
42832
  datasetBytes: number().int().nonnegative(),
@@ -42708,7 +42892,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42708
42892
  kind: "mutation",
42709
42893
  auth: "admin",
42710
42894
  timeoutMs: 5 * 6e4
42711
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
42895
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
42712
42896
  auth: "admin",
42713
42897
  timeoutMs: 2 * 6e4
42714
42898
  });
@@ -42718,20 +42902,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
42718
42902
  *
42719
42903
  * It owns what every provider must agree on, written once:
42720
42904
  *
42721
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
42722
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
42723
- * the export plan) and reaches this store through the five row methods
42724
- * below, so the Retrain page and the export did not change.
42725
42905
  * - **Jobs.** A persisted state machine, a reconcile loop against the
42726
42906
  * provider, a cost guard, a daily orphan sweep and the retention rules.
42727
42907
  * - **The return flow.** Verified artefacts → Model Studio
42728
42908
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
42729
42909
  * rollback. Nothing is ever registered automatically.
42730
42910
  *
42911
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
42912
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
42913
+ * moment and snapshotted on the job. No frozen dataset version.
42914
+ *
42731
42915
  * Every method is `admin`.
42732
42916
  */
42733
- /** A version WITH its frame list — what the export and a job read. */
42734
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
42917
+ /**
42918
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
42919
+ * Frame ids are resolved at plan/start — never a frozen version id.
42920
+ */
42921
+ var TrainingCorpusSelectionSchema = object({
42922
+ collectionIds: array(string()).min(1),
42923
+ /** Default complete-only for v1 */
42924
+ workState: _enum([
42925
+ "complete",
42926
+ "annotated_or_complete",
42927
+ "any_annotated"
42928
+ ]).default("complete")
42929
+ });
42735
42930
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
42736
42931
  var TrainingBaseModelSchema = object({
42737
42932
  modelId: string(),
@@ -42749,9 +42944,13 @@ var TrainingPresetSchema = _enum([
42749
42944
  "thorough"
42750
42945
  ]);
42751
42946
  var TrainingJobRequestSchema = object({
42752
- datasetVersionId: string().min(1),
42753
- /** The `training-provider` addon that runs it. */
42754
- addonId: string().min(1),
42947
+ /** Live collection + work-state criteria; resolved at plan/start. */
42948
+ selection: TrainingCorpusSelectionSchema,
42949
+ /**
42950
+ * The provider **entry** that runs it (credentials + defaults).
42951
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
42952
+ */
42953
+ entryId: string().min(1),
42755
42954
  gpuType: string().min(1),
42756
42955
  region: string(),
42757
42956
  baseModelId: string().min(1),
@@ -42810,6 +43009,7 @@ var TrainingJobPlanSchema = object({
42810
43009
  * result lives after the operator acted on it.
42811
43010
  */
42812
43011
  var TrainingJobStateSchema = _enum([
43012
+ "queued",
42813
43013
  "uploading",
42814
43014
  "submitted",
42815
43015
  "starting",
@@ -42863,6 +43063,11 @@ var TrainingJobSchema = object({
42863
43063
  createdAt: number(),
42864
43064
  updatedAt: number(),
42865
43065
  state: TrainingJobStateSchema,
43066
+ /**
43067
+ * Shared by every job enqueued together via `startJobBatch`.
43068
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43069
+ */
43070
+ batchId: string().nullable().default(null),
42866
43071
  stage: TrainingStageSchema.nullable(),
42867
43072
  failure: object({
42868
43073
  reason: TrainingFailureReasonSchema,
@@ -42874,6 +43079,12 @@ var TrainingJobSchema = object({
42874
43079
  maxRuntimeSec: number().int().positive(),
42875
43080
  trainer: TrainerSourceRefSchema,
42876
43081
  datasetLayout: RetrainExportLayoutSchema,
43082
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43083
+ frameCount: number().int().nonnegative(),
43084
+ /** Resolved frame ids at start — the archive ships exactly these. */
43085
+ frameIds: array(string()).max(2e4).readonly(),
43086
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43087
+ annotationHash: string(),
42877
43088
  dataset: object({
42878
43089
  bytes: number().int(),
42879
43090
  sha256: string(),
@@ -42915,13 +43126,7 @@ var TrainingJobSchema = object({
42915
43126
  canary: TrainingCanarySchema.nullable()
42916
43127
  });
42917
43128
  var IdInput = object({ id: string().min(1) });
42918
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42919
- kind: "mutation",
42920
- auth: "admin"
42921
- }), 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() }), {
42922
- kind: "mutation",
42923
- auth: "admin"
42924
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43129
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
42925
43130
  auth: "admin",
42926
43131
  timeoutMs: 6e4
42927
43132
  }), method(TrainingJobRequestSchema.extend({
@@ -42940,6 +43145,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
42940
43145
  kind: "mutation",
42941
43146
  auth: "admin",
42942
43147
  timeoutMs: 12e4
43148
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43149
+ baseModelIds: array(string().min(1)).min(1),
43150
+ name: string().min(1).max(120),
43151
+ maxCostUsd: number().positive(),
43152
+ maxRuntimeSec: number().int().positive(),
43153
+ idempotencyKey: string().min(8).max(80)
43154
+ }), discriminatedUnion("kind", [object({
43155
+ kind: literal("started"),
43156
+ batchId: string(),
43157
+ jobs: array(TrainingJobSchema).min(1).readonly()
43158
+ }), object({
43159
+ kind: literal("refused"),
43160
+ reason: TrainingRefusalReasonSchema,
43161
+ detail: string()
43162
+ })]), {
43163
+ kind: "mutation",
43164
+ auth: "admin",
43165
+ timeoutMs: 12e4
42943
43166
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
42944
43167
  kind: "mutation",
42945
43168
  auth: "admin",
@@ -48498,6 +48721,36 @@ Object.freeze({
48498
48721
  addonId: null,
48499
48722
  access: "view"
48500
48723
  },
48724
+ "oidcConnections.connectionFormSchema": {
48725
+ capName: "oidc-connections",
48726
+ capScope: "system",
48727
+ addonId: null,
48728
+ access: "view"
48729
+ },
48730
+ "oidcConnections.createConnection": {
48731
+ capName: "oidc-connections",
48732
+ capScope: "system",
48733
+ addonId: null,
48734
+ access: "create"
48735
+ },
48736
+ "oidcConnections.deleteConnection": {
48737
+ capName: "oidc-connections",
48738
+ capScope: "system",
48739
+ addonId: null,
48740
+ access: "delete"
48741
+ },
48742
+ "oidcConnections.listConnections": {
48743
+ capName: "oidc-connections",
48744
+ capScope: "system",
48745
+ addonId: null,
48746
+ access: "view"
48747
+ },
48748
+ "oidcConnections.updateConnection": {
48749
+ capName: "oidc-connections",
48750
+ capScope: "system",
48751
+ addonId: null,
48752
+ access: "create"
48753
+ },
48501
48754
  "osd.getStatus": {
48502
48755
  capName: "osd",
48503
48756
  capScope: "device",
@@ -48570,6 +48823,12 @@ Object.freeze({
48570
48823
  addonId: null,
48571
48824
  access: "create"
48572
48825
  },
48826
+ "osdManager.setSlotCameraEnabled": {
48827
+ capName: "osd-manager",
48828
+ capScope: "system",
48829
+ addonId: null,
48830
+ access: "create"
48831
+ },
48573
48832
  "osdManager.upsertTemplate": {
48574
48833
  capName: "osd-manager",
48575
48834
  capScope: "system",
@@ -48708,12 +48967,6 @@ Object.freeze({
48708
48967
  addonId: null,
48709
48968
  access: "create"
48710
48969
  },
48711
- "pipelineAnalytics.createRetrainDatasetVersion": {
48712
- capName: "pipeline-analytics",
48713
- capScope: "device",
48714
- addonId: null,
48715
- access: "create"
48716
- },
48717
48970
  "pipelineAnalytics.deleteDeviceEvents": {
48718
48971
  capName: "pipeline-analytics",
48719
48972
  capScope: "device",
@@ -48726,12 +48979,6 @@ Object.freeze({
48726
48979
  addonId: null,
48727
48980
  access: "delete"
48728
48981
  },
48729
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
48730
- capName: "pipeline-analytics",
48731
- capScope: "device",
48732
- addonId: null,
48733
- access: "delete"
48734
- },
48735
48982
  "pipelineAnalytics.deleteTracks": {
48736
48983
  capName: "pipeline-analytics",
48737
48984
  capScope: "device",
@@ -48834,6 +49081,12 @@ Object.freeze({
48834
49081
  addonId: null,
48835
49082
  access: "view"
48836
49083
  },
49084
+ "pipelineAnalytics.getRetrainCorpusKpi": {
49085
+ capName: "pipeline-analytics",
49086
+ capScope: "device",
49087
+ addonId: null,
49088
+ access: "view"
49089
+ },
48837
49090
  "pipelineAnalytics.getRetrainExportUrl": {
48838
49091
  capName: "pipeline-analytics",
48839
49092
  capScope: "device",
@@ -48954,7 +49207,7 @@ Object.freeze({
48954
49207
  addonId: null,
48955
49208
  access: "view"
48956
49209
  },
48957
- "pipelineAnalytics.listRetrainDatasetVersions": {
49210
+ "pipelineAnalytics.listRetrainCorpusPage": {
48958
49211
  capName: "pipeline-analytics",
48959
49212
  capScope: "device",
48960
49213
  addonId: null,
@@ -49008,12 +49261,6 @@ Object.freeze({
49008
49261
  addonId: null,
49009
49262
  access: "create"
49010
49263
  },
49011
- "pipelineAnalytics.previewRetrainDataset": {
49012
- capName: "pipeline-analytics",
49013
- capScope: "device",
49014
- addonId: null,
49015
- access: "view"
49016
- },
49017
49264
  "pipelineAnalytics.proposeRetrainAnnotations": {
49018
49265
  capName: "pipeline-analytics",
49019
49266
  capScope: "device",
@@ -49092,6 +49339,12 @@ Object.freeze({
49092
49339
  addonId: null,
49093
49340
  access: "create"
49094
49341
  },
49342
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
49343
+ capName: "pipeline-analytics",
49344
+ capScope: "device",
49345
+ addonId: null,
49346
+ access: "view"
49347
+ },
49095
49348
  "pipelineAnalytics.restageRetrainTrack": {
49096
49349
  capName: "pipeline-analytics",
49097
49350
  capScope: "device",
@@ -49152,12 +49405,6 @@ Object.freeze({
49152
49405
  addonId: null,
49153
49406
  access: "create"
49154
49407
  },
49155
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
49156
- capName: "pipeline-analytics",
49157
- capScope: "device",
49158
- addonId: null,
49159
- access: "view"
49160
- },
49161
49408
  "pipelineAnalytics.wipeAllAnalytics": {
49162
49409
  capName: "pipeline-analytics",
49163
49410
  capScope: "device",
@@ -51552,18 +51799,6 @@ Object.freeze({
51552
51799
  addonId: null,
51553
51800
  access: "create"
51554
51801
  },
51555
- "training.findDatasetVersionIdByName": {
51556
- capName: "training",
51557
- capScope: "system",
51558
- addonId: null,
51559
- access: "view"
51560
- },
51561
- "training.getDatasetVersion": {
51562
- capName: "training",
51563
- capScope: "system",
51564
- addonId: null,
51565
- access: "view"
51566
- },
51567
51802
  "training.getJob": {
51568
51803
  capName: "training",
51569
51804
  capScope: "system",
@@ -51582,12 +51817,6 @@ Object.freeze({
51582
51817
  addonId: null,
51583
51818
  access: "view"
51584
51819
  },
51585
- "training.listDatasetVersions": {
51586
- capName: "training",
51587
- capScope: "system",
51588
- addonId: null,
51589
- access: "view"
51590
- },
51591
51820
  "training.listJobs": {
51592
51821
  capName: "training",
51593
51822
  capScope: "system",
@@ -51600,54 +51829,66 @@ Object.freeze({
51600
51829
  addonId: null,
51601
51830
  access: "view"
51602
51831
  },
51603
- "training.putDatasetVersion": {
51832
+ "training.registerResult": {
51604
51833
  capName: "training",
51605
51834
  capScope: "system",
51606
51835
  addonId: null,
51607
51836
  access: "create"
51608
51837
  },
51609
- "training.registerResult": {
51838
+ "training.rollbackCanary": {
51610
51839
  capName: "training",
51611
51840
  capScope: "system",
51612
51841
  addonId: null,
51613
51842
  access: "create"
51614
51843
  },
51615
- "training.removeDatasetVersion": {
51844
+ "training.startJob": {
51616
51845
  capName: "training",
51617
51846
  capScope: "system",
51618
51847
  addonId: null,
51619
- access: "delete"
51848
+ access: "create"
51620
51849
  },
51621
- "training.rollbackCanary": {
51850
+ "training.startJobBatch": {
51622
51851
  capName: "training",
51623
51852
  capScope: "system",
51624
51853
  addonId: null,
51625
51854
  access: "create"
51626
51855
  },
51627
- "training.startJob": {
51628
- capName: "training",
51856
+ "trainingProvider.cancelJob": {
51857
+ capName: "training-provider",
51629
51858
  capScope: "system",
51630
51859
  addonId: null,
51631
51860
  access: "create"
51632
51861
  },
51633
- "trainingProvider.cancelJob": {
51862
+ "trainingProvider.cleanupJob": {
51634
51863
  capName: "training-provider",
51635
51864
  capScope: "system",
51636
51865
  addonId: null,
51637
51866
  access: "create"
51638
51867
  },
51639
- "trainingProvider.cleanupJob": {
51868
+ "trainingProvider.createEntry": {
51640
51869
  capName: "training-provider",
51641
51870
  capScope: "system",
51642
51871
  addonId: null,
51643
51872
  access: "create"
51644
51873
  },
51874
+ "trainingProvider.deleteEntry": {
51875
+ capName: "training-provider",
51876
+ capScope: "system",
51877
+ addonId: null,
51878
+ access: "delete"
51879
+ },
51645
51880
  "trainingProvider.describe": {
51646
51881
  capName: "training-provider",
51647
51882
  capScope: "system",
51648
51883
  addonId: null,
51649
51884
  access: "view"
51650
51885
  },
51886
+ "trainingProvider.describeTypes": {
51887
+ capName: "training-provider",
51888
+ capScope: "system",
51889
+ addonId: null,
51890
+ access: "view"
51891
+ },
51651
51892
  "trainingProvider.estimateJob": {
51652
51893
  capName: "training-provider",
51653
51894
  capScope: "system",
@@ -51660,6 +51901,12 @@ Object.freeze({
51660
51901
  addonId: null,
51661
51902
  access: "view"
51662
51903
  },
51904
+ "trainingProvider.listEntries": {
51905
+ capName: "training-provider",
51906
+ capScope: "system",
51907
+ addonId: null,
51908
+ access: "view"
51909
+ },
51663
51910
  "trainingProvider.listJobEvents": {
51664
51911
  capName: "training-provider",
51665
51912
  capScope: "system",
@@ -51690,6 +51937,12 @@ Object.freeze({
51690
51937
  addonId: null,
51691
51938
  access: "create"
51692
51939
  },
51940
+ "trainingProvider.updateEntry": {
51941
+ capName: "training-provider",
51942
+ capScope: "system",
51943
+ addonId: null,
51944
+ access: "create"
51945
+ },
51693
51946
  "trainingProvider.uploadDataset": {
51694
51947
  capName: "training-provider",
51695
51948
  capScope: "system",
@@ -54896,6 +55149,11 @@ Object.freeze({
54896
55149
  form: "single",
54897
55150
  optional: false
54898
55151
  }],
55152
+ "osdManager.setSlotCameraEnabled": [{
55153
+ name: "deviceId",
55154
+ form: "single",
55155
+ optional: false
55156
+ }],
54899
55157
  "petFeeder.callPet": [{
54900
55158
  name: "deviceId",
54901
55159
  form: "single",
@@ -55116,6 +55374,11 @@ Object.freeze({
55116
55374
  form: "array",
55117
55375
  optional: false
55118
55376
  }],
55377
+ "pipelineAnalytics.listRetrainCorpusPage": [{
55378
+ name: "deviceIds",
55379
+ form: "array",
55380
+ optional: true
55381
+ }],
55119
55382
  "pipelineAnalytics.listRetrainStaging": [{
55120
55383
  name: "deviceIds",
55121
55384
  form: "array",
@@ -56225,6 +56488,7 @@ Object.freeze({
56225
56488
  });
56226
56489
  Object.freeze({
56227
56490
  "broker": "broker",
56491
+ "calendar-source": "calendar",
56228
56492
  "device-export": "device-export",
56229
56493
  "llm": "ai",
56230
56494
  "mesh-network": "mesh",