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