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