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