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