@camstack/addon-provider-homeassistant 1.2.165 → 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" })
@@ -37247,7 +37354,13 @@ var TopologyNodeSchema = object({
37247
37354
  })).readonly(),
37248
37355
  processes: array(TopologyProcessSchema).readonly(),
37249
37356
  categories: array(TopologyCategorySchema).readonly(),
37250
- rootPackage: TopologyRootPackageSchema.nullable()
37357
+ rootPackage: TopologyRootPackageSchema.nullable(),
37358
+ /**
37359
+ * How an online AGENT reaches the hub (mesh mTLS Release A): `tls` once it has
37360
+ * completed a mutual-TLS handshake, `clear` otherwise. Absent for the hub,
37361
+ * for offline rows and when the hub cannot tell.
37362
+ */
37363
+ meshTransport: _enum(["tls", "clear"]).optional()
37251
37364
  });
37252
37365
  var CapUsageEdgeSchema = object({
37253
37366
  callerAddonId: string(),
@@ -37660,6 +37773,7 @@ var OsdNamedTemplateSchema = object({
37660
37773
  });
37661
37774
  /** Where a slot's value comes from. */
37662
37775
  var OsdSourceSchema = discriminatedUnion("kind", [
37776
+ object({ kind: literal("none") }),
37663
37777
  object({
37664
37778
  kind: literal("static"),
37665
37779
  text: string().max(64)
@@ -37786,6 +37900,13 @@ method(object({ deviceId: number().int() }), object({
37786
37900
  }), object({ success: literal(true) }), {
37787
37901
  kind: "mutation",
37788
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"
37789
37910
  }), method(object({
37790
37911
  sourceDeviceId: number().int(),
37791
37912
  targetDeviceId: number().int()
@@ -38217,7 +38338,15 @@ var GpuInfoSchema = object({
38217
38338
  name: string(),
38218
38339
  memoryMB: number().optional()
38219
38340
  });
38220
- 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
+ });
38221
38350
  var CoralInfoSchema = object({
38222
38351
  type: literal("coral-edgetpu"),
38223
38352
  bus: string().optional()
@@ -42960,9 +43089,11 @@ var zoneRulesCapability = {
42960
43089
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42961
43090
  * manifest entry and nothing else.
42962
43091
  *
42963
- * Collection, routed by the `addonId` in every single-row input (the `llm` /
42964
- * `notification-output` posture); `describe` concat-fans across providers.
42965
- * 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.
42966
43097
  *
42967
43098
  * Every cloud object a provider creates is tagged with the orchestrator's
42968
43099
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42986,8 +43117,8 @@ var TrainingRegionOptionSchema = object({
42986
43117
  priceMultiplier: number().positive()
42987
43118
  });
42988
43119
  /**
42989
- * The provider's per-account settings, as the orchestrator reads them. They
42990
- * 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
42991
43122
  * depend on the user's account), never hard-coded in the orchestrator.
42992
43123
  */
42993
43124
  var TrainingProviderDefaultsSchema = object({
@@ -42998,9 +43129,44 @@ var TrainingProviderDefaultsSchema = object({
42998
43129
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
42999
43130
  failedDatasetGraceHours: number().nonnegative()
43000
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
+ });
43001
43162
  var TrainingProviderDescriptorSchema = object({
43002
43163
  addonId: string(),
43003
- /** `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. */
43004
43170
  kind: string(),
43005
43171
  label: string(),
43006
43172
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43012,7 +43178,30 @@ var TrainingProviderDescriptorSchema = object({
43012
43178
  dataResidencyNote: string(),
43013
43179
  /** Credentials are present — never the values. */
43014
43180
  configured: boolean(),
43015
- 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()
43016
43205
  });
43017
43206
  var TrainingCredentialCheckSchema = object({
43018
43207
  ok: boolean(),
@@ -43064,20 +43253,33 @@ var TrainerSourceRefSchema = object({
43064
43253
  /** A commit sha (never a branch) — the job must be reproducible. */
43065
43254
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43066
43255
  });
43256
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43067
43257
  var JobRef = {
43068
- addonId: string(),
43258
+ entryId: string().min(1),
43069
43259
  jobKey: string().uuid()
43070
43260
  };
43071
43261
  var TrainingLogLineSchema = object({
43072
43262
  ts: number(),
43073
43263
  text: string()
43074
43264
  });
43075
- 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, {
43076
43278
  kind: "mutation",
43077
43279
  auth: "admin",
43078
43280
  timeoutMs: 3e4
43079
43281
  }), method(object({
43080
- addonId: string(),
43282
+ entryId: string().min(1),
43081
43283
  gpuType: string(),
43082
43284
  region: string(),
43083
43285
  datasetBytes: number().int().nonnegative(),
@@ -43143,7 +43345,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43143
43345
  kind: "mutation",
43144
43346
  auth: "admin",
43145
43347
  timeoutMs: 5 * 6e4
43146
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
43348
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
43147
43349
  auth: "admin",
43148
43350
  timeoutMs: 2 * 6e4
43149
43351
  });
@@ -43153,20 +43355,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43153
43355
  *
43154
43356
  * It owns what every provider must agree on, written once:
43155
43357
  *
43156
- * - **Dataset versions.** Taken over from pipeline-analytics (D796): the rows
43157
- * live here (D808); pipeline-analytics still CUTS a version (it owns the corpus and
43158
- * the export plan) and reaches this store through the five row methods
43159
- * below, so the Retrain page and the export did not change.
43160
43358
  * - **Jobs.** A persisted state machine, a reconcile loop against the
43161
43359
  * provider, a cost guard, a daily orphan sweep and the retention rules.
43162
43360
  * - **The return flow.** Verified artefacts → Model Studio
43163
43361
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
43164
43362
  * rollback. Nothing is ever registered automatically.
43165
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
+ *
43166
43368
  * Every method is `admin`.
43167
43369
  */
43168
- /** A version WITH its frame list — what the export and a job read. */
43169
- 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
+ });
43170
43383
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
43171
43384
  var TrainingBaseModelSchema = object({
43172
43385
  modelId: string(),
@@ -43184,9 +43397,13 @@ var TrainingPresetSchema = _enum([
43184
43397
  "thorough"
43185
43398
  ]);
43186
43399
  var TrainingJobRequestSchema = object({
43187
- datasetVersionId: string().min(1),
43188
- /** The `training-provider` addon that runs it. */
43189
- 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),
43190
43407
  gpuType: string().min(1),
43191
43408
  region: string(),
43192
43409
  baseModelId: string().min(1),
@@ -43245,6 +43462,7 @@ var TrainingJobPlanSchema = object({
43245
43462
  * result lives after the operator acted on it.
43246
43463
  */
43247
43464
  var TrainingJobStateSchema = _enum([
43465
+ "queued",
43248
43466
  "uploading",
43249
43467
  "submitted",
43250
43468
  "starting",
@@ -43298,6 +43516,11 @@ var TrainingJobSchema = object({
43298
43516
  createdAt: number(),
43299
43517
  updatedAt: number(),
43300
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),
43301
43524
  stage: TrainingStageSchema.nullable(),
43302
43525
  failure: object({
43303
43526
  reason: TrainingFailureReasonSchema,
@@ -43309,6 +43532,12 @@ var TrainingJobSchema = object({
43309
43532
  maxRuntimeSec: number().int().positive(),
43310
43533
  trainer: TrainerSourceRefSchema,
43311
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(),
43312
43541
  dataset: object({
43313
43542
  bytes: number().int(),
43314
43543
  sha256: string(),
@@ -43350,13 +43579,7 @@ var TrainingJobSchema = object({
43350
43579
  canary: TrainingCanarySchema.nullable()
43351
43580
  });
43352
43581
  var IdInput = object({ id: string().min(1) });
43353
- method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43354
- kind: "mutation",
43355
- auth: "admin"
43356
- }), 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() }), {
43357
- kind: "mutation",
43358
- auth: "admin"
43359
- }), method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43582
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43360
43583
  auth: "admin",
43361
43584
  timeoutMs: 6e4
43362
43585
  }), method(TrainingJobRequestSchema.extend({
@@ -43375,6 +43598,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43375
43598
  kind: "mutation",
43376
43599
  auth: "admin",
43377
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
43378
43619
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
43379
43620
  kind: "mutation",
43380
43621
  auth: "admin",
@@ -48933,6 +49174,36 @@ Object.freeze({
48933
49174
  addonId: null,
48934
49175
  access: "view"
48935
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
+ },
48936
49207
  "osd.getStatus": {
48937
49208
  capName: "osd",
48938
49209
  capScope: "device",
@@ -49005,6 +49276,12 @@ Object.freeze({
49005
49276
  addonId: null,
49006
49277
  access: "create"
49007
49278
  },
49279
+ "osdManager.setSlotCameraEnabled": {
49280
+ capName: "osd-manager",
49281
+ capScope: "system",
49282
+ addonId: null,
49283
+ access: "create"
49284
+ },
49008
49285
  "osdManager.upsertTemplate": {
49009
49286
  capName: "osd-manager",
49010
49287
  capScope: "system",
@@ -49143,12 +49420,6 @@ Object.freeze({
49143
49420
  addonId: null,
49144
49421
  access: "create"
49145
49422
  },
49146
- "pipelineAnalytics.createRetrainDatasetVersion": {
49147
- capName: "pipeline-analytics",
49148
- capScope: "device",
49149
- addonId: null,
49150
- access: "create"
49151
- },
49152
49423
  "pipelineAnalytics.deleteDeviceEvents": {
49153
49424
  capName: "pipeline-analytics",
49154
49425
  capScope: "device",
@@ -49161,12 +49432,6 @@ Object.freeze({
49161
49432
  addonId: null,
49162
49433
  access: "delete"
49163
49434
  },
49164
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
49165
- capName: "pipeline-analytics",
49166
- capScope: "device",
49167
- addonId: null,
49168
- access: "delete"
49169
- },
49170
49435
  "pipelineAnalytics.deleteTracks": {
49171
49436
  capName: "pipeline-analytics",
49172
49437
  capScope: "device",
@@ -49269,6 +49534,12 @@ Object.freeze({
49269
49534
  addonId: null,
49270
49535
  access: "view"
49271
49536
  },
49537
+ "pipelineAnalytics.getRetrainCorpusKpi": {
49538
+ capName: "pipeline-analytics",
49539
+ capScope: "device",
49540
+ addonId: null,
49541
+ access: "view"
49542
+ },
49272
49543
  "pipelineAnalytics.getRetrainExportUrl": {
49273
49544
  capName: "pipeline-analytics",
49274
49545
  capScope: "device",
@@ -49389,7 +49660,7 @@ Object.freeze({
49389
49660
  addonId: null,
49390
49661
  access: "view"
49391
49662
  },
49392
- "pipelineAnalytics.listRetrainDatasetVersions": {
49663
+ "pipelineAnalytics.listRetrainCorpusPage": {
49393
49664
  capName: "pipeline-analytics",
49394
49665
  capScope: "device",
49395
49666
  addonId: null,
@@ -49443,12 +49714,6 @@ Object.freeze({
49443
49714
  addonId: null,
49444
49715
  access: "create"
49445
49716
  },
49446
- "pipelineAnalytics.previewRetrainDataset": {
49447
- capName: "pipeline-analytics",
49448
- capScope: "device",
49449
- addonId: null,
49450
- access: "view"
49451
- },
49452
49717
  "pipelineAnalytics.proposeRetrainAnnotations": {
49453
49718
  capName: "pipeline-analytics",
49454
49719
  capScope: "device",
@@ -49527,6 +49792,12 @@ Object.freeze({
49527
49792
  addonId: null,
49528
49793
  access: "create"
49529
49794
  },
49795
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
49796
+ capName: "pipeline-analytics",
49797
+ capScope: "device",
49798
+ addonId: null,
49799
+ access: "view"
49800
+ },
49530
49801
  "pipelineAnalytics.restageRetrainTrack": {
49531
49802
  capName: "pipeline-analytics",
49532
49803
  capScope: "device",
@@ -49587,12 +49858,6 @@ Object.freeze({
49587
49858
  addonId: null,
49588
49859
  access: "create"
49589
49860
  },
49590
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
49591
- capName: "pipeline-analytics",
49592
- capScope: "device",
49593
- addonId: null,
49594
- access: "view"
49595
- },
49596
49861
  "pipelineAnalytics.wipeAllAnalytics": {
49597
49862
  capName: "pipeline-analytics",
49598
49863
  capScope: "device",
@@ -51987,18 +52252,6 @@ Object.freeze({
51987
52252
  addonId: null,
51988
52253
  access: "create"
51989
52254
  },
51990
- "training.findDatasetVersionIdByName": {
51991
- capName: "training",
51992
- capScope: "system",
51993
- addonId: null,
51994
- access: "view"
51995
- },
51996
- "training.getDatasetVersion": {
51997
- capName: "training",
51998
- capScope: "system",
51999
- addonId: null,
52000
- access: "view"
52001
- },
52002
52255
  "training.getJob": {
52003
52256
  capName: "training",
52004
52257
  capScope: "system",
@@ -52017,12 +52270,6 @@ Object.freeze({
52017
52270
  addonId: null,
52018
52271
  access: "view"
52019
52272
  },
52020
- "training.listDatasetVersions": {
52021
- capName: "training",
52022
- capScope: "system",
52023
- addonId: null,
52024
- access: "view"
52025
- },
52026
52273
  "training.listJobs": {
52027
52274
  capName: "training",
52028
52275
  capScope: "system",
@@ -52035,54 +52282,66 @@ Object.freeze({
52035
52282
  addonId: null,
52036
52283
  access: "view"
52037
52284
  },
52038
- "training.putDatasetVersion": {
52285
+ "training.registerResult": {
52039
52286
  capName: "training",
52040
52287
  capScope: "system",
52041
52288
  addonId: null,
52042
52289
  access: "create"
52043
52290
  },
52044
- "training.registerResult": {
52291
+ "training.rollbackCanary": {
52045
52292
  capName: "training",
52046
52293
  capScope: "system",
52047
52294
  addonId: null,
52048
52295
  access: "create"
52049
52296
  },
52050
- "training.removeDatasetVersion": {
52297
+ "training.startJob": {
52051
52298
  capName: "training",
52052
52299
  capScope: "system",
52053
52300
  addonId: null,
52054
- access: "delete"
52301
+ access: "create"
52055
52302
  },
52056
- "training.rollbackCanary": {
52303
+ "training.startJobBatch": {
52057
52304
  capName: "training",
52058
52305
  capScope: "system",
52059
52306
  addonId: null,
52060
52307
  access: "create"
52061
52308
  },
52062
- "training.startJob": {
52063
- capName: "training",
52309
+ "trainingProvider.cancelJob": {
52310
+ capName: "training-provider",
52064
52311
  capScope: "system",
52065
52312
  addonId: null,
52066
52313
  access: "create"
52067
52314
  },
52068
- "trainingProvider.cancelJob": {
52315
+ "trainingProvider.cleanupJob": {
52069
52316
  capName: "training-provider",
52070
52317
  capScope: "system",
52071
52318
  addonId: null,
52072
52319
  access: "create"
52073
52320
  },
52074
- "trainingProvider.cleanupJob": {
52321
+ "trainingProvider.createEntry": {
52075
52322
  capName: "training-provider",
52076
52323
  capScope: "system",
52077
52324
  addonId: null,
52078
52325
  access: "create"
52079
52326
  },
52327
+ "trainingProvider.deleteEntry": {
52328
+ capName: "training-provider",
52329
+ capScope: "system",
52330
+ addonId: null,
52331
+ access: "delete"
52332
+ },
52080
52333
  "trainingProvider.describe": {
52081
52334
  capName: "training-provider",
52082
52335
  capScope: "system",
52083
52336
  addonId: null,
52084
52337
  access: "view"
52085
52338
  },
52339
+ "trainingProvider.describeTypes": {
52340
+ capName: "training-provider",
52341
+ capScope: "system",
52342
+ addonId: null,
52343
+ access: "view"
52344
+ },
52086
52345
  "trainingProvider.estimateJob": {
52087
52346
  capName: "training-provider",
52088
52347
  capScope: "system",
@@ -52095,6 +52354,12 @@ Object.freeze({
52095
52354
  addonId: null,
52096
52355
  access: "view"
52097
52356
  },
52357
+ "trainingProvider.listEntries": {
52358
+ capName: "training-provider",
52359
+ capScope: "system",
52360
+ addonId: null,
52361
+ access: "view"
52362
+ },
52098
52363
  "trainingProvider.listJobEvents": {
52099
52364
  capName: "training-provider",
52100
52365
  capScope: "system",
@@ -52125,6 +52390,12 @@ Object.freeze({
52125
52390
  addonId: null,
52126
52391
  access: "create"
52127
52392
  },
52393
+ "trainingProvider.updateEntry": {
52394
+ capName: "training-provider",
52395
+ capScope: "system",
52396
+ addonId: null,
52397
+ access: "create"
52398
+ },
52128
52399
  "trainingProvider.uploadDataset": {
52129
52400
  capName: "training-provider",
52130
52401
  capScope: "system",
@@ -55331,6 +55602,11 @@ Object.freeze({
55331
55602
  form: "single",
55332
55603
  optional: false
55333
55604
  }],
55605
+ "osdManager.setSlotCameraEnabled": [{
55606
+ name: "deviceId",
55607
+ form: "single",
55608
+ optional: false
55609
+ }],
55334
55610
  "petFeeder.callPet": [{
55335
55611
  name: "deviceId",
55336
55612
  form: "single",
@@ -55551,6 +55827,11 @@ Object.freeze({
55551
55827
  form: "array",
55552
55828
  optional: false
55553
55829
  }],
55830
+ "pipelineAnalytics.listRetrainCorpusPage": [{
55831
+ name: "deviceIds",
55832
+ form: "array",
55833
+ optional: true
55834
+ }],
55554
55835
  "pipelineAnalytics.listRetrainStaging": [{
55555
55836
  name: "deviceIds",
55556
55837
  form: "array",
@@ -56660,6 +56941,7 @@ Object.freeze({
56660
56941
  });
56661
56942
  Object.freeze({
56662
56943
  "broker": "broker",
56944
+ "calendar-source": "calendar",
56663
56945
  "device-export": "device-export",
56664
56946
  "llm": "ai",
56665
56947
  "mesh-network": "mesh",
@@ -57352,6 +57634,8 @@ var STATE_SUMMARY_VARS = [
57352
57634
  [...RULE_TEXT],
57353
57635
  [...RULE_TEXT],
57354
57636
  [...RULE_TEXT],
57637
+ [...RULE_TEXT],
57638
+ [...RULE_TEXT],
57355
57639
  ([...RULE_TEXT], [...UPDATES]),
57356
57640
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),
57357
57641
  ([...RULE_TEXT], [...PACKAGE_UPDATES]),