@camstack/addon-provider-homeassistant 1.2.166 → 1.2.170

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",
@@ -13814,7 +13824,14 @@ var BrokerProviderInfoSchema = object({
13814
13824
  /** Broker kinds this provider can create, with a display label. */
13815
13825
  kinds: array(object({
13816
13826
  kind: string(),
13817
- label: string()
13827
+ label: string(),
13828
+ /**
13829
+ * Relative hub path to start an interactive account link (OAuth popup).
13830
+ * May include `{{brokerId}}`; admin-ui substitutes and appends `?popup=1`.
13831
+ */
13832
+ interactiveConnectPath: string().min(1).optional(),
13833
+ /** Relative hub path to disconnect the linked account (same popup pattern). */
13834
+ interactiveDisconnectPath: string().min(1).optional()
13818
13835
  }))
13819
13836
  });
13820
13837
  var ListInputSchema = object({
@@ -18916,14 +18933,14 @@ var LlmProfileSchema = object({
18916
18933
  /** ConfigUISchema tree passed through untyped on the wire (the
18917
18934
  * notification-output `ConfigSchemaPassthrough` precedent at
18918
18935
  * notification-output.cap.ts:151); the exported TS type re-tightens it. */
18919
- var ConfigSchemaPassthrough$1 = unknown();
18936
+ var ConfigSchemaPassthrough$3 = unknown();
18920
18937
  var LlmProfileKindDescriptorSchema = object({
18921
18938
  kind: LlmProfileKindSchema,
18922
18939
  label: string(),
18923
18940
  icon: string(),
18924
18941
  /** Stamped by each provider so the concat-fanned catalog stays routable. */
18925
18942
  addonId: string(),
18926
- configSchema: ConfigSchemaPassthrough$1
18943
+ configSchema: ConfigSchemaPassthrough$3
18927
18944
  });
18928
18945
  var LlmDefaultSelectorSchema = union([object({ consumer: string() }), object({ purpose: _enum(["text", "vision"]) })]);
18929
18946
  var LlmDefaultSchema = object({
@@ -20044,7 +20061,7 @@ var TargetKindCapsSchema = object({
20044
20061
  * the union is large and not meant for runtime validation here; the exported
20045
20062
  * `TargetKind` type re-tightens `configSchema` to `ConfigUISchema`.
20046
20063
  */
20047
- var ConfigSchemaPassthrough = unknown();
20064
+ var ConfigSchemaPassthrough$2 = unknown();
20048
20065
  var TargetKindSchema = object({
20049
20066
  kind: string(),
20050
20067
  label: string(),
@@ -20081,7 +20098,7 @@ var TargetKindSchema = object({
20081
20098
  * its raster path, which is the safe default for an unknown image.
20082
20099
  */
20083
20100
  iconMediaType: string().optional(),
20084
- configSchema: ConfigSchemaPassthrough,
20101
+ configSchema: ConfigSchemaPassthrough$2,
20085
20102
  /**
20086
20103
  * The config keys that decide WHERE this kind's secrets are sent (server,
20087
20104
  * base URL, instance, chat, recipient). A save that changes any of them
@@ -23456,6 +23473,61 @@ var oauthIntegrationCapability = {
23456
23473
  getDescriptor: method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" }) }
23457
23474
  };
23458
23475
  /**
23476
+ * `oidc-connections` — CRUD for IdP rows under `auth-oidc` (D828 sibling).
23477
+ *
23478
+ * One hub-only singleton (`auth-oidc`). The Settings UI is a DataTable +
23479
+ * ItemFormDialog; there is no `editable-array` in `globalSettingsSchema`.
23480
+ * Operator-chosen `id` is the URL slug (`/addon/auth-oidc/<id>/…`) and is
23481
+ * immutable after create.
23482
+ */
23483
+ var ConfigSchemaPassthrough$1 = unknown();
23484
+ var OidcConnectionSchema = object({
23485
+ id: string().min(1),
23486
+ displayName: string(),
23487
+ icon: string(),
23488
+ issuerUrl: string(),
23489
+ clientId: string(),
23490
+ /** Client id + secret present — never the secret value. */
23491
+ configured: boolean(),
23492
+ /**
23493
+ * Values for the connection form schema. `clientSecret` is a keychain
23494
+ * {@link SecretFieldView} or `null` / `''`, never plaintext (D789).
23495
+ */
23496
+ formValues: record(string(), unknown()).optional()
23497
+ });
23498
+ /**
23499
+ * Patch one connection. Omitted or empty `clientSecret` keeps the stored
23500
+ * secret (D787). `{ $secretClear: true }` clears it. `id` is never renamed.
23501
+ */
23502
+ var OidcConnectionUpdateInputSchema = object({
23503
+ id: string().min(1),
23504
+ displayName: string().min(1),
23505
+ icon: string().optional(),
23506
+ issuerUrl: string().optional(),
23507
+ clientId: string().optional(),
23508
+ clientSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
23509
+ redirectUri: string().optional(),
23510
+ scopes: string().optional(),
23511
+ usernameClaim: _enum([
23512
+ "preferred_username",
23513
+ "email",
23514
+ "sub"
23515
+ ]).optional()
23516
+ });
23517
+ method(object({}), ConfigSchemaPassthrough$1, { auth: "admin" }), method(object({}), array(OidcConnectionSchema).readonly(), { auth: "admin" }), method(object({
23518
+ id: string().min(1).regex(/^[a-z0-9][a-z0-9-]{0,63}$/, "id must be a lowercase slug"),
23519
+ displayName: string().min(1)
23520
+ }), object({ id: string() }), {
23521
+ kind: "mutation",
23522
+ auth: "admin"
23523
+ }), method(OidcConnectionUpdateInputSchema, object({ ok: literal(true) }), {
23524
+ kind: "mutation",
23525
+ auth: "admin"
23526
+ }), method(object({ id: string().min(1) }), object({ ok: literal(true) }), {
23527
+ kind: "mutation",
23528
+ auth: "admin"
23529
+ });
23530
+ /**
23459
23531
  * What started a camera's onboard motion (D672). `camera` is the camera's own
23460
23532
  * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
23461
23533
  * wire means the camera: only the camera-sensors bridge ever says `sensor`.
@@ -24812,24 +24884,69 @@ var RetrainFrameListSchema = object({
24812
24884
  /** What the page pre-selects — the native key frame when one survives. */
24813
24885
  autoPickMediaId: number().int().optional()
24814
24886
  });
24887
+ /** Exclusive partition of a corpus copy's annotation progress (design §4.2). */
24888
+ var RetrainFrameWorkStateSchema = _enum([
24889
+ "unannotated",
24890
+ "annotated",
24891
+ "complete"
24892
+ ]);
24893
+ /**
24894
+ * Filters for paginated corpus list, KPI, and matching export (design §4.4).
24895
+ * Every narrowing field is ANDed; omitted fields impose no constraint.
24896
+ */
24897
+ var RetrainCorpusFilterSchema = object({
24898
+ workState: RetrainFrameWorkStateSchema.optional(),
24899
+ deviceIds: array(number()).max(500).optional(),
24900
+ /** When set, only frames in this named collection. */
24901
+ collectionId: string().optional(),
24902
+ /** Frames that carry at least one saved annotation in one of these classes. */
24903
+ classes: array(RetrainMacroClassSchema).optional(),
24904
+ page: number().int().positive().default(1),
24905
+ pageSize: number().int().positive().max(100).default(50)
24906
+ });
24907
+ var RetrainCorpusPageSchema = object({
24908
+ frames: array(RetrainFrameSchema.extend({ workState: RetrainFrameWorkStateSchema })).readonly(),
24909
+ total: number().int().nonnegative(),
24910
+ page: number().int().positive(),
24911
+ pageSize: number().int().positive()
24912
+ });
24913
+ var RetrainCorpusKpiCameraRowSchema = object({
24914
+ deviceId: number(),
24915
+ unannotated: number().int().nonnegative(),
24916
+ annotated: number().int().nonnegative(),
24917
+ complete: number().int().nonnegative(),
24918
+ /** This camera's `complete` count divided by corpus `total`, in `[0,1]`.
24919
+ * `null` when the corpus is empty (no ratio). */
24920
+ pctOfCorpus: number().min(0).max(1).nullable()
24921
+ });
24922
+ var RetrainCorpusKpiSchema = object({
24923
+ total: number().int().nonnegative(),
24924
+ unannotated: number().int().nonnegative(),
24925
+ annotated: number().int().nonnegative(),
24926
+ complete: number().int().nonnegative(),
24927
+ cameras: array(RetrainCorpusKpiCameraRowSchema).readonly()
24928
+ });
24815
24929
  /**
24816
24930
  * 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`).
24931
+ * filter is every annotated copy. `frameIds` is the primitive a job or
24932
+ * download uses; `batchId` re-selects what an earlier export carried
24933
+ * (`exportedInBatch`). Frozen dataset versions were removed — live selection
24934
+ * resolves to `frameIds` at plan/start.
24821
24935
  */
24822
24936
  var RetrainExportFilterSchema = object({
24823
24937
  deviceIds: array(number()).optional(),
24824
24938
  frameIds: array(string()).max(2e4).optional(),
24825
24939
  /** Only frames in at least one of these named collections. */
24826
24940
  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(),
24941
+ /** Single collection (Frames filter bar). ANDed with `collectionIds` when both set. */
24942
+ collectionId: string().optional(),
24830
24943
  batchId: string().optional(),
24831
24944
  /** Only frames the operator marked complete (all subjects boxed). */
24832
- completeOnly: boolean().optional()
24945
+ completeOnly: boolean().optional(),
24946
+ /** Exclusive work-state partition (`workStateOf`); same as the corpus list. */
24947
+ workState: RetrainFrameWorkStateSchema.optional(),
24948
+ /** Frames with at least one saved annotation in one of these classes. */
24949
+ classes: array(RetrainMacroClassSchema).optional()
24833
24950
  });
24834
24951
  /**
24835
24952
  * `frames`: the full frame copies, boxes in `annotations.json`.
@@ -25029,8 +25146,7 @@ var RetrainDatasetStatsSchema = object({
25029
25146
  completeFrames: number().int()
25030
25147
  })).readonly()
25031
25148
  });
25032
- /** An immutable dataset version, without its frame list. */
25033
- var RetrainDatasetVersionSchema = object({
25149
+ object({
25034
25150
  id: string(),
25035
25151
  name: string(),
25036
25152
  createdAt: number(),
@@ -25038,22 +25154,33 @@ var RetrainDatasetVersionSchema = object({
25038
25154
  layout: RetrainExportLayoutSchema,
25039
25155
  completeOnly: boolean(),
25040
25156
  frameCount: number().int(),
25041
- /** sha256 of what the frames taught when the version was frozen. */
25042
25157
  annotationHash: string(),
25043
- /** The export manifest schema the version was cut under. */
25044
25158
  manifestSchema: string(),
25045
25159
  stats: RetrainDatasetStatsSchema
25046
25160
  });
25047
- var CreateRetrainDatasetVersionResultSchema = discriminatedUnion("kind", [object({
25048
- kind: literal("created"),
25049
- version: RetrainDatasetVersionSchema
25161
+ /**
25162
+ * Live training corpus criteria — same shape as `TrainingCorpusSelection` on
25163
+ * the training cap. Resolved here so plan/start and the annotated export share
25164
+ * one definition of "the frames" (`buildRetrainExportPlan`).
25165
+ */
25166
+ var RetrainTrainingCorpusSelectionSchema = object({
25167
+ collectionIds: array(string()).min(1),
25168
+ workState: _enum([
25169
+ "complete",
25170
+ "annotated_or_complete",
25171
+ "any_annotated"
25172
+ ]).default("complete")
25173
+ });
25174
+ var RetrainTrainingCorpusResolveResultSchema = discriminatedUnion("kind", [object({
25175
+ kind: literal("resolved"),
25176
+ frameIds: array(string()).max(2e4).readonly(),
25177
+ stats: RetrainDatasetStatsSchema,
25178
+ annotationHash: string(),
25179
+ layout: RetrainExportLayoutSchema
25050
25180
  }), object({
25051
25181
  kind: literal("refused"),
25052
- reason: _enum([
25053
- "empty-name",
25054
- "duplicate-name",
25055
- "no-frames"
25056
- ])
25182
+ reason: _enum(["unknown-collection", "no-frames"]),
25183
+ detail: string()
25057
25184
  })]);
25058
25185
  /** The outcome of a lifecycle move owned by the retrain page. */
25059
25186
  var RetrainTransitionResultSchema = object({
@@ -25760,6 +25887,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25760
25887
  }), array(RetrainTrackSchema).readonly(), {
25761
25888
  kind: "query",
25762
25889
  auth: "admin"
25890
+ }), method(RetrainCorpusFilterSchema, RetrainCorpusPageSchema, {
25891
+ kind: "query",
25892
+ auth: "admin"
25893
+ }), method(object({}), RetrainCorpusKpiSchema, {
25894
+ kind: "query",
25895
+ auth: "admin"
25763
25896
  }), method(object({ trackId: string() }), RetrainFrameListSchema, {
25764
25897
  kind: "query",
25765
25898
  auth: "admin"
@@ -25855,36 +25988,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25855
25988
  kind: "mutation",
25856
25989
  auth: "admin",
25857
25990
  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
25991
  }), method(object({}), array(RetrainAssistProfileSchema).readonly(), {
25889
25992
  kind: "query",
25890
25993
  auth: "admin"
@@ -25911,6 +26014,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
25911
26014
  }), method(object({}), array(RetrainCollectionSchema).readonly(), {
25912
26015
  kind: "query",
25913
26016
  auth: "admin"
26017
+ }), method(RetrainTrainingCorpusSelectionSchema, RetrainTrainingCorpusResolveResultSchema, {
26018
+ kind: "query",
26019
+ auth: "admin",
26020
+ timeoutMs: 6e4
25914
26021
  }), method(object({
25915
26022
  id: string(),
25916
26023
  name: string().max(120)
@@ -26527,11 +26634,14 @@ var HardwareClassIdSchema = _enum([
26527
26634
  "intel-n-series",
26528
26635
  "apple-m-base",
26529
26636
  "apple-m-pro",
26637
+ "amd-phoenix",
26530
26638
  "unknown"
26531
26639
  ]);
26532
26640
  var AcceleratorKindSchema = _enum([
26533
26641
  "intel-npu",
26534
26642
  "intel-igpu",
26643
+ "amd-igpu",
26644
+ "amd-npu",
26535
26645
  "x86-cpu",
26536
26646
  "arm-cpu",
26537
26647
  "apple-ane",
@@ -28461,6 +28571,8 @@ var AgentPipelineSettingsSchema = object({
28461
28571
  * address is wrong (multi-homed host, NAT, custom interface).
28462
28572
  */
28463
28573
  reachableHost: string().optional(),
28574
+ /** Hub-persisted UI colour (`--color-node-*` theme tokens). */
28575
+ color: NodeColorIdSchema.optional(),
28464
28576
  /**
28465
28577
  * Multi-device inference opt-in (Phase 4). Per-node map deviceKey → {enabled,
28466
28578
  * weight, steps}. Absent / all-disabled ⇒ the node's single default
@@ -29010,8 +29122,9 @@ method(object({
29010
29122
  auth: "admin"
29011
29123
  }), method(object({
29012
29124
  agentNodeId: string(),
29013
- reachableHost: string().nullable()
29014
- }), object({ success: literal(true) }), {
29125
+ reachableHost: string().nullable().optional(),
29126
+ color: NodeColorIdSchema.nullable().optional()
29127
+ }).refine((v) => v.reachableHost !== void 0 || v.color !== void 0, { message: "reachableHost or color required" }), object({ success: literal(true) }), {
29015
29128
  kind: "mutation",
29016
29129
  auth: "admin"
29017
29130
  }), method(object({
@@ -32159,7 +32272,7 @@ var CustomActionInputSchema = object({
32159
32272
  action: string().min(1),
32160
32273
  input: unknown()
32161
32274
  });
32162
- method(_void(), array(AddonListItemSchema).readonly()), method(object({
32275
+ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSchema).readonly()), method(object({
32163
32276
  addonId: string(),
32164
32277
  limit: number().min(1).max(500).default(100),
32165
32278
  level: LogLevelSchema$2.optional()
@@ -32887,6 +33000,7 @@ var calendarSourceCapability = {
32887
33000
  scope: "system",
32888
33001
  mode: "collection",
32889
33002
  internal: true,
33003
+ providerKind: "calendar",
32890
33004
  methods: {
32891
33005
  listCalendars: method(_void(), array(CalendarInfoSchema).readonly(), { auth: "admin" }),
32892
33006
  listEvents: method(CalendarListEventsInputSchema, array(CalendarEventSchema).readonly(), { auth: "admin" })
@@ -37666,6 +37780,7 @@ var OsdNamedTemplateSchema = object({
37666
37780
  });
37667
37781
  /** Where a slot's value comes from. */
37668
37782
  var OsdSourceSchema = discriminatedUnion("kind", [
37783
+ object({ kind: literal("none") }),
37669
37784
  object({
37670
37785
  kind: literal("static"),
37671
37786
  text: string().max(64)
@@ -37792,6 +37907,13 @@ method(object({ deviceId: number().int() }), object({
37792
37907
  }), object({ success: literal(true) }), {
37793
37908
  kind: "mutation",
37794
37909
  auth: "admin"
37910
+ }), method(object({
37911
+ deviceId: number().int(),
37912
+ slotId: string().min(1),
37913
+ enabled: boolean()
37914
+ }), object({ success: literal(true) }), {
37915
+ kind: "mutation",
37916
+ auth: "admin"
37795
37917
  }), method(object({
37796
37918
  sourceDeviceId: number().int(),
37797
37919
  targetDeviceId: number().int()
@@ -38223,7 +38345,15 @@ var GpuInfoSchema = object({
38223
38345
  name: string(),
38224
38346
  memoryMB: number().optional()
38225
38347
  });
38226
- var NpuInfoSchema = object({ type: _enum(["apple-ane", "intel-npu"]) });
38348
+ var NpuInfoSchema = object({
38349
+ type: _enum([
38350
+ "apple-ane",
38351
+ "intel-npu",
38352
+ "amd-xdna"
38353
+ ]),
38354
+ name: string().optional(),
38355
+ generation: _enum(["xdna1", "xdna2"]).optional()
38356
+ });
38227
38357
  var CoralInfoSchema = object({
38228
38358
  type: literal("coral-edgetpu"),
38229
38359
  bus: string().optional()
@@ -42966,9 +43096,11 @@ var zoneRulesCapability = {
42966
43096
  * once is what makes a second provider (RunPod, a local NVIDIA node) a new
42967
43097
  * manifest entry and nothing else.
42968
43098
  *
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.
43099
+ * Collection of provider **types** (addons). Each addon owns zero or more
43100
+ * **entries** (credentials + defaults). Concat-fans: `describe`,
43101
+ * `describeTypes`, `listEntries`, `listJobs`. Single-row work is keyed by
43102
+ * `entryId`; callers also pass the owning `addonId` as the collection
43103
+ * selector (broker posture). Every method is `admin`: these spend money.
42972
43104
  *
42973
43105
  * Every cloud object a provider creates is tagged with the orchestrator's
42974
43106
  * `jobKey`, so a retried submit finds the job it already started instead of
@@ -42992,8 +43124,8 @@ var TrainingRegionOptionSchema = object({
42992
43124
  priceMultiplier: number().positive()
42993
43125
  });
42994
43126
  /**
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
43127
+ * The provider's per-entry settings, as the orchestrator reads them. They
43128
+ * live on the PROVIDER addon's entry (operator decision 2026-10-08: they
42997
43129
  * depend on the user's account), never hard-coded in the orchestrator.
42998
43130
  */
42999
43131
  var TrainingProviderDefaultsSchema = object({
@@ -43004,9 +43136,44 @@ var TrainingProviderDefaultsSchema = object({
43004
43136
  /** Hours a FAILED job's cloud dataset is kept for debugging; 0 = delete at once. */
43005
43137
  failedDatasetGraceHours: number().nonnegative()
43006
43138
  });
43139
+ /**
43140
+ * Entry form schema for a provider type — same seam as notification
43141
+ * `TargetKind.configSchema` (`z.unknown()` at the wire; callers tighten to
43142
+ * {@link ConfigUISchema}). Drives `ConfigFormBuilder` on Training → Providers.
43143
+ */
43144
+ var ConfigSchemaPassthrough = unknown();
43145
+ /** One creatable provider type, for the Add-entry dialog. */
43146
+ var TrainingProviderTypeSchema = object({
43147
+ typeId: string(),
43148
+ label: string(),
43149
+ /** Path under the addon package (e.g. `assets/training-modal/icon.svg`). */
43150
+ iconAsset: string(),
43151
+ /** Owning `training-provider` addon — collection selector for createEntry. */
43152
+ addonId: string(),
43153
+ /**
43154
+ * Fields for one entry of this type (credentials + defaults). Absent on a
43155
+ * type that only needs a name. Password fields are keychain-backed on the
43156
+ * provider addon (`secretStatePaths`), not D634 plaintext.
43157
+ */
43158
+ configSchema: ConfigSchemaPassthrough.optional()
43159
+ });
43160
+ /** One configured account / workspace under a provider type. */
43161
+ var TrainingProviderEntrySchema = object({
43162
+ entryId: string(),
43163
+ typeId: string(),
43164
+ name: string(),
43165
+ addonId: string(),
43166
+ /** Credentials are present — never the values. */
43167
+ configured: boolean()
43168
+ });
43007
43169
  var TrainingProviderDescriptorSchema = object({
43008
43170
  addonId: string(),
43009
- /** `modal`, `runpod`, `fake`, … */
43171
+ entryId: string(),
43172
+ typeId: string(),
43173
+ /** Operator-chosen entry name. */
43174
+ name: string(),
43175
+ iconAsset: string(),
43176
+ /** `modal`, `runpod`, `fake`, … — same as typeId for current providers. */
43010
43177
  kind: string(),
43011
43178
  label: string(),
43012
43179
  gpuTypes: array(TrainingGpuOptionSchema).readonly(),
@@ -43018,7 +43185,30 @@ var TrainingProviderDescriptorSchema = object({
43018
43185
  dataResidencyNote: string(),
43019
43186
  /** Credentials are present — never the values. */
43020
43187
  configured: boolean(),
43021
- defaults: TrainingProviderDefaultsSchema
43188
+ defaults: TrainingProviderDefaultsSchema,
43189
+ /**
43190
+ * Values for {@link TrainingProviderTypeSchema}'s `configSchema` — password
43191
+ * fields are keychain {@link SecretFieldView} or `null` / `''` (create),
43192
+ * never plaintext. Same hydrate contract as settings forms (D789).
43193
+ */
43194
+ formValues: record(string(), unknown()).optional()
43195
+ });
43196
+ /**
43197
+ * Patch one entry's name, credentials and defaults. Pin with owning `{ addonId }`.
43198
+ * An omitted or empty `tokenSecret` means KEEP the stored secret (D787).
43199
+ * `{ $secretClear: true }` clears it.
43200
+ */
43201
+ var TrainingProviderUpdateEntryInputSchema = object({
43202
+ entryId: string().min(1),
43203
+ name: string().min(1),
43204
+ tokenId: string().optional(),
43205
+ tokenSecret: union([string(), object({ $secretClear: literal(true) })]).optional(),
43206
+ environment: string().optional(),
43207
+ gpuType: string().optional(),
43208
+ region: string().optional(),
43209
+ costCapUsd: number().nonnegative().optional(),
43210
+ maxRuntimeSec: number().int().positive().optional(),
43211
+ failedDatasetGraceHours: number().nonnegative().optional()
43022
43212
  });
43023
43213
  var TrainingCredentialCheckSchema = object({
43024
43214
  ok: boolean(),
@@ -43070,20 +43260,33 @@ var TrainerSourceRefSchema = object({
43070
43260
  /** A commit sha (never a branch) — the job must be reproducible. */
43071
43261
  revision: string().regex(/^[0-9a-f]{7,64}$/)
43072
43262
  });
43263
+ /** Cloud job identity — route with the owning addon's `addonId` selector. */
43073
43264
  var JobRef = {
43074
- addonId: string(),
43265
+ entryId: string().min(1),
43075
43266
  jobKey: string().uuid()
43076
43267
  };
43077
43268
  var TrainingLogLineSchema = object({
43078
43269
  ts: number(),
43079
43270
  text: string()
43080
43271
  });
43081
- method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({ addonId: string() }), TrainingCredentialCheckSchema, {
43272
+ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderTypeSchema).readonly(), { auth: "admin" }), method(object({}), array(TrainingProviderEntrySchema).readonly(), { auth: "admin" }), method(object({
43273
+ typeId: string().min(1),
43274
+ name: string().min(1)
43275
+ }), object({ entryId: string() }), {
43276
+ kind: "mutation",
43277
+ auth: "admin"
43278
+ }), method(object({ entryId: string().min(1) }), object({ ok: literal(true) }), {
43279
+ kind: "mutation",
43280
+ auth: "admin"
43281
+ }), method(TrainingProviderUpdateEntryInputSchema, object({ ok: literal(true) }), {
43282
+ kind: "mutation",
43283
+ auth: "admin"
43284
+ }), method(object({ entryId: string().min(1) }), TrainingCredentialCheckSchema, {
43082
43285
  kind: "mutation",
43083
43286
  auth: "admin",
43084
43287
  timeoutMs: 3e4
43085
43288
  }), method(object({
43086
- addonId: string(),
43289
+ entryId: string().min(1),
43087
43290
  gpuType: string(),
43088
43291
  region: string(),
43089
43292
  datasetBytes: number().int().nonnegative(),
@@ -43149,7 +43352,7 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43149
43352
  kind: "mutation",
43150
43353
  auth: "admin",
43151
43354
  timeoutMs: 5 * 6e4
43152
- }), method(object({ addonId: string() }), array(ProviderJobStatusSchema).readonly(), {
43355
+ }), method(object({ entryId: string().min(1).optional() }), array(ProviderJobStatusSchema).readonly(), {
43153
43356
  auth: "admin",
43154
43357
  timeoutMs: 2 * 6e4
43155
43358
  });
@@ -43159,20 +43362,31 @@ method(object({}), array(TrainingProviderDescriptorSchema).readonly(), { auth: "
43159
43362
  *
43160
43363
  * It owns what every provider must agree on, written once:
43161
43364
  *
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
43365
  * - **Jobs.** A persisted state machine, a reconcile loop against the
43167
43366
  * provider, a cost guard, a daily orphan sweep and the retention rules.
43168
43367
  * - **The return flow.** Verified artefacts → Model Studio
43169
43368
  * (`custom-model-registry.importModelBundle`) → canary on cameras →
43170
43369
  * rollback. Nothing is ever registered automatically.
43171
43370
  *
43371
+ * Plan/start takes a live {@link TrainingCorpusSelection} (collections +
43372
+ * work-state rule); frame ids are resolved via pipeline-analytics at that
43373
+ * moment and snapshotted on the job. No frozen dataset version.
43374
+ *
43172
43375
  * Every method is `admin`.
43173
43376
  */
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() });
43377
+ /**
43378
+ * Live corpus criteria for plan/start (design §5.2). Default is complete-only.
43379
+ * Frame ids are resolved at plan/start — never a frozen version id.
43380
+ */
43381
+ var TrainingCorpusSelectionSchema = object({
43382
+ collectionIds: array(string()).min(1),
43383
+ /** Default complete-only for v1 */
43384
+ workState: _enum([
43385
+ "complete",
43386
+ "annotated_or_complete",
43387
+ "any_annotated"
43388
+ ]).default("complete")
43389
+ });
43176
43390
  /** A base model a detector job can fine-tune, and the baseline it is judged against. */
43177
43391
  var TrainingBaseModelSchema = object({
43178
43392
  modelId: string(),
@@ -43190,9 +43404,13 @@ var TrainingPresetSchema = _enum([
43190
43404
  "thorough"
43191
43405
  ]);
43192
43406
  var TrainingJobRequestSchema = object({
43193
- datasetVersionId: string().min(1),
43194
- /** The `training-provider` addon that runs it. */
43195
- addonId: string().min(1),
43407
+ /** Live collection + work-state criteria; resolved at plan/start. */
43408
+ selection: TrainingCorpusSelectionSchema,
43409
+ /**
43410
+ * The provider **entry** that runs it (credentials + defaults).
43411
+ * Resolve to an owning addon via `training-provider.describe` / `listEntries`.
43412
+ */
43413
+ entryId: string().min(1),
43196
43414
  gpuType: string().min(1),
43197
43415
  region: string(),
43198
43416
  baseModelId: string().min(1),
@@ -43251,6 +43469,7 @@ var TrainingJobPlanSchema = object({
43251
43469
  * result lives after the operator acted on it.
43252
43470
  */
43253
43471
  var TrainingJobStateSchema = _enum([
43472
+ "queued",
43254
43473
  "uploading",
43255
43474
  "submitted",
43256
43475
  "starting",
@@ -43304,6 +43523,11 @@ var TrainingJobSchema = object({
43304
43523
  createdAt: number(),
43305
43524
  updatedAt: number(),
43306
43525
  state: TrainingJobStateSchema,
43526
+ /**
43527
+ * Shared by every job enqueued together via `startJobBatch`.
43528
+ * `null` for a lone `startJob`. The engine advances queued siblings by this id.
43529
+ */
43530
+ batchId: string().nullable().default(null),
43307
43531
  stage: TrainingStageSchema.nullable(),
43308
43532
  failure: object({
43309
43533
  reason: TrainingFailureReasonSchema,
@@ -43315,6 +43539,12 @@ var TrainingJobSchema = object({
43315
43539
  maxRuntimeSec: number().int().positive(),
43316
43540
  trainer: TrainerSourceRefSchema,
43317
43541
  datasetLayout: RetrainExportLayoutSchema,
43542
+ /** Frame count snapshotted when the job started (audit; equals `frameIds.length`). */
43543
+ frameCount: number().int().nonnegative(),
43544
+ /** Resolved frame ids at start — the archive ships exactly these. */
43545
+ frameIds: array(string()).max(2e4).readonly(),
43546
+ /** Hash of what those frames taught at start (trainer `dataset.annotationHash`). */
43547
+ annotationHash: string(),
43318
43548
  dataset: object({
43319
43549
  bytes: number().int(),
43320
43550
  sha256: string(),
@@ -43356,13 +43586,7 @@ var TrainingJobSchema = object({
43356
43586
  canary: TrainingCanarySchema.nullable()
43357
43587
  });
43358
43588
  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, {
43589
+ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" }), method(TrainingJobRequestSchema, TrainingJobPlanSchema, {
43366
43590
  auth: "admin",
43367
43591
  timeoutMs: 6e4
43368
43592
  }), method(TrainingJobRequestSchema.extend({
@@ -43381,6 +43605,24 @@ method(TrainingDatasetVersionRowSchema, object({ stored: boolean() }), {
43381
43605
  kind: "mutation",
43382
43606
  auth: "admin",
43383
43607
  timeoutMs: 12e4
43608
+ }), method(TrainingJobRequestSchema.omit({ baseModelId: true }).extend({
43609
+ baseModelIds: array(string().min(1)).min(1),
43610
+ name: string().min(1).max(120),
43611
+ maxCostUsd: number().positive(),
43612
+ maxRuntimeSec: number().int().positive(),
43613
+ idempotencyKey: string().min(8).max(80)
43614
+ }), discriminatedUnion("kind", [object({
43615
+ kind: literal("started"),
43616
+ batchId: string(),
43617
+ jobs: array(TrainingJobSchema).min(1).readonly()
43618
+ }), object({
43619
+ kind: literal("refused"),
43620
+ reason: TrainingRefusalReasonSchema,
43621
+ detail: string()
43622
+ })]), {
43623
+ kind: "mutation",
43624
+ auth: "admin",
43625
+ timeoutMs: 12e4
43384
43626
  }), method(object({}), array(TrainingJobSchema).readonly(), { auth: "admin" }), method(IdInput, TrainingJobSchema.nullable(), { auth: "admin" }), method(IdInput, TrainingJobSchema, {
43385
43627
  kind: "mutation",
43386
43628
  auth: "admin",
@@ -48939,6 +49181,36 @@ Object.freeze({
48939
49181
  addonId: null,
48940
49182
  access: "view"
48941
49183
  },
49184
+ "oidcConnections.connectionFormSchema": {
49185
+ capName: "oidc-connections",
49186
+ capScope: "system",
49187
+ addonId: null,
49188
+ access: "view"
49189
+ },
49190
+ "oidcConnections.createConnection": {
49191
+ capName: "oidc-connections",
49192
+ capScope: "system",
49193
+ addonId: null,
49194
+ access: "create"
49195
+ },
49196
+ "oidcConnections.deleteConnection": {
49197
+ capName: "oidc-connections",
49198
+ capScope: "system",
49199
+ addonId: null,
49200
+ access: "delete"
49201
+ },
49202
+ "oidcConnections.listConnections": {
49203
+ capName: "oidc-connections",
49204
+ capScope: "system",
49205
+ addonId: null,
49206
+ access: "view"
49207
+ },
49208
+ "oidcConnections.updateConnection": {
49209
+ capName: "oidc-connections",
49210
+ capScope: "system",
49211
+ addonId: null,
49212
+ access: "create"
49213
+ },
48942
49214
  "osd.getStatus": {
48943
49215
  capName: "osd",
48944
49216
  capScope: "device",
@@ -49011,6 +49283,12 @@ Object.freeze({
49011
49283
  addonId: null,
49012
49284
  access: "create"
49013
49285
  },
49286
+ "osdManager.setSlotCameraEnabled": {
49287
+ capName: "osd-manager",
49288
+ capScope: "system",
49289
+ addonId: null,
49290
+ access: "create"
49291
+ },
49014
49292
  "osdManager.upsertTemplate": {
49015
49293
  capName: "osd-manager",
49016
49294
  capScope: "system",
@@ -49149,12 +49427,6 @@ Object.freeze({
49149
49427
  addonId: null,
49150
49428
  access: "create"
49151
49429
  },
49152
- "pipelineAnalytics.createRetrainDatasetVersion": {
49153
- capName: "pipeline-analytics",
49154
- capScope: "device",
49155
- addonId: null,
49156
- access: "create"
49157
- },
49158
49430
  "pipelineAnalytics.deleteDeviceEvents": {
49159
49431
  capName: "pipeline-analytics",
49160
49432
  capScope: "device",
@@ -49167,12 +49439,6 @@ Object.freeze({
49167
49439
  addonId: null,
49168
49440
  access: "delete"
49169
49441
  },
49170
- "pipelineAnalytics.deleteRetrainDatasetVersion": {
49171
- capName: "pipeline-analytics",
49172
- capScope: "device",
49173
- addonId: null,
49174
- access: "delete"
49175
- },
49176
49442
  "pipelineAnalytics.deleteTracks": {
49177
49443
  capName: "pipeline-analytics",
49178
49444
  capScope: "device",
@@ -49275,6 +49541,12 @@ Object.freeze({
49275
49541
  addonId: null,
49276
49542
  access: "view"
49277
49543
  },
49544
+ "pipelineAnalytics.getRetrainCorpusKpi": {
49545
+ capName: "pipeline-analytics",
49546
+ capScope: "device",
49547
+ addonId: null,
49548
+ access: "view"
49549
+ },
49278
49550
  "pipelineAnalytics.getRetrainExportUrl": {
49279
49551
  capName: "pipeline-analytics",
49280
49552
  capScope: "device",
@@ -49395,7 +49667,7 @@ Object.freeze({
49395
49667
  addonId: null,
49396
49668
  access: "view"
49397
49669
  },
49398
- "pipelineAnalytics.listRetrainDatasetVersions": {
49670
+ "pipelineAnalytics.listRetrainCorpusPage": {
49399
49671
  capName: "pipeline-analytics",
49400
49672
  capScope: "device",
49401
49673
  addonId: null,
@@ -49449,12 +49721,6 @@ Object.freeze({
49449
49721
  addonId: null,
49450
49722
  access: "create"
49451
49723
  },
49452
- "pipelineAnalytics.previewRetrainDataset": {
49453
- capName: "pipeline-analytics",
49454
- capScope: "device",
49455
- addonId: null,
49456
- access: "view"
49457
- },
49458
49724
  "pipelineAnalytics.proposeRetrainAnnotations": {
49459
49725
  capName: "pipeline-analytics",
49460
49726
  capScope: "device",
@@ -49533,6 +49799,12 @@ Object.freeze({
49533
49799
  addonId: null,
49534
49800
  access: "create"
49535
49801
  },
49802
+ "pipelineAnalytics.resolveRetrainTrainingCorpus": {
49803
+ capName: "pipeline-analytics",
49804
+ capScope: "device",
49805
+ addonId: null,
49806
+ access: "view"
49807
+ },
49536
49808
  "pipelineAnalytics.restageRetrainTrack": {
49537
49809
  capName: "pipeline-analytics",
49538
49810
  capScope: "device",
@@ -49593,12 +49865,6 @@ Object.freeze({
49593
49865
  addonId: null,
49594
49866
  access: "create"
49595
49867
  },
49596
- "pipelineAnalytics.verifyRetrainDatasetVersion": {
49597
- capName: "pipeline-analytics",
49598
- capScope: "device",
49599
- addonId: null,
49600
- access: "view"
49601
- },
49602
49868
  "pipelineAnalytics.wipeAllAnalytics": {
49603
49869
  capName: "pipeline-analytics",
49604
49870
  capScope: "device",
@@ -51993,18 +52259,6 @@ Object.freeze({
51993
52259
  addonId: null,
51994
52260
  access: "create"
51995
52261
  },
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
52262
  "training.getJob": {
52009
52263
  capName: "training",
52010
52264
  capScope: "system",
@@ -52023,12 +52277,6 @@ Object.freeze({
52023
52277
  addonId: null,
52024
52278
  access: "view"
52025
52279
  },
52026
- "training.listDatasetVersions": {
52027
- capName: "training",
52028
- capScope: "system",
52029
- addonId: null,
52030
- access: "view"
52031
- },
52032
52280
  "training.listJobs": {
52033
52281
  capName: "training",
52034
52282
  capScope: "system",
@@ -52041,54 +52289,66 @@ Object.freeze({
52041
52289
  addonId: null,
52042
52290
  access: "view"
52043
52291
  },
52044
- "training.putDatasetVersion": {
52292
+ "training.registerResult": {
52045
52293
  capName: "training",
52046
52294
  capScope: "system",
52047
52295
  addonId: null,
52048
52296
  access: "create"
52049
52297
  },
52050
- "training.registerResult": {
52298
+ "training.rollbackCanary": {
52051
52299
  capName: "training",
52052
52300
  capScope: "system",
52053
52301
  addonId: null,
52054
52302
  access: "create"
52055
52303
  },
52056
- "training.removeDatasetVersion": {
52304
+ "training.startJob": {
52057
52305
  capName: "training",
52058
52306
  capScope: "system",
52059
52307
  addonId: null,
52060
- access: "delete"
52308
+ access: "create"
52061
52309
  },
52062
- "training.rollbackCanary": {
52310
+ "training.startJobBatch": {
52063
52311
  capName: "training",
52064
52312
  capScope: "system",
52065
52313
  addonId: null,
52066
52314
  access: "create"
52067
52315
  },
52068
- "training.startJob": {
52069
- capName: "training",
52316
+ "trainingProvider.cancelJob": {
52317
+ capName: "training-provider",
52070
52318
  capScope: "system",
52071
52319
  addonId: null,
52072
52320
  access: "create"
52073
52321
  },
52074
- "trainingProvider.cancelJob": {
52322
+ "trainingProvider.cleanupJob": {
52075
52323
  capName: "training-provider",
52076
52324
  capScope: "system",
52077
52325
  addonId: null,
52078
52326
  access: "create"
52079
52327
  },
52080
- "trainingProvider.cleanupJob": {
52328
+ "trainingProvider.createEntry": {
52081
52329
  capName: "training-provider",
52082
52330
  capScope: "system",
52083
52331
  addonId: null,
52084
52332
  access: "create"
52085
52333
  },
52334
+ "trainingProvider.deleteEntry": {
52335
+ capName: "training-provider",
52336
+ capScope: "system",
52337
+ addonId: null,
52338
+ access: "delete"
52339
+ },
52086
52340
  "trainingProvider.describe": {
52087
52341
  capName: "training-provider",
52088
52342
  capScope: "system",
52089
52343
  addonId: null,
52090
52344
  access: "view"
52091
52345
  },
52346
+ "trainingProvider.describeTypes": {
52347
+ capName: "training-provider",
52348
+ capScope: "system",
52349
+ addonId: null,
52350
+ access: "view"
52351
+ },
52092
52352
  "trainingProvider.estimateJob": {
52093
52353
  capName: "training-provider",
52094
52354
  capScope: "system",
@@ -52101,6 +52361,12 @@ Object.freeze({
52101
52361
  addonId: null,
52102
52362
  access: "view"
52103
52363
  },
52364
+ "trainingProvider.listEntries": {
52365
+ capName: "training-provider",
52366
+ capScope: "system",
52367
+ addonId: null,
52368
+ access: "view"
52369
+ },
52104
52370
  "trainingProvider.listJobEvents": {
52105
52371
  capName: "training-provider",
52106
52372
  capScope: "system",
@@ -52131,6 +52397,12 @@ Object.freeze({
52131
52397
  addonId: null,
52132
52398
  access: "create"
52133
52399
  },
52400
+ "trainingProvider.updateEntry": {
52401
+ capName: "training-provider",
52402
+ capScope: "system",
52403
+ addonId: null,
52404
+ access: "create"
52405
+ },
52134
52406
  "trainingProvider.uploadDataset": {
52135
52407
  capName: "training-provider",
52136
52408
  capScope: "system",
@@ -55337,6 +55609,11 @@ Object.freeze({
55337
55609
  form: "single",
55338
55610
  optional: false
55339
55611
  }],
55612
+ "osdManager.setSlotCameraEnabled": [{
55613
+ name: "deviceId",
55614
+ form: "single",
55615
+ optional: false
55616
+ }],
55340
55617
  "petFeeder.callPet": [{
55341
55618
  name: "deviceId",
55342
55619
  form: "single",
@@ -55557,6 +55834,11 @@ Object.freeze({
55557
55834
  form: "array",
55558
55835
  optional: false
55559
55836
  }],
55837
+ "pipelineAnalytics.listRetrainCorpusPage": [{
55838
+ name: "deviceIds",
55839
+ form: "array",
55840
+ optional: true
55841
+ }],
55560
55842
  "pipelineAnalytics.listRetrainStaging": [{
55561
55843
  name: "deviceIds",
55562
55844
  form: "array",
@@ -56666,6 +56948,7 @@ Object.freeze({
56666
56948
  });
56667
56949
  Object.freeze({
56668
56950
  "broker": "broker",
56951
+ "calendar-source": "calendar",
56669
56952
  "device-export": "device-export",
56670
56953
  "llm": "ai",
56671
56954
  "mesh-network": "mesh",