@camstack/addon-provider-homeassistant 1.2.166 → 1.2.167

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.
@@ -5377,7 +5377,7 @@ var ZodIssueCode = {
5377
5377
  var ZodFirstPartyTypeKind;
5378
5378
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5379
5379
  //#endregion
5380
- //#region ../types/dist/sleep-r3RWkGVx.mjs
5380
+ //#region ../types/dist/sleep-DwAQ9sqX.mjs
5381
5381
  /**
5382
5382
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5383
5383
  * window to float samples (D455).
@@ -9442,6 +9442,16 @@ var CompositionSchema = object({
9442
9442
  seen.add(feature.cap);
9443
9443
  });
9444
9444
  });
9445
+ var NodeColorIdSchema = _enum([
9446
+ "node-a",
9447
+ "node-b",
9448
+ "node-c",
9449
+ "node-d",
9450
+ "node-e",
9451
+ "node-f",
9452
+ "node-g",
9453
+ "node-h"
9454
+ ]);
9445
9455
  new Set([
9446
9456
  "track",
9447
9457
  "face",
@@ -18917,14 +18927,14 @@ var LlmProfileSchema = object({
18917
18927
  /** ConfigUISchema tree passed through untyped on the wire (the
18918
18928
  * notification-output `ConfigSchemaPassthrough` precedent at
18919
18929
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18920
- var ConfigSchemaPassthrough$1 = unknown();
18930
+ var ConfigSchemaPassthrough$3 = unknown();
18921
18931
  var LlmProfileKindDescriptorSchema = object({
18922
18932
  kind: LlmProfileKindSchema,
18923
18933
  label: string(),
18924
18934
  icon: string(),
18925
18935
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18926
18936
  addonId: string(),
18927
- configSchema: ConfigSchemaPassthrough$1
18937
+ configSchema: ConfigSchemaPassthrough$3
18928
18938
  });
18929
18939
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18930
18940
  var LlmDefaultSchema = object({
@@ -20045,7 +20055,7 @@ var TargetKindCapsSchema = object({
20045
20055
  * the union is large and not meant for runtime validation here; the exported
20046
20056
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
20047
20057
  */
20048
- var ConfigSchemaPassthrough = unknown();
20058
+ var ConfigSchemaPassthrough$2 = unknown();
20049
20059
  var TargetKindSchema = object({
20050
20060
  kind: string(),
20051
20061
  label: string(),
@@ -20082,7 +20092,7 @@ var TargetKindSchema = object({
20082
20092
  * its raster path, which is the safe default for an unknown image.
20083
20093
  */
20084
20094
  iconMediaType: string().optional(),
20085
- configSchema: ConfigSchemaPassthrough,
20095
+ configSchema: ConfigSchemaPassthrough$2,
20086
20096
  /**
20087
20097
  * The config keys that decide WHERE this kind's secrets are sent (server,
20088
20098
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23457,6 +23467,61 @@ var oauthIntegrationCapability = {
23457
23467
  getDescriptor: method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" }) }
23458
23468
  };
23459
23469
  /**
23470
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23471
+ *
23472
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23473
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23474
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23475
+ * immutable after create.
23476
+ */
23477
+ var ConfigSchemaPassthrough$1 = unknown();
23478
+ var OidcConnectionSchema = object({
23479
+ id: string().min(1),
23480
+ displayName: string(),
23481
+ icon: string(),
23482
+ issuerUrl: string(),
23483
+ clientId: string(),
23484
+ /** Client id + secret present — never the secret value. */
23485
+ configured: boolean(),
23486
+ /**
23487
+ * Values for the connection form schema. `clientSecret` is a keychain
23488
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23489
+ */
23490
+ formValues: record(string(), unknown()).optional()
23491
+ });
23492
+ /**
23493
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23494
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23495
+ */
23496
+ var OidcConnectionUpdateInputSchema = object({
23497
+ id: string().min(1),
23498
+ displayName: string().min(1),
23499
+ icon: string().optional(),
23500
+ issuerUrl: string().optional(),
23501
+ clientId: string().optional(),
23502
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23503
+ redirectUri: string().optional(),
23504
+ scopes: string().optional(),
23505
+ usernameClaim: _enum([
23506
+ "preferred_username",
23507
+ "email",
23508
+ "sub"
23509
+ ]).optional()
23510
+ });
23511
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23512
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23513
+ displayName: string().min(1)
23514
+ }), object({ id: string() }), {
23515
+ kind: "mutation",
23516
+ auth: "admin"
23517
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23518
+ kind: "mutation",
23519
+ auth: "admin"
23520
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23521
+ kind: "mutation",
23522
+ auth: "admin"
23523
+ });
23524
+ /**
23460
23525
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23461
23526
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23462
23527
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24813,24 +24878,69 @@ var RetrainFrameListSchema = object({
24813
24878
  /** What the page pre-selects — the native key frame when one survives. */
24814
24879
  autoPickMediaId: number().int().optional()
24815
24880
  });
24881
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24882
+ var RetrainFrameWorkStateSchema = _enum([
24883
+ "unannotated",
24884
+ "annotated",
24885
+ "complete"
24886
+ ]);
24887
+ /**
24888
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24889
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24890
+ */
24891
+ var RetrainCorpusFilterSchema = object({
24892
+ workState: RetrainFrameWorkStateSchema.optional(),
24893
+ deviceIds: array(number()).max(500).optional(),
24894
+ /** When set, only frames in this named collection. */
24895
+ collectionId: string().optional(),
24896
+ /** Frames that carry at least one saved annotation in one of these classes. */
24897
+ classes: array(RetrainMacroClassSchema).optional(),
24898
+ page: number().int().positive().default(1),
24899
+ pageSize: number().int().positive().max(100).default(50)
24900
+ });
24901
+ var RetrainCorpusPageSchema = object({
24902
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24903
+ total: number().int().nonnegative(),
24904
+ page: number().int().positive(),
24905
+ pageSize: number().int().positive()
24906
+ });
24907
+ var RetrainCorpusKpiCameraRowSchema = object({
24908
+ deviceId: number(),
24909
+ unannotated: number().int().nonnegative(),
24910
+ annotated: number().int().nonnegative(),
24911
+ complete: number().int().nonnegative(),
24912
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24913
+ * `null` when the corpus is empty (no ratio). */
24914
+ pctOfCorpus: number().min(0).max(1).nullable()
24915
+ });
24916
+ var RetrainCorpusKpiSchema = object({
24917
+ total: number().int().nonnegative(),
24918
+ unannotated: number().int().nonnegative(),
24919
+ annotated: number().int().nonnegative(),
24920
+ complete: number().int().nonnegative(),
24921
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24922
+ });
24816
24923
  /**
24817
24924
  * Which frames an annotated export carries. Every field narrows; an empty
24818
- * filter is every annotated copy. A dataset VERSION is a frozen `frameIds`
24819
- * list owned by whoever trains (the training orchestrator), so `frameIds` is
24820
- * the primitive a version export uses; `batchId` re-selects what an earlier
24821
- * export carried (`exportedInBatch`).
24925
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24926
+ * download uses; `batchId` re-selects what an earlier export carried
24927
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24928
+ * resolves to `frameIds` at plan/start.
24822
24929
  */
24823
24930
  var RetrainExportFilterSchema = object({
24824
24931
  deviceIds: array(number()).optional(),
24825
24932
  frameIds: array(string()).max(2e4).optional(),
24826
24933
  /** Only frames in at least one of these named collections. */
24827
24934
  collectionIds: array(string()).max(200).optional(),
24828
- /** Exactly the frames of this dataset version (and its completeOnly). An
24829
- * unknown id selects nothing. */
24830
- datasetVersionId: string().optional(),
24935
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24936
+ collectionId: string().optional(),
24831
24937
  batchId: string().optional(),
24832
24938
  /** Only frames the operator marked complete (all subjects boxed). */
24833
- completeOnly: boolean().optional()
24939
+ completeOnly: boolean().optional(),
24940
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24941
+ workState: RetrainFrameWorkStateSchema.optional(),
24942
+ /** Frames with at least one saved annotation in one of these classes. */
24943
+ classes: array(RetrainMacroClassSchema).optional()
24834
24944
  });
24835
24945
  /**
24836
24946
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -25030,8 +25140,7 @@ var RetrainDatasetStatsSchema = object({
25030
25140
  completeFrames: number().int()
25031
25141
  })).readonly()
25032
25142
  });
25033
- /** An immutable dataset version, without its frame list. */
25034
- var RetrainDatasetVersionSchema = object({
25143
+ object({
25035
25144
  id: string(),
25036
25145
  name: string(),
25037
25146
  createdAt: number(),
@@ -25039,22 +25148,33 @@ var RetrainDatasetVersionSchema = object({
25039
25148
  layout: RetrainExportLayoutSchema,
25040
25149
  completeOnly: boolean(),
25041
25150
  frameCount: number().int(),
25042
- /** sha256 of what the frames taught when the version was frozen. */
25043
25151
  annotationHash: string(),
25044
- /** The export manifest schema the version was cut under. */
25045
25152
  manifestSchema: string(),
25046
25153
  stats: RetrainDatasetStatsSchema
25047
25154
  });
25048
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
25049
- kind: literal("created"),
25050
- version: RetrainDatasetVersionSchema
25155
+ /**
25156
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25157
+ * the training cap. Resolved here so plan/start and the annotated export share
25158
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25159
+ */
25160
+ var RetrainTrainingCorpusSelectionSchema = object({
25161
+ collectionIds: array(string()).min(1),
25162
+ workState: _enum([
25163
+ "complete",
25164
+ "annotated_or_complete",
25165
+ "any_annotated"
25166
+ ]).default("complete")
25167
+ });
25168
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25169
+ kind: literal("resolved"),
25170
+ frameIds: array(string()).max(2e4).readonly(),
25171
+ stats: RetrainDatasetStatsSchema,
25172
+ annotationHash: string(),
25173
+ layout: RetrainExportLayoutSchema
25051
25174
  }), object({
25052
25175
  kind: literal("refused"),
25053
- reason: _enum([
25054
- "empty-name",
25055
- "duplicate-name",
25056
- "no-frames"
25057
- ])
25176
+ reason: _enum(["unknown-collection", "no-frames"]),
25177
+ detail: string()
25058
25178
  })]);
25059
25179
  /** The outcome of a lifecycle move owned by the retrain page. */
25060
25180
  var RetrainTransitionResultSchema = object({
@@ -25761,6 +25881,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25761
25881
  }), array(RetrainTrackSchema).readonly(), {
25762
25882
  kind: "query",
25763
25883
  auth: "admin"
25884
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25885
+ kind: "query",
25886
+ auth: "admin"
25887
+ }), method(object({}), RetrainCorpusKpiSchema, {
25888
+ kind: "query",
25889
+ auth: "admin"
25764
25890
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25765
25891
  kind: "query",
25766
25892
  auth: "admin"
@@ -25856,36 +25982,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25856
25982
  kind: "mutation",
25857
25983
  auth: "admin",
25858
25984
  timeoutMs: 12e4
25859
- }), method(object({
25860
- selection: RetrainDatasetSelectionSchema,
25861
- completeOnly: boolean().optional()
25862
- }), RetrainDatasetStatsSchema, {
25863
- kind: "query",
25864
- auth: "admin"
25865
- }), method(object({
25866
- name: string().max(120),
25867
- selection: RetrainDatasetSelectionSchema,
25868
- layout: RetrainExportLayoutSchema,
25869
- completeOnly: boolean()
25870
- }), CreateRetrainDatasetVersionResultSchema, {
25871
- kind: "mutation",
25872
- auth: "admin",
25873
- timeoutMs: 12e4
25874
- }), method(object({}), array(RetrainDatasetVersionSchema).readonly(), {
25875
- kind: "query",
25876
- auth: "admin"
25877
- }), method(object({ id: string() }), object({ deleted: boolean() }), {
25878
- kind: "mutation",
25879
- auth: "admin"
25880
- }), method(object({ id: string() }), object({
25881
- found: boolean(),
25882
- annotationHash: string(),
25883
- matches: boolean(),
25884
- missingFrames: number().int()
25885
- }), {
25886
- kind: "query",
25887
- auth: "admin",
25888
- timeoutMs: 12e4
25889
25985
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25890
25986
  kind: "query",
25891
25987
  auth: "admin"
@@ -25912,6 +26008,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25912
26008
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25913
26009
  kind: "query",
25914
26010
  auth: "admin"
26011
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
26012
+ kind: "query",
26013
+ auth: "admin",
26014
+ timeoutMs: 6e4
25915
26015
  }), method(object({
25916
26016
  id: string(),
25917
26017
  name: string().max(120)
@@ -26528,11 +26628,14 @@ var HardwareClassIdSchema = _enum([
26528
26628
  "intel-n-series",
26529
26629
  "apple-m-base",
26530
26630
  "apple-m-pro",
26631
+ "amd-phoenix",
26531
26632
  "unknown"
26532
26633
  ]);
26533
26634
  var AcceleratorKindSchema = _enum([
26534
26635
  "intel-npu",
26535
26636
  "intel-igpu",
26637
+ "amd-igpu",
26638
+ "amd-npu",
26536
26639
  "x86-cpu",
26537
26640
  "arm-cpu",
26538
26641
  "apple-ane",
@@ -28462,6 +28565,8 @@ var AgentPipelineSettingsSchema = object({
28462
28565
  * address is wrong (multi-homed host, NAT, custom interface).
28463
28566
  */
28464
28567
  reachableHost: string().optional(),
28568
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28569
+ color: NodeColorIdSchema.optional(),
28465
28570
  /**
28466
28571
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28467
28572
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -29011,8 +29116,9 @@ method(object({
29011
29116
  auth: "admin"
29012
29117
  }), method(object({
29013
29118
  agentNodeId: string(),
29014
- reachableHost: string().nullable()
29015
- }), object({ success: literal(true) }), {
29119
+ reachableHost: string().nullable().optional(),
29120
+ color: NodeColorIdSchema.nullable().optional()
29121
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
29016
29122
  kind: "mutation",
29017
29123
  auth: "admin"
29018
29124
  }), method(object({
@@ -32160,7 +32266,7 @@ var CustomActionInputSchema = object({
32160
32266
  action: string().min(1),
32161
32267
  input: unknown()
32162
32268
  });
32163
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32269
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32164
32270
  addonId: string(),
32165
32271
  limit: number().min(1).max(500).default(100),
32166
32272
  level: LogLevelSchema$2.optional()
@@ -32888,6 +32994,7 @@ var calendarSourceCapability = {
32888
32994
  scope: "system",
32889
32995
  mode: "collection",
32890
32996
  internal: true,
32997
+ providerKind: "calendar",
32891
32998
  methods: {
32892
32999
  listCalendars: method(_void(), array(CalendarInfoSchema).readonly(), { auth: "admin" }),
32893
33000
  listEvents: method(CalendarListEventsInputSchema, array(CalendarEventSchema).readonly(), { auth: "admin" })
@@ -37667,6 +37774,7 @@ var OsdNamedTemplateSchema = object({
37667
37774
  });
37668
37775
  /** Where a slot's value comes from. */
37669
37776
  var OsdSourceSchema = discriminatedUnion("kind", [
37777
+ object({ kind: literal("none") }),
37670
37778
  object({
37671
37779
  kind: literal("static"),
37672
37780
  text: string().max(64)
@@ -37793,6 +37901,13 @@ method(object({ deviceId: number().int() }), object({
37793
37901
  }), object({ success: literal(true) }), {
37794
37902
  kind: "mutation",
37795
37903
  auth: "admin"
37904
+ }), method(object({
37905
+ deviceId: number().int(),
37906
+ slotId: string().min(1),
37907
+ enabled: boolean()
37908
+ }), object({ success: literal(true) }), {
37909
+ kind: "mutation",
37910
+ auth: "admin"
37796
37911
  }), method(object({
37797
37912
  sourceDeviceId: number().int(),
37798
37913
  targetDeviceId: number().int()
@@ -38224,7 +38339,15 @@ var GpuInfoSchema = object({
38224
38339
  name: string(),
38225
38340
  memoryMB: number().optional()
38226
38341
  });
38227
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
38342
+ var NpuInfoSchema = object({
38343
+ type: _enum([
38344
+ "apple-ane",
38345
+ "intel-npu",
38346
+ "amd-xdna"
38347
+ ]),
38348
+ name: string().optional(),
38349
+ generation: _enum(["xdna1", "xdna2"]).optional()
38350
+ });
38228
38351
  var CoralInfoSchema = object({
38229
38352
  type: literal("coral-edgetpu"),
38230
38353
  bus: string().optional()
@@ -42967,9 +43090,11 @@ var zoneRulesCapability = {
42967
43090
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42968
43091
  * manifest entry and nothing else.
42969
43092
  *
42970
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42971
- * `notification-output` posture); `describe` concat-fans across providers.
42972
- * Every method is `admin`: these spend money.
43093
+ * Collection of provider **types** (addons). Each addon owns zero or more
43094
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
43095
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
43096
+ * `entryId`; callers also pass the owning `addonId` as the collection
43097
+ * selector (broker posture). Every method is `admin`: these spend money.
42973
43098
  *
42974
43099
  * Every cloud object a provider creates is tagged with the orchestrator's
42975
43100
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42993,8 +43118,8 @@ var TrainingRegionOptionSchema = object({
42993
43118
  priceMultiplier: number().positive()
42994
43119
  });
42995
43120
  /**
42996
- * The provider's per-account settings, as the orchestrator reads them. They
42997
- * live in the PROVIDER addon's settings (operator decision 2026-10-08: they
43121
+ * The provider's per-entry settings, as the orchestrator reads them. They
43122
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
42998
43123
  * depend on the user's account), never hard-coded in the orchestrator.
42999
43124
  */
43000
43125
  var TrainingProviderDefaultsSchema = object({
@@ -43005,9 +43130,44 @@ var TrainingProviderDefaultsSchema = object({
43005
43130
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43006
43131
  failedDatasetGraceHours: number().nonnegative()
43007
43132
  });
43133
+ /**
43134
+ * Entry form schema for a provider type — same seam as notification
43135
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
43136
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
43137
+ */
43138
+ var ConfigSchemaPassthrough = unknown();
43139
+ /** One creatable provider type, for the Add-entry dialog. */
43140
+ var TrainingProviderTypeSchema = object({
43141
+ typeId: string(),
43142
+ label: string(),
43143
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
43144
+ iconAsset: string(),
43145
+ /** Owning `training-provider` addon — collection selector for createEntry. */
43146
+ addonId: string(),
43147
+ /**
43148
+ * Fields for one entry of this type (credentials + defaults). Absent on a
43149
+ * type that only needs a name. Password fields are keychain-backed on the
43150
+ * provider addon (`secretStatePaths`), not D634 plaintext.
43151
+ */
43152
+ configSchema: ConfigSchemaPassthrough.optional()
43153
+ });
43154
+ /** One configured account / workspace under a provider type. */
43155
+ var TrainingProviderEntrySchema = object({
43156
+ entryId: string(),
43157
+ typeId: string(),
43158
+ name: string(),
43159
+ addonId: string(),
43160
+ /** Credentials are present — never the values. */
43161
+ configured: boolean()
43162
+ });
43008
43163
  var TrainingProviderDescriptorSchema = object({
43009
43164
  addonId: string(),
43010
- /** `modal`, `runpod`, `fake`, … */
43165
+ entryId: string(),
43166
+ typeId: string(),
43167
+ /** Operator-chosen entry name. */
43168
+ name: string(),
43169
+ iconAsset: string(),
43170
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
43011
43171
  kind: string(),
43012
43172
  label: string(),
43013
43173
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43019,7 +43179,30 @@ var TrainingProviderDescriptorSchema = object({
43019
43179
  dataResidencyNote: string(),
43020
43180
  /** Credentials are present — never the values. */
43021
43181
  configured: boolean(),
43022
- defaults: TrainingProviderDefaultsSchema
43182
+ defaults: TrainingProviderDefaultsSchema,
43183
+ /**
43184
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
43185
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
43186
+ * never plaintext. Same hydrate contract as settings forms (D789).
43187
+ */
43188
+ formValues: record(string(), unknown()).optional()
43189
+ });
43190
+ /**
43191
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
43192
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
43193
+ * `{ $secretClear: true }` clears it.
43194
+ */
43195
+ var TrainingProviderUpdateEntryInputSchema = object({
43196
+ entryId: string().min(1),
43197
+ name: string().min(1),
43198
+ tokenId: string().optional(),
43199
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
43200
+ environment: string().optional(),
43201
+ gpuType: string().optional(),
43202
+ region: string().optional(),
43203
+ costCapUsd: number().nonnegative().optional(),
43204
+ maxRuntimeSec: number().int().positive().optional(),
43205
+ failedDatasetGraceHours: number().nonnegative().optional()
43023
43206
  });
43024
43207
  var TrainingCredentialCheckSchema = object({
43025
43208
  ok: boolean(),
@@ -43071,20 +43254,33 @@ var TrainerSourceRefSchema = object({
43071
43254
  /** A commit sha (never a branch) — the job must be reproducible. */
43072
43255
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43073
43256
  });
43257
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43074
43258
  var JobRef = {
43075
- addonId: string(),
43259
+ entryId: string().min(1),
43076
43260
  jobKey: string().uuid()
43077
43261
  };
43078
43262
  var TrainingLogLineSchema = object({
43079
43263
  ts: number(),
43080
43264
  text: string()
43081
43265
  });
43082
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
43266
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
43267
+ typeId: string().min(1),
43268
+ name: string().min(1)
43269
+ }), object({ entryId: string() }), {
43270
+ kind: "mutation",
43271
+ auth: "admin"
43272
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
43273
+ kind: "mutation",
43274
+ auth: "admin"
43275
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
43276
+ kind: "mutation",
43277
+ auth: "admin"
43278
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
43083
43279
  kind: "mutation",
43084
43280
  auth: "admin",
43085
43281
  timeoutMs: 3e4
43086
43282
  }), method(object({
43087
- addonId: string(),
43283
+ entryId: string().min(1),
43088
43284
  gpuType: string(),
43089
43285
  region: string(),
43090
43286
  datasetBytes: number().int().nonnegative(),
@@ -43150,7 +43346,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43150
43346
  kind: "mutation",
43151
43347
  auth: "admin",
43152
43348
  timeoutMs: 5 * 6e4
43153
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
43349
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
43154
43350
  auth: "admin",
43155
43351
  timeoutMs: 2 * 6e4
43156
43352
  });
@@ -43160,20 +43356,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43160
43356
  *
43161
43357
  * It owns what every provider must agree on, written once:
43162
43358
  *
43163
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
43164
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
43165
- * the export plan) and reaches this store through the five row methods
43166
- * below, so the Retrain page and the export did not change.
43167
43359
  * - **Jobs.** A persisted state machine, a reconcile loop against the
43168
43360
  * provider, a cost guard, a daily orphan sweep and the retention rules.
43169
43361
  * - **The return flow.** Verified artefacts → Model Studio
43170
43362
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
43171
43363
  * rollback. Nothing is ever registered automatically.
43172
43364
  *
43365
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
43366
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
43367
+ * moment and snapshotted on the job. No frozen dataset version.
43368
+ *
43173
43369
  * Every method is `admin`.
43174
43370
  */
43175
- /** A version WITH its frame list — what the export and a job read. */
43176
- var TrainingDatasetVersionRowSchema = RetrainDatasetVersionSchema.omit({ frameCount: true }).extend({ frameIds: array(string()).max(2e4).readonly() });
43371
+ /**
43372
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
43373
+ * Frame ids are resolved at plan/start — never a frozen version id.
43374
+ */
43375
+ var TrainingCorpusSelectionSchema = object({
43376
+ collectionIds: array(string()).min(1),
43377
+ /** Default complete-only for v1 */
43378
+ workState: _enum([
43379
+ "complete",
43380
+ "annotated_or_complete",
43381
+ "any_annotated"
43382
+ ]).default("complete")
43383
+ });
43177
43384
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
43178
43385
  var TrainingBaseModelSchema = object({
43179
43386
  modelId: string(),
@@ -43191,9 +43398,13 @@ var TrainingPresetSchema = _enum([
43191
43398
  "thorough"
43192
43399
  ]);
43193
43400
  var TrainingJobRequestSchema = object({
43194
- datasetVersionId: string().min(1),
43195
- /** The `training-provider` addon that runs it. */
43196
- addonId: string().min(1),
43401
+ /** Live collection + work-state criteria; resolved at plan/start. */
43402
+ selection: TrainingCorpusSelectionSchema,
43403
+ /**
43404
+ * The provider **entry** that runs it (credentials + defaults).
43405
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
43406
+ */
43407
+ entryId: string().min(1),
43197
43408
  gpuType: string().min(1),
43198
43409
  region: string(),
43199
43410
  baseModelId: string().min(1),
@@ -43252,6 +43463,7 @@ var TrainingJobPlanSchema = object({
43252
43463
  * result lives after the operator acted on it.
43253
43464
  */
43254
43465
  var TrainingJobStateSchema = _enum([
43466
+ "queued",
43255
43467
  "uploading",
43256
43468
  "submitted",
43257
43469
  "starting",
@@ -43305,6 +43517,11 @@ var TrainingJobSchema = object({
43305
43517
  createdAt: number(),
43306
43518
  updatedAt: number(),
43307
43519
  state: TrainingJobStateSchema,
43520
+ /**
43521
+ * Shared by every job enqueued together via `startJobBatch`.
43522
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43523
+ */
43524
+ batchId: string().nullable().default(null),
43308
43525
  stage: TrainingStageSchema.nullable(),
43309
43526
  failure: object({
43310
43527
  reason: TrainingFailureReasonSchema,
@@ -43316,6 +43533,12 @@ var TrainingJobSchema = object({
43316
43533
  maxRuntimeSec: number().int().positive(),
43317
43534
  trainer: TrainerSourceRefSchema,
43318
43535
  datasetLayout: RetrainExportLayoutSchema,
43536
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43537
+ frameCount: number().int().nonnegative(),
43538
+ /** Resolved frame ids at start — the archive ships exactly these. */
43539
+ frameIds: array(string()).max(2e4).readonly(),
43540
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43541
+ annotationHash: string(),
43319
43542
  dataset: object({
43320
43543
  bytes: number().int(),
43321
43544
  sha256: string(),
@@ -43357,13 +43580,7 @@ var TrainingJobSchema = object({
43357
43580
  canary: TrainingCanarySchema.nullable()
43358
43581
  });
43359
43582
  var IdInput = object({ id: string().min(1) });
43360
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43361
- kind: "mutation",
43362
- auth: "admin"
43363
- }), 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() }), {
43364
- kind: "mutation",
43365
- auth: "admin"
43366
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43583
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43367
43584
  auth: "admin",
43368
43585
  timeoutMs: 6e4
43369
43586
  }), method(TrainingJobRequestSchema.extend({
@@ -43382,6 +43599,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43382
43599
  kind: "mutation",
43383
43600
  auth: "admin",
43384
43601
  timeoutMs: 12e4
43602
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43603
+ baseModelIds: array(string().min(1)).min(1),
43604
+ name: string().min(1).max(120),
43605
+ maxCostUsd: number().positive(),
43606
+ maxRuntimeSec: number().int().positive(),
43607
+ idempotencyKey: string().min(8).max(80)
43608
+ }), discriminatedUnion("kind", [object({
43609
+ kind: literal("started"),
43610
+ batchId: string(),
43611
+ jobs: array(TrainingJobSchema).min(1).readonly()
43612
+ }), object({
43613
+ kind: literal("refused"),
43614
+ reason: TrainingRefusalReasonSchema,
43615
+ detail: string()
43616
+ })]), {
43617
+ kind: "mutation",
43618
+ auth: "admin",
43619
+ timeoutMs: 12e4
43385
43620
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
43386
43621
  kind: "mutation",
43387
43622
  auth: "admin",
@@ -48940,6 +49175,36 @@ Object.freeze({
48940
49175
  addonId: null,
48941
49176
  access: "view"
48942
49177
  },
49178
+ "oidcConnections.connectionFormSchema": {
49179
+ capName: "oidc-connections",
49180
+ capScope: "system",
49181
+ addonId: null,
49182
+ access: "view"
49183
+ },
49184
+ "oidcConnections.createConnection": {
49185
+ capName: "oidc-connections",
49186
+ capScope: "system",
49187
+ addonId: null,
49188
+ access: "create"
49189
+ },
49190
+ "oidcConnections.deleteConnection": {
49191
+ capName: "oidc-connections",
49192
+ capScope: "system",
49193
+ addonId: null,
49194
+ access: "delete"
49195
+ },
49196
+ "oidcConnections.listConnections": {
49197
+ capName: "oidc-connections",
49198
+ capScope: "system",
49199
+ addonId: null,
49200
+ access: "view"
49201
+ },
49202
+ "oidcConnections.updateConnection": {
49203
+ capName: "oidc-connections",
49204
+ capScope: "system",
49205
+ addonId: null,
49206
+ access: "create"
49207
+ },
48943
49208
  "osd.getStatus": {
48944
49209
  capName: "osd",
48945
49210
  capScope: "device",
@@ -49012,6 +49277,12 @@ Object.freeze({
49012
49277
  addonId: null,
49013
49278
  access: "create"
49014
49279
  },
49280
+ "osdManager.setSlotCameraEnabled": {
49281
+ capName: "osd-manager",
49282
+ capScope: "system",
49283
+ addonId: null,
49284
+ access: "create"
49285
+ },
49015
49286
  "osdManager.upsertTemplate": {
49016
49287
  capName: "osd-manager",
49017
49288
  capScope: "system",
@@ -49150,12 +49421,6 @@ Object.freeze({
49150
49421
  addonId: null,
49151
49422
  access: "create"
49152
49423
  },
49153
- "pipelineAnalytics.createRetrainDatasetVersion": {
49154
- capName: "pipeline-analytics",
49155
- capScope: "device",
49156
- addonId: null,
49157
- access: "create"
49158
- },
49159
49424
  "pipelineAnalytics.deleteDeviceEvents": {
49160
49425
  capName: "pipeline-analytics",
49161
49426
  capScope: "device",
@@ -49168,12 +49433,6 @@ Object.freeze({
49168
49433
  addonId: null,
49169
49434
  access: "delete"
49170
49435
  },
49171
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
49172
- capName: "pipeline-analytics",
49173
- capScope: "device",
49174
- addonId: null,
49175
- access: "delete"
49176
- },
49177
49436
  "pipelineAnalytics.deleteTracks": {
49178
49437
  capName: "pipeline-analytics",
49179
49438
  capScope: "device",
@@ -49276,6 +49535,12 @@ Object.freeze({
49276
49535
  addonId: null,
49277
49536
  access: "view"
49278
49537
  },
49538
+ "pipelineAnalytics.getRetrainCorpusKpi": {
49539
+ capName: "pipeline-analytics",
49540
+ capScope: "device",
49541
+ addonId: null,
49542
+ access: "view"
49543
+ },
49279
49544
  "pipelineAnalytics.getRetrainExportUrl": {
49280
49545
  capName: "pipeline-analytics",
49281
49546
  capScope: "device",
@@ -49396,7 +49661,7 @@ Object.freeze({
49396
49661
  addonId: null,
49397
49662
  access: "view"
49398
49663
  },
49399
- "pipelineAnalytics.listRetrainDatasetVersions": {
49664
+ "pipelineAnalytics.listRetrainCorpusPage": {
49400
49665
  capName: "pipeline-analytics",
49401
49666
  capScope: "device",
49402
49667
  addonId: null,
@@ -49450,12 +49715,6 @@ Object.freeze({
49450
49715
  addonId: null,
49451
49716
  access: "create"
49452
49717
  },
49453
- "pipelineAnalytics.previewRetrainDataset": {
49454
- capName: "pipeline-analytics",
49455
- capScope: "device",
49456
- addonId: null,
49457
- access: "view"
49458
- },
49459
49718
  "pipelineAnalytics.proposeRetrainAnnotations": {
49460
49719
  capName: "pipeline-analytics",
49461
49720
  capScope: "device",
@@ -49534,6 +49793,12 @@ Object.freeze({
49534
49793
  addonId: null,
49535
49794
  access: "create"
49536
49795
  },
49796
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
49797
+ capName: "pipeline-analytics",
49798
+ capScope: "device",
49799
+ addonId: null,
49800
+ access: "view"
49801
+ },
49537
49802
  "pipelineAnalytics.restageRetrainTrack": {
49538
49803
  capName: "pipeline-analytics",
49539
49804
  capScope: "device",
@@ -49594,12 +49859,6 @@ Object.freeze({
49594
49859
  addonId: null,
49595
49860
  access: "create"
49596
49861
  },
49597
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
49598
- capName: "pipeline-analytics",
49599
- capScope: "device",
49600
- addonId: null,
49601
- access: "view"
49602
- },
49603
49862
  "pipelineAnalytics.wipeAllAnalytics": {
49604
49863
  capName: "pipeline-analytics",
49605
49864
  capScope: "device",
@@ -51994,18 +52253,6 @@ Object.freeze({
51994
52253
  addonId: null,
51995
52254
  access: "create"
51996
52255
  },
51997
- "training.findDatasetVersionIdByName": {
51998
- capName: "training",
51999
- capScope: "system",
52000
- addonId: null,
52001
- access: "view"
52002
- },
52003
- "training.getDatasetVersion": {
52004
- capName: "training",
52005
- capScope: "system",
52006
- addonId: null,
52007
- access: "view"
52008
- },
52009
52256
  "training.getJob": {
52010
52257
  capName: "training",
52011
52258
  capScope: "system",
@@ -52024,12 +52271,6 @@ Object.freeze({
52024
52271
  addonId: null,
52025
52272
  access: "view"
52026
52273
  },
52027
- "training.listDatasetVersions": {
52028
- capName: "training",
52029
- capScope: "system",
52030
- addonId: null,
52031
- access: "view"
52032
- },
52033
52274
  "training.listJobs": {
52034
52275
  capName: "training",
52035
52276
  capScope: "system",
@@ -52042,54 +52283,66 @@ Object.freeze({
52042
52283
  addonId: null,
52043
52284
  access: "view"
52044
52285
  },
52045
- "training.putDatasetVersion": {
52286
+ "training.registerResult": {
52046
52287
  capName: "training",
52047
52288
  capScope: "system",
52048
52289
  addonId: null,
52049
52290
  access: "create"
52050
52291
  },
52051
- "training.registerResult": {
52292
+ "training.rollbackCanary": {
52052
52293
  capName: "training",
52053
52294
  capScope: "system",
52054
52295
  addonId: null,
52055
52296
  access: "create"
52056
52297
  },
52057
- "training.removeDatasetVersion": {
52298
+ "training.startJob": {
52058
52299
  capName: "training",
52059
52300
  capScope: "system",
52060
52301
  addonId: null,
52061
- access: "delete"
52302
+ access: "create"
52062
52303
  },
52063
- "training.rollbackCanary": {
52304
+ "training.startJobBatch": {
52064
52305
  capName: "training",
52065
52306
  capScope: "system",
52066
52307
  addonId: null,
52067
52308
  access: "create"
52068
52309
  },
52069
- "training.startJob": {
52070
- capName: "training",
52310
+ "trainingProvider.cancelJob": {
52311
+ capName: "training-provider",
52071
52312
  capScope: "system",
52072
52313
  addonId: null,
52073
52314
  access: "create"
52074
52315
  },
52075
- "trainingProvider.cancelJob": {
52316
+ "trainingProvider.cleanupJob": {
52076
52317
  capName: "training-provider",
52077
52318
  capScope: "system",
52078
52319
  addonId: null,
52079
52320
  access: "create"
52080
52321
  },
52081
- "trainingProvider.cleanupJob": {
52322
+ "trainingProvider.createEntry": {
52082
52323
  capName: "training-provider",
52083
52324
  capScope: "system",
52084
52325
  addonId: null,
52085
52326
  access: "create"
52086
52327
  },
52328
+ "trainingProvider.deleteEntry": {
52329
+ capName: "training-provider",
52330
+ capScope: "system",
52331
+ addonId: null,
52332
+ access: "delete"
52333
+ },
52087
52334
  "trainingProvider.describe": {
52088
52335
  capName: "training-provider",
52089
52336
  capScope: "system",
52090
52337
  addonId: null,
52091
52338
  access: "view"
52092
52339
  },
52340
+ "trainingProvider.describeTypes": {
52341
+ capName: "training-provider",
52342
+ capScope: "system",
52343
+ addonId: null,
52344
+ access: "view"
52345
+ },
52093
52346
  "trainingProvider.estimateJob": {
52094
52347
  capName: "training-provider",
52095
52348
  capScope: "system",
@@ -52102,6 +52355,12 @@ Object.freeze({
52102
52355
  addonId: null,
52103
52356
  access: "view"
52104
52357
  },
52358
+ "trainingProvider.listEntries": {
52359
+ capName: "training-provider",
52360
+ capScope: "system",
52361
+ addonId: null,
52362
+ access: "view"
52363
+ },
52105
52364
  "trainingProvider.listJobEvents": {
52106
52365
  capName: "training-provider",
52107
52366
  capScope: "system",
@@ -52132,6 +52391,12 @@ Object.freeze({
52132
52391
  addonId: null,
52133
52392
  access: "create"
52134
52393
  },
52394
+ "trainingProvider.updateEntry": {
52395
+ capName: "training-provider",
52396
+ capScope: "system",
52397
+ addonId: null,
52398
+ access: "create"
52399
+ },
52135
52400
  "trainingProvider.uploadDataset": {
52136
52401
  capName: "training-provider",
52137
52402
  capScope: "system",
@@ -55338,6 +55603,11 @@ Object.freeze({
55338
55603
  form: "single",
55339
55604
  optional: false
55340
55605
  }],
55606
+ "osdManager.setSlotCameraEnabled": [{
55607
+ name: "deviceId",
55608
+ form: "single",
55609
+ optional: false
55610
+ }],
55341
55611
  "petFeeder.callPet": [{
55342
55612
  name: "deviceId",
55343
55613
  form: "single",
@@ -55558,6 +55828,11 @@ Object.freeze({
55558
55828
  form: "array",
55559
55829
  optional: false
55560
55830
  }],
55831
+ "pipelineAnalytics.listRetrainCorpusPage": [{
55832
+ name: "deviceIds",
55833
+ form: "array",
55834
+ optional: true
55835
+ }],
55561
55836
  "pipelineAnalytics.listRetrainStaging": [{
55562
55837
  name: "deviceIds",
55563
55838
  form: "array",
@@ -56667,6 +56942,7 @@ Object.freeze({
56667
56942
  });
56668
56943
  Object.freeze({
56669
56944
  "broker": "broker",
56945
+ "calendar-source": "calendar",
56670
56946
  "device-export": "device-export",
56671
56947
  "llm": "ai",
56672
56948
  "mesh-network": "mesh",